From 37f34f2e5cdb09dc6f0f4733454d2b83b3039343 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 6 Aug 2026 21:00:57 +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: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwcF9odWItdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwcF9vcHRpbWl6ZS12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFydGlmYWN0X3JlZ2lzdHJ5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFydGlmYWN0X3JlZ2lzdHJ5LXYxYmV0YTIvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFzc3VyZWRfd29ya2xvYWRzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFzc3VyZWRfd29ya2xvYWRzLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWF1ZGl0X21hbmFnZXItdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWF1dG9tbC12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWF1dG9tbC12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhY2t1cGRyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhcmVfbWV0YWxfc29sdXRpb24tdjIvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhdGNoLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWFwcF9jb25uZWN0aW9ucy12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWFwcF9jb25uZWN0b3JzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWFwcF9nYXRld2F5cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWNsaWVudF9nYXRld2F5cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWFuYWx5dGljc19odWItdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFfdHJhbnNmZXItdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LW1pZ3JhdGlvbi12Mi8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LXJlc2VydmF0aW9uLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= --- .../google-cloud-app_hub-v1/.gitignore | 20 + .../.repo-metadata.json | 17 + .../google-cloud-app_hub-v1/.rubocop.yml | 33 + .../google-cloud-app_hub-v1/.toys.rb | 28 + .../google-cloud-app_hub-v1/.yardopts | 12 + .../google-cloud-app_hub-v1/AUTHENTICATION.md | 122 + .../google-cloud-app_hub-v1/CHANGELOG.md | 2 + .../google-cloud-app_hub-v1/Gemfile | 15 + .../google-cloud-app_hub-v1/LICENSE.md | 201 + .../google-cloud-app_hub-v1/README.md | 154 + .../google-cloud-app_hub-v1/Rakefile | 169 + .../gapic_metadata.json | 153 + .../google-cloud-app_hub-v1.gemspec | 30 + .../lib/google-cloud-app_hub-v1.rb | 21 + .../lib/google/cloud/app_hub/v1.rb | 45 + .../lib/google/cloud/app_hub/v1/app_hub.rb | 56 + .../google/cloud/app_hub/v1/app_hub/client.rb | 3470 ++++++++++ .../cloud/app_hub/v1/app_hub/credentials.rb | 47 + .../cloud/app_hub/v1/app_hub/operations.rb | 843 +++ .../google/cloud/app_hub/v1/app_hub/paths.rb | 182 + .../google/cloud/app_hub/v1/app_hub/rest.rb | 54 + .../cloud/app_hub/v1/app_hub/rest/client.rb | 3247 ++++++++++ .../app_hub/v1/app_hub/rest/operations.rb | 927 +++ .../app_hub/v1/app_hub/rest/service_stub.rb | 1736 +++++ .../cloud/app_hub/v1/bindings_override.rb | 108 + .../lib/google/cloud/app_hub/v1/rest.rb | 38 + .../lib/google/cloud/app_hub/v1/version.rb | 28 + .../cloud/apphub/v1/apphub_service_pb.rb | 71 + .../apphub/v1/apphub_service_services_pb.rb | 104 + .../google/cloud/apphub/v1/application_pb.rb | 30 + .../google/cloud/apphub/v1/attributes_pb.rb | 28 + .../lib/google/cloud/apphub/v1/service_pb.rb | 31 + .../v1/service_project_attachment_pb.rb | 27 + .../lib/google/cloud/apphub/v1/workload_pb.rb | 31 + .../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/apphub/v1/apphub_service.rb | 787 +++ .../google/cloud/apphub/v1/application.rb | 103 + .../google/cloud/apphub/v1/attributes.rb | 115 + .../google/cloud/apphub/v1/service.rb | 139 + .../apphub/v1/service_project_attachment.rb | 72 + .../google/cloud/apphub/v1/workload.rb | 140 + .../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 + .../google-cloud-app_hub-v1/snippets/Gemfile | 32 + .../snippets/app_hub/create_application.rb | 54 + .../snippets/app_hub/create_service.rb | 54 + .../create_service_project_attachment.rb | 54 + .../snippets/app_hub/create_workload.rb | 54 + .../snippets/app_hub/delete_application.rb | 54 + .../snippets/app_hub/delete_service.rb | 54 + .../delete_service_project_attachment.rb | 54 + .../snippets/app_hub/delete_workload.rb | 54 + .../detach_service_project_attachment.rb | 47 + .../snippets/app_hub/get_application.rb | 47 + .../app_hub/get_discovered_service.rb | 47 + .../app_hub/get_discovered_workload.rb | 47 + .../snippets/app_hub/get_service.rb | 47 + .../app_hub/get_service_project_attachment.rb | 47 + .../snippets/app_hub/get_workload.rb | 47 + .../snippets/app_hub/list_applications.rb | 51 + .../app_hub/list_discovered_services.rb | 51 + .../app_hub/list_discovered_workloads.rb | 51 + .../list_service_project_attachments.rb | 51 + .../snippets/app_hub/list_services.rb | 51 + .../snippets/app_hub/list_workloads.rb | 51 + .../app_hub/lookup_discovered_service.rb | 47 + .../app_hub/lookup_discovered_workload.rb | 47 + .../lookup_service_project_attachment.rb | 47 + .../snippets/app_hub/update_application.rb | 54 + .../snippets/app_hub/update_service.rb | 54 + .../snippets/app_hub/update_workload.rb | 54 + ...ippet_metadata_google.cloud.apphub.v1.json | 1095 ++++ .../app_hub/v1/app_hub_operations_test.rb | 400 ++ .../cloud/app_hub/v1/app_hub_paths_test.rb | 139 + .../cloud/app_hub/v1/app_hub_rest_test.rb | 1605 +++++ .../google/cloud/app_hub/v1/app_hub_test.rb | 1865 ++++++ .../google-cloud-app_hub-v1/test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-cloud-app_optimize-v1beta/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-app_optimize-v1beta/Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../google-cloud-app_optimize-v1beta/Rakefile | 169 + .../gapic_metadata.json | 43 + .../google-cloud-app_optimize-v1beta.gemspec | 29 + .../lib/google-cloud-app_optimize-v1beta.rb | 21 + .../cloud/app_optimize/v1beta/version.rb | 28 + .../lib/google/cloud/appoptimize/v1beta.rb | 45 + .../cloud/appoptimize/v1beta/app_optimize.rb | 56 + .../appoptimize/v1beta/app_optimize/client.rb | 961 +++ .../v1beta/app_optimize/credentials.rb | 47 + .../v1beta/app_optimize/operations.rb | 843 +++ .../appoptimize/v1beta/app_optimize/paths.rb | 102 + .../appoptimize/v1beta/app_optimize/rest.rb | 54 + .../v1beta/app_optimize/rest/client.rb | 891 +++ .../v1beta/app_optimize/rest/operations.rb | 927 +++ .../v1beta/app_optimize/rest/service_stub.rb | 388 ++ .../appoptimize/v1beta/app_optimize_pb.rb | 40 + .../v1beta/app_optimize_services_pb.rb | 57 + .../appoptimize/v1beta/bindings_override.rb | 75 + .../google/cloud/appoptimize/v1beta/rest.rb | 38 + .../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/appoptimize/v1beta/app_optimize.rb | 328 + .../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/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../snippets/app_optimize/create_report.rb | 54 + .../snippets/app_optimize/delete_report.rb | 47 + .../snippets/app_optimize/get_report.rb | 47 + .../snippets/app_optimize/list_reports.rb | 51 + .../snippets/app_optimize/read_report.rb | 51 + ...adata_google.cloud.appoptimize.v1beta.json | 215 + .../v1beta/app_optimize_operations_test.rb | 400 ++ .../v1beta/app_optimize_paths_test.rb | 91 + .../v1beta/app_optimize_rest_test.rb | 376 ++ .../appoptimize/v1beta/app_optimize_test.rb | 437 ++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-artifact_registry-v1/Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 268 + .../google-cloud-artifact_registry-v1.gemspec | 30 + .../lib/google-cloud-artifact_registry-v1.rb | 21 + .../lib/google/cloud/artifact_registry/v1.rb | 45 + .../artifact_registry/v1/artifact_registry.rb | 68 + .../v1/artifact_registry/client.rb | 5574 +++++++++++++++++ .../v1/artifact_registry/credentials.rb | 52 + .../v1/artifact_registry/operations.rb | 843 +++ .../v1/artifact_registry/paths.rb | 333 + .../v1/artifact_registry/rest.rb | 66 + .../v1/artifact_registry/rest/client.rb | 5189 +++++++++++++++ .../v1/artifact_registry/rest/operations.rb | 927 +++ .../v1/artifact_registry/rest/service_stub.rb | 3149 ++++++++++ .../artifact_registry/v1/bindings_override.rb | 75 + .../google/cloud/artifact_registry/v1/rest.rb | 38 + .../cloud/artifact_registry/v1/version.rb | 28 + .../artifactregistry/v1/apt_artifact_pb.rb | 31 + .../artifactregistry/v1/artifact_pb.rb | 41 + .../artifactregistry/v1/attachment_pb.rb | 30 + .../devtools/artifactregistry/v1/export_pb.rb | 29 + .../devtools/artifactregistry/v1/file_pb.rb | 33 + .../artifactregistry/v1/generic_pb.rb | 25 + .../devtools/artifactregistry/v1/go_pb.rb | 25 + .../artifactregistry/v1/kfp_artifact_pb.rb | 24 + .../artifactregistry/v1/package_pb.rb | 31 + .../artifactregistry/v1/repository_pb.rb | 72 + .../devtools/artifactregistry/v1/rule_pb.rb | 34 + .../artifactregistry/v1/service_pb.rb | 41 + .../v1/service_services_pb.rb | 172 + .../artifactregistry/v1/settings_pb.rb | 28 + .../devtools/artifactregistry/v1/tag_pb.rb | 30 + .../artifactregistry/v1/version_pb.rb | 37 + .../artifactregistry/v1/vpcsc_config_pb.rb | 28 + .../artifactregistry/v1/yum_artifact_pb.rb | 31 + .../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 + .../artifactregistry/v1/apt_artifact.rb | 118 + .../devtools/artifactregistry/v1/artifact.rb | 384 ++ .../artifactregistry/v1/attachment.rb | 152 + .../devtools/artifactregistry/v1/export.rb | 91 + .../devtools/artifactregistry/v1/file.rb | 211 + .../devtools/artifactregistry/v1/generic.rb | 48 + .../google/devtools/artifactregistry/v1/go.rb | 45 + .../artifactregistry/v1/kfp_artifact.rb | 42 + .../devtools/artifactregistry/v1/package.rb | 169 + .../artifactregistry/v1/repository.rb | 848 +++ .../devtools/artifactregistry/v1/rule.rb | 149 + .../devtools/artifactregistry/v1/service.rb | 32 + .../devtools/artifactregistry/v1/settings.rb | 90 + .../devtools/artifactregistry/v1/tag.rb | 152 + .../devtools/artifactregistry/v1/version.rb | 237 + .../artifactregistry/v1/vpcsc_config.rb | 82 + .../artifactregistry/v1/yum_artifact.rb | 110 + .../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_delete_versions.rb | 54 + .../artifact_registry/create_attachment.rb | 54 + .../artifact_registry/create_repository.rb | 54 + .../snippets/artifact_registry/create_rule.rb | 47 + .../snippets/artifact_registry/create_tag.rb | 47 + .../artifact_registry/delete_attachment.rb | 54 + .../snippets/artifact_registry/delete_file.rb | 54 + .../artifact_registry/delete_package.rb | 54 + .../artifact_registry/delete_repository.rb | 54 + .../snippets/artifact_registry/delete_rule.rb | 47 + .../snippets/artifact_registry/delete_tag.rb | 47 + .../artifact_registry/delete_version.rb | 54 + .../artifact_registry/export_artifact.rb | 54 + .../artifact_registry/get_attachment.rb | 47 + .../artifact_registry/get_docker_image.rb | 47 + .../snippets/artifact_registry/get_file.rb | 47 + .../artifact_registry/get_iam_policy.rb | 47 + .../artifact_registry/get_maven_artifact.rb | 47 + .../artifact_registry/get_npm_package.rb | 47 + .../snippets/artifact_registry/get_package.rb | 47 + .../artifact_registry/get_project_settings.rb | 47 + .../artifact_registry/get_python_package.rb | 47 + .../artifact_registry/get_repository.rb | 47 + .../snippets/artifact_registry/get_rule.rb | 47 + .../snippets/artifact_registry/get_tag.rb | 47 + .../snippets/artifact_registry/get_version.rb | 47 + .../artifact_registry/get_vpcsc_config.rb | 47 + .../artifact_registry/import_apt_artifacts.rb | 54 + .../artifact_registry/import_yum_artifacts.rb | 54 + .../artifact_registry/list_attachments.rb | 51 + .../artifact_registry/list_docker_images.rb | 51 + .../snippets/artifact_registry/list_files.rb | 51 + .../artifact_registry/list_maven_artifacts.rb | 51 + .../artifact_registry/list_npm_packages.rb | 51 + .../artifact_registry/list_packages.rb | 51 + .../artifact_registry/list_python_packages.rb | 51 + .../artifact_registry/list_repositories.rb | 51 + .../snippets/artifact_registry/list_rules.rb | 51 + .../snippets/artifact_registry/list_tags.rb | 51 + .../artifact_registry/list_versions.rb | 51 + .../artifact_registry/set_iam_policy.rb | 47 + .../artifact_registry/test_iam_permissions.rb | 47 + .../snippets/artifact_registry/update_file.rb | 47 + .../artifact_registry/update_package.rb | 47 + .../update_project_settings.rb | 47 + .../artifact_registry/update_repository.rb | 47 + .../snippets/artifact_registry/update_rule.rb | 47 + .../snippets/artifact_registry/update_tag.rb | 47 + .../artifact_registry/update_version.rb | 47 + .../artifact_registry/update_vpcsc_config.rb | 47 + ...a_google.devtools.artifactregistry.v1.json | 2015 ++++++ .../v1/artifact_registry_operations_test.rb | 400 ++ .../v1/artifact_registry_paths_test.rb | 223 + .../v1/artifact_registry_rest_test.rb | 2861 +++++++++ .../v1/artifact_registry_test.rb | 3256 ++++++++++ .../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 | 143 + ...le-cloud-artifact_registry-v1beta2.gemspec | 30 + .../google-cloud-artifact_registry-v1beta2.rb | 21 + .../google/cloud/artifact_registry/v1beta2.rb | 45 + .../v1beta2/artifact_registry.rb | 68 + .../v1beta2/artifact_registry/client.rb | 3004 +++++++++ .../v1beta2/artifact_registry/credentials.rb | 52 + .../v1beta2/artifact_registry/operations.rb | 843 +++ .../v1beta2/artifact_registry/paths.rb | 106 + .../v1beta2/artifact_registry/rest.rb | 66 + .../v1beta2/artifact_registry/rest/client.rb | 2794 +++++++++ .../artifact_registry/rest/operations.rb | 927 +++ .../artifact_registry/rest/service_stub.rb | 1615 +++++ .../v1beta2/bindings_override.rb | 75 + .../cloud/artifact_registry/v1beta2/rest.rb | 38 + .../artifact_registry/v1beta2/version.rb | 28 + .../v1beta2/apt_artifact_pb.rb | 31 + .../artifactregistry/v1beta2/file_pb.rb | 29 + .../artifactregistry/v1beta2/package_pb.rb | 27 + .../artifactregistry/v1beta2/repository_pb.rb | 35 + .../artifactregistry/v1beta2/service_pb.rb | 36 + .../v1beta2/service_services_pb.rb | 116 + .../artifactregistry/v1beta2/settings_pb.rb | 28 + .../artifactregistry/v1beta2/tag_pb.rb | 30 + .../artifactregistry/v1beta2/version_pb.rb | 32 + .../v1beta2/yum_artifact_pb.rb | 31 + .../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 + .../artifactregistry/v1beta2/apt_artifact.rb | 118 + .../devtools/artifactregistry/v1beta2/file.rb | 128 + .../artifactregistry/v1beta2/package.rb | 93 + .../artifactregistry/v1beta2/repository.rb | 202 + .../artifactregistry/v1beta2/service.rb | 32 + .../artifactregistry/v1beta2/settings.rb | 80 + .../devtools/artifactregistry/v1beta2/tag.rb | 132 + .../artifactregistry/v1beta2/version.rb | 132 + .../artifactregistry/v1beta2/yum_artifact.rb | 110 + .../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 + .../artifact_registry/create_repository.rb | 54 + .../snippets/artifact_registry/create_tag.rb | 47 + .../artifact_registry/delete_package.rb | 54 + .../artifact_registry/delete_repository.rb | 54 + .../snippets/artifact_registry/delete_tag.rb | 47 + .../artifact_registry/delete_version.rb | 54 + .../snippets/artifact_registry/get_file.rb | 47 + .../artifact_registry/get_iam_policy.rb | 47 + .../snippets/artifact_registry/get_package.rb | 47 + .../artifact_registry/get_project_settings.rb | 47 + .../artifact_registry/get_repository.rb | 47 + .../snippets/artifact_registry/get_tag.rb | 47 + .../snippets/artifact_registry/get_version.rb | 47 + .../artifact_registry/import_apt_artifacts.rb | 54 + .../artifact_registry/import_yum_artifacts.rb | 54 + .../snippets/artifact_registry/list_files.rb | 51 + .../artifact_registry/list_packages.rb | 51 + .../artifact_registry/list_repositories.rb | 51 + .../snippets/artifact_registry/list_tags.rb | 51 + .../artifact_registry/list_versions.rb | 51 + .../artifact_registry/set_iam_policy.rb | 47 + .../artifact_registry/test_iam_permissions.rb | 47 + .../update_project_settings.rb | 47 + .../artifact_registry/update_repository.rb | 47 + .../snippets/artifact_registry/update_tag.rb | 47 + ...gle.devtools.artifactregistry.v1beta2.json | 1015 +++ .../artifact_registry_operations_test.rb | 400 ++ .../v1beta2/artifact_registry_paths_test.rb | 91 + .../v1beta2/artifact_registry_rest_test.rb | 1478 +++++ .../v1beta2/artifact_registry_test.rb | 1683 +++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-assured_workloads-v1/Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 63 + .../google-cloud-assured_workloads-v1.gemspec | 28 + .../lib/google-cloud-assured_workloads-v1.rb | 21 + .../lib/google/cloud/assured_workloads/v1.rb | 45 + .../v1/assured_workloads_service.rb | 56 + .../v1/assured_workloads_service/client.rb | 1305 ++++ .../assured_workloads_service/credentials.rb | 51 + .../assured_workloads_service/operations.rb | 843 +++ .../v1/assured_workloads_service/paths.rb | 90 + .../v1/assured_workloads_service/rest.rb | 53 + .../assured_workloads_service/rest/client.rb | 930 +++ .../rest/operations.rb | 927 +++ .../rest/service_stub.rb | 450 ++ .../google/cloud/assured_workloads/v1/rest.rb | 37 + .../cloud/assured_workloads/v1/version.rb | 28 + .../v1/assuredworkloads_pb.rb | 64 + .../v1/assuredworkloads_services_pb.rb | 78 + .../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 + .../assuredworkloads/v1/assuredworkloads.rb | 720 +++ .../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 + .../snippets/Gemfile | 32 + .../acknowledge_violation.rb | 47 + .../create_workload.rb | 54 + .../delete_workload.rb | 47 + .../get_violation.rb | 47 + .../assured_workloads_service/get_workload.rb | 47 + .../list_violations.rb | 51 + .../list_workloads.rb | 51 + .../restrict_allowed_resources.rb | 47 + .../update_workload.rb | 47 + ...data_google.cloud.assuredworkloads.v1.json | 375 ++ ...sured_workloads_service_operations_test.rb | 400 ++ .../assured_workloads_service_paths_test.rb | 79 + .../v1/assured_workloads_service_rest_test.rb | 431 ++ .../v1/assured_workloads_service_test.rb | 683 ++ .../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 | 53 + ...le-cloud-assured_workloads-v1beta1.gemspec | 28 + .../google-cloud-assured_workloads-v1beta1.rb | 21 + .../google/cloud/assured_workloads/v1beta1.rb | 45 + .../v1beta1/assured_workloads_service.rb | 56 + .../assured_workloads_service/client.rb | 1123 ++++ .../assured_workloads_service/credentials.rb | 51 + .../assured_workloads_service/operations.rb | 843 +++ .../assured_workloads_service/paths.rb | 69 + .../v1beta1/assured_workloads_service/rest.rb | 53 + .../assured_workloads_service/rest/client.rb | 655 ++ .../rest/operations.rb | 927 +++ .../rest/service_stub.rb | 266 + .../cloud/assured_workloads/v1beta1/rest.rb | 37 + .../assured_workloads/v1beta1/version.rb | 28 + .../v1beta1/assuredworkloads_pb.rb | 52 + .../v1beta1/assuredworkloads_service_pb.rb | 26 + .../assuredworkloads_service_services_pb.rb | 71 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1beta1/assuredworkloads.rb | 557 ++ .../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 + .../snippets/Gemfile | 32 + .../analyze_workload_move.rb | 47 + .../create_workload.rb | 54 + .../delete_workload.rb | 47 + .../assured_workloads_service/get_workload.rb | 47 + .../list_workloads.rb | 51 + .../restrict_allowed_resources.rb | 47 + .../update_workload.rb | 47 + ...google.cloud.assuredworkloads.v1beta1.json | 295 + ...sured_workloads_service_operations_test.rb | 400 ++ .../assured_workloads_service_paths_test.rb | 67 + .../assured_workloads_service_rest_test.rb | 265 + .../v1beta1/assured_workloads_service_test.rb | 553 ++ .../test/helper.rb | 35 + .../google-cloud-audit_manager-v1/.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-cloud-audit_manager-v1/.toys.rb | 28 + .../google-cloud-audit_manager-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-audit_manager-v1/Gemfile | 15 + .../google-cloud-audit_manager-v1/LICENSE.md | 201 + .../google-cloud-audit_manager-v1/README.md | 154 + .../google-cloud-audit_manager-v1/Rakefile | 169 + .../gapic_metadata.json | 58 + .../google-cloud-audit_manager-v1.gemspec | 29 + .../lib/google-cloud-audit_manager-v1.rb | 21 + .../lib/google/cloud/audit_manager/v1.rb | 45 + .../cloud/audit_manager/v1/audit_manager.rb | 56 + .../audit_manager/v1/audit_manager/client.rb | 1275 ++++ .../v1/audit_manager/credentials.rb | 47 + .../v1/audit_manager/operations.rb | 843 +++ .../audit_manager/v1/audit_manager/paths.rb | 265 + .../audit_manager/v1/audit_manager/rest.rb | 54 + .../v1/audit_manager/rest/client.rb | 1184 ++++ .../v1/audit_manager/rest/operations.rb | 956 +++ .../v1/audit_manager/rest/service_stub.rb | 660 ++ .../audit_manager/v1/bindings_override.rb | 75 + .../lib/google/cloud/audit_manager/v1/rest.rb | 38 + .../google/cloud/audit_manager/v1/version.rb | 28 + .../cloud/auditmanager/v1/auditmanager_pb.rb | 57 + .../v1/auditmanager_services_pb.rb | 66 + .../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/auditmanager/v1/auditmanager.rb | 648 ++ .../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 + .../snippets/Gemfile | 32 + .../snippets/audit_manager/enroll_resource.rb | 47 + .../audit_manager/generate_audit_report.rb | 54 + .../generate_audit_scope_report.rb | 47 + .../audit_manager/get_audit_report.rb | 47 + .../get_resource_enrollment_status.rb | 47 + .../audit_manager/list_audit_reports.rb | 51 + .../snippets/audit_manager/list_controls.rb | 51 + .../list_resource_enrollment_statuses.rb | 51 + ...metadata_google.cloud.auditmanager.v1.json | 335 + .../v1/audit_manager_operations_test.rb | 400 ++ .../v1/audit_manager_paths_test.rb | 133 + .../v1/audit_manager_rest_test.rb | 545 ++ .../audit_manager/v1/audit_manager_test.rb | 631 ++ .../test/helper.rb | 35 + .../google-cloud-automl-v1/.gitignore | 20 + .../.repo-metadata.json | 20 + .../google-cloud-automl-v1/.rubocop.yml | 33 + .../google-cloud-automl-v1/.toys.rb | 28 + .../google-cloud-automl-v1/.yardopts | 12 + .../google-cloud-automl-v1/AUTHENTICATION.md | 122 + .../google-cloud-automl-v1/CHANGELOG.md | 2 + .../google-cloud-automl-v1/Gemfile | 15 + .../google-cloud-automl-v1/LICENSE.md | 201 + .../google-cloud-automl-v1/README.md | 154 + .../google-cloud-automl-v1/Rakefile | 168 + .../gapic_metadata.json | 127 + .../google-cloud-automl-v1.gemspec | 28 + .../lib/google-cloud-automl-v1.rb | 21 + .../lib/google/cloud/automl/v1.rb | 46 + .../cloud/automl/v1/annotation_payload_pb.rb | 27 + .../cloud/automl/v1/annotation_spec_pb.rb | 23 + .../lib/google/cloud/automl/v1/automl.rb | 69 + .../google/cloud/automl/v1/automl/client.rb | 2351 +++++++ .../cloud/automl/v1/automl/credentials.rb | 51 + .../cloud/automl/v1/automl/operations.rb | 851 +++ .../google/cloud/automl/v1/automl/paths.rb | 130 + .../lib/google/cloud/automl/v1/automl/rest.rb | 66 + .../cloud/automl/v1/automl/rest/client.rb | 2182 +++++++ .../cloud/automl/v1/automl/rest/operations.rb | 1095 ++++ .../automl/v1/automl/rest/service_stub.rb | 1188 ++++ .../cloud/automl/v1/classification_pb.rb | 26 + .../google/cloud/automl/v1/data_items_pb.rb | 32 + .../lib/google/cloud/automl/v1/dataset_pb.rb | 27 + .../google/cloud/automl/v1/detection_pb.rb | 26 + .../lib/google/cloud/automl/v1/geometry_pb.rb | 22 + .../lib/google/cloud/automl/v1/image_pb.rb | 29 + .../lib/google/cloud/automl/v1/io_pb.rb | 30 + .../cloud/automl/v1/model_evaluation_pb.rb | 29 + .../lib/google/cloud/automl/v1/model_pb.rb | 28 + .../google/cloud/automl/v1/operations_pb.rb | 37 + .../cloud/automl/v1/prediction_service.rb | 59 + .../automl/v1/prediction_service/client.rb | 770 +++ .../v1/prediction_service/credentials.rb | 51 + .../v1/prediction_service/operations.rb | 851 +++ .../automl/v1/prediction_service/paths.rb | 52 + .../automl/v1/prediction_service/rest.rb | 56 + .../v1/prediction_service/rest/client.rb | 713 +++ .../v1/prediction_service/rest/operations.rb | 1095 ++++ .../prediction_service/rest/service_stub.rb | 205 + .../cloud/automl/v1/prediction_service_pb.rb | 33 + .../v1/prediction_service_services_pb.rb | 99 + .../lib/google/cloud/automl/v1/rest.rb | 38 + .../lib/google/cloud/automl/v1/service_pb.rb | 55 + .../cloud/automl/v1/service_services_pb.rb | 136 + .../cloud/automl/v1/text_extraction_pb.rb | 25 + .../lib/google/cloud/automl/v1/text_pb.rb | 28 + .../google/cloud/automl/v1/text_segment_pb.rb | 21 + .../cloud/automl/v1/text_sentiment_pb.rb | 24 + .../google/cloud/automl/v1/translation_pb.rb | 27 + .../lib/google/cloud/automl/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 + .../cloud/automl/v1/annotation_payload.rb | 70 + .../google/cloud/automl/v1/annotation_spec.rb | 45 + .../google/cloud/automl/v1/classification.rb | 189 + .../google/cloud/automl/v1/data_items.rb | 202 + .../google/cloud/automl/v1/dataset.rb | 106 + .../google/cloud/automl/v1/detection.rb | 97 + .../google/cloud/automl/v1/geometry.rb | 53 + .../google/cloud/automl/v1/image.rb | 215 + .../proto_docs/google/cloud/automl/v1/io.rb | 1345 ++++ .../google/cloud/automl/v1/model.rb | 121 + .../cloud/automl/v1/model_evaluation.rb | 100 + .../google/cloud/automl/v1/operations.rb | 197 + .../cloud/automl/v1/prediction_service.rb | 270 + .../google/cloud/automl/v1/service.rb | 326 + .../proto_docs/google/cloud/automl/v1/text.rb | 76 + .../google/cloud/automl/v1/text_extraction.rb | 73 + .../google/cloud/automl/v1/text_segment.rb | 44 + .../google/cloud/automl/v1/text_sentiment.rb | 82 + .../google/cloud/automl/v1/translation.rb | 79 + .../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 + .../google-cloud-automl-v1/snippets/Gemfile | 32 + .../snippets/automl/create_dataset.rb | 54 + .../snippets/automl/create_model.rb | 54 + .../snippets/automl/delete_dataset.rb | 54 + .../snippets/automl/delete_model.rb | 54 + .../snippets/automl/deploy_model.rb | 54 + .../snippets/automl/export_data.rb | 54 + .../snippets/automl/export_model.rb | 54 + .../snippets/automl/get_annotation_spec.rb | 47 + .../snippets/automl/get_dataset.rb | 47 + .../snippets/automl/get_model.rb | 47 + .../snippets/automl/get_model_evaluation.rb | 47 + .../snippets/automl/import_data.rb | 54 + .../snippets/automl/list_datasets.rb | 51 + .../snippets/automl/list_model_evaluations.rb | 51 + .../snippets/automl/list_models.rb | 51 + .../snippets/automl/undeploy_model.rb | 54 + .../snippets/automl/update_dataset.rb | 47 + .../snippets/automl/update_model.rb | 47 + .../prediction_service/batch_predict.rb | 54 + .../snippets/prediction_service/predict.rb | 47 + ...ippet_metadata_google.cloud.automl.v1.json | 815 +++ .../cloud/automl/v1/automl_operations_test.rb | 400 ++ .../cloud/automl/v1/automl_paths_test.rb | 103 + .../cloud/automl/v1/automl_rest_test.rb | 1088 ++++ .../google/cloud/automl/v1/automl_test.rb | 1257 ++++ .../v1/prediction_service_operations_test.rb | 400 ++ .../v1/prediction_service_paths_test.rb | 55 + .../automl/v1/prediction_service_rest_test.rb | 212 + .../automl/v1/prediction_service_test.rb | 249 + .../google-cloud-automl-v1/test/helper.rb | 35 + .../google-cloud-automl-v1beta1/.gitignore | 20 + .../.repo-metadata.json | 20 + .../google-cloud-automl-v1beta1/.rubocop.yml | 33 + .../google-cloud-automl-v1beta1/.toys.rb | 28 + .../google-cloud-automl-v1beta1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-automl-v1beta1/CHANGELOG.md | 2 + .../google-cloud-automl-v1beta1/Gemfile | 15 + .../google-cloud-automl-v1beta1/LICENSE.md | 201 + .../google-cloud-automl-v1beta1/README.md | 154 + .../google-cloud-automl-v1beta1/Rakefile | 169 + .../gapic_metadata.json | 157 + .../google-cloud-automl-v1beta1.gemspec | 28 + .../lib/google-cloud-automl-v1beta1.rb | 21 + .../lib/google/cloud/automl/v1beta1.rb | 46 + .../automl/v1beta1/annotation_payload_pb.rb | 28 + .../automl/v1beta1/annotation_spec_pb.rb | 23 + .../lib/google/cloud/automl/v1beta1/automl.rb | 69 + .../cloud/automl/v1beta1/automl/client.rb | 2985 +++++++++ .../automl/v1beta1/automl/credentials.rb | 51 + .../cloud/automl/v1beta1/automl/operations.rb | 851 +++ .../cloud/automl/v1beta1/automl/paths.rb | 174 + .../cloud/automl/v1beta1/automl/rest.rb | 66 + .../automl/v1beta1/automl/rest/client.rb | 2774 ++++++++ .../automl/v1beta1/automl/rest/operations.rb | 1095 ++++ .../v1beta1/automl/rest/service_stub.rb | 1556 +++++ .../cloud/automl/v1beta1/classification_pb.rb | 29 + .../cloud/automl/v1beta1/column_spec_pb.rb | 26 + .../cloud/automl/v1beta1/data_items_pb.rb | 35 + .../cloud/automl/v1beta1/data_stats_pb.rb | 32 + .../cloud/automl/v1beta1/data_types_pb.rb | 23 + .../google/cloud/automl/v1beta1/dataset_pb.rb | 29 + .../cloud/automl/v1beta1/detection_pb.rb | 29 + .../cloud/automl/v1beta1/geometry_pb.rb | 22 + .../google/cloud/automl/v1beta1/image_pb.rb | 29 + .../lib/google/cloud/automl/v1beta1/io_pb.rb | 32 + .../automl/v1beta1/model_evaluation_pb.rb | 31 + .../google/cloud/automl/v1beta1/model_pb.rb | 30 + .../cloud/automl/v1beta1/operations_pb.rb | 40 + .../automl/v1beta1/prediction_service.rb | 59 + .../v1beta1/prediction_service/client.rb | 727 +++ .../v1beta1/prediction_service/credentials.rb | 51 + .../v1beta1/prediction_service/operations.rb | 851 +++ .../v1beta1/prediction_service/paths.rb | 52 + .../automl/v1beta1/prediction_service/rest.rb | 56 + .../v1beta1/prediction_service/rest/client.rb | 670 ++ .../prediction_service/rest/operations.rb | 1095 ++++ .../prediction_service/rest/service_stub.rb | 205 + .../automl/v1beta1/prediction_service_pb.rb | 34 + .../v1beta1/prediction_service_services_pb.rb | 79 + .../google/cloud/automl/v1beta1/ranges_pb.rb | 21 + .../cloud/automl/v1beta1/regression_pb.rb | 21 + .../lib/google/cloud/automl/v1beta1/rest.rb | 38 + .../google/cloud/automl/v1beta1/service_pb.rb | 66 + .../automl/v1beta1/service_services_pb.rb | 163 + .../cloud/automl/v1beta1/table_spec_pb.rb | 24 + .../google/cloud/automl/v1beta1/tables_pb.rb | 34 + .../cloud/automl/v1beta1/temporal_pb.rb | 23 + .../automl/v1beta1/text_extraction_pb.rb | 25 + .../google/cloud/automl/v1beta1/text_pb.rb | 28 + .../cloud/automl/v1beta1/text_segment_pb.rb | 21 + .../cloud/automl/v1beta1/text_sentiment_pb.rb | 24 + .../cloud/automl/v1beta1/translation_pb.rb | 27 + .../google/cloud/automl/v1beta1/version.rb | 28 + .../google/cloud/automl/v1beta1/video_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 + .../automl/v1beta1/annotation_payload.rb | 86 + .../cloud/automl/v1beta1/annotation_spec.rb | 46 + .../cloud/automl/v1beta1/classification.rb | 235 + .../cloud/automl/v1beta1/column_spec.rb | 77 + .../google/cloud/automl/v1beta1/data_items.rb | 239 + .../google/cloud/automl/v1beta1/data_stats.rb | 239 + .../google/cloud/automl/v1beta1/data_types.rb | 124 + .../google/cloud/automl/v1beta1/dataset.rb | 102 + .../google/cloud/automl/v1beta1/detection.rb | 152 + .../google/cloud/automl/v1beta1/geometry.rb | 53 + .../google/cloud/automl/v1beta1/image.rb | 205 + .../google/cloud/automl/v1beta1/io.rb | 1214 ++++ .../google/cloud/automl/v1beta1/model.rb | 113 + .../cloud/automl/v1beta1/model_evaluation.rb | 117 + .../google/cloud/automl/v1beta1/operations.rb | 232 + .../automl/v1beta1/prediction_service.rb | 238 + .../google/cloud/automl/v1beta1/ranges.rb | 38 + .../google/cloud/automl/v1beta1/regression.rb | 48 + .../google/cloud/automl/v1beta1/service.rb | 452 ++ .../google/cloud/automl/v1beta1/table_spec.rb | 75 + .../google/cloud/automl/v1beta1/tables.rb | 304 + .../google/cloud/automl/v1beta1/temporal.rb | 40 + .../google/cloud/automl/v1beta1/text.rb | 84 + .../cloud/automl/v1beta1/text_extraction.rb | 73 + .../cloud/automl/v1beta1/text_segment.rb | 44 + .../cloud/automl/v1beta1/text_sentiment.rb | 87 + .../cloud/automl/v1beta1/translation.rb | 79 + .../google/cloud/automl/v1beta1/video.rb | 51 + .../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 + .../snippets/Gemfile | 32 + .../snippets/automl/create_dataset.rb | 47 + .../snippets/automl/create_model.rb | 54 + .../snippets/automl/delete_dataset.rb | 54 + .../snippets/automl/delete_model.rb | 54 + .../snippets/automl/deploy_model.rb | 54 + .../snippets/automl/export_data.rb | 54 + .../automl/export_evaluated_examples.rb | 54 + .../snippets/automl/export_model.rb | 54 + .../snippets/automl/get_annotation_spec.rb | 47 + .../snippets/automl/get_column_spec.rb | 47 + .../snippets/automl/get_dataset.rb | 47 + .../snippets/automl/get_model.rb | 47 + .../snippets/automl/get_model_evaluation.rb | 47 + .../snippets/automl/get_table_spec.rb | 47 + .../snippets/automl/import_data.rb | 54 + .../snippets/automl/list_column_specs.rb | 51 + .../snippets/automl/list_datasets.rb | 51 + .../snippets/automl/list_model_evaluations.rb | 51 + .../snippets/automl/list_models.rb | 51 + .../snippets/automl/list_table_specs.rb | 51 + .../snippets/automl/undeploy_model.rb | 54 + .../snippets/automl/update_column_spec.rb | 47 + .../snippets/automl/update_dataset.rb | 47 + .../snippets/automl/update_table_spec.rb | 47 + .../prediction_service/batch_predict.rb | 54 + .../snippets/prediction_service/predict.rb | 47 + ..._metadata_google.cloud.automl.v1beta1.json | 1055 ++++ .../automl/v1beta1/automl_operations_test.rb | 400 ++ .../cloud/automl/v1beta1/automl_paths_test.rb | 127 + .../cloud/automl/v1beta1/automl_rest_test.rb | 1424 +++++ .../cloud/automl/v1beta1/automl_test.rb | 1639 +++++ .../prediction_service_operations_test.rb | 400 ++ .../v1beta1/prediction_service_paths_test.rb | 55 + .../v1beta1/prediction_service_rest_test.rb | 212 + .../automl/v1beta1/prediction_service_test.rb | 249 + .../test/helper.rb | 35 + .../google-cloud-backupdr-v1/.gitignore | 20 + .../.repo-metadata.json | 19 + .../google-cloud-backupdr-v1/.rubocop.yml | 33 + .../google-cloud-backupdr-v1/.toys.rb | 28 + .../google-cloud-backupdr-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-backupdr-v1/CHANGELOG.md | 2 + .../google-cloud-backupdr-v1/Gemfile | 15 + .../google-cloud-backupdr-v1/LICENSE.md | 201 + .../google-cloud-backupdr-v1/README.md | 154 + .../google-cloud-backupdr-v1/Rakefile | 169 + .../gapic_metadata.json | 217 + .../google-cloud-backupdr-v1.gemspec | 30 + .../lib/google-cloud-backupdr-v1.rb | 21 + .../lib/google/cloud/backupdr/v1.rb | 46 + .../v1/backup_dr_protection_summary.rb | 55 + .../v1/backup_dr_protection_summary/client.rb | 532 ++ .../credentials.rb | 47 + .../v1/backup_dr_protection_summary/paths.rb | 50 + .../v1/backup_dr_protection_summary/rest.rb | 53 + .../rest/client.rb | 491 ++ .../rest/service_stub.rb | 142 + .../lib/google/cloud/backupdr/v1/backupdr.rb | 56 + .../cloud/backupdr/v1/backupdr/client.rb | 4788 ++++++++++++++ .../cloud/backupdr/v1/backupdr/credentials.rb | 47 + .../cloud/backupdr/v1/backupdr/operations.rb | 843 +++ .../cloud/backupdr/v1/backupdr/paths.rb | 309 + .../google/cloud/backupdr/v1/backupdr/rest.rb | 54 + .../cloud/backupdr/v1/backupdr/rest/client.rb | 4495 +++++++++++++ .../backupdr/v1/backupdr/rest/operations.rb | 927 +++ .../backupdr/v1/backupdr/rest/service_stub.rb | 2350 +++++++ .../google/cloud/backupdr/v1/backupdr_pb.rb | 51 + .../cloud/backupdr/v1/backupdr_services_pb.rb | 119 + .../google/cloud/backupdr/v1/backupplan_pb.rb | 47 + .../backupdr/v1/backupplanassociation_pb.rb | 42 + .../backupdr/v1/backupvault_alloydb_pb.rb | 27 + .../cloud/backupdr/v1/backupvault_ba_pb.rb | 24 + .../backupdr/v1/backupvault_cloudsql_pb.rb | 30 + .../cloud/backupdr/v1/backupvault_disk_pb.rb | 32 + .../cloud/backupdr/v1/backupvault_gce_pb.rb | 66 + .../cloud/backupdr/v1/backupvault_pb.rb | 80 + .../cloud/backupdr/v1/bindings_override.rb | 108 + .../backupdr/v1/datasourcereference_pb.rb | 34 + .../backupdr/v1/protection_summary_pb.rb | 40 + .../v1/protection_summary_services_pb.rb | 45 + .../lib/google/cloud/backupdr/v1/rest.rb | 39 + .../lib/google/cloud/backupdr/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/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/backupdr/v1/backupdr.rb | 415 ++ .../google/cloud/backupdr/v1/backupplan.rb | 588 ++ .../backupdr/v1/backupplanassociation.rb | 388 ++ .../google/cloud/backupdr/v1/backupvault.rb | 1364 ++++ .../cloud/backupdr/v1/backupvault_alloydb.rb | 69 + .../cloud/backupdr/v1/backupvault_ba.rb | 47 + .../cloud/backupdr/v1/backupvault_cloudsql.rb | 131 + .../cloud/backupdr/v1/backupvault_disk.rb | 241 + .../cloud/backupdr/v1/backupvault_gce.rb | 1001 +++ .../cloud/backupdr/v1/datasourcereference.rb | 228 + .../cloud/backupdr/v1/protection_summary.rb | 309 + .../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 + .../proto_docs/google/type/dayofweek.rb | 49 + .../proto_docs/google/type/expr.rb | 75 + .../proto_docs/google/type/month.rb | 64 + .../google-cloud-backupdr-v1/snippets/Gemfile | 32 + .../list_resource_backup_configs.rb | 51 + .../snippets/backupdr/create_backup_plan.rb | 54 + .../create_backup_plan_association.rb | 54 + .../snippets/backupdr/create_backup_vault.rb | 54 + .../backupdr/create_management_server.rb | 54 + .../snippets/backupdr/delete_backup.rb | 54 + .../snippets/backupdr/delete_backup_plan.rb | 54 + .../delete_backup_plan_association.rb | 54 + .../snippets/backupdr/delete_backup_vault.rb | 54 + .../backupdr/delete_management_server.rb | 54 + ...kup_plan_associations_for_resource_type.rb | 51 + .../fetch_backups_for_resource_type.rb | 51 + ...ata_source_references_for_resource_type.rb | 51 + .../backupdr/fetch_usable_backup_vaults.rb | 51 + .../snippets/backupdr/get_backup.rb | 47 + .../snippets/backupdr/get_backup_plan.rb | 47 + .../backupdr/get_backup_plan_association.rb | 47 + .../backupdr/get_backup_plan_revision.rb | 47 + .../snippets/backupdr/get_backup_vault.rb | 47 + .../snippets/backupdr/get_data_source.rb | 47 + .../backupdr/get_data_source_reference.rb | 47 + .../backupdr/get_management_server.rb | 47 + .../snippets/backupdr/initialize_service.rb | 54 + .../backupdr/list_backup_plan_associations.rb | 51 + .../backupdr/list_backup_plan_revisions.rb | 51 + .../snippets/backupdr/list_backup_plans.rb | 51 + .../snippets/backupdr/list_backup_vaults.rb | 51 + .../snippets/backupdr/list_backups.rb | 51 + .../backupdr/list_data_source_references.rb | 51 + .../snippets/backupdr/list_data_sources.rb | 51 + .../backupdr/list_management_servers.rb | 51 + .../snippets/backupdr/restore_backup.rb | 54 + .../snippets/backupdr/trigger_backup.rb | 54 + .../snippets/backupdr/update_backup.rb | 54 + .../snippets/backupdr/update_backup_plan.rb | 54 + .../update_backup_plan_association.rb | 54 + .../snippets/backupdr/update_backup_vault.rb | 54 + .../snippets/backupdr/update_data_source.rb | 54 + ...pet_metadata_google.cloud.backupdr.v1.json | 1535 +++++ ...backup_dr_protection_summary_paths_test.rb | 55 + .../backup_dr_protection_summary_rest_test.rb | 157 + .../v1/backup_dr_protection_summary_test.rb | 175 + .../backupdr/v1/backupdr_operations_test.rb | 400 ++ .../cloud/backupdr/v1/backupdr_paths_test.rb | 211 + .../cloud/backupdr/v1/backupdr_rest_test.rb | 2196 +++++++ .../google/cloud/backupdr/v1/backupdr_test.rb | 2613 ++++++++ .../google-cloud-backupdr-v1/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 | 238 + ...oogle-cloud-bare_metal_solution-v2.gemspec | 30 + .../google-cloud-bare_metal_solution-v2.rb | 21 + .../google/cloud/bare_metal_solution/v2.rb | 45 + .../v2/bare_metal_solution.rb | 63 + .../v2/bare_metal_solution/client.rb | 4838 ++++++++++++++ .../v2/bare_metal_solution/credentials.rb | 47 + .../v2/bare_metal_solution/operations.rb | 843 +++ .../v2/bare_metal_solution/paths.rb | 301 + .../v2/bare_metal_solution/rest.rb | 61 + .../v2/bare_metal_solution/rest/client.rb | 4495 +++++++++++++ .../v2/bare_metal_solution/rest/operations.rb | 927 +++ .../bare_metal_solution/rest/service_stub.rb | 2789 +++++++++ .../v2/bindings_override.rb | 75 + .../cloud/bare_metal_solution/v2/rest.rb | 38 + .../cloud/bare_metal_solution/v2/version.rb | 28 + .../v2/baremetalsolution_pb.rb | 38 + .../v2/baremetalsolution_services_pb.rb | 154 + .../cloud/baremetalsolution/v2/common_pb.rb | 22 + .../cloud/baremetalsolution/v2/instance_pb.rb | 49 + .../cloud/baremetalsolution/v2/lun_pb.rb | 32 + .../cloud/baremetalsolution/v2/network_pb.rb | 43 + .../baremetalsolution/v2/nfs_share_pb.rb | 36 + .../cloud/baremetalsolution/v2/osimage_pb.rb | 26 + .../baremetalsolution/v2/provisioning_pb.rb | 53 + .../cloud/baremetalsolution/v2/ssh_key_pb.rb | 28 + .../cloud/baremetalsolution/v2/volume_pb.rb | 40 + .../v2/volume_snapshot_pb.rb | 32 + .../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 + .../baremetalsolution/v2/baremetalsolution.rb | 63 + .../cloud/baremetalsolution/v2/common.rb | 53 + .../cloud/baremetalsolution/v2/instance.rb | 354 ++ .../google/cloud/baremetalsolution/v2/lun.rb | 161 + .../cloud/baremetalsolution/v2/network.rb | 379 ++ .../cloud/baremetalsolution/v2/nfs_share.rb | 243 + .../cloud/baremetalsolution/v2/osimage.rb | 80 + .../baremetalsolution/v2/provisioning.rb | 603 ++ .../cloud/baremetalsolution/v2/ssh_key.rb | 97 + .../cloud/baremetalsolution/v2/volume.rb | 325 + .../baremetalsolution/v2/volume_snapshot.rb | 134 + .../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 + .../bare_metal_solution/create_nfs_share.rb | 54 + .../create_provisioning_config.rb | 47 + .../bare_metal_solution/create_ssh_key.rb | 47 + .../create_volume_snapshot.rb | 47 + .../bare_metal_solution/delete_nfs_share.rb | 54 + .../bare_metal_solution/delete_ssh_key.rb | 47 + .../delete_volume_snapshot.rb | 47 + .../bare_metal_solution/detach_lun.rb | 54 + .../disable_interactive_serial_console.rb | 54 + .../enable_interactive_serial_console.rb | 54 + .../snippets/bare_metal_solution/evict_lun.rb | 54 + .../bare_metal_solution/evict_volume.rb | 54 + .../bare_metal_solution/get_instance.rb | 47 + .../snippets/bare_metal_solution/get_lun.rb | 47 + .../bare_metal_solution/get_network.rb | 47 + .../bare_metal_solution/get_nfs_share.rb | 47 + .../get_provisioning_config.rb | 47 + .../bare_metal_solution/get_volume.rb | 47 + .../get_volume_snapshot.rb | 47 + .../bare_metal_solution/list_instances.rb | 51 + .../snippets/bare_metal_solution/list_luns.rb | 51 + .../bare_metal_solution/list_network_usage.rb | 47 + .../bare_metal_solution/list_networks.rb | 51 + .../bare_metal_solution/list_nfs_shares.rb | 51 + .../bare_metal_solution/list_os_images.rb | 51 + .../list_provisioning_quotas.rb | 51 + .../bare_metal_solution/list_ssh_keys.rb | 51 + .../list_volume_snapshots.rb | 51 + .../bare_metal_solution/list_volumes.rb | 51 + .../bare_metal_solution/rename_instance.rb | 47 + .../bare_metal_solution/rename_network.rb | 47 + .../bare_metal_solution/rename_nfs_share.rb | 47 + .../bare_metal_solution/rename_volume.rb | 47 + .../bare_metal_solution/reset_instance.rb | 54 + .../bare_metal_solution/resize_volume.rb | 54 + .../restore_volume_snapshot.rb | 54 + .../bare_metal_solution/start_instance.rb | 54 + .../bare_metal_solution/stop_instance.rb | 54 + .../submit_provisioning_config.rb | 47 + .../bare_metal_solution/update_instance.rb | 54 + .../bare_metal_solution/update_network.rb | 54 + .../bare_metal_solution/update_nfs_share.rb | 54 + .../update_provisioning_config.rb | 47 + .../bare_metal_solution/update_volume.rb | 54 + ...ata_google.cloud.baremetalsolution.v2.json | 1775 ++++++ .../v2/bare_metal_solution_operations_test.rb | 400 ++ .../v2/bare_metal_solution_paths_test.rb | 211 + .../v2/bare_metal_solution_rest_test.rb | 2518 ++++++++ .../v2/bare_metal_solution_test.rb | 2881 +++++++++ .../test/helper.rb | 35 + .../google-cloud-batch-v1/.gitignore | 20 + .../google-cloud-batch-v1/.repo-metadata.json | 15 + .../google-cloud-batch-v1/.rubocop.yml | 33 + .../google-cloud-batch-v1/.toys.rb | 28 + .../google-cloud-batch-v1/.yardopts | 12 + .../google-cloud-batch-v1/AUTHENTICATION.md | 122 + .../google-cloud-batch-v1/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-batch-v1/Gemfile | 15 + .../google-cloud-batch-v1/LICENSE.md | 201 + .../google-cloud-batch-v1/README.md | 151 + .../google-cloud-batch-v1/Rakefile | 169 + .../google-cloud-batch-v1/gapic_metadata.json | 53 + .../google-cloud-batch-v1.gemspec | 30 + .../lib/google-cloud-batch-v1.rb | 22 + .../lib/google/cloud/batch/v1.rb | 45 + .../lib/google/cloud/batch/v1/batch_pb.rb | 42 + .../google/cloud/batch/v1/batch_service.rb | 58 + .../cloud/batch/v1/batch_service/client.rb | 1192 ++++ .../batch/v1/batch_service/credentials.rb | 47 + .../batch/v1/batch_service/operations.rb | 843 +++ .../cloud/batch/v1/batch_service/paths.rb | 113 + .../cloud/batch/v1/batch_service/rest.rb | 56 + .../batch/v1/batch_service/rest/client.rb | 1108 ++++ .../batch/v1/batch_service/rest/operations.rb | 927 +++ .../v1/batch_service/rest/service_stub.rb | 510 ++ .../cloud/batch/v1/batch_services_pb.rb | 59 + .../cloud/batch/v1/bindings_override.rb | 75 + .../lib/google/cloud/batch/v1/job_pb.rb | 51 + .../lib/google/cloud/batch/v1/rest.rb | 38 + .../lib/google/cloud/batch/v1/task_pb.rb | 42 + .../lib/google/cloud/batch/v1/version.rb | 28 + .../lib/google/cloud/batch/v1/volume_pb.rb | 23 + .../lib/google/iam/v1.rb | 43 + .../lib/google/iam/v1/bindings_override.rb | 73 + .../lib/google/iam/v1/iam_policy.rb | 76 + .../lib/google/iam/v1/iam_policy/client.rb | 729 +++ .../google/iam/v1/iam_policy/credentials.rb | 42 + .../lib/google/iam/v1/iam_policy/rest.rb | 74 + .../google/iam/v1/iam_policy/rest/client.rb | 673 ++ .../iam/v1/iam_policy/rest/service_stub.rb | 265 + .../lib/google/iam/v1/rest.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 + .../proto_docs/google/cloud/batch/v1/batch.rb | 246 + .../proto_docs/google/cloud/batch/v1/job.rb | 801 +++ .../proto_docs/google/cloud/batch/v1/task.rb | 547 ++ .../google/cloud/batch/v1/volume.rb | 92 + .../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 + .../proto_docs/google/type/expr.rb | 75 + .../google-cloud-batch-v1/snippets/Gemfile | 32 + .../snippets/batch_service/cancel_job.rb | 54 + .../snippets/batch_service/create_job.rb | 47 + .../snippets/batch_service/delete_job.rb | 54 + .../snippets/batch_service/get_job.rb | 47 + .../snippets/batch_service/get_task.rb | 47 + .../snippets/batch_service/list_jobs.rb | 51 + .../snippets/batch_service/list_tasks.rb | 51 + .../snippets/iam_policy/get_iam_policy.rb | 47 + .../snippets/iam_policy/set_iam_policy.rb | 47 + .../iam_policy/test_iam_permissions.rb | 47 + ...nippet_metadata_google.cloud.batch.v1.json | 295 + .../snippet_metadata_google.iam.v1.json | 135 + .../batch/v1/batch_service_operations_test.rb | 400 ++ .../batch/v1/batch_service_paths_test.rb | 91 + .../cloud/batch/v1/batch_service_rest_test.rb | 490 ++ .../cloud/batch/v1/batch_service_test.rb | 570 ++ .../google/iam/v1/iam_policy_rest_test.rb | 265 + .../test/google/iam/v1/iam_policy_test.rb | 286 + .../google-cloud-batch-v1/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 | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 48 + ...oud-beyond_corp-app_connections-v1.gemspec | 30 + ...le-cloud-beyond_corp-app_connections-v1.rb | 21 + .../cloud/beyond_corp/app_connections/v1.rb | 42 + .../v1/app_connections_service.rb | 65 + .../v1/app_connections_service/client.rb | 1143 ++++ .../v1/app_connections_service/credentials.rb | 49 + .../v1/app_connections_service/operations.rb | 845 +++ .../v1/app_connections_service/paths.rb | 109 + .../beyond_corp/app_connections/v1/version.rb | 30 + .../v1/app_connections_service_pb.rb | 46 + .../v1/app_connections_service_services_pb.rb | 72 + .../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/app_connections_service.rb | 411 ++ .../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 + .../create_app_connection.rb | 54 + .../delete_app_connection.rb | 54 + .../get_app_connection.rb | 47 + .../list_app_connections.rb | 51 + .../resolve_app_connections.rb | 51 + .../update_app_connection.rb | 54 + ...le.cloud.beyondcorp.appconnections.v1.json | 255 + ...app_connections_service_operations_test.rb | 400 ++ .../v1/app_connections_service_paths_test.rb | 91 + .../v1/app_connections_service_test.rb | 525 ++ .../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 | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 48 + ...loud-beyond_corp-app_connectors-v1.gemspec | 30 + ...gle-cloud-beyond_corp-app_connectors-v1.rb | 21 + .../cloud/beyond_corp/app_connectors/v1.rb | 42 + .../v1/app_connectors_service.rb | 65 + .../v1/app_connectors_service/client.rb | 1146 ++++ .../v1/app_connectors_service/credentials.rb | 49 + .../v1/app_connectors_service/operations.rb | 845 +++ .../v1/app_connectors_service/paths.rb | 71 + .../beyond_corp/app_connectors/v1/version.rb | 30 + .../v1/app_connector_instance_config_pb.rb | 29 + .../v1/app_connectors_service_pb.rb | 44 + .../v1/app_connectors_service_services_pb.rb | 70 + .../appconnectors/v1/resource_info_pb.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 + .../v1/app_connector_instance_config.rb | 82 + .../v1/app_connectors_service.rb | 341 + .../appconnectors/v1/resource_info.rb | 78 + .../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 + .../create_app_connector.rb | 54 + .../delete_app_connector.rb | 54 + .../get_app_connector.rb | 47 + .../list_app_connectors.rb | 51 + .../app_connectors_service/report_status.rb | 54 + .../update_app_connector.rb | 54 + ...gle.cloud.beyondcorp.appconnectors.v1.json | 255 + .../app_connectors_service_operations_test.rb | 400 ++ .../v1/app_connectors_service_paths_test.rb | 67 + .../v1/app_connectors_service_test.rb | 523 ++ .../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 | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 38 + ...-cloud-beyond_corp-app_gateways-v1.gemspec | 30 + ...oogle-cloud-beyond_corp-app_gateways-v1.rb | 21 + .../cloud/beyond_corp/app_gateways/v1.rb | 42 + .../app_gateways/v1/app_gateways_service.rb | 65 + .../v1/app_gateways_service/client.rb | 899 +++ .../v1/app_gateways_service/credentials.rb | 49 + .../v1/app_gateways_service/operations.rb | 845 +++ .../v1/app_gateways_service/paths.rb | 71 + .../beyond_corp/app_gateways/v1/version.rb | 30 + .../appgateways/v1/app_gateways_service_pb.rb | 40 + .../v1/app_gateways_service_services_pb.rb | 66 + .../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 + .../appgateways/v1/app_gateways_service.rb | 291 + .../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 + .../create_app_gateway.rb | 54 + .../delete_app_gateway.rb | 54 + .../app_gateways_service/get_app_gateway.rb | 47 + .../app_gateways_service/list_app_gateways.rb | 51 + ...oogle.cloud.beyondcorp.appgateways.v1.json | 175 + .../app_gateways_service_operations_test.rb | 400 ++ .../v1/app_gateways_service_paths_test.rb | 67 + .../v1/app_gateways_service_test.rb | 385 ++ .../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 | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 38 + ...oud-beyond_corp-client_gateways-v1.gemspec | 30 + ...le-cloud-beyond_corp-client_gateways-v1.rb | 21 + .../cloud/beyond_corp/client_gateways/v1.rb | 42 + .../v1/client_gateways_service.rb | 62 + .../v1/client_gateways_service/client.rb | 884 +++ .../v1/client_gateways_service/credentials.rb | 49 + .../v1/client_gateways_service/operations.rb | 845 +++ .../v1/client_gateways_service/paths.rb | 71 + .../beyond_corp/client_gateways/v1/version.rb | 30 + .../v1/client_gateways_service_pb.rb | 37 + .../v1/client_gateways_service_services_pb.rb | 63 + .../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/client_gateways_service.rb | 221 + .../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 + .../create_client_gateway.rb | 54 + .../delete_client_gateway.rb | 54 + .../get_client_gateway.rb | 47 + .../list_client_gateways.rb | 51 + ...le.cloud.beyondcorp.clientgateways.v1.json | 175 + ...client_gateways_service_operations_test.rb | 400 ++ .../v1/client_gateways_service_paths_test.rb | 67 + .../v1/client_gateways_service_test.rb | 385 ++ .../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 | 163 + ...le-cloud-bigquery-analytics_hub-v1.gemspec | 29 + .../google-cloud-bigquery-analytics_hub-v1.rb | 21 + .../google/cloud/bigquery/analytics_hub/v1.rb | 47 + .../analytics_hub/v1/analytics_hub_service.rb | 63 + .../v1/analytics_hub_service/client.rb | 3312 ++++++++++ .../v1/analytics_hub_service/credentials.rb | 50 + .../v1/analytics_hub_service/operations.rb | 845 +++ .../v1/analytics_hub_service/paths.rb | 218 + .../v1/analytics_hub_service/rest.rb | 60 + .../v1/analytics_hub_service/rest/client.rb | 3066 +++++++++ .../analytics_hub_service/rest/operations.rb | 929 +++ .../rest/service_stub.rb | 1914 ++++++ .../cloud/bigquery/analytics_hub/v1/rest.rb | 39 + .../bigquery/analytics_hub/v1/version.rb | 30 + .../analyticshub/v1/analyticshub_pb.rb | 108 + .../v1/analyticshub_services_pb.rb | 119 + .../bigquery/analyticshub/v1/pubsub_pb.rb | 40 + .../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 + .../bigquery/analyticshub/v1/analyticshub.rb | 1364 ++++ .../cloud/bigquery/analyticshub/v1/pubsub.rb | 559 ++ .../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/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../approve_query_template.rb | 47 + .../create_data_exchange.rb | 47 + .../analytics_hub_service/create_listing.rb | 47 + .../create_query_template.rb | 47 + .../delete_data_exchange.rb | 47 + .../analytics_hub_service/delete_listing.rb | 47 + .../delete_query_template.rb | 47 + .../delete_subscription.rb | 54 + .../get_data_exchange.rb | 47 + .../analytics_hub_service/get_iam_policy.rb | 47 + .../analytics_hub_service/get_listing.rb | 47 + .../get_query_template.rb | 47 + .../analytics_hub_service/get_subscription.rb | 47 + .../list_data_exchanges.rb | 51 + .../analytics_hub_service/list_listings.rb | 51 + .../list_org_data_exchanges.rb | 51 + .../list_query_templates.rb | 51 + .../list_shared_resource_subscriptions.rb | 51 + .../list_subscriptions.rb | 51 + .../refresh_subscription.rb | 54 + .../revoke_subscription.rb | 47 + .../analytics_hub_service/set_iam_policy.rb | 47 + .../submit_query_template.rb | 47 + .../subscribe_data_exchange.rb | 54 + .../subscribe_listing.rb | 47 + .../test_iam_permissions.rb | 47 + .../update_data_exchange.rb | 47 + .../analytics_hub_service/update_listing.rb | 47 + .../update_query_template.rb | 47 + ...google.cloud.bigquery.analyticshub.v1.json | 1175 ++++ .../analytics_hub_service_operations_test.rb | 400 ++ .../v1/analytics_hub_service_paths_test.rb | 163 + .../v1/analytics_hub_service_rest_test.rb | 1699 +++++ .../v1/analytics_hub_service_test.rb | 1914 ++++++ .../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 | 168 + .../gapic_metadata.json | 98 + ...le-cloud-bigquery-data_transfer-v1.gemspec | 29 + .../google-cloud-bigquery-data_transfer-v1.rb | 21 + .../google/cloud/bigquery/data_transfer/v1.rb | 47 + .../data_transfer/v1/bindings_override.rb | 77 + .../data_transfer/v1/data_transfer_service.rb | 57 + .../v1/data_transfer_service/client.rb | 2172 +++++++ .../v1/data_transfer_service/credentials.rb | 53 + .../v1/data_transfer_service/paths.rb | 193 + .../v1/data_transfer_service/rest.rb | 55 + .../v1/data_transfer_service/rest/client.rb | 2023 ++++++ .../rest/service_stub.rb | 1177 ++++ .../cloud/bigquery/data_transfer/v1/rest.rb | 40 + .../bigquery/data_transfer/v1/version.rb | 30 + .../datatransfer/v1/datatransfer_pb.rb | 63 + .../v1/datatransfer_services_pb.rb | 99 + .../bigquery/datatransfer/v1/transfer_pb.rb | 43 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../bigquery/datatransfer/v1/datatransfer.rb | 726 +++ .../bigquery/datatransfer/v1/transfer.rb | 411 ++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../check_valid_creds.rb | 47 + .../create_transfer_config.rb | 47 + .../delete_transfer_config.rb | 47 + .../delete_transfer_run.rb | 47 + .../enroll_data_sources.rb | 47 + .../data_transfer_service/get_data_source.rb | 47 + .../get_transfer_config.rb | 47 + .../data_transfer_service/get_transfer_run.rb | 47 + .../list_data_sources.rb | 51 + .../list_transfer_configs.rb | 51 + .../list_transfer_logs.rb | 51 + .../list_transfer_runs.rb | 51 + .../schedule_transfer_runs.rb | 47 + .../start_manual_transfer_runs.rb | 47 + .../unenroll_data_sources.rb | 47 + .../update_transfer_config.rb | 47 + ...google.cloud.bigquery.datatransfer.v1.json | 655 ++ .../v1/data_transfer_service_paths_test.rb | 112 + .../v1/data_transfer_service_rest_test.rb | 988 +++ .../v1/data_transfer_service_test.rb | 1103 ++++ .../test/helper.rb | 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 | 53 + ...google-cloud-bigquery-migration-v2.gemspec | 28 + .../lib/google-cloud-bigquery-migration-v2.rb | 21 + .../lib/google/cloud/bigquery/migration/v2.rb | 47 + .../migration/v2/assessment_task_pb.rb | 26 + .../migration/v2/migration_entities_pb.rb | 41 + .../v2/migration_error_details_pb.rb | 28 + .../migration/v2/migration_metrics_pb.rb | 31 + .../migration/v2/migration_service.rb | 57 + .../migration/v2/migration_service/client.rb | 1103 ++++ .../v2/migration_service/credentials.rb | 49 + .../migration/v2/migration_service/paths.rb | 92 + .../migration/v2/migration_service/rest.rb | 54 + .../v2/migration_service/rest/client.rb | 1011 +++ .../v2/migration_service/rest/service_stub.rb | 512 ++ .../migration/v2/migration_service_pb.rb | 39 + .../v2/migration_service_services_pb.rb | 62 + .../cloud/bigquery/migration/v2/rest.rb | 39 + .../migration/v2/translation_config_pb.rb | 50 + .../migration/v2/translation_details_pb.rb | 34 + .../migration/v2/translation_suggestion_pb.rb | 27 + .../migration/v2/translation_usability_pb.rb | 26 + .../cloud/bigquery/migration/v2/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/distribution.rb | 233 + .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/label.rb | 49 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/metric.rb | 299 + .../proto_docs/google/api/resource.rb | 227 + .../bigquery/migration/v2/assessment_task.rb | 61 + .../migration/v2/migration_entities.rb | 297 + .../migration/v2/migration_error_details.rb | 72 + .../migration/v2/migration_metrics.rb | 129 + .../migration/v2/migration_service.rb | 166 + .../migration/v2/translation_config.rb | 389 ++ .../migration/v2/translation_details.rb | 191 + .../migration/v2/translation_suggestion.rb | 67 + .../migration/v2/translation_usability.rb | 69 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/error_details.rb | 420 ++ .../snippets/Gemfile | 32 + .../create_migration_workflow.rb | 47 + .../delete_migration_workflow.rb | 47 + .../get_migration_subtask.rb | 47 + .../get_migration_workflow.rb | 47 + .../list_migration_subtasks.rb | 51 + .../list_migration_workflows.rb | 51 + .../start_migration_workflow.rb | 47 + ...ta_google.cloud.bigquery.migration.v2.json | 295 + .../v2/migration_service_paths_test.rb | 79 + .../v2/migration_service_rest_test.rb | 487 ++ .../migration/v2/migration_service_test.rb | 540 ++ .../test/helper.rb | 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 + ...ogle-cloud-bigquery-reservation-v1.gemspec | 29 + .../google-cloud-bigquery-reservation-v1.rb | 21 + .../google/cloud/bigquery/reservation/v1.rb | 47 + .../bigquery/reservation/v1/reservation_pb.rb | 82 + .../reservation/v1/reservation_service.rb | 71 + .../v1/reservation_service/client.rb | 3516 +++++++++++ .../v1/reservation_service/credentials.rb | 54 + .../v1/reservation_service/paths.rb | 147 + .../v1/reservation_service/rest.rb | 68 + .../v1/reservation_service/rest/client.rb | 3268 ++++++++++ .../reservation_service/rest/service_stub.rb | 1889 ++++++ .../reservation/v1/reservation_services_pb.rb | 297 + .../cloud/bigquery/reservation/v1/rest.rb | 39 + .../cloud/bigquery/reservation/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../bigquery/reservation/v1/reservation.rb | 1207 ++++ .../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/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../reservation_service/create_assignment.rb | 47 + .../create_capacity_commitment.rb | 47 + .../reservation_service/create_reservation.rb | 47 + .../create_reservation_group.rb | 47 + .../reservation_service/delete_assignment.rb | 47 + .../delete_capacity_commitment.rb | 47 + .../reservation_service/delete_reservation.rb | 47 + .../delete_reservation_group.rb | 47 + .../failover_reservation.rb | 47 + .../reservation_service/get_bi_reservation.rb | 47 + .../get_capacity_commitment.rb | 47 + .../reservation_service/get_iam_policy.rb | 47 + .../reservation_service/get_reservation.rb | 47 + .../get_reservation_group.rb | 47 + .../reservation_service/list_assignments.rb | 51 + .../list_capacity_commitments.rb | 51 + .../list_reservation_groups.rb | 51 + .../reservation_service/list_reservations.rb | 51 + .../merge_capacity_commitments.rb | 47 + .../reservation_service/move_assignment.rb | 47 + .../search_all_assignments.rb | 51 + .../reservation_service/search_assignments.rb | 51 + .../reservation_service/set_iam_policy.rb | 47 + .../split_capacity_commitment.rb | 47 + .../test_iam_permissions.rb | 47 + .../reservation_service/update_assignment.rb | 47 + .../update_bi_reservation.rb | 47 + .../update_capacity_commitment.rb | 47 + .../reservation_service/update_reservation.rb | 47 + ..._google.cloud.bigquery.reservation.v1.json | 1175 ++++ .../v1/reservation_service_paths_test.rb | 115 + .../v1/reservation_service_rest_test.rb | 1703 +++++ .../v1/reservation_service_test.rb | 1892 ++++++ .../test/helper.rb | 35 + 1614 files changed, 347596 insertions(+) create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/README.md create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/application_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/attributes_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/service_project_attachment_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/workload_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/.gitignore create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/.yardopts create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/Gemfile create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/README.md create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/Rakefile create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/google-cloud-app_optimize-v1beta.gemspec create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google-cloud-app_optimize-v1beta.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/app_optimize/v1beta/version.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/client.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/paths.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/cloud/appoptimize/v1beta/app_optimize.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/create_report.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/delete_report.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/get_report.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/list_reports.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/read_report.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/snippet_metadata_google.cloud.appoptimize.v1beta.json create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_test.rb create mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/README.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/README.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/README.md create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/google-cloud-audit_manager-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google-cloud-audit_manager-v1.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/client.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/credentials.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/operations.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/paths.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/auditmanager/v1/auditmanager_pb.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/auditmanager/v1/auditmanager_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/cloud/auditmanager/v1/auditmanager.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/enroll_resource.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_report.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_scope_report.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_audit_report.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_resource_enrollment_status.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_audit_reports.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_controls.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_resource_enrollment_statuses.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/snippet_metadata_google.cloud.auditmanager.v1.json create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_test.rb create mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-automl-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-automl-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-automl-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-automl-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-automl-v1/README.md create mode 100644 owl-bot-staging/google-cloud-automl-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/ranges_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/regression_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/README.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-batch-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-batch-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-batch-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-batch-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-batch-v1/README.md create mode 100644 owl-bot-staging/google-cloud-batch-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_error_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_metrics_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.gitignore b/owl-bot-staging/google-cloud-app_hub-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-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-app_hub-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json new file mode 100644 index 000000000000..118640b1b4b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "apphub.googleapis.com", + "api_shortname": "apphub", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest", + "distribution_name": "google-cloud-app_hub-v1", + "is_cloud": true, + "language": "ruby", + "name": "apphub", + "name_pretty": "App Hub V1 API", + "product_documentation": "https://cloud.google.com/app-hub/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. Note that google-cloud-app_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_hub instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/app-hub/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml b/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml new file mode 100644 index 000000000000..aac5e1a2d3f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-app_hub-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-app_hub-v1.rb" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb b/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.yardopts b/owl-bot-staging/google-cloud-app_hub-v1/.yardopts new file mode 100644 index 000000000000..47c312defbe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="App Hub V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..56078e3eba52 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-app_hub-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-app_hub-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/app_hub/v1" + +client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/app_hub/v1" + +::Google::Cloud::AppHub::V1::AppHub::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AppHub::V1::AppHub::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-app_hub-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/app_hub/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AppHub::V1::AppHub::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-app_hub-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-app_hub-v1/Gemfile b/owl-bot-staging/google-cloud-app_hub-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-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-app_hub-v1/LICENSE.md b/owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-app_hub-v1/README.md b/owl-bot-staging/google-cloud-app_hub-v1/README.md new file mode 100644 index 000000000000..0e429745cbc4 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the App Hub V1 API + +API Client library for the App Hub V1 API + +google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the App Hub V1 API. Most users should consider using +the main client gem, +[google-cloud-app_hub](https://rubygems.org/gems/google-cloud-app_hub). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-app_hub-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/apphub.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/app_hub/v1" + +client = ::Google::Cloud::AppHub::V1::AppHub::Client.new +request = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new # (request fields as keyword arguments...) +response = client.lookup_service_project_attachment request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/app-hub/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/app_hub/v1" +require "logger" + +client = ::Google::Cloud::AppHub::V1::AppHub::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-app_hub`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-app_hub-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-app_hub`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-app_hub-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-app_hub-v1/Rakefile b/owl-bot-staging/google-cloud-app_hub-v1/Rakefile new file mode 100644 index 000000000000..6f86b00de1d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-app_hub-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/app_hub/v1/app_hub/credentials" + ::Google::Cloud::AppHub::V1::AppHub::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-app_hub-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-app_hub-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-app_hub-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-app_hub-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-app_hub-v1" + header "google-cloud-app_hub-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-app_hub-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-app_hub-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-app_hub-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-app_hub-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json new file mode 100644 index 000000000000..b9d4fe1df12e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-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.cloud.apphub.v1", + "libraryPackage": "::Google::Cloud::AppHub::V1", + "services": { + "AppHub": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AppHub::V1::AppHub::Client", + "rpcs": { + "LookupServiceProjectAttachment": { + "methods": [ + "lookup_service_project_attachment" + ] + }, + "ListServiceProjectAttachments": { + "methods": [ + "list_service_project_attachments" + ] + }, + "CreateServiceProjectAttachment": { + "methods": [ + "create_service_project_attachment" + ] + }, + "GetServiceProjectAttachment": { + "methods": [ + "get_service_project_attachment" + ] + }, + "DeleteServiceProjectAttachment": { + "methods": [ + "delete_service_project_attachment" + ] + }, + "DetachServiceProjectAttachment": { + "methods": [ + "detach_service_project_attachment" + ] + }, + "ListDiscoveredServices": { + "methods": [ + "list_discovered_services" + ] + }, + "GetDiscoveredService": { + "methods": [ + "get_discovered_service" + ] + }, + "LookupDiscoveredService": { + "methods": [ + "lookup_discovered_service" + ] + }, + "ListServices": { + "methods": [ + "list_services" + ] + }, + "CreateService": { + "methods": [ + "create_service" + ] + }, + "GetService": { + "methods": [ + "get_service" + ] + }, + "UpdateService": { + "methods": [ + "update_service" + ] + }, + "DeleteService": { + "methods": [ + "delete_service" + ] + }, + "ListDiscoveredWorkloads": { + "methods": [ + "list_discovered_workloads" + ] + }, + "GetDiscoveredWorkload": { + "methods": [ + "get_discovered_workload" + ] + }, + "LookupDiscoveredWorkload": { + "methods": [ + "lookup_discovered_workload" + ] + }, + "ListWorkloads": { + "methods": [ + "list_workloads" + ] + }, + "CreateWorkload": { + "methods": [ + "create_workload" + ] + }, + "GetWorkload": { + "methods": [ + "get_workload" + ] + }, + "UpdateWorkload": { + "methods": [ + "update_workload" + ] + }, + "DeleteWorkload": { + "methods": [ + "delete_workload" + ] + }, + "ListApplications": { + "methods": [ + "list_applications" + ] + }, + "CreateApplication": { + "methods": [ + "create_application" + ] + }, + "GetApplication": { + "methods": [ + "get_application" + ] + }, + "UpdateApplication": { + "methods": [ + "update_application" + ] + }, + "DeleteApplication": { + "methods": [ + "delete_application" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec b/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec new file mode 100644 index 000000000000..749c0a6e2eaa --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/app_hub/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-app_hub-v1" + gem.version = Google::Cloud::AppHub::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. Note that google-cloud-app_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_hub instead. See the readme for more details." + gem.summary = "API Client library for the App Hub V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.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-app_hub-v1/lib/google-cloud-app_hub-v1.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb new file mode 100644 index 000000000000..2bd20cb40c59 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/app_hub/v1" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb new file mode 100644 index 000000000000..ebab4dae51e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/app_hub/v1/app_hub" +require "google/cloud/app_hub/v1/version" + +module Google + module Cloud + module AppHub + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/app_hub/v1" + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/app_hub/v1" + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/app_hub/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb new file mode 100644 index 000000000000..8fa01251c081 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.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/app_hub/v1/version" + +require "google/cloud/app_hub/v1/app_hub/credentials" +require "google/cloud/app_hub/v1/app_hub/paths" +require "google/cloud/app_hub/v1/app_hub/operations" +require "google/cloud/app_hub/v1/app_hub/client" +require "google/cloud/app_hub/v1/app_hub/rest" + +module Google + module Cloud + module AppHub + module V1 + ## + # The App Hub API allows you to manage App Hub resources. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/app_hub/v1/app_hub" + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/app_hub/v1/app_hub/rest" + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + module AppHub + end + end + end + end +end + +helper_path = ::File.join __dir__, "app_hub", "helpers.rb" +require "google/cloud/app_hub/v1/app_hub/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb new file mode 100644 index 000000000000..9722a209e19a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb @@ -0,0 +1,3470 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/apphub/v1/apphub_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module AppHub + module V1 + module AppHub + ## + # Client for the AppHub service. + # + # The App Hub API allows you to manage App Hub resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_hub_stub + + ## + # Configure the AppHub Client class. + # + # See {::Google::Cloud::AppHub::V1::AppHub::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppHub clients + # ::Google::Cloud::AppHub::V1::AppHub::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", "AppHub", "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.lookup_service_project_attachment.timeout = 60.0 + default_config.rpcs.lookup_service_project_attachment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_service_project_attachments.timeout = 60.0 + default_config.rpcs.list_service_project_attachments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_service_project_attachment.timeout = 60.0 + + default_config.rpcs.get_service_project_attachment.timeout = 60.0 + default_config.rpcs.get_service_project_attachment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_service_project_attachment.timeout = 60.0 + + default_config.rpcs.detach_service_project_attachment.timeout = 60.0 + + default_config.rpcs.list_discovered_services.timeout = 60.0 + default_config.rpcs.list_discovered_services.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_discovered_service.timeout = 60.0 + default_config.rpcs.get_discovered_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.lookup_discovered_service.timeout = 60.0 + default_config.rpcs.lookup_discovered_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_services.timeout = 60.0 + default_config.rpcs.list_services.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_service.timeout = 60.0 + + default_config.rpcs.get_service.timeout = 60.0 + default_config.rpcs.get_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_service.timeout = 60.0 + + default_config.rpcs.delete_service.timeout = 60.0 + + default_config.rpcs.list_discovered_workloads.timeout = 60.0 + default_config.rpcs.list_discovered_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_discovered_workload.timeout = 60.0 + default_config.rpcs.get_discovered_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.lookup_discovered_workload.timeout = 60.0 + default_config.rpcs.lookup_discovered_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workloads.timeout = 60.0 + default_config.rpcs.list_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workload.timeout = 60.0 + + default_config.rpcs.get_workload.timeout = 60.0 + default_config.rpcs.get_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_workload.timeout = 60.0 + + default_config.rpcs.delete_workload.timeout = 60.0 + + default_config.rpcs.list_applications.timeout = 60.0 + default_config.rpcs.list_applications.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_application.timeout = 60.0 + + default_config.rpcs.get_application.timeout = 60.0 + default_config.rpcs.get_application.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_application.timeout = 60.0 + + default_config.rpcs.delete_application.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AppHub 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::AppHub::V1::AppHub::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 + @app_hub_stub.universe_domain + end + + ## + # Create a new AppHub client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppHub 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/apphub/v1/apphub_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 + + @app_hub_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AppHub::V1::AppHub::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 + ) + + @app_hub_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_hub_stub.endpoint + config.universe_domain = @app_hub_stub.universe_domain + config.logger = @app_hub_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 = @app_hub_stub.endpoint + config.universe_domain = @app_hub_stub.universe_domain + config.logger = @app_hub_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppHub::V1::AppHub::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 + @app_hub_stub.logger + end + + # Service calls + + ## + # Lists a service project attachment for a given service project. You can + # call this API from any project to find if it is attached to a host project. + # + # @overload lookup_service_project_attachment(request, options = nil) + # Pass arguments to `lookup_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lookup_service_project_attachment(name: nil) + # Pass arguments to `lookup_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Service project ID and location to lookup service project + # attachment for. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new + # + # # Call the lookup_service_project_attachment method. + # result = client.lookup_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. + # p result + # + def lookup_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lookup_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lookup_service_project_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :lookup_service_project_attachment, request, 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 service projects attached to the host project. + # + # @overload list_service_project_attachments(request, options = nil) + # Pass arguments to `list_service_project_attachments` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_service_project_attachments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to list service project attachments. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @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. 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::AppHub::V1::ServiceProjectAttachment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new + # + # # Call the list_service_project_attachments method. + # result = client.list_service_project_attachments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. + # p item + # end + # + def list_service_project_attachments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest + + # Converts hash and nil to an 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_project_attachments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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_project_attachments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_service_project_attachments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_service_project_attachments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_service_project_attachments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Attaches a service project to the host project. + # + # @overload create_service_project_attachment(request, options = nil) + # Pass arguments to `create_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_project_attachment(parent: nil, service_project_attachment_id: nil, service_project_attachment: nil, request_id: nil) + # Pass arguments to `create_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to which service project is being + # attached. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @param service_project_attachment_id [::String] + # Required. The service project attachment identifier must contain the + # project id of the service project specified in the + # service_project_attachment.service_project field. + # @param service_project_attachment [::Google::Cloud::AppHub::V1::ServiceProjectAttachment, ::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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new + # + # # Call the create_service_project_attachment method. + # result = client.create_service_project_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest + + # Converts hash and nil to 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_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_project_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :create_service_project_attachment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 service project attachment. + # + # @overload get_service_project_attachment(request, options = nil) + # Pass arguments to `get_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_project_attachment(name: nil) + # Pass arguments to `get_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the service project attachment to + # retrieve. Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new + # + # # Call the get_service_project_attachment method. + # result = client.get_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. + # p result + # + def get_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest + + # Converts hash and nil to an 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_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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_project_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_service_project_attachment, request, 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 project attachment. + # + # @overload delete_service_project_attachment(request, options = nil) + # Pass arguments to `delete_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_project_attachment(name: nil, request_id: nil) + # Pass arguments to `delete_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the service project attachment to delete. + # Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + # @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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new + # + # # Call the delete_service_project_attachment method. + # result = client.delete_service_project_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest + + # Converts hash and nil to 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_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_project_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :delete_service_project_attachment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Detaches a service project from a host project. + # You can call this API from any service project without needing access to + # the host project that it is attached to. + # + # @overload detach_service_project_attachment(request, options = nil) + # Pass arguments to `detach_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload detach_service_project_attachment(name: nil) + # Pass arguments to `detach_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Service project id and location to detach from a host project. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new + # + # # Call the detach_service_project_attachment method. + # result = client.detach_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. + # p result + # + def detach_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.detach_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.detach_service_project_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.detach_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :detach_service_project_attachment, request, 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 Discovered Services that can be added to an Application in a host + # project and location. + # + # @overload list_discovered_services(request, options = nil) + # Pass arguments to `list_discovered_services` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_discovered_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_discovered_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. Project and location to list Discovered Services on. + # Expected format: `projects/{project}/locations/{location}`. + # @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. 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::AppHub::V1::DiscoveredService>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new + # + # # Call the list_discovered_services method. + # result = client.list_discovered_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::AppHub::V1::DiscoveredService. + # p item + # end + # + def list_discovered_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_discovered_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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_discovered_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_discovered_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_discovered_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_discovered_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 Discovered Service in a host project and location. + # + # @overload get_discovered_service(request, options = nil) + # Pass arguments to `get_discovered_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_discovered_service(name: nil) + # Pass arguments to `get_discovered_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. Fully qualified name of the Discovered Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::DiscoveredService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new + # + # # Call the get_discovered_service method. + # result = client.get_discovered_service request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. + # p result + # + def get_discovered_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_discovered_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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_discovered_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_discovered_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_discovered_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 a Discovered Service in a host project and location, with a + # given resource URI. + # + # @overload lookup_discovered_service(request, options = nil) + # Pass arguments to `lookup_discovered_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lookup_discovered_service(parent: nil, uri: nil) + # Pass arguments to `lookup_discovered_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. Host project ID and location to lookup Discovered Service in. + # Expected format: `projects/{project}/locations/{location}`. + # @param uri [::String] + # Required. Resource URI to find DiscoveredService for. + # Accepts both project number and project ID and does translation when + # needed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new + # + # # Call the lookup_discovered_service method. + # result = client.lookup_discovered_service request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. + # p result + # + def lookup_discovered_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lookup_discovered_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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lookup_discovered_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_discovered_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :lookup_discovered_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 Services in an Application. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::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, 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. Fully qualified name of the parent Application to list Services + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @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. 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::AppHub::V1::Service>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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 + + @app_hub_stub.call_rpc :list_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_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 + + ## + # Creates a Service in an Application. + # + # @overload create_service(request, options = nil) + # Pass arguments to `create_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::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(parent: nil, service_id: nil, service: nil, request_id: 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. Fully qualified name of the parent Application to create the + # Service in. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param service_id [::String] + # Required. The Service identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param service [::Google::Cloud::AppHub::V1::Service, ::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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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 + + @app_hub_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 + + ## + # Gets a Service in an Application. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::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] + # Required. Fully qualified name of the Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::Service] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::Service] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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 + + @app_hub_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 in an Application. + # + # @overload update_service(request, options = nil) + # Pass arguments to `update_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::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(update_mask: nil, service: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Service resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] + # Required. The resource being updated. + # @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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new + # + # # Call the update_service method. + # result = client.update_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 update_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::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::AppHub::V1::VERSION + metadata[:"x-goog-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 + + @app_hub_stub.call_rpc :update_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 Service from an Application. + # + # @overload delete_service(request, options = nil) + # Pass arguments to `delete_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::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(name: nil, request_id: 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. Fully qualified name of the Service to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # @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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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 + + @app_hub_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 + + ## + # Lists Discovered Workloads that can be added to an Application in a host + # project and location. + # + # @overload list_discovered_workloads(request, options = nil) + # Pass arguments to `list_discovered_workloads` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_discovered_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_discovered_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to list Discovered Workloads on. + # Expected format: `projects/{project}/locations/{location}`. + # @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. 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::AppHub::V1::DiscoveredWorkload>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new + # + # # Call the list_discovered_workloads method. + # result = client.list_discovered_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. + # p item + # end + # + def list_discovered_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_discovered_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_discovered_workloads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_discovered_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_discovered_workloads, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_discovered_workloads, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Discovered Workload in a host project and location. + # + # @overload get_discovered_workload(request, options = nil) + # Pass arguments to `get_discovered_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_discovered_workload(name: nil) + # Pass arguments to `get_discovered_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Discovered Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new + # + # # Call the get_discovered_workload method. + # result = client.get_discovered_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. + # p result + # + def get_discovered_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_discovered_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_discovered_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_discovered_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_discovered_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a Discovered Workload in a host project and location, with a + # given resource URI. + # + # @overload lookup_discovered_workload(request, options = nil) + # Pass arguments to `lookup_discovered_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lookup_discovered_workload(parent: nil, uri: nil) + # Pass arguments to `lookup_discovered_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to lookup Discovered Workload in. + # Expected format: `projects/{project}/locations/{location}`. + # @param uri [::String] + # Required. Resource URI to find Discovered Workload for. + # Accepts both project number and project ID and does translation when + # needed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new + # + # # Call the lookup_discovered_workload method. + # result = client.lookup_discovered_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. + # p result + # + def lookup_discovered_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lookup_discovered_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lookup_discovered_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_discovered_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :lookup_discovered_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Workloads in an Application. + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the parent Application to list Workloads + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @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. 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::AppHub::V1::Workload>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_workloads, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_workloads, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Workload in an Application. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workload(parent: nil, workload_id: nil, workload: nil, request_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the Application to create Workload in. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param workload_id [::String] + # Required. The Workload identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param workload [::Google::Cloud::AppHub::V1::Workload, ::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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateWorkloadRequest + + # Converts hash and nil to 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :create_workload, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 Workload in an Application. + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Workload in an Application. + # + # @overload update_workload(request, options = nil) + # Pass arguments to `update_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workload(update_mask: nil, workload: nil, request_id: nil) + # Pass arguments to `update_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Workload resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] + # Required. The resource being updated. + # @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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new + # + # # Call the update_workload method. + # result = client.update_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest + + # Converts hash and nil to 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.workload&.name + header_params["workload.name"] = request.workload.name + end + + request_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_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :update_workload, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 Workload from an Application. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workload(name: nil, request_id: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Workload to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # @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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest + + # Converts hash and nil to 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :delete_workload, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 Applications in a host project and location. + # + # @overload list_applications(request, options = nil) + # Pass arguments to `list_applications` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListApplicationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListApplicationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_applications` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to list Applications on. + # Expected format: `projects/{project}/locations/{location}`. + # @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. 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::AppHub::V1::Application>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new + # + # # Call the list_applications method. + # result = client.list_applications request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::Application. + # p item + # end + # + def list_applications request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListApplicationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_applications.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_applications.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_applications.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_applications, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_applications, request, response, 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 an Application in a host project and location. + # + # @overload create_application(request, options = nil) + # Pass arguments to `create_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_application(parent: nil, application_id: nil, application: nil, request_id: nil) + # Pass arguments to `create_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to create Application in. + # Expected format: `projects/{project}/locations/{location}`. + # @param application_id [::String] + # Required. The Application identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param application [::Google::Cloud::AppHub::V1::Application, ::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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new + # + # # Call the create_application method. + # result = client.create_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateApplicationRequest + + # Converts hash and nil to 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_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :create_application, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 Application in a host project and location. + # + # @overload get_application(request, options = nil) + # Pass arguments to `get_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_application(name: nil) + # Pass arguments to `get_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Application to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::Application] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::Application] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetApplicationRequest.new + # + # # Call the get_application method. + # result = client.get_application request + # + # # The returned object is of type Google::Cloud::AppHub::V1::Application. + # p result + # + def get_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_application, request, 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 Application in a host project and location. + # + # @overload update_application(request, options = nil) + # Pass arguments to `update_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::UpdateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_application(update_mask: nil, application: nil, request_id: nil) + # Pass arguments to `update_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Application resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] + # Required. The resource being updated. + # @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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new + # + # # Call the update_application method. + # result = client.update_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateApplicationRequest + + # Converts hash and nil to 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_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.application&.name + header_params["application.name"] = request.application.name + end + + request_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_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :update_application, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 Application in a host project and location. + # + # @overload delete_application(request, options = nil) + # Pass arguments to `delete_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_application(name: nil, request_id: nil) + # Pass arguments to `delete_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Application to delete. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new + # + # # Call the delete_application method. + # result = client.delete_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteApplicationRequest + + # Converts hash and nil to 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_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :delete_application, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 AppHub API. + # + # This class represents the configuration for AppHub, + # providing control 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::AppHub::V1::AppHub::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # lookup_service_project_attachment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppHub::V1::AppHub::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.lookup_service_project_attachment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.lookup_service_project_attachment.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::AppHub::V1::AppHub::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 = "apphub.googleapis.com" + + config_attr :endpoint, nil, ::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 AppHub API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `lookup_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_service_project_attachment + ## + # RPC-specific configuration for `list_service_project_attachments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_project_attachments + ## + # RPC-specific configuration for `create_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_project_attachment + ## + # RPC-specific configuration for `get_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_project_attachment + ## + # RPC-specific configuration for `delete_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_project_attachment + ## + # RPC-specific configuration for `detach_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :detach_service_project_attachment + ## + # RPC-specific configuration for `list_discovered_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_discovered_services + ## + # RPC-specific configuration for `get_discovered_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_discovered_service + ## + # RPC-specific configuration for `lookup_discovered_service` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_discovered_service + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `create_service` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service + ## + # 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 `list_discovered_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_discovered_workloads + ## + # RPC-specific configuration for `get_discovered_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_discovered_workload + ## + # RPC-specific configuration for `lookup_discovered_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_discovered_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + ## + # RPC-specific configuration for `create_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `update_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workload + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + ## + # RPC-specific configuration for `list_applications` + # @return [::Gapic::Config::Method] + # + attr_reader :list_applications + ## + # RPC-specific configuration for `create_application` + # @return [::Gapic::Config::Method] + # + attr_reader :create_application + ## + # RPC-specific configuration for `get_application` + # @return [::Gapic::Config::Method] + # + attr_reader :get_application + ## + # RPC-specific configuration for `update_application` + # @return [::Gapic::Config::Method] + # + attr_reader :update_application + ## + # RPC-specific configuration for `delete_application` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_application + + # @private + def initialize parent_rpcs = nil + lookup_service_project_attachment_config = parent_rpcs.lookup_service_project_attachment if parent_rpcs.respond_to? :lookup_service_project_attachment + @lookup_service_project_attachment = ::Gapic::Config::Method.new lookup_service_project_attachment_config + list_service_project_attachments_config = parent_rpcs.list_service_project_attachments if parent_rpcs.respond_to? :list_service_project_attachments + @list_service_project_attachments = ::Gapic::Config::Method.new list_service_project_attachments_config + create_service_project_attachment_config = parent_rpcs.create_service_project_attachment if parent_rpcs.respond_to? :create_service_project_attachment + @create_service_project_attachment = ::Gapic::Config::Method.new create_service_project_attachment_config + get_service_project_attachment_config = parent_rpcs.get_service_project_attachment if parent_rpcs.respond_to? :get_service_project_attachment + @get_service_project_attachment = ::Gapic::Config::Method.new get_service_project_attachment_config + delete_service_project_attachment_config = parent_rpcs.delete_service_project_attachment if parent_rpcs.respond_to? :delete_service_project_attachment + @delete_service_project_attachment = ::Gapic::Config::Method.new delete_service_project_attachment_config + detach_service_project_attachment_config = parent_rpcs.detach_service_project_attachment if parent_rpcs.respond_to? :detach_service_project_attachment + @detach_service_project_attachment = ::Gapic::Config::Method.new detach_service_project_attachment_config + list_discovered_services_config = parent_rpcs.list_discovered_services if parent_rpcs.respond_to? :list_discovered_services + @list_discovered_services = ::Gapic::Config::Method.new list_discovered_services_config + get_discovered_service_config = parent_rpcs.get_discovered_service if parent_rpcs.respond_to? :get_discovered_service + @get_discovered_service = ::Gapic::Config::Method.new get_discovered_service_config + lookup_discovered_service_config = parent_rpcs.lookup_discovered_service if parent_rpcs.respond_to? :lookup_discovered_service + @lookup_discovered_service = ::Gapic::Config::Method.new lookup_discovered_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 + create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service + @create_service = ::Gapic::Config::Method.new create_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 + 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 + list_discovered_workloads_config = parent_rpcs.list_discovered_workloads if parent_rpcs.respond_to? :list_discovered_workloads + @list_discovered_workloads = ::Gapic::Config::Method.new list_discovered_workloads_config + get_discovered_workload_config = parent_rpcs.get_discovered_workload if parent_rpcs.respond_to? :get_discovered_workload + @get_discovered_workload = ::Gapic::Config::Method.new get_discovered_workload_config + lookup_discovered_workload_config = parent_rpcs.lookup_discovered_workload if parent_rpcs.respond_to? :lookup_discovered_workload + @lookup_discovered_workload = ::Gapic::Config::Method.new lookup_discovered_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload + @update_workload = ::Gapic::Config::Method.new update_workload_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + list_applications_config = parent_rpcs.list_applications if parent_rpcs.respond_to? :list_applications + @list_applications = ::Gapic::Config::Method.new list_applications_config + create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application + @create_application = ::Gapic::Config::Method.new create_application_config + get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application + @get_application = ::Gapic::Config::Method.new get_application_config + update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application + @update_application = ::Gapic::Config::Method.new update_application_config + delete_application_config = parent_rpcs.delete_application if parent_rpcs.respond_to? :delete_application + @delete_application = ::Gapic::Config::Method.new delete_application_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb new file mode 100644 index 000000000000..541dcc24d08f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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 AppHub + module V1 + module AppHub + # Credentials for the AppHub 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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb new file mode 100644 index 000000000000..77b788f9db27 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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 AppHub + module V1 + module AppHub + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppHub 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 AppHub 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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AppHub::V1::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 = "apphub.googleapis.com" + + config_attr :endpoint, nil, ::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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb new file mode 100644 index 000000000000..de11b2b871b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb @@ -0,0 +1,182 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + module AppHub + # Path helper methods for the AppHub API. + module Paths + ## + # Create a fully-qualified Application resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/applications/{application}` + # + # @param project [String] + # @param location [String] + # @param application [String] + # + # @return [::String] + def application_path project:, location:, application: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/applications/#{application}" + end + + ## + # Create a fully-qualified DiscoveredService resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/discoveredServices/{discovered_service}` + # + # @param project [String] + # @param location [String] + # @param discovered_service [String] + # + # @return [::String] + def discovered_service_path project:, location:, discovered_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}/discoveredServices/#{discovered_service}" + end + + ## + # Create a fully-qualified DiscoveredWorkload resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/discoveredWorkloads/{discovered_workload}` + # + # @param project [String] + # @param location [String] + # @param discovered_workload [String] + # + # @return [::String] + def discovered_workload_path project:, location:, discovered_workload: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/discoveredWorkloads/#{discovered_workload}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/applications/{application}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param application [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, application:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "application cannot contain /" if application.to_s.include? "/" + + "projects/#{project}/locations/#{location}/applications/#{application}/services/#{service}" + end + + ## + # Create a fully-qualified ServiceProjectAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/serviceProjectAttachments/{service_project_attachment}` + # + # @param project [String] + # @param location [String] + # @param service_project_attachment [String] + # + # @return [::String] + def service_project_attachment_path project:, location:, service_project_attachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/serviceProjectAttachments/#{service_project_attachment}" + end + + ## + # Create a fully-qualified Workload resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}` + # + # @param project [String] + # @param location [String] + # @param application [String] + # @param workload [String] + # + # @return [::String] + def workload_path project:, location:, application:, workload: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "application cannot contain /" if application.to_s.include? "/" + + "projects/#{project}/locations/#{location}/applications/#{application}/workloads/#{workload}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb new file mode 100644 index 000000000000..41025e868601 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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/app_hub/v1/version" +require "google/cloud/app_hub/v1/bindings_override" + +require "google/cloud/app_hub/v1/app_hub/credentials" +require "google/cloud/app_hub/v1/app_hub/paths" +require "google/cloud/app_hub/v1/app_hub/rest/operations" +require "google/cloud/app_hub/v1/app_hub/rest/client" + +module Google + module Cloud + module AppHub + module V1 + ## + # The App Hub API allows you to manage App Hub resources. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/app_hub/v1/app_hub/rest" + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + module AppHub + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/app_hub/v1/app_hub/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb new file mode 100644 index 000000000000..eed67b697cee --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb @@ -0,0 +1,3247 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/apphub/v1/apphub_service_pb" +require "google/cloud/app_hub/v1/app_hub/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module AppHub + module V1 + module AppHub + module Rest + ## + # REST client for the AppHub service. + # + # The App Hub API allows you to manage App Hub resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_hub_stub + + ## + # Configure the AppHub Client class. + # + # See {::Google::Cloud::AppHub::V1::AppHub::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppHub clients + # ::Google::Cloud::AppHub::V1::AppHub::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", "AppHub", "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.lookup_service_project_attachment.timeout = 60.0 + default_config.rpcs.lookup_service_project_attachment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_service_project_attachments.timeout = 60.0 + default_config.rpcs.list_service_project_attachments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_service_project_attachment.timeout = 60.0 + + default_config.rpcs.get_service_project_attachment.timeout = 60.0 + default_config.rpcs.get_service_project_attachment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_service_project_attachment.timeout = 60.0 + + default_config.rpcs.detach_service_project_attachment.timeout = 60.0 + + default_config.rpcs.list_discovered_services.timeout = 60.0 + default_config.rpcs.list_discovered_services.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_discovered_service.timeout = 60.0 + default_config.rpcs.get_discovered_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.lookup_discovered_service.timeout = 60.0 + default_config.rpcs.lookup_discovered_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_services.timeout = 60.0 + default_config.rpcs.list_services.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_service.timeout = 60.0 + + default_config.rpcs.get_service.timeout = 60.0 + default_config.rpcs.get_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_service.timeout = 60.0 + + default_config.rpcs.delete_service.timeout = 60.0 + + default_config.rpcs.list_discovered_workloads.timeout = 60.0 + default_config.rpcs.list_discovered_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_discovered_workload.timeout = 60.0 + default_config.rpcs.get_discovered_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.lookup_discovered_workload.timeout = 60.0 + default_config.rpcs.lookup_discovered_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workloads.timeout = 60.0 + default_config.rpcs.list_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workload.timeout = 60.0 + + default_config.rpcs.get_workload.timeout = 60.0 + default_config.rpcs.get_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_workload.timeout = 60.0 + + default_config.rpcs.delete_workload.timeout = 60.0 + + default_config.rpcs.list_applications.timeout = 60.0 + default_config.rpcs.list_applications.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_application.timeout = 60.0 + + default_config.rpcs.get_application.timeout = 60.0 + default_config.rpcs.get_application.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_application.timeout = 60.0 + + default_config.rpcs.delete_application.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AppHub 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::AppHub::V1::AppHub::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 + @app_hub_stub.universe_domain + end + + ## + # Create a new AppHub REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppHub 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::AppHub::V1::AppHub::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 + + @app_hub_stub = ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @app_hub_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_hub_stub.endpoint + config.universe_domain = @app_hub_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @app_hub_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 = @app_hub_stub.endpoint + config.universe_domain = @app_hub_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @app_hub_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppHub::V1::AppHub::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 + @app_hub_stub.logger + end + + # Service calls + + ## + # Lists a service project attachment for a given service project. You can + # call this API from any project to find if it is attached to a host project. + # + # @overload lookup_service_project_attachment(request, options = nil) + # Pass arguments to `lookup_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lookup_service_project_attachment(name: nil) + # Pass arguments to `lookup_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Service project ID and location to lookup service project + # attachment for. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new + # + # # Call the lookup_service_project_attachment method. + # result = client.lookup_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. + # p result + # + def lookup_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lookup_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_service_project_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.lookup_service_project_attachment request, 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 service projects attached to the host project. + # + # @overload list_service_project_attachments(request, options = nil) + # Pass arguments to `list_service_project_attachments` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_service_project_attachments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to list service project attachments. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @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. 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::AppHub::V1::ServiceProjectAttachment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new + # + # # Call the list_service_project_attachments method. + # result = client.list_service_project_attachments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. + # p item + # end + # + def list_service_project_attachments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest + + # Converts hash and nil to an options 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_project_attachments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_project_attachments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_service_project_attachments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_service_project_attachments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_service_project_attachments, "service_project_attachments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Attaches a service project to the host project. + # + # @overload create_service_project_attachment(request, options = nil) + # Pass arguments to `create_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_project_attachment(parent: nil, service_project_attachment_id: nil, service_project_attachment: nil, request_id: nil) + # Pass arguments to `create_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to which service project is being + # attached. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @param service_project_attachment_id [::String] + # Required. The service project attachment identifier must contain the + # project id of the service project specified in the + # service_project_attachment.service_project field. + # @param service_project_attachment [::Google::Cloud::AppHub::V1::ServiceProjectAttachment, ::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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new + # + # # Call the create_service_project_attachment method. + # result = client.create_service_project_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest + + # Converts hash and nil to an 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_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_project_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.create_service_project_attachment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 project attachment. + # + # @overload get_service_project_attachment(request, options = nil) + # Pass arguments to `get_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_project_attachment(name: nil) + # Pass arguments to `get_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the service project attachment to + # retrieve. Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new + # + # # Call the get_service_project_attachment method. + # result = client.get_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. + # p result + # + def get_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest + + # Converts hash and nil to an options 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_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_project_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_service_project_attachment request, 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 project attachment. + # + # @overload delete_service_project_attachment(request, options = nil) + # Pass arguments to `delete_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_project_attachment(name: nil, request_id: nil) + # Pass arguments to `delete_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the service project attachment to delete. + # Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + # @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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new + # + # # Call the delete_service_project_attachment method. + # result = client.delete_service_project_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest + + # Converts hash and nil to an 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_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_project_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.delete_service_project_attachment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Detaches a service project from a host project. + # You can call this API from any service project without needing access to + # the host project that it is attached to. + # + # @overload detach_service_project_attachment(request, options = nil) + # Pass arguments to `detach_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload detach_service_project_attachment(name: nil) + # Pass arguments to `detach_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Service project id and location to detach from a host project. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new + # + # # Call the detach_service_project_attachment method. + # result = client.detach_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. + # p result + # + def detach_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.detach_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.detach_service_project_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.detach_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.detach_service_project_attachment request, 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 Discovered Services that can be added to an Application in a host + # project and location. + # + # @overload list_discovered_services(request, options = nil) + # Pass arguments to `list_discovered_services` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_discovered_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_discovered_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. Project and location to list Discovered Services on. + # Expected format: `projects/{project}/locations/{location}`. + # @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. 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::AppHub::V1::DiscoveredService>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new + # + # # Call the list_discovered_services method. + # result = client.list_discovered_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::AppHub::V1::DiscoveredService. + # p item + # end + # + def list_discovered_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_discovered_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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_discovered_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_discovered_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_discovered_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_discovered_services, "discovered_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 Discovered Service in a host project and location. + # + # @overload get_discovered_service(request, options = nil) + # Pass arguments to `get_discovered_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_discovered_service(name: nil) + # Pass arguments to `get_discovered_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. Fully qualified name of the Discovered Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new + # + # # Call the get_discovered_service method. + # result = client.get_discovered_service request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. + # p result + # + def get_discovered_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_discovered_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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_discovered_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_discovered_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_discovered_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 a Discovered Service in a host project and location, with a + # given resource URI. + # + # @overload lookup_discovered_service(request, options = nil) + # Pass arguments to `lookup_discovered_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lookup_discovered_service(parent: nil, uri: nil) + # Pass arguments to `lookup_discovered_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. Host project ID and location to lookup Discovered Service in. + # Expected format: `projects/{project}/locations/{location}`. + # @param uri [::String] + # Required. Resource URI to find DiscoveredService for. + # Accepts both project number and project ID and does translation when + # needed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new + # + # # Call the lookup_discovered_service method. + # result = client.lookup_discovered_service request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. + # p result + # + def lookup_discovered_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lookup_discovered_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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_discovered_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_discovered_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.lookup_discovered_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 Services in an Application. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::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, 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. Fully qualified name of the parent Application to list Services + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @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. 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::AppHub::V1::Service>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @app_hub_stub.list_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_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 + + ## + # Creates a Service in an Application. + # + # @overload create_service(request, options = nil) + # Pass arguments to `create_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::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(parent: nil, service_id: nil, service: nil, request_id: 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. Fully qualified name of the parent Application to create the + # Service in. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param service_id [::String] + # Required. The Service identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param service [::Google::Cloud::AppHub::V1::Service, ::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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @app_hub_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 + + ## + # Gets a Service in an Application. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::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] + # Required. Fully qualified name of the Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Service] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @app_hub_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 in an Application. + # + # @overload update_service(request, options = nil) + # Pass arguments to `update_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::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(update_mask: nil, service: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Service resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] + # Required. The resource being updated. + # @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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new + # + # # Call the update_service method. + # result = client.update_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 update_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @app_hub_stub.update_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 Service from an Application. + # + # @overload delete_service(request, options = nil) + # Pass arguments to `delete_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::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(name: nil, request_id: 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. Fully qualified name of the Service to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # @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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @app_hub_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 + + ## + # Lists Discovered Workloads that can be added to an Application in a host + # project and location. + # + # @overload list_discovered_workloads(request, options = nil) + # Pass arguments to `list_discovered_workloads` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_discovered_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_discovered_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to list Discovered Workloads on. + # Expected format: `projects/{project}/locations/{location}`. + # @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. 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::AppHub::V1::DiscoveredWorkload>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new + # + # # Call the list_discovered_workloads method. + # result = client.list_discovered_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. + # p item + # end + # + def list_discovered_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_discovered_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_discovered_workloads.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_discovered_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_discovered_workloads request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_discovered_workloads, "discovered_workloads", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Discovered Workload in a host project and location. + # + # @overload get_discovered_workload(request, options = nil) + # Pass arguments to `get_discovered_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_discovered_workload(name: nil) + # Pass arguments to `get_discovered_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Discovered Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new + # + # # Call the get_discovered_workload method. + # result = client.get_discovered_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. + # p result + # + def get_discovered_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_discovered_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_discovered_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_discovered_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_discovered_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a Discovered Workload in a host project and location, with a + # given resource URI. + # + # @overload lookup_discovered_workload(request, options = nil) + # Pass arguments to `lookup_discovered_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lookup_discovered_workload(parent: nil, uri: nil) + # Pass arguments to `lookup_discovered_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to lookup Discovered Workload in. + # Expected format: `projects/{project}/locations/{location}`. + # @param uri [::String] + # Required. Resource URI to find Discovered Workload for. + # Accepts both project number and project ID and does translation when + # needed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new + # + # # Call the lookup_discovered_workload method. + # result = client.lookup_discovered_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. + # p result + # + def lookup_discovered_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lookup_discovered_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_discovered_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_discovered_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.lookup_discovered_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Workloads in an Application. + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the parent Application to list Workloads + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @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. 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::AppHub::V1::Workload>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_workloads request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_workloads, "workloads", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Workload in an Application. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workload(parent: nil, workload_id: nil, workload: nil, request_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the Application to create Workload in. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param workload_id [::String] + # Required. The Workload identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param workload [::Google::Cloud::AppHub::V1::Workload, ::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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateWorkloadRequest + + # Converts hash and nil to an 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.create_workload request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Workload in an Application. + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Workload in an Application. + # + # @overload update_workload(request, options = nil) + # Pass arguments to `update_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workload(update_mask: nil, workload: nil, request_id: nil) + # Pass arguments to `update_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Workload resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] + # Required. The resource being updated. + # @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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new + # + # # Call the update_workload method. + # result = client.update_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest + + # Converts hash and nil to an 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.update_workload request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Workload from an Application. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workload(name: nil, request_id: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Workload to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # @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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest + + # Converts hash and nil to an 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.delete_workload request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Applications in a host project and location. + # + # @overload list_applications(request, options = nil) + # Pass arguments to `list_applications` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListApplicationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListApplicationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_applications` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to list Applications on. + # Expected format: `projects/{project}/locations/{location}`. + # @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. 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::AppHub::V1::Application>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new + # + # # Call the list_applications method. + # result = client.list_applications request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::Application. + # p item + # end + # + def list_applications request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListApplicationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_applications.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_applications.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_applications.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_applications request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_applications, "applications", request, result, 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 Application in a host project and location. + # + # @overload create_application(request, options = nil) + # Pass arguments to `create_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_application(parent: nil, application_id: nil, application: nil, request_id: nil) + # Pass arguments to `create_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to create Application in. + # Expected format: `projects/{project}/locations/{location}`. + # @param application_id [::String] + # Required. The Application identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param application [::Google::Cloud::AppHub::V1::Application, ::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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new + # + # # Call the create_application method. + # result = client.create_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateApplicationRequest + + # Converts hash and nil to an 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_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.create_application request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Application in a host project and location. + # + # @overload get_application(request, options = nil) + # Pass arguments to `get_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_application(name: nil) + # Pass arguments to `get_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Application to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Application] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Application] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetApplicationRequest.new + # + # # Call the get_application method. + # result = client.get_application request + # + # # The returned object is of type Google::Cloud::AppHub::V1::Application. + # p result + # + def get_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_application request, 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 Application in a host project and location. + # + # @overload update_application(request, options = nil) + # Pass arguments to `update_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::UpdateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_application(update_mask: nil, application: nil, request_id: nil) + # Pass arguments to `update_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Application resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] + # Required. The resource being updated. + # @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/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new + # + # # Call the update_application method. + # result = client.update_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateApplicationRequest + + # Converts hash and nil to an 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_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.update_application request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Application in a host project and location. + # + # @overload delete_application(request, options = nil) + # Pass arguments to `delete_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_application(name: nil, request_id: nil) + # Pass arguments to `delete_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Application to delete. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new + # + # # Call the delete_application method. + # result = client.delete_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteApplicationRequest + + # Converts hash and nil to an 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_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.delete_application request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 AppHub REST API. + # + # This class represents the configuration for AppHub 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::AppHub::V1::AppHub::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 + # # lookup_service_project_attachment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.lookup_service_project_attachment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.lookup_service_project_attachment.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "apphub.googleapis.com" + + config_attr :endpoint, nil, ::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 AppHub API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `lookup_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_service_project_attachment + ## + # RPC-specific configuration for `list_service_project_attachments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_project_attachments + ## + # RPC-specific configuration for `create_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_project_attachment + ## + # RPC-specific configuration for `get_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_project_attachment + ## + # RPC-specific configuration for `delete_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_project_attachment + ## + # RPC-specific configuration for `detach_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :detach_service_project_attachment + ## + # RPC-specific configuration for `list_discovered_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_discovered_services + ## + # RPC-specific configuration for `get_discovered_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_discovered_service + ## + # RPC-specific configuration for `lookup_discovered_service` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_discovered_service + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `create_service` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service + ## + # 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 `list_discovered_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_discovered_workloads + ## + # RPC-specific configuration for `get_discovered_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_discovered_workload + ## + # RPC-specific configuration for `lookup_discovered_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_discovered_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + ## + # RPC-specific configuration for `create_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `update_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workload + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + ## + # RPC-specific configuration for `list_applications` + # @return [::Gapic::Config::Method] + # + attr_reader :list_applications + ## + # RPC-specific configuration for `create_application` + # @return [::Gapic::Config::Method] + # + attr_reader :create_application + ## + # RPC-specific configuration for `get_application` + # @return [::Gapic::Config::Method] + # + attr_reader :get_application + ## + # RPC-specific configuration for `update_application` + # @return [::Gapic::Config::Method] + # + attr_reader :update_application + ## + # RPC-specific configuration for `delete_application` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_application + + # @private + def initialize parent_rpcs = nil + lookup_service_project_attachment_config = parent_rpcs.lookup_service_project_attachment if parent_rpcs.respond_to? :lookup_service_project_attachment + @lookup_service_project_attachment = ::Gapic::Config::Method.new lookup_service_project_attachment_config + list_service_project_attachments_config = parent_rpcs.list_service_project_attachments if parent_rpcs.respond_to? :list_service_project_attachments + @list_service_project_attachments = ::Gapic::Config::Method.new list_service_project_attachments_config + create_service_project_attachment_config = parent_rpcs.create_service_project_attachment if parent_rpcs.respond_to? :create_service_project_attachment + @create_service_project_attachment = ::Gapic::Config::Method.new create_service_project_attachment_config + get_service_project_attachment_config = parent_rpcs.get_service_project_attachment if parent_rpcs.respond_to? :get_service_project_attachment + @get_service_project_attachment = ::Gapic::Config::Method.new get_service_project_attachment_config + delete_service_project_attachment_config = parent_rpcs.delete_service_project_attachment if parent_rpcs.respond_to? :delete_service_project_attachment + @delete_service_project_attachment = ::Gapic::Config::Method.new delete_service_project_attachment_config + detach_service_project_attachment_config = parent_rpcs.detach_service_project_attachment if parent_rpcs.respond_to? :detach_service_project_attachment + @detach_service_project_attachment = ::Gapic::Config::Method.new detach_service_project_attachment_config + list_discovered_services_config = parent_rpcs.list_discovered_services if parent_rpcs.respond_to? :list_discovered_services + @list_discovered_services = ::Gapic::Config::Method.new list_discovered_services_config + get_discovered_service_config = parent_rpcs.get_discovered_service if parent_rpcs.respond_to? :get_discovered_service + @get_discovered_service = ::Gapic::Config::Method.new get_discovered_service_config + lookup_discovered_service_config = parent_rpcs.lookup_discovered_service if parent_rpcs.respond_to? :lookup_discovered_service + @lookup_discovered_service = ::Gapic::Config::Method.new lookup_discovered_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 + create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service + @create_service = ::Gapic::Config::Method.new create_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 + 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 + list_discovered_workloads_config = parent_rpcs.list_discovered_workloads if parent_rpcs.respond_to? :list_discovered_workloads + @list_discovered_workloads = ::Gapic::Config::Method.new list_discovered_workloads_config + get_discovered_workload_config = parent_rpcs.get_discovered_workload if parent_rpcs.respond_to? :get_discovered_workload + @get_discovered_workload = ::Gapic::Config::Method.new get_discovered_workload_config + lookup_discovered_workload_config = parent_rpcs.lookup_discovered_workload if parent_rpcs.respond_to? :lookup_discovered_workload + @lookup_discovered_workload = ::Gapic::Config::Method.new lookup_discovered_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload + @update_workload = ::Gapic::Config::Method.new update_workload_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + list_applications_config = parent_rpcs.list_applications if parent_rpcs.respond_to? :list_applications + @list_applications = ::Gapic::Config::Method.new list_applications_config + create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application + @create_application = ::Gapic::Config::Method.new create_application_config + get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application + @get_application = ::Gapic::Config::Method.new get_application_config + update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application + @update_application = ::Gapic::Config::Method.new update_application_config + delete_application_config = parent_rpcs.delete_application if parent_rpcs.respond_to? :delete_application + @delete_application = ::Gapic::Config::Method.new delete_application_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb new file mode 100644 index 000000000000..c65c0c87c00c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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 AppHub + module V1 + module AppHub + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppHub 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 AppHub 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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "apphub.googleapis.com" + + config_attr :endpoint, nil, ::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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb new file mode 100644 index 000000000000..8c21b329cfc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb @@ -0,0 +1,1736 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/apphub/v1/apphub_service_pb" + +module Google + module Cloud + module AppHub + module V1 + module AppHub + module Rest + ## + # REST service stub for the AppHub 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 lookup_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # A result object deserialized from the server's reply + def lookup_service_project_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_service_project_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "lookup_service_project_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.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_project_attachments REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse] + # A result object deserialized from the server's reply + def list_service_project_attachments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_service_project_attachments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_project_attachments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.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_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_project_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_project_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_project_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_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_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # A result object deserialized from the server's reply + def get_service_project_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_project_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_project_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.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_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_project_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_project_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_project_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the detach_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # A result object deserialized from the server's reply + def detach_service_project_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_detach_service_project_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "detach_service_project_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.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_discovered_services REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse] + # A result object deserialized from the server's reply + def list_discovered_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_discovered_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_discovered_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_discovered_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredService] + # A result object deserialized from the server's reply + def get_discovered_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_discovered_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_discovered_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::DiscoveredService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the lookup_discovered_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # A result object deserialized from the server's reply + def lookup_discovered_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_discovered_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: "lookup_discovered_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.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::AppHub::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::AppHub::V1::ListServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::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::AppHub::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 create_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::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 get_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::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::AppHub::V1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::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::AppHub::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 update_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # 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::Longrunning::Operation.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::AppHub::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 list_discovered_workloads REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse] + # A result object deserialized from the server's reply + def list_discovered_workloads request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_discovered_workloads_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_discovered_workloads", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_discovered_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # A result object deserialized from the server's reply + def get_discovered_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_discovered_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_discovered_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the lookup_discovered_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # A result object deserialized from the server's reply + def lookup_discovered_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_discovered_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "lookup_discovered_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workloads REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListWorkloadsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListWorkloadsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListWorkloadsResponse] + # A result object deserialized from the server's reply + def list_workloads request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_workloads", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Workload] + # A result object deserialized from the server's reply + def get_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::Workload.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_applications REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListApplicationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListApplicationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListApplicationsResponse] + # A result object deserialized from the server's reply + def list_applications request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_applications_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_applications", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.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_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Application] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Application] + # A result object deserialized from the server's reply + def get_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::Application.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_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::UpdateApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 lookup_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_service_project_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:lookupServiceProjectAttachment", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_service_project_attachments REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest] + # A 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_project_attachments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/serviceProjectAttachments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest] + # 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_project_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/serviceProjectAttachments", + body: "service_project_attachment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest] + # A 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_project_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest] + # 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_project_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the detach_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_detach_service_project_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:detachServiceProjectAttachment", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_discovered_services REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_discovered_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/discoveredServices", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_discovered_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_discovered_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/discoveredServices/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_discovered_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_discovered_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/discoveredServices:lookup", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_services REST call + # + # @param request_pb [::Google::Cloud::AppHub::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{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::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/{parent}/services", + body: "service", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::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{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::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: "/v1/{service.name}", + body: "service", + matches: [ + ["service.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::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/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_discovered_workloads REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_discovered_workloads_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/discoveredWorkloads", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_discovered_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_discovered_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/discoveredWorkloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_discovered_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_discovered_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/discoveredWorkloads:lookup", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workloads REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListWorkloadsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workloads_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workloads", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateWorkloadRequest] + # 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_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/workloads", + body: "workload", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest] + # 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_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{workload.name}", + body: "workload", + matches: [ + ["workload.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest] + # 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_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_applications REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListApplicationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_applications_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/applications", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateApplicationRequest] + # 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_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/applications", + body: "application", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetApplicationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::UpdateApplicationRequest] + # 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_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{application.name}", + body: "application", + matches: [ + ["application.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteApplicationRequest] + # 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_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb new file mode 100644 index 000000000000..126149ab3449 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/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 AppHub + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/app_hub/v1/rest" + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppHub"] + 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/[^/]+/applications/[^/]+/?$}, 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/[^/]+/applications/[^/]+/?$}, 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/[^/]+/applications/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb new file mode 100644 index 000000000000..722942549fd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/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/app_hub/v1/app_hub/rest" +require "google/cloud/app_hub/v1/bindings_override" +require "google/cloud/app_hub/v1/version" + +module Google + module Cloud + module AppHub + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/app_hub/v1/rest" + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb new file mode 100644 index 000000000000..471b04475c54 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb new file mode 100644 index 000000000000..12080e3972e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/apphub/v1/apphub_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/apphub/v1/application_pb' +require 'google/cloud/apphub/v1/service_pb' +require 'google/cloud/apphub/v1/service_project_attachment_pb' +require 'google/cloud/apphub/v1/workload_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/apphub/v1/apphub_service.proto\x12\x16google.cloud.apphub.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/apphub/v1/application.proto\x1a$google/cloud/apphub/v1/service.proto\x1a\x37google/cloud/apphub/v1/service_project_attachment.proto\x1a%google/cloud/apphub/v1/workload.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"`\n%LookupServiceProjectAttachmentRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"~\n&LookupServiceProjectAttachmentResponse\x12T\n\x1aservice_project_attachment\x18\x01 \x01(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachment\"\xcb\x01\n$ListServiceProjectAttachmentsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.apphub.googleapis.com/ServiceProjectAttachment\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\"\xac\x01\n%ListServiceProjectAttachmentsResponse\x12U\n\x1bservice_project_attachments\x18\x01 \x03(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8f\x02\n%CreateServiceProjectAttachmentRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.apphub.googleapis.com/ServiceProjectAttachment\x12*\n\x1dservice_project_attachment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x1aservice_project_attachment\x18\x03 \x01(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachmentB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\"GetServiceProjectAttachmentRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.apphub.googleapis.com/ServiceProjectAttachment\"\x86\x01\n%DeleteServiceProjectAttachmentRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.apphub.googleapis.com/ServiceProjectAttachment\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"`\n%DetachServiceProjectAttachmentRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"(\n&DetachServiceProjectAttachmentResponse\"\xa9\x01\n\x13ListServicesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x61pphub.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\"w\n\x14ListServicesResponse\x12\x31\n\x08services\x18\x01 \x03(\x0b\x32\x1f.google.cloud.apphub.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbd\x01\n\x1dListDiscoveredServicesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'apphub.googleapis.com/DiscoveredService\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\"\x96\x01\n\x1eListDiscoveredServicesResponse\x12\x46\n\x13\x64iscovered_services\x18\x01 \x03(\x0b\x32).google.cloud.apphub.v1.DiscoveredService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xb6\x01\n\x14\x43reateServiceRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x61pphub.googleapis.com/Service\x12\x17\n\nservice_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x35\n\x07service\x18\x03 \x01(\x0b\x32\x1f.google.cloud.apphub.v1.ServiceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"H\n\x11GetServiceRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61pphub.googleapis.com/Service\"\\\n\x1bGetDiscoveredServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'apphub.googleapis.com/DiscoveredService\"s\n\x1eLookupDiscoveredServiceRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'apphub.googleapis.com/DiscoveredService\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"h\n\x1fLookupDiscoveredServiceResponse\x12\x45\n\x12\x64iscovered_service\x18\x01 \x01(\x0b\x32).google.cloud.apphub.v1.DiscoveredService\"\x9c\x01\n\x14UpdateServiceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x07service\x18\x02 \x01(\x0b\x32\x1f.google.cloud.apphub.v1.ServiceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"d\n\x14\x44\x65leteServiceRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61pphub.googleapis.com/Service\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb1\x01\n\x17ListApplicationsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!apphub.googleapis.com/Application\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\"\x83\x01\n\x18ListApplicationsResponse\x12\x39\n\x0c\x61pplications\x18\x01 \x03(\x0b\x32#.google.cloud.apphub.v1.Application\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xca\x01\n\x18\x43reateApplicationRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!apphub.googleapis.com/Application\x12\x1b\n\x0e\x61pplication_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x0b\x61pplication\x18\x03 \x01(\x0b\x32#.google.cloud.apphub.v1.ApplicationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"P\n\x15GetApplicationRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!apphub.googleapis.com/Application\"\xa8\x01\n\x18UpdateApplicationRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12=\n\x0b\x61pplication\x18\x02 \x01(\x0b\x32#.google.cloud.apphub.v1.ApplicationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"l\n\x18\x44\x65leteApplicationRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!apphub.googleapis.com/Application\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\x14ListWorkloadsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x61pphub.googleapis.com/Workload\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\"z\n\x15ListWorkloadsResponse\x12\x33\n\tworkloads\x18\x01 \x03(\x0b\x32 .google.cloud.apphub.v1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbf\x01\n\x1eListDiscoveredWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apphub.googleapis.com/DiscoveredWorkload\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\"\x99\x01\n\x1fListDiscoveredWorkloadsResponse\x12H\n\x14\x64iscovered_workloads\x18\x01 \x03(\x0b\x32*.google.cloud.apphub.v1.DiscoveredWorkload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbb\x01\n\x15\x43reateWorkloadRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x61pphub.googleapis.com/Workload\x12\x18\n\x0bworkload_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x08workload\x18\x03 \x01(\x0b\x32 .google.cloud.apphub.v1.WorkloadB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"J\n\x12GetWorkloadRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61pphub.googleapis.com/Workload\"^\n\x1cGetDiscoveredWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(apphub.googleapis.com/DiscoveredWorkload\"u\n\x1fLookupDiscoveredWorkloadRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apphub.googleapis.com/DiscoveredWorkload\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"k\n LookupDiscoveredWorkloadResponse\x12G\n\x13\x64iscovered_workload\x18\x01 \x01(\x0b\x32*.google.cloud.apphub.v1.DiscoveredWorkload\"\x9f\x01\n\x15UpdateWorkloadRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x37\n\x08workload\x18\x02 \x01(\x0b\x32 .google.cloud.apphub.v1.WorkloadB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"f\n\x15\x44\x65leteWorkloadRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61pphub.googleapis.com/Workload\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\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\x32\xa7/\n\x06\x41ppHub\x12\xf0\x01\n\x1eLookupServiceProjectAttachment\x12=.google.cloud.apphub.v1.LookupServiceProjectAttachmentRequest\x1a>.google.cloud.apphub.v1.LookupServiceProjectAttachmentResponse\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*}:lookupServiceProjectAttachment\x12\xec\x01\n\x1dListServiceProjectAttachments\x12<.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest\x1a=.google.cloud.apphub.v1.ListServiceProjectAttachmentsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*}/serviceProjectAttachments\x12\xd4\x02\n\x1e\x43reateServiceProjectAttachment\x12=.google.cloud.apphub.v1.CreateServiceProjectAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\xd3\x01\xca\x41-\n\x18ServiceProjectAttachment\x12\x11OperationMetadata\xda\x41?parent,service_project_attachment,service_project_attachment_id\x82\xd3\xe4\x93\x02[\"=/v1/{parent=projects/*/locations/*}/serviceProjectAttachments:\x1aservice_project_attachment\x12\xd9\x01\n\x1bGetServiceProjectAttachment\x12:.google.cloud.apphub.v1.GetServiceProjectAttachmentRequest\x1a\x30.google.cloud.apphub.v1.ServiceProjectAttachment\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/serviceProjectAttachments/*}\x12\xf9\x01\n\x1e\x44\x65leteServiceProjectAttachment\x12=.google.cloud.apphub.v1.DeleteServiceProjectAttachmentRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/serviceProjectAttachments/*}\x12\xf3\x01\n\x1e\x44\x65tachServiceProjectAttachment\x12=.google.cloud.apphub.v1.DetachServiceProjectAttachmentRequest\x1a>.google.cloud.apphub.v1.DetachServiceProjectAttachmentResponse\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\"@/v1/{name=projects/*/locations/*}:detachServiceProjectAttachment:\x01*\x12\xd0\x01\n\x16ListDiscoveredServices\x12\x35.google.cloud.apphub.v1.ListDiscoveredServicesRequest\x1a\x36.google.cloud.apphub.v1.ListDiscoveredServicesResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*}/discoveredServices\x12\xbd\x01\n\x14GetDiscoveredService\x12\x33.google.cloud.apphub.v1.GetDiscoveredServiceRequest\x1a).google.cloud.apphub.v1.DiscoveredService\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/discoveredServices/*}\x12\xde\x01\n\x17LookupDiscoveredService\x12\x36.google.cloud.apphub.v1.LookupDiscoveredServiceRequest\x1a\x37.google.cloud.apphub.v1.LookupDiscoveredServiceResponse\"R\xda\x41\nparent,uri\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*}/discoveredServices:lookup\x12\xb7\x01\n\x0cListServices\x12+.google.cloud.apphub.v1.ListServicesRequest\x1a,.google.cloud.apphub.v1.ListServicesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/applications/*}/services\x12\xe6\x01\n\rCreateService\x12,.google.cloud.apphub.v1.CreateServiceRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1c\n\x07Service\x12\x11OperationMetadata\xda\x41\x19parent,service,service_id\x82\xd3\xe4\x93\x02\x46\";/v1/{parent=projects/*/locations/*/applications/*}/services:\x07service\x12\xa4\x01\n\nGetService\x12).google.cloud.apphub.v1.GetServiceRequest\x1a\x1f.google.cloud.apphub.v1.Service\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/applications/*/services/*}\x12\xe8\x01\n\rUpdateService\x12,.google.cloud.apphub.v1.UpdateServiceRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1c\n\x07Service\x12\x11OperationMetadata\xda\x41\x13service,update_mask\x82\xd3\xe4\x93\x02N2C/v1/{service.name=projects/*/locations/*/applications/*/services/*}:\x07service\x12\xd5\x01\n\rDeleteService\x12,.google.cloud.apphub.v1.DeleteServiceRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/applications/*/services/*}\x12\xd4\x01\n\x17ListDiscoveredWorkloads\x12\x36.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest\x1a\x37.google.cloud.apphub.v1.ListDiscoveredWorkloadsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/discoveredWorkloads\x12\xc1\x01\n\x15GetDiscoveredWorkload\x12\x34.google.cloud.apphub.v1.GetDiscoveredWorkloadRequest\x1a*.google.cloud.apphub.v1.DiscoveredWorkload\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/discoveredWorkloads/*}\x12\xe2\x01\n\x18LookupDiscoveredWorkload\x12\x37.google.cloud.apphub.v1.LookupDiscoveredWorkloadRequest\x1a\x38.google.cloud.apphub.v1.LookupDiscoveredWorkloadResponse\"S\xda\x41\nparent,uri\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*}/discoveredWorkloads:lookup\x12\xbb\x01\n\rListWorkloads\x12,.google.cloud.apphub.v1.ListWorkloadsRequest\x1a-.google.cloud.apphub.v1.ListWorkloadsResponse\"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-app_hub-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb new file mode 100644 index 000000000000..1b34c270e2f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb @@ -0,0 +1,787 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + # Request for LookupServiceProjectAttachment. + # @!attribute [rw] name + # @return [::String] + # Required. Service project ID and location to lookup service project + # attachment for. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + class LookupServiceProjectAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for LookupServiceProjectAttachment. + # @!attribute [rw] service_project_attachment + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # Service project attachment for a project if exists, empty otherwise. + class LookupServiceProjectAttachmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListServiceProjectAttachments. + # @!attribute [rw] parent + # @return [::String] + # Required. Host project ID and location to list service project attachments. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListServiceProjectAttachmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListServiceProjectAttachments. + # @!attribute [rw] service_project_attachments + # @return [::Array<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] + # List of service project attachments. + # @!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 ListServiceProjectAttachmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateServiceProjectAttachment. + # @!attribute [rw] parent + # @return [::String] + # Required. Host project ID and location to which service project is being + # attached. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] service_project_attachment_id + # @return [::String] + # Required. The service project attachment identifier must contain the + # project id of the service project specified in the + # service_project_attachment.service_project field. + # @!attribute [rw] service_project_attachment + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # 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 CreateServiceProjectAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetServiceProjectAttachment. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the service project attachment to + # retrieve. Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + class GetServiceProjectAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteServiceProjectAttachment. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the service project attachment to delete. + # Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + # @!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). + class DeleteServiceProjectAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DetachServiceProjectAttachment. + # @!attribute [rw] name + # @return [::String] + # Required. Service project id and location to detach from a host project. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + class DetachServiceProjectAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for DetachServiceProjectAttachment. + class DetachServiceProjectAttachmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListServices. + # @!attribute [rw] parent + # @return [::String] + # Required. Fully qualified name of the parent Application to list Services + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @!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. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListServices. + # @!attribute [rw] services + # @return [::Array<::Google::Cloud::AppHub::V1::Service>] + # List of Services. + # @!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 ListServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListDiscoveredServices. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location to list Discovered Services on. + # Expected format: `projects/{project}/locations/{location}`. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListDiscoveredServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListDiscoveredServices. + # @!attribute [rw] discovered_services + # @return [::Array<::Google::Cloud::AppHub::V1::DiscoveredService>] + # List of Discovered Services. + # @!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 ListDiscoveredServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateService. + # @!attribute [rw] parent + # @return [::String] + # Required. Fully qualified name of the parent Application to create the + # Service in. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @!attribute [rw] service_id + # @return [::String] + # Required. The Service identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @!attribute [rw] service + # @return [::Google::Cloud::AppHub::V1::Service] + # 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 CreateServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetService. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + class GetServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetDiscoveredService. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Discovered Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. + class GetDiscoveredServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for LookupDiscoveredService. + # @!attribute [rw] parent + # @return [::String] + # Required. Host project ID and location to lookup Discovered Service in. + # Expected format: `projects/{project}/locations/{location}`. + # @!attribute [rw] uri + # @return [::String] + # Required. Resource URI to find DiscoveredService for. + # Accepts both project number and project ID and does translation when + # needed. + class LookupDiscoveredServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for LookupDiscoveredService. + # @!attribute [rw] discovered_service + # @return [::Google::Cloud::AppHub::V1::DiscoveredService] + # Discovered Service if exists, empty otherwise. + class LookupDiscoveredServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for UpdateService. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Service resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @!attribute [rw] service + # @return [::Google::Cloud::AppHub::V1::Service] + # Required. The resource being updated. + # @!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 UpdateServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteService. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Service to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # @!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). + class DeleteServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListApplications. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location to list Applications on. + # Expected format: `projects/{project}/locations/{location}`. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListApplicationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListApplications. + # @!attribute [rw] applications + # @return [::Array<::Google::Cloud::AppHub::V1::Application>] + # List of Applications. + # @!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 ListApplicationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateApplication. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location to create Application in. + # Expected format: `projects/{project}/locations/{location}`. + # @!attribute [rw] application_id + # @return [::String] + # Required. The Application identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @!attribute [rw] application + # @return [::Google::Cloud::AppHub::V1::Application] + # 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 CreateApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetApplication. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Application to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + class GetApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for UpdateApplication. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Application resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @!attribute [rw] application + # @return [::Google::Cloud::AppHub::V1::Application] + # Required. The resource being updated. + # @!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 UpdateApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteApplication. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Application to delete. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @!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). + class DeleteApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListWorkloads. + # @!attribute [rw] parent + # @return [::String] + # Required. Fully qualified name of the parent Application to list Workloads + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListWorkloadsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListWorkloads. + # @!attribute [rw] workloads + # @return [::Array<::Google::Cloud::AppHub::V1::Workload>] + # List of Workloads. + # @!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 ListWorkloadsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListDiscoveredWorkloads. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location to list Discovered Workloads on. + # Expected format: `projects/{project}/locations/{location}`. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListDiscoveredWorkloadsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListDiscoveredWorkloads. + # @!attribute [rw] discovered_workloads + # @return [::Array<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] + # List of Discovered Workloads. + # @!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 ListDiscoveredWorkloadsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateWorkload. + # @!attribute [rw] parent + # @return [::String] + # Required. Fully qualified name of the Application to create Workload in. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @!attribute [rw] workload_id + # @return [::String] + # Required. The Workload identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @!attribute [rw] workload + # @return [::Google::Cloud::AppHub::V1::Workload] + # 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 CreateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetWorkload. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + class GetWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetDiscoveredWorkload. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Discovered Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. + class GetDiscoveredWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for LookupDiscoveredWorkload. + # @!attribute [rw] parent + # @return [::String] + # Required. Host project ID and location to lookup Discovered Workload in. + # Expected format: `projects/{project}/locations/{location}`. + # @!attribute [rw] uri + # @return [::String] + # Required. Resource URI to find Discovered Workload for. + # Accepts both project number and project ID and does translation when + # needed. + class LookupDiscoveredWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for LookupDiscoveredWorkload. + # @!attribute [rw] discovered_workload + # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # Discovered Workload if exists, empty otherwise. + class LookupDiscoveredWorkloadResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for UpdateWorkload. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Workload resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @!attribute [rw] workload + # @return [::Google::Cloud::AppHub::V1::Workload] + # Required. The resource being updated. + # @!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 UpdateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteWorkload. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Workload to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # @!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). + class DeleteWorkloadRequest + 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 been cancelled successfully + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb new file mode 100644 index 000000000000..e67a1568db65 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.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 AppHub + module V1 + # Application defines the governance boundary for App Hub entities that + # perform a logical end-to-end business function. + # App Hub supports application level IAM permission to align with governance + # requirements. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of an Application. Format: + # `"projects/{host-project-id}/locations/{location}/applications/{application-id}"` + # @!attribute [rw] display_name + # @return [::String] + # Optional. User-defined name for the Application. + # Can have a maximum length of 63 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User-defined description of an Application. + # Can have a maximum length of 2048 characters. + # @!attribute [rw] attributes + # @return [::Google::Cloud::AppHub::V1::Attributes] + # Optional. Consumer provided attributes. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update time. + # @!attribute [rw] scope + # @return [::Google::Cloud::AppHub::V1::Scope] + # Required. Immutable. Defines what data can be included into this + # Application. Limits which Services and Workloads can be registered. + # @!attribute [r] uid + # @return [::String] + # Output only. A universally unique identifier (in UUID4 format) for the + # `Application`. + # @!attribute [r] state + # @return [::Google::Cloud::AppHub::V1::Application::State] + # Output only. Application state. + class Application + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Application state. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The Application is being created. + CREATING = 1 + + # The Application is ready to register Services and Workloads. + ACTIVE = 2 + + # The Application is being deleted. + DELETING = 3 + end + end + + # Scope of an application. + # @!attribute [rw] type + # @return [::Google::Cloud::AppHub::V1::Scope::Type] + # Required. Scope Type. + class Scope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Scope Type. + module Type + # Unspecified type. + TYPE_UNSPECIFIED = 0 + + # Regional type. + REGIONAL = 1 + + # Global type. + GLOBAL = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb new file mode 100644 index 000000000000..841a166336a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.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 AppHub + module V1 + # Consumer provided attributes. + # @!attribute [rw] criticality + # @return [::Google::Cloud::AppHub::V1::Criticality] + # Optional. User-defined criticality information. + # @!attribute [rw] environment + # @return [::Google::Cloud::AppHub::V1::Environment] + # Optional. User-defined environment information. + # @!attribute [rw] developer_owners + # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] + # Optional. Developer team that owns development and coding. + # @!attribute [rw] operator_owners + # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] + # Optional. Operator team that ensures runtime and operations. + # @!attribute [rw] business_owners + # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] + # Optional. Business team that ensures user needs are met and value is + # delivered + class Attributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Criticality of the Application, Service, or Workload + # @!attribute [rw] type + # @return [::Google::Cloud::AppHub::V1::Criticality::Type] + # Required. Criticality Type. + class Criticality + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Criticality Type. + module Type + # Unspecified type. + TYPE_UNSPECIFIED = 0 + + # Mission critical service, application or workload. + MISSION_CRITICAL = 1 + + # High impact. + HIGH = 2 + + # Medium impact. + MEDIUM = 3 + + # Low impact. + LOW = 4 + end + end + + # Environment of the Application, Service, or Workload + # @!attribute [rw] type + # @return [::Google::Cloud::AppHub::V1::Environment::Type] + # Required. Environment Type. + class Environment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Environment Type. + module Type + # Unspecified type. + TYPE_UNSPECIFIED = 0 + + # Production environment. + PRODUCTION = 1 + + # Staging environment. + STAGING = 2 + + # Test environment. + TEST = 3 + + # Development environment. + DEVELOPMENT = 4 + end + end + + # Contact information of stakeholders. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Contact's name. + # Can have a maximum length of 63 characters. + # @!attribute [rw] email + # @return [::String] + # Required. Email address of the contacts. + class ContactInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb new file mode 100644 index 000000000000..78a43787310d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb @@ -0,0 +1,139 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + # Service is an App Hub data model that contains a discovered service, which + # represents a network or API interface that exposes some functionality to + # clients for consumption over the network. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of a Service. Format: + # `"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}"` + # @!attribute [rw] display_name + # @return [::String] + # Optional. User-defined name for the Service. + # Can have a maximum length of 63 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User-defined description of a Service. + # Can have a maximum length of 2048 characters. + # @!attribute [r] service_reference + # @return [::Google::Cloud::AppHub::V1::ServiceReference] + # Output only. Reference to an underlying networking resource that can + # comprise a Service. These are immutable. + # @!attribute [r] service_properties + # @return [::Google::Cloud::AppHub::V1::ServiceProperties] + # Output only. Properties of an underlying compute resource that can comprise + # a Service. These are immutable. + # @!attribute [rw] attributes + # @return [::Google::Cloud::AppHub::V1::Attributes] + # Optional. Consumer provided attributes. + # @!attribute [rw] discovered_service + # @return [::String] + # Required. Immutable. The resource name of the original discovered service. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update time. + # @!attribute [r] uid + # @return [::String] + # Output only. A universally unique identifier (UUID) for the `Service` in + # the UUID4 format. + # @!attribute [r] state + # @return [::Google::Cloud::AppHub::V1::Service::State] + # Output only. Service state. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Service state. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The service is being created. + CREATING = 1 + + # The service is ready. + ACTIVE = 2 + + # The service is being deleted. + DELETING = 3 + + # The underlying networking resources have been deleted. + DETACHED = 4 + end + end + + # Reference to an underlying networking resource that can comprise a Service. + # @!attribute [r] uri + # @return [::String] + # Output only. The underlying resource URI. For example, URI of Forwarding + # Rule, URL Map, and Backend Service. + class ServiceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties of an underlying cloud resource that can comprise a Service. + # @!attribute [r] gcp_project + # @return [::String] + # Output only. The service project identifier that the underlying cloud + # resource resides in. + # @!attribute [r] location + # @return [::String] + # Output only. The location that the underlying resource resides in, for + # example, us-west1. + # @!attribute [r] zone + # @return [::String] + # Output only. The location that the underlying resource resides in if it is + # zonal, for example, us-west1-a). + class ServiceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DiscoveredService is a network or API interface that exposes some + # functionality to clients for consumption over the network. A discovered + # service can be registered to a App Hub service. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the discovered service. Format: + # `"projects/{host-project-id}/locations/{location}/discoveredServices/{uuid}"` + # @!attribute [r] service_reference + # @return [::Google::Cloud::AppHub::V1::ServiceReference] + # Output only. Reference to an underlying networking resource that can + # comprise a Service. These are immutable. + # @!attribute [r] service_properties + # @return [::Google::Cloud::AppHub::V1::ServiceProperties] + # Output only. Properties of an underlying compute resource that can comprise + # a Service. These are immutable. + class DiscoveredService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb new file mode 100644 index 000000000000..2da9f70c19b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.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 AppHub + module V1 + # ServiceProjectAttachment represents an attachment from a service project to a + # host project. Service projects contain the underlying cloud + # infrastructure resources, and expose these resources to the host project + # through a ServiceProjectAttachment. With the attachments, the host project + # can provide an aggregated view of resources across all service projects. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of a ServiceProjectAttachment. Format: + # `"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."` + # @!attribute [rw] service_project + # @return [::String] + # Required. Immutable. Service project name in the format: `"projects/abc"` + # or `"projects/123"`. As input, project name with either project id or + # number are accepted. As output, this field will contain project number. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time. + # @!attribute [r] uid + # @return [::String] + # Output only. A globally unique identifier (in UUID4 format) for the + # `ServiceProjectAttachment`. + # @!attribute [r] state + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment::State] + # Output only. ServiceProjectAttachment state. + class ServiceProjectAttachment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # ServiceProjectAttachment state. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The ServiceProjectAttachment is being created. + CREATING = 1 + + # The ServiceProjectAttachment is ready. + # This means Services and Workloads under the corresponding + # ServiceProjectAttachment is ready for registration. + ACTIVE = 2 + + # The ServiceProjectAttachment is being deleted. + DELETING = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb new file mode 100644 index 000000000000..9d71177bf824 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + # Workload is an App Hub data model that contains a discovered workload, which + # represents a binary deployment (such as managed instance groups (MIGs) and + # GKE deployments) that performs the smallest logical subset of business + # functionality. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the Workload. Format: + # `"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"` + # @!attribute [rw] display_name + # @return [::String] + # Optional. User-defined name for the Workload. + # Can have a maximum length of 63 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User-defined description of a Workload. + # Can have a maximum length of 2048 characters. + # @!attribute [r] workload_reference + # @return [::Google::Cloud::AppHub::V1::WorkloadReference] + # Output only. Reference of an underlying compute resource represented by the + # Workload. These are immutable. + # @!attribute [r] workload_properties + # @return [::Google::Cloud::AppHub::V1::WorkloadProperties] + # Output only. Properties of an underlying compute resource represented by + # the Workload. These are immutable. + # @!attribute [rw] discovered_workload + # @return [::String] + # Required. Immutable. The resource name of the original discovered workload. + # @!attribute [rw] attributes + # @return [::Google::Cloud::AppHub::V1::Attributes] + # Optional. Consumer provided attributes. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update time. + # @!attribute [r] uid + # @return [::String] + # Output only. A universally unique identifier (UUID) for the `Workload` in + # the UUID4 format. + # @!attribute [r] state + # @return [::Google::Cloud::AppHub::V1::Workload::State] + # Output only. Workload state. + class Workload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Workload state. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The Workload is being created. + CREATING = 1 + + # The Workload is ready. + ACTIVE = 2 + + # The Workload is being deleted. + DELETING = 3 + + # The underlying compute resources have been deleted. + DETACHED = 4 + end + end + + # Reference of an underlying compute resource represented by the Workload. + # @!attribute [r] uri + # @return [::String] + # Output only. The underlying compute resource uri. + class WorkloadReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties of an underlying compute resource represented by the Workload. + # @!attribute [r] gcp_project + # @return [::String] + # Output only. The service project identifier that the underlying cloud + # resource resides in. Empty for non-cloud resources. + # @!attribute [r] location + # @return [::String] + # Output only. The location that the underlying compute resource resides in + # (for example, us-west1). + # @!attribute [r] zone + # @return [::String] + # Output only. The location that the underlying compute resource resides in + # if it is zonal (for example, us-west1-a). + class WorkloadProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DiscoveredWorkload is a binary deployment (such as managed instance groups + # (MIGs) and GKE deployments) that performs the smallest logical subset of + # business functionality. A discovered workload can be registered to an App Hub + # Workload. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the discovered workload. Format: + # `"projects/{host-project-id}/locations/{location}/discoveredWorkloads/{uuid}"` + # @!attribute [r] workload_reference + # @return [::Google::Cloud::AppHub::V1::WorkloadReference] + # Output only. Reference of an underlying compute resource represented by the + # Workload. These are immutable. + # @!attribute [r] workload_properties + # @return [::Google::Cloud::AppHub::V1::WorkloadProperties] + # Output only. Properties of an underlying compute resource represented by + # the Workload. These are immutable. + class DiscoveredWorkload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-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-app_hub-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile new file mode 100644 index 000000000000..01e4ee88000f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-app_hub-v1", path: "../" +else + gem "google-cloud-app_hub-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb new file mode 100644 index 000000000000..ecb6729ae83a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.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 apphub_v1_generated_AppHub_CreateApplication_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the create_application call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#create_application. +# +def create_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new + + # Call the create_application method. + result = client.create_application request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_CreateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb new file mode 100644 index 000000000000..909a8e44c897 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/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 apphub_v1_generated_AppHub_CreateService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the create_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#create_service. +# +def create_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::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 apphub_v1_generated_AppHub_CreateService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb new file mode 100644 index 000000000000..bef16146076a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.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 apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the create_service_project_attachment call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment. +# +def create_service_project_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new + + # Call the create_service_project_attachment method. + result = client.create_service_project_attachment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb new file mode 100644 index 000000000000..09e9695fc333 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.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 apphub_v1_generated_AppHub_CreateWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the create_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#create_workload. +# +def create_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new + + # Call the create_workload method. + result = client.create_workload request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb new file mode 100644 index 000000000000..246fde1039c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.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 apphub_v1_generated_AppHub_DeleteApplication_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the delete_application call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#delete_application. +# +def delete_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new + + # Call the delete_application method. + result = client.delete_application request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_DeleteApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb new file mode 100644 index 000000000000..96f1cd39b61c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/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 apphub_v1_generated_AppHub_DeleteService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the delete_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#delete_service. +# +def delete_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::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 apphub_v1_generated_AppHub_DeleteService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb new file mode 100644 index 000000000000..76b3adb08c91 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.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 apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the delete_service_project_attachment call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment. +# +def delete_service_project_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new + + # Call the delete_service_project_attachment method. + result = client.delete_service_project_attachment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb new file mode 100644 index 000000000000..438e272456a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.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 apphub_v1_generated_AppHub_DeleteWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the delete_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#delete_workload. +# +def delete_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new + + # Call the delete_workload method. + result = client.delete_workload request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb new file mode 100644 index 000000000000..fd0a2727844c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the detach_service_project_attachment call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment. +# +def detach_service_project_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new + + # Call the detach_service_project_attachment method. + result = client.detach_service_project_attachment request + + # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. + p result +end +# [END apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb new file mode 100644 index 000000000000..b24e9656c575 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_GetApplication_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_application call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_application. +# +def get_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetApplicationRequest.new + + # Call the get_application method. + result = client.get_application request + + # The returned object is of type Google::Cloud::AppHub::V1::Application. + p result +end +# [END apphub_v1_generated_AppHub_GetApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb new file mode 100644 index 000000000000..8d6b3faca3aa --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_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 apphub_v1_generated_AppHub_GetDiscoveredService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_discovered_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service. +# +def get_discovered_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new + + # Call the get_discovered_service method. + result = client.get_discovered_service request + + # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. + p result +end +# [END apphub_v1_generated_AppHub_GetDiscoveredService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb new file mode 100644 index 000000000000..d5a7376701be --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_discovered_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload. +# +def get_discovered_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new + + # Call the get_discovered_workload method. + result = client.get_discovered_workload request + + # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. + p result +end +# [END apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb new file mode 100644 index 000000000000..cf9240d27574 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/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 apphub_v1_generated_AppHub_GetService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_service. +# +def get_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetServiceRequest.new + + # Call the get_service method. + result = client.get_service request + + # The returned object is of type Google::Cloud::AppHub::V1::Service. + p result +end +# [END apphub_v1_generated_AppHub_GetService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb new file mode 100644 index 000000000000..d913e0dd0077 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_service_project_attachment call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment. +# +def get_service_project_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new + + # Call the get_service_project_attachment method. + result = client.get_service_project_attachment request + + # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. + p result +end +# [END apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb new file mode 100644 index 000000000000..981d5001c644 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_GetWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_workload. +# +def get_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new + + # Call the get_workload method. + result = client.get_workload request + + # The returned object is of type Google::Cloud::AppHub::V1::Workload. + p result +end +# [END apphub_v1_generated_AppHub_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb new file mode 100644 index 000000000000..a0c9e9dc43c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.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 apphub_v1_generated_AppHub_ListApplications_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_applications call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_applications. +# +def list_applications + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new + + # Call the list_applications method. + result = client.list_applications request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppHub::V1::Application. + p item + end +end +# [END apphub_v1_generated_AppHub_ListApplications_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb new file mode 100644 index 000000000000..16595dffd427 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_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 apphub_v1_generated_AppHub_ListDiscoveredServices_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_discovered_services call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services. +# +def list_discovered_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new + + # Call the list_discovered_services method. + result = client.list_discovered_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::AppHub::V1::DiscoveredService. + p item + end +end +# [END apphub_v1_generated_AppHub_ListDiscoveredServices_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb new file mode 100644 index 000000000000..8af6d5b9a9e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_discovered_workloads call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads. +# +def list_discovered_workloads + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new + + # Call the list_discovered_workloads method. + result = client.list_discovered_workloads request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. + p item + end +end +# [END apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb new file mode 100644 index 000000000000..c9dc10bc0854 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.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 apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_service_project_attachments call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments. +# +def list_service_project_attachments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new + + # Call the list_service_project_attachments method. + result = client.list_service_project_attachments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. + p item + end +end +# [END apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb new file mode 100644 index 000000000000..f63e8b919d25 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/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 apphub_v1_generated_AppHub_ListServices_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_services call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_services. +# +def list_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::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::AppHub::V1::Service. + p item + end +end +# [END apphub_v1_generated_AppHub_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb new file mode 100644 index 000000000000..98bee1c64a09 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_ListWorkloads_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_workloads call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_workloads. +# +def list_workloads + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new + + # Call the list_workloads method. + result = client.list_workloads request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppHub::V1::Workload. + p item + end +end +# [END apphub_v1_generated_AppHub_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb new file mode 100644 index 000000000000..70e65424d4a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_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 apphub_v1_generated_AppHub_LookupDiscoveredService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the lookup_discovered_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service. +# +def lookup_discovered_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new + + # Call the lookup_discovered_service method. + result = client.lookup_discovered_service request + + # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. + p result +end +# [END apphub_v1_generated_AppHub_LookupDiscoveredService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb new file mode 100644 index 000000000000..d1d638e8c7dc --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the lookup_discovered_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload. +# +def lookup_discovered_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new + + # Call the lookup_discovered_workload method. + result = client.lookup_discovered_workload request + + # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. + p result +end +# [END apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb new file mode 100644 index 000000000000..86dc1e535b27 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the lookup_service_project_attachment call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment. +# +def lookup_service_project_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new + + # Call the lookup_service_project_attachment method. + result = client.lookup_service_project_attachment request + + # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. + p result +end +# [END apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb new file mode 100644 index 000000000000..b2ddfd7fe664 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.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 apphub_v1_generated_AppHub_UpdateApplication_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the update_application call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#update_application. +# +def update_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new + + # Call the update_application method. + result = client.update_application request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_UpdateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb new file mode 100644 index 000000000000..e0a74c946803 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_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 apphub_v1_generated_AppHub_UpdateService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the update_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#update_service. +# +def update_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new + + # Call the update_service method. + result = client.update_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 apphub_v1_generated_AppHub_UpdateService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb new file mode 100644 index 000000000000..fc6d58bbc083 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.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 apphub_v1_generated_AppHub_UpdateWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the update_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#update_workload. +# +def update_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new + + # Call the update_workload method. + result = client.update_workload request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json b/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json new file mode 100644 index 000000000000..43c82a87d67c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json @@ -0,0 +1,1095 @@ +{ + "client_library": { + "name": "google-cloud-app_hub-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.apphub.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync", + "title": "Snippet for the lookup_service_project_attachment call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment.", + "file": "app_hub/lookup_service_project_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_service_project_attachment", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "LookupServiceProjectAttachment", + "full_name": "google.cloud.apphub.v1.AppHub.LookupServiceProjectAttachment", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync", + "title": "Snippet for the list_service_project_attachments call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments.", + "file": "app_hub/list_service_project_attachments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_service_project_attachments", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListServiceProjectAttachments", + "full_name": "google.cloud.apphub.v1.AppHub.ListServiceProjectAttachments", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync", + "title": "Snippet for the create_service_project_attachment call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment.", + "file": "app_hub/create_service_project_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service_project_attachment", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "CreateServiceProjectAttachment", + "full_name": "google.cloud.apphub.v1.AppHub.CreateServiceProjectAttachment", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync", + "title": "Snippet for the get_service_project_attachment call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment.", + "file": "app_hub/get_service_project_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service_project_attachment", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ServiceProjectAttachment", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetServiceProjectAttachment", + "full_name": "google.cloud.apphub.v1.AppHub.GetServiceProjectAttachment", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync", + "title": "Snippet for the delete_service_project_attachment call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment.", + "file": "app_hub/delete_service_project_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service_project_attachment", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "DeleteServiceProjectAttachment", + "full_name": "google.cloud.apphub.v1.AppHub.DeleteServiceProjectAttachment", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync", + "title": "Snippet for the detach_service_project_attachment call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment.", + "file": "app_hub/detach_service_project_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "detach_service_project_attachment", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "DetachServiceProjectAttachment", + "full_name": "google.cloud.apphub.v1.AppHub.DetachServiceProjectAttachment", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListDiscoveredServices_sync", + "title": "Snippet for the list_discovered_services call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services.", + "file": "app_hub/list_discovered_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_discovered_services", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListDiscoveredServices", + "full_name": "google.cloud.apphub.v1.AppHub.ListDiscoveredServices", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetDiscoveredService_sync", + "title": "Snippet for the get_discovered_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service.", + "file": "app_hub/get_discovered_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_discovered_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::DiscoveredService", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetDiscoveredService", + "full_name": "google.cloud.apphub.v1.AppHub.GetDiscoveredService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_LookupDiscoveredService_sync", + "title": "Snippet for the lookup_discovered_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service.", + "file": "app_hub/lookup_discovered_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_discovered_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "LookupDiscoveredService", + "full_name": "google.cloud.apphub.v1.AppHub.LookupDiscoveredService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListServices_sync", + "title": "Snippet for the list_services call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_services.", + "file": "app_hub/list_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_services", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListServicesResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListServices", + "full_name": "google.cloud.apphub.v1.AppHub.ListServices", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_CreateService_sync", + "title": "Snippet for the create_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_service.", + "file": "app_hub/create_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::CreateServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "CreateService", + "full_name": "google.cloud.apphub.v1.AppHub.CreateService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetService_sync", + "title": "Snippet for the get_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_service.", + "file": "app_hub/get_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::Service", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetService", + "full_name": "google.cloud.apphub.v1.AppHub.GetService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_UpdateService_sync", + "title": "Snippet for the update_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_service.", + "file": "app_hub/update_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::UpdateServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "UpdateService", + "full_name": "google.cloud.apphub.v1.AppHub.UpdateService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_DeleteService_sync", + "title": "Snippet for the delete_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_service.", + "file": "app_hub/delete_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::DeleteServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "DeleteService", + "full_name": "google.cloud.apphub.v1.AppHub.DeleteService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync", + "title": "Snippet for the list_discovered_workloads call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads.", + "file": "app_hub/list_discovered_workloads.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_discovered_workloads", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListDiscoveredWorkloads", + "full_name": "google.cloud.apphub.v1.AppHub.ListDiscoveredWorkloads", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync", + "title": "Snippet for the get_discovered_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload.", + "file": "app_hub/get_discovered_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_discovered_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::DiscoveredWorkload", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetDiscoveredWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.GetDiscoveredWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync", + "title": "Snippet for the lookup_discovered_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload.", + "file": "app_hub/lookup_discovered_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_discovered_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "LookupDiscoveredWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.LookupDiscoveredWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListWorkloads_sync", + "title": "Snippet for the list_workloads call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_workloads.", + "file": "app_hub/list_workloads.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workloads", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_workloads", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListWorkloadsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListWorkloadsResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListWorkloads", + "full_name": "google.cloud.apphub.v1.AppHub.ListWorkloads", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_CreateWorkload_sync", + "title": "Snippet for the create_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_workload.", + "file": "app_hub/create_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::CreateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "CreateWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.CreateWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetWorkload_sync", + "title": "Snippet for the get_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_workload.", + "file": "app_hub/get_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::Workload", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.GetWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_UpdateWorkload_sync", + "title": "Snippet for the update_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_workload.", + "file": "app_hub/update_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::UpdateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "UpdateWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.UpdateWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_DeleteWorkload_sync", + "title": "Snippet for the delete_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_workload.", + "file": "app_hub/delete_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::DeleteWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "DeleteWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.DeleteWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListApplications_sync", + "title": "Snippet for the list_applications call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_applications.", + "file": "app_hub/list_applications.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_applications", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_applications", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListApplicationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListApplicationsResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListApplications", + "full_name": "google.cloud.apphub.v1.AppHub.ListApplications", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_CreateApplication_sync", + "title": "Snippet for the create_application call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_application.", + "file": "app_hub/create_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_application", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::CreateApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "CreateApplication", + "full_name": "google.cloud.apphub.v1.AppHub.CreateApplication", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetApplication_sync", + "title": "Snippet for the get_application call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_application.", + "file": "app_hub/get_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_application", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::Application", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetApplication", + "full_name": "google.cloud.apphub.v1.AppHub.GetApplication", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_UpdateApplication_sync", + "title": "Snippet for the update_application call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_application.", + "file": "app_hub/update_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_application", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::UpdateApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "UpdateApplication", + "full_name": "google.cloud.apphub.v1.AppHub.UpdateApplication", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_DeleteApplication_sync", + "title": "Snippet for the delete_application call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_application.", + "file": "app_hub/delete_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_application", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::DeleteApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "DeleteApplication", + "full_name": "google.cloud.apphub.v1.AppHub.DeleteApplication", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "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-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb new file mode 100644 index 000000000000..92b4bb44b49c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/apphub/v1/apphub_service_pb" +require "google/cloud/apphub/v1/apphub_service_services_pb" +require "google/cloud/app_hub/v1/app_hub" + +class ::Google::Cloud::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb new file mode 100644 index 000000000000..546a7a4d6b65 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb @@ -0,0 +1,139 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/app_hub/v1/app_hub" + +class ::Google::Cloud::AppHub::V1::AppHub::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_application_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.application_path project: "value0", location: "value1", application: "value2" + assert_equal "projects/value0/locations/value1/applications/value2", path + end + end + + def test_discovered_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::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.discovered_service_path project: "value0", location: "value1", discovered_service: "value2" + assert_equal "projects/value0/locations/value1/discoveredServices/value2", path + end + end + + def test_discovered_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.discovered_workload_path project: "value0", location: "value1", discovered_workload: "value2" + assert_equal "projects/value0/locations/value1/discoveredWorkloads/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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", 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::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", application: "value2", service: "value3" + assert_equal "projects/value0/locations/value1/applications/value2/services/value3", path + end + end + + def test_service_project_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::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_project_attachment_path project: "value0", location: "value1", service_project_attachment: "value2" + assert_equal "projects/value0/locations/value1/serviceProjectAttachments/value2", path + end + end + + def test_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workload_path project: "value0", location: "value1", application: "value2", workload: "value3" + assert_equal "projects/value0/locations/value1/applications/value2/workloads/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb new file mode 100644 index 000000000000..4b7d70cebacb --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb @@ -0,0 +1,1605 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/apphub/v1/apphub_service_pb" +require "google/cloud/app_hub/v1/app_hub/rest" + + +class ::Google::Cloud::AppHub::V1::AppHub::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_lookup_service_project_attachment + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + lookup_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_service_project_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_service_project_attachment_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.lookup_service_project_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.lookup_service_project_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.lookup_service_project_attachment ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.lookup_service_project_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.lookup_service_project_attachment(::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_service_project_attachment_client_stub.call_count + end + end + end + + def test_list_service_project_attachments + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.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_service_project_attachments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_service_project_attachments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_service_project_attachments_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_service_project_attachments({ 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_service_project_attachments 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_service_project_attachments ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.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_service_project_attachments({ 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_service_project_attachments(::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.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_service_project_attachments_client_stub.call_count + end + end + end + + def test_create_service_project_attachment + # Create test objects. + 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_project_attachment_id = "hello world" + service_project_attachment = {} + request_id = "hello world" + + create_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_service_project_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_project_attachment_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_service_project_attachment parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_service_project_attachment ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_service_project_attachment(::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_project_attachment_client_stub.call_count + end + end + end + + def test_get_service_project_attachment + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_service_project_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_project_attachment_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_service_project_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_service_project_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_service_project_attachment ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_service_project_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_service_project_attachment(::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_project_attachment_client_stub.call_count + end + end + end + + def test_delete_service_project_attachment + # Create test objects. + 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_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_service_project_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_project_attachment_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_service_project_attachment({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_service_project_attachment name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_service_project_attachment ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.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_service_project_attachment({ 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_service_project_attachment(::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.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_service_project_attachment_client_stub.call_count + end + end + end + + def test_detach_service_project_attachment + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + detach_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_detach_service_project_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, detach_service_project_attachment_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.detach_service_project_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.detach_service_project_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.detach_service_project_attachment ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.detach_service_project_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.detach_service_project_attachment(::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, detach_service_project_attachment_client_stub.call_count + end + end + end + + def test_list_discovered_services + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.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_discovered_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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_discovered_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_discovered_services_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_discovered_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_discovered_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_discovered_services ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.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_discovered_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_discovered_services(::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.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_discovered_services_client_stub.call_count + end + end + end + + def test_get_discovered_service + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::DiscoveredService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_discovered_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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_discovered_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_discovered_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_discovered_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_discovered_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_discovered_service ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_discovered_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_discovered_service(::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_discovered_service_client_stub.call_count + end + end + end + + def test_lookup_discovered_service + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + uri = "hello world" + + lookup_discovered_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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_discovered_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_discovered_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.lookup_discovered_service({ parent: parent, uri: uri }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.lookup_discovered_service parent: parent, uri: uri do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.lookup_discovered_service ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.lookup_discovered_service({ parent: parent, uri: uri }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.lookup_discovered_service(::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_discovered_service_client_stub.call_count + end + end + end + + def test_list_services + # Create test objects. + client_result = ::Google::Cloud::AppHub::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" + 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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_services_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::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::AppHub::V1::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::AppHub::V1::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_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. + parent = "hello world" + service_id = "hello world" + service = {} + request_id = "hello world" + + 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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_service({ parent: parent, service_id: service_id, service: service, request_id: request_id }) 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, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_service ::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id) 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, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_service(::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id), 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_get_service + # Create test objects. + client_result = ::Google::Cloud::AppHub::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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::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::AppHub::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::AppHub::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_update_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. + update_mask = {} + service = {} + request_id = "hello world" + + 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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_service({ update_mask: update_mask, service: service, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_service update_mask: update_mask, service: service, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_service ::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_service({ update_mask: update_mask, service: service, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_service(::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id), 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::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_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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_service({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_service name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_service ::Google::Cloud::AppHub::V1::DeleteServiceRequest.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_service({ 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_service(::Google::Cloud::AppHub::V1::DeleteServiceRequest.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_service_client_stub.call_count + end + end + end + + def test_list_discovered_workloads + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.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_discovered_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_discovered_workloads_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_discovered_workloads_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_discovered_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_discovered_workloads ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.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_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_discovered_workloads(::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.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_discovered_workloads_client_stub.call_count + end + end + end + + def test_get_discovered_workload + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_discovered_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_discovered_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_discovered_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_discovered_workload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_discovered_workload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_discovered_workload ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_discovered_workload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_discovered_workload(::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_discovered_workload_client_stub.call_count + end + end + end + + def test_lookup_discovered_workload + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + uri = "hello world" + + lookup_discovered_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_discovered_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_discovered_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.lookup_discovered_workload({ parent: parent, uri: uri }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.lookup_discovered_workload parent: parent, uri: uri do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.lookup_discovered_workload ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.lookup_discovered_workload({ parent: parent, uri: uri }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.lookup_discovered_workload(::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_discovered_workload_client_stub.call_count + end + end + end + + def test_list_workloads + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_workloads ::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_workloads(::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_workloads_client_stub.call_count + end + end + end + + def test_create_workload + # Create test objects. + 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" + workload_id = "hello world" + workload = {} + request_id = "hello world" + + create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_workload parent: parent, workload_id: workload_id, workload: workload, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_workload ::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_workload(::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workload_client_stub.call_count + end + end + end + + def test_get_workload + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::Workload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_workload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_workload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_workload ::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_workload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_workload(::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_count + end + end + end + + def test_update_workload + # Create test objects. + 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 = {} + workload = {} + request_id = "hello world" + + update_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_workload update_mask: update_mask, workload: workload, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_workload ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_workload(::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workload_client_stub.call_count + end + end + end + + def test_delete_workload + # Create test objects. + 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_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_workload({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_workload name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_workload ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.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_workload({ 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_workload(::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.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_workload_client_stub.call_count + end + end + end + + def test_list_applications + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.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_applications_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_applications_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_applications_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_applications({ 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_applications 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_applications ::Google::Cloud::AppHub::V1::ListApplicationsRequest.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_applications({ 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_applications(::Google::Cloud::AppHub::V1::ListApplicationsRequest.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_applications_client_stub.call_count + end + end + end + + def test_create_application + # Create test objects. + 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" + application_id = "hello world" + application = {} + request_id = "hello world" + + create_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_application_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_application parent: parent, application_id: application_id, application: application, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_application ::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_application(::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_application_client_stub.call_count + end + end + end + + def test_get_application + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::Application.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_application_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_application({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_application name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_application ::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_application({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_application(::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_application_client_stub.call_count + end + end + end + + def test_update_application + # Create test objects. + 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 = {} + application = {} + request_id = "hello world" + + update_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_application_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_application({ update_mask: update_mask, application: application, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_application update_mask: update_mask, application: application, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_application ::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_application({ update_mask: update_mask, application: application, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_application(::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_application_client_stub.call_count + end + end + end + + def test_delete_application + # Create test objects. + 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_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_application_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_application({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_application name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_application ::Google::Cloud::AppHub::V1::DeleteApplicationRequest.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_application({ 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_application(::Google::Cloud::AppHub::V1::DeleteApplicationRequest.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_application_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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb new file mode 100644 index 000000000000..2c384f85efa9 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb @@ -0,0 +1,1865 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/apphub/v1/apphub_service_pb" +require "google/cloud/app_hub/v1/app_hub" + +class ::Google::Cloud::AppHub::V1::AppHub::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_lookup_service_project_attachment + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + lookup_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_service_project_attachment, name + assert_kind_of ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_service_project_attachment_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.lookup_service_project_attachment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.lookup_service_project_attachment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.lookup_service_project_attachment ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.lookup_service_project_attachment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.lookup_service_project_attachment(::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_service_project_attachment_client_stub.call_rpc_count + end + end + + def test_list_service_project_attachments + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_service_project_attachments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_service_project_attachments, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, 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_service_project_attachments_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_service_project_attachments({ 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_service_project_attachments 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_service_project_attachments ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.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_service_project_attachments({ 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_service_project_attachments(::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.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_service_project_attachments_client_stub.call_rpc_count + end + end + + def test_create_service_project_attachment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_project_attachment_id = "hello world" + service_project_attachment = {} + request_id = "hello world" + + create_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service_project_attachment, name + assert_kind_of ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["service_project_attachment_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::ServiceProjectAttachment), request["service_project_attachment"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_project_attachment_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, 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_service_project_attachment parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, 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_service_project_attachment ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, 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_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, 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_service_project_attachment(::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, 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_service_project_attachment_client_stub.call_rpc_count + end + end + + def test_get_service_project_attachment + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service_project_attachment, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_project_attachment_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_service_project_attachment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_service_project_attachment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_service_project_attachment ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.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_project_attachment({ 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_project_attachment(::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(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_project_attachment_client_stub.call_rpc_count + end + end + + def test_delete_service_project_attachment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service_project_attachment, name + assert_kind_of ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_project_attachment_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_service_project_attachment({ 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_service_project_attachment 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_service_project_attachment ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.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_service_project_attachment({ 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_service_project_attachment(::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.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_service_project_attachment_client_stub.call_rpc_count + end + end + + def test_detach_service_project_attachment + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + detach_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :detach_service_project_attachment, name + assert_kind_of ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, detach_service_project_attachment_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.detach_service_project_attachment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.detach_service_project_attachment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.detach_service_project_attachment ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.detach_service_project_attachment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.detach_service_project_attachment(::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, detach_service_project_attachment_client_stub.call_rpc_count + end + end + + def test_list_discovered_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_discovered_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_discovered_services, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, 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_discovered_services_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_discovered_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_discovered_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_discovered_services ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.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_discovered_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_discovered_services(::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.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_discovered_services_client_stub.call_rpc_count + end + end + + def test_get_discovered_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::DiscoveredService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_discovered_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_discovered_service, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_discovered_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_discovered_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_discovered_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_discovered_service ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_discovered_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_discovered_service(::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(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_discovered_service_client_stub.call_rpc_count + end + end + + def test_lookup_discovered_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + uri = "hello world" + + lookup_discovered_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_discovered_service, name + assert_kind_of ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["uri"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_discovered_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.lookup_discovered_service({ parent: parent, uri: uri }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.lookup_discovered_service parent: parent, uri: uri do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.lookup_discovered_service ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.lookup_discovered_service({ parent: parent, uri: uri }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.lookup_discovered_service(::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_discovered_service_client_stub.call_rpc_count + end + end + + def test_list_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::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" + 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::AppHub::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"] + 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::AppHub::V1::AppHub::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::AppHub::V1::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::AppHub::V1::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_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. + parent = "hello world" + service_id = "hello world" + service = {} + request_id = "hello world" + + create_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service, name + assert_kind_of ::Google::Cloud::AppHub::V1::CreateServiceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["service_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Service), request["service"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_service({ parent: parent, service_id: service_id, service: service, 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_service parent: parent, service_id: service_id, service: service, 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_service ::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, 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_service({ parent: parent, service_id: service_id, service: service, 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_service(::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, 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_service_client_stub.call_rpc_count + end + end + + def test_get_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::AppHub::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::AppHub::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::AppHub::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_update_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. + update_mask = {} + service = {} + request_id = "hello world" + + update_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_service, name + assert_kind_of ::Google::Cloud::AppHub::V1::UpdateServiceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Service), request["service"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_service({ update_mask: update_mask, service: service, 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_service update_mask: update_mask, service: service, 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_service ::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, 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_service({ update_mask: update_mask, service: service, 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_service(::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, 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_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. + name = "hello world" + request_id = "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::AppHub::V1::DeleteServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_service({ 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_service 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_service ::Google::Cloud::AppHub::V1::DeleteServiceRequest.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_service({ 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_service(::Google::Cloud::AppHub::V1::DeleteServiceRequest.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_service_client_stub.call_rpc_count + end + end + + def test_list_discovered_workloads + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_discovered_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_discovered_workloads, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, 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_discovered_workloads_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_discovered_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_discovered_workloads ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.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_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_discovered_workloads(::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.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_discovered_workloads_client_stub.call_rpc_count + end + end + + def test_get_discovered_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_discovered_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_discovered_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_discovered_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_discovered_workload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_discovered_workload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_discovered_workload ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_discovered_workload({ 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_discovered_workload(::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(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_discovered_workload_client_stub.call_rpc_count + end + end + + def test_lookup_discovered_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + uri = "hello world" + + lookup_discovered_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_discovered_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["uri"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_discovered_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.lookup_discovered_workload({ parent: parent, uri: uri }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.lookup_discovered_workload parent: parent, uri: uri do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.lookup_discovered_workload ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.lookup_discovered_workload({ parent: parent, uri: uri }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.lookup_discovered_workload(::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_discovered_workload_client_stub.call_rpc_count + end + end + + def test_list_workloads + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workloads, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListWorkloadsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workloads_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_workloads ::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_workloads(::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_workloads_client_stub.call_rpc_count + end + end + + def test_create_workload + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workload_id = "hello world" + workload = {} + request_id = "hello world" + + create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::CreateWorkloadRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["workload_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Workload), request["workload"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_workload({ parent: parent, workload_id: workload_id, workload: workload, 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_workload parent: parent, workload_id: workload_id, workload: workload, 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_workload ::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, 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_workload({ parent: parent, workload_id: workload_id, workload: workload, 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_workload(::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, 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_workload_client_stub.call_rpc_count + end + end + + def test_get_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::Workload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetWorkloadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_workload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_workload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_workload ::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_workload({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_workload(::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_rpc_count + end + end + + def test_update_workload + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + workload = {} + request_id = "hello world" + + update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Workload), request["workload"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_workload({ update_mask: update_mask, workload: workload, 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_workload update_mask: update_mask, workload: workload, 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_workload ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, 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_workload({ update_mask: update_mask, workload: workload, 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_workload(::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, 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_workload_client_stub.call_rpc_count + end + end + + def test_delete_workload + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workload_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_workload({ 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_workload 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_workload ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.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_workload({ 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_workload(::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.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_workload_client_stub.call_rpc_count + end + end + + def test_list_applications + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_applications_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_applications, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListApplicationsRequest, 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_applications_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_applications({ 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_applications 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_applications ::Google::Cloud::AppHub::V1::ListApplicationsRequest.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_applications({ 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_applications(::Google::Cloud::AppHub::V1::ListApplicationsRequest.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_applications_client_stub.call_rpc_count + end + end + + def test_create_application + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + application_id = "hello world" + application = {} + request_id = "hello world" + + create_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_application, name + assert_kind_of ::Google::Cloud::AppHub::V1::CreateApplicationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["application_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Application), request["application"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_application_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_application({ parent: parent, application_id: application_id, application: application, 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_application parent: parent, application_id: application_id, application: application, 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_application ::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, 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_application({ parent: parent, application_id: application_id, application: application, 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_application(::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, 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_application_client_stub.call_rpc_count + end + end + + def test_get_application + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::Application.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_application, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetApplicationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_application_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_application({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_application name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_application ::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_application({ 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_application(::Google::Cloud::AppHub::V1::GetApplicationRequest.new(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_application_client_stub.call_rpc_count + end + end + + def test_update_application + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + application = {} + request_id = "hello world" + + update_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_application, name + assert_kind_of ::Google::Cloud::AppHub::V1::UpdateApplicationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Application), request["application"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_application_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_application({ update_mask: update_mask, application: application, 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_application update_mask: update_mask, application: application, 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_application ::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, 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_application({ update_mask: update_mask, application: application, 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_application(::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, 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_application_client_stub.call_rpc_count + end + end + + def test_delete_application + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_application, name + assert_kind_of ::Google::Cloud::AppHub::V1::DeleteApplicationRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_application_client_stub do + # Create client + c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_application({ 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_application 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_application ::Google::Cloud::AppHub::V1::DeleteApplicationRequest.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_application({ 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_application(::Google::Cloud::AppHub::V1::DeleteApplicationRequest.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_application_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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::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::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-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-app_optimize-v1beta/.gitignore b/owl-bot-staging/google-cloud-app_optimize-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/.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-app_optimize-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-app_optimize-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..451ab3df8516 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "appoptimize.googleapis.com", + "api_shortname": "appoptimize", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-app_optimize-v1beta/latest", + "distribution_name": "google-cloud-app_optimize-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "appoptimize", + "name_pretty": "App Optimize V1BETA API", + "product_documentation": "https://docs.cloud.google.com/app-optimize/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The App Optimize API provides developers and platform teams with tools to monitor, analyze, and improve the performance and cost-efficiency of their cloud applications. Note that google-cloud-app_optimize-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_optimize instead. See the readme for more details.", + "ruby-cloud-product-url": "https://docs.cloud.google.com/app-optimize/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-app_optimize-v1beta/.rubocop.yml new file mode 100644 index 000000000000..cef10eae53b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-app_optimize-v1beta.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-app_optimize-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/.toys.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/.yardopts b/owl-bot-staging/google-cloud-app_optimize-v1beta/.yardopts new file mode 100644 index 000000000000..7780a8e335e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="App Optimize V1BETA API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-app_optimize-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..759293528403 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-app_optimize-v1beta library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-app_optimize-v1beta library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/appoptimize/v1beta" + +client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/appoptimize/v1beta" + +::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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-app_optimize-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/appoptimize/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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-app_optimize-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-app_optimize-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/Gemfile b/owl-bot-staging/google-cloud-app_optimize-v1beta/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/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-app_optimize-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-app_optimize-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/README.md b/owl-bot-staging/google-cloud-app_optimize-v1beta/README.md new file mode 100644 index 000000000000..4d0bcfe397fc --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the App Optimize V1BETA API + +The App Optimize API provides developers and platform teams with tools to monitor, analyze, and improve the performance and cost-efficiency of their cloud applications. + +The App Optimize API provides developers and platform teams with tools to monitor, analyze, and improve the performance and cost-efficiency of their cloud applications. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the App Optimize V1BETA API. Most users should consider using +the main client gem, +[google-cloud-app_optimize](https://rubygems.org/gems/google-cloud-app_optimize). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-app_optimize-v1beta +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/appoptimize.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/appoptimize/v1beta" + +client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new +request = ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new # (request fields as keyword arguments...) +response = client.create_report request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-app_optimize-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://docs.cloud.google.com/app-optimize/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/appoptimize/v1beta" +require "logger" + +client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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-app_optimize`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-app_optimize-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-app_optimize`. +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-app_optimize-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/Rakefile b/owl-bot-staging/google-cloud-app_optimize-v1beta/Rakefile new file mode 100644 index 000000000000..0a42283e458a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-app_optimize-v1beta acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/appoptimize/v1beta/app_optimize/credentials" + ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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-app_optimize-v1beta gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-app_optimize-v1beta gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-app_optimize-v1beta gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-app_optimize-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-app_optimize-v1beta" + header "google-cloud-app_optimize-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-app_optimize-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-app_optimize-v1beta test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-app_optimize-v1beta smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-app_optimize-v1beta acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-app_optimize-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..24aa39819243 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/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.appoptimize.v1beta", + "libraryPackage": "::Google::Cloud::Appoptimize::V1beta", + "services": { + "AppOptimize": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client", + "rpcs": { + "CreateReport": { + "methods": [ + "create_report" + ] + }, + "GetReport": { + "methods": [ + "get_report" + ] + }, + "ListReports": { + "methods": [ + "list_reports" + ] + }, + "DeleteReport": { + "methods": [ + "delete_report" + ] + }, + "ReadReport": { + "methods": [ + "read_report" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/google-cloud-app_optimize-v1beta.gemspec b/owl-bot-staging/google-cloud-app_optimize-v1beta/google-cloud-app_optimize-v1beta.gemspec new file mode 100644 index 000000000000..49275d425a6d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/google-cloud-app_optimize-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/app_optimize/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-app_optimize-v1beta" + gem.version = Google::Cloud::AppOptimize::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The App Optimize API provides developers and platform teams with tools to monitor, analyze, and improve the performance and cost-efficiency of their cloud applications. Note that google-cloud-app_optimize-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_optimize instead. See the readme for more details." + gem.summary = "The App Optimize API provides developers and platform teams with tools to monitor, analyze, and improve the performance and cost-efficiency of their cloud applications." + 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-app_optimize-v1beta/lib/google-cloud-app_optimize-v1beta.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google-cloud-app_optimize-v1beta.rb new file mode 100644 index 000000000000..a02f66ecebbb --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google-cloud-app_optimize-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/appoptimize/v1beta" diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/app_optimize/v1beta/version.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/app_optimize/v1beta/version.rb new file mode 100644 index 000000000000..0abbbe55b69f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/app_optimize/v1beta/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppOptimize + module V1beta + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta.rb new file mode 100644 index 000000000000..b5abc495b3a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/appoptimize/v1beta/app_optimize" +require "google/cloud/app_optimize/v1beta/version" + +module Google + module Cloud + module Appoptimize + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/appoptimize/v1beta" + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/appoptimize/v1beta" + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + module V1beta + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/appoptimize/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize.rb new file mode 100644 index 000000000000..d7334f5d45c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize.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/app_optimize/v1beta/version" + +require "google/cloud/appoptimize/v1beta/app_optimize/credentials" +require "google/cloud/appoptimize/v1beta/app_optimize/paths" +require "google/cloud/appoptimize/v1beta/app_optimize/operations" +require "google/cloud/appoptimize/v1beta/app_optimize/client" +require "google/cloud/appoptimize/v1beta/app_optimize/rest" + +module Google + module Cloud + module Appoptimize + module V1beta + ## + # Service for managing and querying optimization reports. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/appoptimize/v1beta/app_optimize" + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/appoptimize/v1beta/app_optimize/rest" + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + module AppOptimize + end + end + end + end +end + +helper_path = ::File.join __dir__, "app_optimize", "helpers.rb" +require "google/cloud/appoptimize/v1beta/app_optimize/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/client.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/client.rb new file mode 100644 index 000000000000..99e0330a174f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/client.rb @@ -0,0 +1,961 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/appoptimize/v1beta/app_optimize_pb" +require "google/cloud/location" + +module Google + module Cloud + module Appoptimize + module V1beta + module AppOptimize + ## + # Client for the AppOptimize service. + # + # Service for managing and querying optimization reports. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appoptimize.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_optimize_stub + + ## + # Configure the AppOptimize Client class. + # + # See {::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppOptimize clients + # ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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", "Appoptimize", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_report.timeout = 60.0 + + default_config.rpcs.get_report.timeout = 60.0 + default_config.rpcs.get_report.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_reports.timeout = 60.0 + default_config.rpcs.list_reports.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_report.timeout = 60.0 + + default_config.rpcs.read_report.timeout = 60.0 + default_config.rpcs.read_report.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 AppOptimize 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::Appoptimize::V1beta::AppOptimize::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 + @app_optimize_stub.universe_domain + end + + ## + # Create a new AppOptimize client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppOptimize 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/appoptimize/v1beta/app_optimize_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 + + @app_optimize_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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 + ) + + @app_optimize_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 = @app_optimize_stub.endpoint + config.universe_domain = @app_optimize_stub.universe_domain + config.logger = @app_optimize_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Appoptimize::V1beta::AppOptimize::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @app_optimize_stub.logger + end + + # Service calls + + ## + # Creates a new report. + # + # This initiates a long-running operation that, upon completion, results + # in a report resource. Once the report is created, its results can be read + # via `ReadReport`. + # + # @overload create_report(request, options = nil) + # Pass arguments to `create_report` via a request object, either of type + # {::Google::Cloud::Appoptimize::V1beta::CreateReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Appoptimize::V1beta::CreateReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_report(parent: nil, report_id: nil, report: nil) + # Pass arguments to `create_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 parent [::String] + # Required. The parent Google Cloud project that will own the report. + # + # This value does not define the scope of the report data. See `Report.scope` + # for setting the data scope. + # + # Format: `projects/{project}/locations/{location}`. + # @param report_id [::String] + # Required. The ID to use for this report. This ID must be unique within + # the parent project and should comply with RFC 1034 restrictions (letters, + # numbers, and hyphen, with the first character a letter, the last a letter + # or a number, and a 63 character maximum). + # @param report [::Google::Cloud::Appoptimize::V1beta::Report, ::Hash] + # Required. The report resource to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/appoptimize/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new + # + # # Call the create_report method. + # result = client.create_report request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest + + # Converts hash and nil to 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_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::AppOptimize::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_optimize_stub.call_rpc :create_report, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the details of a report configuration. + # + # @overload get_report(request, options = nil) + # Pass arguments to `get_report` via a request object, either of type + # {::Google::Cloud::Appoptimize::V1beta::GetReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Appoptimize::V1beta::GetReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_report(name: nil) + # Pass arguments to `get_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 name [::String] + # Required. The name of the report to retrieve. + # + # Format: `projects/{project}/locations/{location}/reports/{report_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Appoptimize::V1beta::Report] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Appoptimize::V1beta::Report] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/appoptimize/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Appoptimize::V1beta::GetReportRequest.new + # + # # Call the get_report method. + # result = client.get_report request + # + # # The returned object is of type Google::Cloud::Appoptimize::V1beta::Report. + # p result + # + def get_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::GetReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_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::AppOptimize::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_optimize_stub.call_rpc :get_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 + + ## + # Lists reports within a given project. + # + # @overload list_reports(request, options = nil) + # Pass arguments to `list_reports` via a request object, either of type + # {::Google::Cloud::Appoptimize::V1beta::ListReportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Appoptimize::V1beta::ListReportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_reports(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project whose reports are to be listed. + # + # Format: `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. The maximum number of reports to return. The service may return + # fewer than this value. If unspecified, the server will determine the number + # of results to return. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListReports` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListReports` 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::Appoptimize::V1beta::Report>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Appoptimize::V1beta::Report>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/appoptimize/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Appoptimize::V1beta::ListReportsRequest.new + # + # # Call the list_reports method. + # result = client.list_reports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Appoptimize::V1beta::Report. + # p item + # end + # + def list_reports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_reports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_reports.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_optimize_stub.call_rpc :list_reports, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_optimize_stub, :list_reports, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified report. + # + # @overload delete_report(request, options = nil) + # Pass arguments to `delete_report` via a request object, either of type + # {::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_report(name: nil, allow_missing: nil) + # Pass arguments to `delete_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 name [::String] + # Required. The name of the report to delete. + # + # Format: `projects/{project}/locations/{location}/reports/{report_id}`. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the report 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 [::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/appoptimize/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new + # + # # Call the delete_report method. + # result = client.delete_report request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest + + # Converts hash and nil to 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_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::AppOptimize::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_optimize_stub.call_rpc :delete_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 + + ## + # Reads data within a specified report. + # + # @overload read_report(request, options = nil) + # Pass arguments to `read_report` via a request object, either of type + # {::Google::Cloud::Appoptimize::V1beta::ReadReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Appoptimize::V1beta::ReadReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_report(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `read_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 name [::String] + # Required. The resource name of the report to query. + # + # Format: `projects/{project}/locations/{location}/reports/{report_id}`. + # @param page_size [::Integer] + # Optional. The maximum number of rows to return. The service may return + # fewer than this value. If unspecified, at most 10,000 rows will be returned + # per page. The maximum allowed value is 25,000; values above 25,000 are + # coerced to 25,000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ReadReport` call, to + # retrieve the subsequent page of results. When `page_token` is specified, + # `job_reference` must also be provided from the previous response, and the + # `statement` field must not be set. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Protobuf::ListValue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Protobuf::ListValue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/appoptimize/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Appoptimize::V1beta::ReadReportRequest.new + # + # # Call the read_report method. + # result = client.read_report request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Protobuf::ListValue. + # p item + # end + # + def read_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest + + # Converts hash and nil to 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_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::AppOptimize::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.read_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.read_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_optimize_stub.call_rpc :read_report, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_optimize_stub, :read_report, request, response, 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 AppOptimize API. + # + # This class represents the configuration for AppOptimize, + # providing control 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::Appoptimize::V1beta::AppOptimize::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_report to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_report.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_report.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Appoptimize::V1beta::AppOptimize::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 = "appoptimize.googleapis.com" + + config_attr :endpoint, nil, ::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 AppOptimize API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_report` + # @return [::Gapic::Config::Method] + # + attr_reader :create_report + ## + # RPC-specific configuration for `get_report` + # @return [::Gapic::Config::Method] + # + attr_reader :get_report + ## + # RPC-specific configuration for `list_reports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reports + ## + # RPC-specific configuration for `delete_report` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_report + ## + # RPC-specific configuration for `read_report` + # @return [::Gapic::Config::Method] + # + attr_reader :read_report + + # @private + def initialize parent_rpcs = nil + create_report_config = parent_rpcs.create_report if parent_rpcs.respond_to? :create_report + @create_report = ::Gapic::Config::Method.new create_report_config + get_report_config = parent_rpcs.get_report if parent_rpcs.respond_to? :get_report + @get_report = ::Gapic::Config::Method.new get_report_config + list_reports_config = parent_rpcs.list_reports if parent_rpcs.respond_to? :list_reports + @list_reports = ::Gapic::Config::Method.new list_reports_config + delete_report_config = parent_rpcs.delete_report if parent_rpcs.respond_to? :delete_report + @delete_report = ::Gapic::Config::Method.new delete_report_config + read_report_config = parent_rpcs.read_report if parent_rpcs.respond_to? :read_report + @read_report = ::Gapic::Config::Method.new read_report_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/credentials.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/credentials.rb new file mode 100644 index 000000000000..27f2622b05f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/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 Appoptimize + module V1beta + module AppOptimize + # Credentials for the AppOptimize 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-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/operations.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/operations.rb new file mode 100644 index 000000000000..f1cb927af0c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/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 Appoptimize + module V1beta + module AppOptimize + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appoptimize.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppOptimize 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 AppOptimize 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::AppOptimize::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "appoptimize.googleapis.com" + + config_attr :endpoint, nil, ::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-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/paths.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/paths.rb new file mode 100644 index 000000000000..41d0f0f5198f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/paths.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Appoptimize + module V1beta + module AppOptimize + # Path helper methods for the AppOptimize API. + module Paths + ## + # Create a fully-qualified Application resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/applications/{application}` + # + # @param project [String] + # @param location [String] + # @param application [String] + # + # @return [::String] + def application_path project:, location:, application: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/applications/#{application}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified Report resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/reports/{report}` + # + # @param project [String] + # @param location [String] + # @param report [String] + # + # @return [::String] + def report_path project:, location:, report: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/reports/#{report}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest.rb new file mode 100644 index 000000000000..56837bd0515e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/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/app_optimize/v1beta/version" +require "google/cloud/appoptimize/v1beta/bindings_override" + +require "google/cloud/appoptimize/v1beta/app_optimize/credentials" +require "google/cloud/appoptimize/v1beta/app_optimize/paths" +require "google/cloud/appoptimize/v1beta/app_optimize/rest/operations" +require "google/cloud/appoptimize/v1beta/app_optimize/rest/client" + +module Google + module Cloud + module Appoptimize + module V1beta + ## + # Service for managing and querying optimization reports. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/appoptimize/v1beta/app_optimize/rest" + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + module AppOptimize + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/appoptimize/v1beta/app_optimize/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/client.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/client.rb new file mode 100644 index 000000000000..ba42e42adc07 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/client.rb @@ -0,0 +1,891 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/appoptimize/v1beta/app_optimize_pb" +require "google/cloud/appoptimize/v1beta/app_optimize/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Appoptimize + module V1beta + module AppOptimize + module Rest + ## + # REST client for the AppOptimize service. + # + # Service for managing and querying optimization reports. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appoptimize.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_optimize_stub + + ## + # Configure the AppOptimize Client class. + # + # See {::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppOptimize clients + # ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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", "Appoptimize", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_report.timeout = 60.0 + + default_config.rpcs.get_report.timeout = 60.0 + default_config.rpcs.get_report.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_reports.timeout = 60.0 + default_config.rpcs.list_reports.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_report.timeout = 60.0 + + default_config.rpcs.read_report.timeout = 60.0 + default_config.rpcs.read_report.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 AppOptimize 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::Appoptimize::V1beta::AppOptimize::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 + @app_optimize_stub.universe_domain + end + + ## + # Create a new AppOptimize REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppOptimize 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::Appoptimize::V1beta::AppOptimize::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 + + @app_optimize_stub = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @app_optimize_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 = @app_optimize_stub.endpoint + config.universe_domain = @app_optimize_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @app_optimize_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @app_optimize_stub.logger + end + + # Service calls + + ## + # Creates a new report. + # + # This initiates a long-running operation that, upon completion, results + # in a report resource. Once the report is created, its results can be read + # via `ReadReport`. + # + # @overload create_report(request, options = nil) + # Pass arguments to `create_report` via a request object, either of type + # {::Google::Cloud::Appoptimize::V1beta::CreateReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Appoptimize::V1beta::CreateReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_report(parent: nil, report_id: nil, report: nil) + # Pass arguments to `create_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 parent [::String] + # Required. The parent Google Cloud project that will own the report. + # + # This value does not define the scope of the report data. See `Report.scope` + # for setting the data scope. + # + # Format: `projects/{project}/locations/{location}`. + # @param report_id [::String] + # Required. The ID to use for this report. This ID must be unique within + # the parent project and should comply with RFC 1034 restrictions (letters, + # numbers, and hyphen, with the first character a letter, the last a letter + # or a number, and a 63 character maximum). + # @param report [::Google::Cloud::Appoptimize::V1beta::Report, ::Hash] + # Required. The report resource to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/appoptimize/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new + # + # # Call the create_report method. + # result = client.create_report request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest + + # Converts hash and nil to an 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_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::AppOptimize::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_optimize_stub.create_report request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 the details of a report configuration. + # + # @overload get_report(request, options = nil) + # Pass arguments to `get_report` via a request object, either of type + # {::Google::Cloud::Appoptimize::V1beta::GetReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Appoptimize::V1beta::GetReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_report(name: nil) + # Pass arguments to `get_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 name [::String] + # Required. The name of the report to retrieve. + # + # Format: `projects/{project}/locations/{location}/reports/{report_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Appoptimize::V1beta::Report] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Appoptimize::V1beta::Report] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/appoptimize/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Appoptimize::V1beta::GetReportRequest.new + # + # # Call the get_report method. + # result = client.get_report request + # + # # The returned object is of type Google::Cloud::Appoptimize::V1beta::Report. + # p result + # + def get_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::GetReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_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::AppOptimize::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_optimize_stub.get_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 + + ## + # Lists reports within a given project. + # + # @overload list_reports(request, options = nil) + # Pass arguments to `list_reports` via a request object, either of type + # {::Google::Cloud::Appoptimize::V1beta::ListReportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Appoptimize::V1beta::ListReportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_reports(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project whose reports are to be listed. + # + # Format: `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. The maximum number of reports to return. The service may return + # fewer than this value. If unspecified, the server will determine the number + # of results to return. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListReports` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListReports` 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::Appoptimize::V1beta::Report>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Appoptimize::V1beta::Report>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/appoptimize/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Appoptimize::V1beta::ListReportsRequest.new + # + # # Call the list_reports method. + # result = client.list_reports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Appoptimize::V1beta::Report. + # p item + # end + # + def list_reports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_reports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_reports.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_optimize_stub.list_reports request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_optimize_stub, :list_reports, "reports", request, result, 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 specified report. + # + # @overload delete_report(request, options = nil) + # Pass arguments to `delete_report` via a request object, either of type + # {::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_report(name: nil, allow_missing: nil) + # Pass arguments to `delete_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 name [::String] + # Required. The name of the report to delete. + # + # Format: `projects/{project}/locations/{location}/reports/{report_id}`. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the report 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 [::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/appoptimize/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new + # + # # Call the delete_report method. + # result = client.delete_report request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest + + # Converts hash and nil to an 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_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::AppOptimize::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_optimize_stub.delete_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 + + ## + # Reads data within a specified report. + # + # @overload read_report(request, options = nil) + # Pass arguments to `read_report` via a request object, either of type + # {::Google::Cloud::Appoptimize::V1beta::ReadReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Appoptimize::V1beta::ReadReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_report(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `read_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 name [::String] + # Required. The resource name of the report to query. + # + # Format: `projects/{project}/locations/{location}/reports/{report_id}`. + # @param page_size [::Integer] + # Optional. The maximum number of rows to return. The service may return + # fewer than this value. If unspecified, at most 10,000 rows will be returned + # per page. The maximum allowed value is 25,000; values above 25,000 are + # coerced to 25,000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ReadReport` call, to + # retrieve the subsequent page of results. When `page_token` is specified, + # `job_reference` must also be provided from the previous response, and the + # `statement` field must not be set. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Protobuf::ListValue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Protobuf::ListValue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/appoptimize/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Appoptimize::V1beta::ReadReportRequest.new + # + # # Call the read_report method. + # result = client.read_report request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Protobuf::ListValue. + # p item + # end + # + def read_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.read_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::AppOptimize::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.read_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.read_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_optimize_stub.read_report request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_optimize_stub, :read_report, "rows", request, result, 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 AppOptimize REST API. + # + # This class represents the configuration for AppOptimize 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::Appoptimize::V1beta::AppOptimize::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_report to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_report.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_report.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "appoptimize.googleapis.com" + + config_attr :endpoint, nil, ::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 AppOptimize API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_report` + # @return [::Gapic::Config::Method] + # + attr_reader :create_report + ## + # RPC-specific configuration for `get_report` + # @return [::Gapic::Config::Method] + # + attr_reader :get_report + ## + # RPC-specific configuration for `list_reports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reports + ## + # RPC-specific configuration for `delete_report` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_report + ## + # RPC-specific configuration for `read_report` + # @return [::Gapic::Config::Method] + # + attr_reader :read_report + + # @private + def initialize parent_rpcs = nil + create_report_config = parent_rpcs.create_report if parent_rpcs.respond_to? :create_report + @create_report = ::Gapic::Config::Method.new create_report_config + get_report_config = parent_rpcs.get_report if parent_rpcs.respond_to? :get_report + @get_report = ::Gapic::Config::Method.new get_report_config + list_reports_config = parent_rpcs.list_reports if parent_rpcs.respond_to? :list_reports + @list_reports = ::Gapic::Config::Method.new list_reports_config + delete_report_config = parent_rpcs.delete_report if parent_rpcs.respond_to? :delete_report + @delete_report = ::Gapic::Config::Method.new delete_report_config + read_report_config = parent_rpcs.read_report if parent_rpcs.respond_to? :read_report + @read_report = ::Gapic::Config::Method.new read_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-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/operations.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/operations.rb new file mode 100644 index 000000000000..305e2a4d98d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/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 Appoptimize + module V1beta + module AppOptimize + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appoptimize.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppOptimize 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 AppOptimize 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::AppOptimize::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "appoptimize.googleapis.com" + + config_attr :endpoint, nil, ::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: "/v1beta/{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: "/v1beta/{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: "/v1beta/{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: "/v1beta/{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-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/service_stub.rb new file mode 100644 index 000000000000..90b0d58b97ad --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/service_stub.rb @@ -0,0 +1,388 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/appoptimize/v1beta/app_optimize_pb" + +module Google + module Cloud + module Appoptimize + module V1beta + module AppOptimize + module Rest + ## + # REST service stub for the AppOptimize 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_report REST call + # + # @param request_pb [::Google::Cloud::Appoptimize::V1beta::CreateReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_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: "create_report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_report REST call + # + # @param request_pb [::Google::Cloud::Appoptimize::V1beta::GetReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Appoptimize::V1beta::Report] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Appoptimize::V1beta::Report] + # A result object deserialized from the server's reply + def get_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_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: "get_report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Appoptimize::V1beta::Report.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_reports REST call + # + # @param request_pb [::Google::Cloud::Appoptimize::V1beta::ListReportsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Appoptimize::V1beta::ListReportsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Appoptimize::V1beta::ListReportsResponse] + # A result object deserialized from the server's reply + def list_reports request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reports_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_reports", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Appoptimize::V1beta::ListReportsResponse.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_report REST call + # + # @param request_pb [::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_report", + 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 read_report REST call + # + # @param request_pb [::Google::Cloud::Appoptimize::V1beta::ReadReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Appoptimize::V1beta::ReadReportResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Appoptimize::V1beta::ReadReportResponse] + # A result object deserialized from the server's reply + def read_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_read_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: "read_report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Appoptimize::V1beta::ReadReportResponse.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_report REST call + # + # @param request_pb [::Google::Cloud::Appoptimize::V1beta::CreateReportRequest] + # 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_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/reports", + body: "report", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_report REST call + # + # @param request_pb [::Google::Cloud::Appoptimize::V1beta::GetReportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reports REST call + # + # @param request_pb [::Google::Cloud::Appoptimize::V1beta::ListReportsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_reports_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/reports", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_report REST call + # + # @param request_pb [::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest] + # 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_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the read_report REST call + # + # @param request_pb [::Google::Cloud::Appoptimize::V1beta::ReadReportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_read_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:read", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_pb.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_pb.rb new file mode 100644 index 000000000000..cfd388e56b0b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/appoptimize/v1beta/app_optimize.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/appoptimize/v1beta/app_optimize.proto\x12\x1fgoogle.cloud.appoptimize.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x01\n\x13\x43reateReportRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!appoptimize.googleapis.com/Report\x12\x16\n\treport_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\x06report\x18\x03 \x01(\x0b\x32\'.google.cloud.appoptimize.v1beta.ReportB\x03\xe0\x41\x02\"\xd5\x02\n\x06Report\x12\x36\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\ndimensions\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x14\n\x07metrics\x18\x07 \x03(\tB\x03\xe0\x41\x02\x12;\n\x06scopes\x18\x03 \x03(\x0b\x32&.google.cloud.appoptimize.v1beta.ScopeB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01:q\xea\x41n\n!appoptimize.googleapis.com/Report\x12\x38projects/{project}/locations/{location}/reports/{report}*\x07reports2\x06reportB\x0c\n\nexpiration\"\x9a\x01\n\x05Scope\x12\x46\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/ProjectH\x00\x12@\n\x0b\x61pplication\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!apphub.googleapis.com/ApplicationH\x00\x42\x07\n\x05scope\"K\n\x10GetReportRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!appoptimize.googleapis.com/Report\"\x80\x01\n\x12ListReportsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!appoptimize.googleapis.com/Report\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"h\n\x13ListReportsResponse\x12\x38\n\x07reports\x18\x01 \x03(\x0b\x32\'.google.cloud.appoptimize.v1beta.Report\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x13\x44\x65leteReportRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!appoptimize.googleapis.com/Report\x12\x1a\n\rallow_missing\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"}\n\x11ReadReportRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!appoptimize.googleapis.com/Report\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\"\x91\x01\n\x12ReadReportResponse\x12(\n\x04rows\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.ListValue\x12\x38\n\x07\x63olumns\x18\x05 \x03(\x0b\x32\'.google.cloud.appoptimize.v1beta.Column\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"l\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04mode\x18\x03 \x01(\t\x12\x38\n\x07\x63olumns\x18\x04 \x03(\x0b\x32\'.google.cloud.appoptimize.v1beta.Column\"\x13\n\x11OperationMetadata2\x82\x08\n\x0b\x41ppOptimize\x12\xdc\x01\n\x0c\x43reateReport\x12\x34.google.cloud.appoptimize.v1beta.CreateReportRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41\x1b\n\x06Report\x12\x11OperationMetadata\xda\x41\x17parent,report,report_id\x82\xd3\xe4\x93\x02\x39\"//v1beta/{parent=projects/*/locations/*}/reports:\x06report\x12\xa7\x01\n\tGetReport\x12\x31.google.cloud.appoptimize.v1beta.GetReportRequest\x1a\'.google.cloud.appoptimize.v1beta.Report\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1beta/{name=projects/*/locations/*/reports/*}\x12\xba\x01\n\x0bListReports\x12\x33.google.cloud.appoptimize.v1beta.ListReportsRequest\x1a\x34.google.cloud.appoptimize.v1beta.ListReportsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1beta/{parent=projects/*/locations/*}/reports\x12\x9c\x01\n\x0c\x44\x65leteReport\x12\x34.google.cloud.appoptimize.v1beta.DeleteReportRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1beta/{name=projects/*/locations/*/reports/*}\x12\xbd\x01\n\nReadReport\x12\x32.google.cloud.appoptimize.v1beta.ReadReportRequest\x1a\x33.google.cloud.appoptimize.v1beta.ReadReportResponse\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1beta/{name=projects/*/locations/*/reports/*}:read:\x01*\x1aN\xca\x41\x1a\x61ppoptimize.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\x02\n#com.google.cloud.appoptimize.v1betaB\x10\x41ppOptimizeProtoP\x01ZEcloud.google.com/go/appoptimize/apiv1beta/appoptimizepb;appoptimizepb\xaa\x02\x1fGoogle.Cloud.AppOptimize.V1Beta\xca\x02\x1fGoogle\\Cloud\\AppOptimize\\V1beta\xea\x41g\n!apphub.googleapis.com/Application\x12\x42projects/{project}/locations/{location}/applications/{application}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Appoptimize + module V1beta + CreateReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.CreateReportRequest").msgclass + Report = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.Report").msgclass + Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.Scope").msgclass + GetReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.GetReportRequest").msgclass + ListReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.ListReportsRequest").msgclass + ListReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.ListReportsResponse").msgclass + DeleteReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.DeleteReportRequest").msgclass + ReadReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.ReadReportRequest").msgclass + ReadReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.ReadReportResponse").msgclass + Column = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.Column").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_services_pb.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_services_pb.rb new file mode 100644 index 000000000000..13eb8e092e77 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/appoptimize/v1beta/app_optimize.proto for package 'google.cloud.appoptimize.v1beta' +# 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/appoptimize/v1beta/app_optimize_pb' + +module Google + module Cloud + module Appoptimize + module V1beta + module AppOptimize + # Service for managing and querying optimization reports. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.appoptimize.v1beta.AppOptimize' + + # Creates a new report. + # + # This initiates a long-running operation that, upon completion, results + # in a report resource. Once the report is created, its results can be read + # via `ReadReport`. + rpc :CreateReport, ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest, ::Google::Longrunning::Operation + # Retrieves the details of a report configuration. + rpc :GetReport, ::Google::Cloud::Appoptimize::V1beta::GetReportRequest, ::Google::Cloud::Appoptimize::V1beta::Report + # Lists reports within a given project. + rpc :ListReports, ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest, ::Google::Cloud::Appoptimize::V1beta::ListReportsResponse + # Deletes the specified report. + rpc :DeleteReport, ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest, ::Google::Protobuf::Empty + # Reads data within a specified report. + rpc :ReadReport, ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest, ::Google::Cloud::Appoptimize::V1beta::ReadReportResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/bindings_override.rb new file mode 100644 index 000000000000..ee4114f30e6e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/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 Appoptimize + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/appoptimize/v1beta/rest" + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + module V1beta + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Appoptimize"] + 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: "/v1beta/{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: "/v1beta/{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-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/rest.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/rest.rb new file mode 100644 index 000000000000..587079670723 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/appoptimize/v1beta/app_optimize/rest" +require "google/cloud/appoptimize/v1beta/bindings_override" +require "google/cloud/app_optimize/v1beta/version" + +module Google + module Cloud + module Appoptimize + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/appoptimize/v1beta/rest" + # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new + # + module V1beta + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..71d8f8395b0e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# App Optimize V1BETA Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/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-app_optimize-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/cloud/appoptimize/v1beta/app_optimize.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/cloud/appoptimize/v1beta/app_optimize.rb new file mode 100644 index 000000000000..2b2d77e4ce11 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/cloud/appoptimize/v1beta/app_optimize.rb @@ -0,0 +1,328 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Appoptimize + module V1beta + # Request message for the `CreateReport` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent Google Cloud project that will own the report. + # + # This value does not define the scope of the report data. See `Report.scope` + # for setting the data scope. + # + # Format: `projects/{project}/locations/{location}`. + # @!attribute [rw] report_id + # @return [::String] + # Required. The ID to use for this report. This ID must be unique within + # the parent project and should comply with RFC 1034 restrictions (letters, + # numbers, and hyphen, with the first character a letter, the last a letter + # or a number, and a 63 character maximum). + # @!attribute [rw] report + # @return [::Google::Cloud::Appoptimize::V1beta::Report] + # Required. The report resource to create. + class CreateReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A configuration that defines the parameters for the data represented by a + # report. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp in UTC of when this report expires. Once the + # report expires, it will no longer be accessible and the report's + # underlying data will be deleted. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of this report. + # @!attribute [rw] dimensions + # @return [::Array<::String>] + # Required. A list of dimensions to include in the report. Supported values: + # + # * `project` + # * `application` + # * `service_or_workload` + # * `resource` + # * `resource_type` + # * `location` + # * `product_display_name` + # * `sku` + # * `month` + # * `day` + # * `hour` + # + # To aggregate results by time, specify at least one time dimension + # (`month`, `day`, or `hour`). All time dimensions use Pacific Time, + # respect Daylight Saving Time (DST), and follow these ISO 8601 formats: + # + # * `month`: `YYYY-MM` (e.g., `2024-01`) + # * `day`: `YYYY-MM-DD` (e.g., `2024-01-10`) + # * `hour`: `YYYY-MM-DDTHH` (e.g., `2024-01-10T00`) + # + # If the time range filter does not align with the selected time dimension, + # the range is expanded to encompass the full period of the finest-grained + # time dimension. + # + # For example, if the filter is `2026-01-10` through `2026-01-12` and the + # `month` dimension is selected, the effective time range expands to include + # all of January (`2026-01-01` to `2026-02-01`). + # @!attribute [rw] metrics + # @return [::Array<::String>] + # Required. A list of metrics to include in the report. Supported values: + # + # * `cost` + # * `cpu_mean_utilization` + # * `cpu_usage_core_seconds` + # * `cpu_allocation_core_seconds` + # * `cpu_p95_utilization` + # * `memory_mean_utilization` + # * `memory_usage_byte_seconds` + # * `memory_allocation_byte_seconds` + # * `memory_p95_utilization` + # @!attribute [rw] scopes + # @return [::Array<::Google::Cloud::Appoptimize::V1beta::Scope>] + # Optional. The resource containers for which to fetch data. Default is the + # project specified in the report's parent. + # @!attribute [rw] filter + # @return [::String] + # Optional. A Common Expression Language (CEL) expression used to filter the + # data for the report. + # + # Predicates may refer to any dimension. Filtering must conform to these + # constraints: + # + # * All string field predicates must use exact string matches. + # * Multiple predicates referring to the same string field must be joined + # using the logical OR operator ('||'). + # * All other predicates must be joined using the logical AND operator + # (`&&`). + # * A predicate on a time dimension (e.g., `day`) specifying the start time + # must use a greater-than-or-equal-to comparison (`>=`). + # * A predicate on a time dimension specifying the end time must use a + # less-than comparison (`<`). + # + # Examples: + # + # 1. Filter by a specific resource type: + # `"resource_type == 'compute.googleapis.com/Instance'"` + # + # 2. Filter data points that fall within a specific absolute time interval: + # `"hour >= timestamp('2024-01-01T00:00:00Z') && + # hour < timestamp('2024-02-01T00:00:00Z')"` + # + # 3. Filter data points that fall within the past 72 hours: + # `"hour >= now - duration('72h')"` + # + # 4. Combine string predicate with time interval predicate: + # `"(location == 'us-east1' || location == 'us-west1') && + # hour >= timestamp('2023-12-01T00:00:00Z') && + # hour < timestamp('2024-02-01T00:00:00Z')"` + # + # If the filter omits time dimensions (`month`, `day`, `hour`), the report + # defaults to a 7-day range ending at the previous Pacific Time midnight, + # with Daylight Saving Time (DST) applied. + # + # For example, if the current Pacific Time is `2026-01-05T12:00:00`, + # the default range is `2025-12-29T00:00:00` to `2026-01-05T00:00:00` Pacific + # time. + class Report + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the report scope. + # @!attribute [rw] project + # @return [::String] + # Required. A Google Cloud Platform project to fetch data from. + # + # Format: `"projects/{project}"`. + # + # Note: The following fields are mutually exclusive: `project`, `application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] application + # @return [::String] + # Required. An App Hub Application to fetch data from. + # + # Format: + # `"projects/{project}/locations/{location}/applications/{application}"`. + # + # Note: The following fields are mutually exclusive: `application`, `project`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Scope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetReport` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the report to retrieve. + # + # Format: `projects/{project}/locations/{location}/reports/{report_id}`. + class GetReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListReports` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent project whose reports are to be listed. + # + # Format: `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of reports to return. The service may return + # fewer than this value. If unspecified, the server will determine the number + # of results to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListReports` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListReports` must match + # the call that provided the page token. + class ListReportsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListReports` method. + # @!attribute [rw] reports + # @return [::Array<::Google::Cloud::Appoptimize::V1beta::Report>] + # The list of reports. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is empty, there are no subsequent pages. + class ListReportsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteReport` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the report to delete. + # + # Format: `projects/{project}/locations/{location}/reports/{report_id}`. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the report is not found, the request will + # succeed but no action will be taken on the server. + class DeleteReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ReadReport` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the report to query. + # + # Format: `projects/{project}/locations/{location}/reports/{report_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of rows to return. The service may return + # fewer than this value. If unspecified, at most 10,000 rows will be returned + # per page. The maximum allowed value is 25,000; values above 25,000 are + # coerced to 25,000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ReadReport` call, to + # retrieve the subsequent page of results. When `page_token` is specified, + # `job_reference` must also be provided from the previous response, and the + # `statement` field must not be set. + class ReadReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ReadReport` method. + # @!attribute [rw] rows + # @return [::Array<::Google::Protobuf::ListValue>] + # A list of rows, where each row represents a record from the report. + # @!attribute [rw] columns + # @return [::Array<::Google::Cloud::Appoptimize::V1beta::Column>] + # The columns describing the structure of the data in the `rows` field. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` in a subsequent `ReadReport` + # request to retrieve the next page of results. If this field is empty, + # there are no further pages. + class ReadReportResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a single column within `Columns`. + # @!attribute [rw] name + # @return [::String] + # The name of the column. + # + # This field: + # + # * Contains only letters (a-z, A-Z), numbers (0-9), or underscores (_); + # * Start with a letter or underscore; and + # * Has a maximum length is 128 characters. + # @!attribute [rw] type + # @return [::String] + # The data type of the column. + # + # Supported values include: + # + # * `STRING` + # * `INT64` + # * `FLOAT64` + # * `BOOLEAN` + # * `TIMESTAMP` + # * `RECORD` + # + # `RECORD` indicates that the field contains a nested schema, described in + # the `columns` property of this `Column`. + # @!attribute [rw] mode + # @return [::String] + # The mode of the column, indicating if it is nullable, required, or + # repeated. + # + # Possible values: + # + # * `NULLABLE`: The column allows NULL values. + # * `REQUIRED`: The column does not allow NULL values. + # * `REPEATED`: The column contains an array of values. + # @!attribute [rw] columns + # @return [::Array<::Google::Cloud::Appoptimize::V1beta::Column>] + # If the `type` of this column is `RECORD`, this sub-field describes the + # nested structure. + class Column + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents metadata related to the creation of a Report. This value is + # embedded in the Operation object returned by `CreateReport`. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/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-app_optimize-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/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-app_optimize-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..2c0512ca2148 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-app_optimize-v1beta", path: "../" +else + gem "google-cloud-app_optimize-v1beta" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/create_report.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/create_report.rb new file mode 100644 index 000000000000..dc5e43ddb229 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/create_report.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 appoptimize_v1beta_generated_AppOptimize_CreateReport_sync] +require "google/cloud/appoptimize/v1beta" + +## +# Snippet for the create_report call in the AppOptimize service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#create_report. +# +def create_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new + + # Call the create_report method. + result = client.create_report request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appoptimize_v1beta_generated_AppOptimize_CreateReport_sync] diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/delete_report.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/delete_report.rb new file mode 100644 index 000000000000..fee89a232e20 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/delete_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 appoptimize_v1beta_generated_AppOptimize_DeleteReport_sync] +require "google/cloud/appoptimize/v1beta" + +## +# Snippet for the delete_report call in the AppOptimize service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#delete_report. +# +def delete_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new + + # Call the delete_report method. + result = client.delete_report request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END appoptimize_v1beta_generated_AppOptimize_DeleteReport_sync] diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/get_report.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/get_report.rb new file mode 100644 index 000000000000..e9b4e8f3bbb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/get_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 appoptimize_v1beta_generated_AppOptimize_GetReport_sync] +require "google/cloud/appoptimize/v1beta" + +## +# Snippet for the get_report call in the AppOptimize service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#get_report. +# +def get_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Appoptimize::V1beta::GetReportRequest.new + + # Call the get_report method. + result = client.get_report request + + # The returned object is of type Google::Cloud::Appoptimize::V1beta::Report. + p result +end +# [END appoptimize_v1beta_generated_AppOptimize_GetReport_sync] diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/list_reports.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/list_reports.rb new file mode 100644 index 000000000000..fb336c8936a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/list_reports.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 appoptimize_v1beta_generated_AppOptimize_ListReports_sync] +require "google/cloud/appoptimize/v1beta" + +## +# Snippet for the list_reports call in the AppOptimize service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#list_reports. +# +def list_reports + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Appoptimize::V1beta::ListReportsRequest.new + + # Call the list_reports method. + result = client.list_reports request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Appoptimize::V1beta::Report. + p item + end +end +# [END appoptimize_v1beta_generated_AppOptimize_ListReports_sync] diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/read_report.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/read_report.rb new file mode 100644 index 000000000000..fddb352df0f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/read_report.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 appoptimize_v1beta_generated_AppOptimize_ReadReport_sync] +require "google/cloud/appoptimize/v1beta" + +## +# Snippet for the read_report call in the AppOptimize service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#read_report. +# +def read_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Appoptimize::V1beta::ReadReportRequest.new + + # Call the read_report method. + result = client.read_report request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Protobuf::ListValue. + p item + end +end +# [END appoptimize_v1beta_generated_AppOptimize_ReadReport_sync] diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/snippet_metadata_google.cloud.appoptimize.v1beta.json b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/snippet_metadata_google.cloud.appoptimize.v1beta.json new file mode 100644 index 000000000000..fe71ae2fae2c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/snippet_metadata_google.cloud.appoptimize.v1beta.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-cloud-app_optimize-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.appoptimize.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "appoptimize_v1beta_generated_AppOptimize_CreateReport_sync", + "title": "Snippet for the create_report call in the AppOptimize service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#create_report.", + "file": "app_optimize/create_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_report", + "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#create_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Appoptimize::V1beta::CreateReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppOptimize::Client", + "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client" + }, + "method": { + "short_name": "CreateReport", + "full_name": "google.cloud.appoptimize.v1beta.AppOptimize.CreateReport", + "service": { + "short_name": "AppOptimize", + "full_name": "google.cloud.appoptimize.v1beta.AppOptimize" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appoptimize_v1beta_generated_AppOptimize_GetReport_sync", + "title": "Snippet for the get_report call in the AppOptimize service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#get_report.", + "file": "app_optimize/get_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_report", + "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#get_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Appoptimize::V1beta::GetReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Appoptimize::V1beta::Report", + "client": { + "short_name": "AppOptimize::Client", + "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client" + }, + "method": { + "short_name": "GetReport", + "full_name": "google.cloud.appoptimize.v1beta.AppOptimize.GetReport", + "service": { + "short_name": "AppOptimize", + "full_name": "google.cloud.appoptimize.v1beta.AppOptimize" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appoptimize_v1beta_generated_AppOptimize_ListReports_sync", + "title": "Snippet for the list_reports call in the AppOptimize service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#list_reports.", + "file": "app_optimize/list_reports.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reports", + "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#list_reports", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Appoptimize::V1beta::ListReportsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Appoptimize::V1beta::ListReportsResponse", + "client": { + "short_name": "AppOptimize::Client", + "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client" + }, + "method": { + "short_name": "ListReports", + "full_name": "google.cloud.appoptimize.v1beta.AppOptimize.ListReports", + "service": { + "short_name": "AppOptimize", + "full_name": "google.cloud.appoptimize.v1beta.AppOptimize" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "appoptimize_v1beta_generated_AppOptimize_DeleteReport_sync", + "title": "Snippet for the delete_report call in the AppOptimize service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#delete_report.", + "file": "app_optimize/delete_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_report", + "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#delete_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AppOptimize::Client", + "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client" + }, + "method": { + "short_name": "DeleteReport", + "full_name": "google.cloud.appoptimize.v1beta.AppOptimize.DeleteReport", + "service": { + "short_name": "AppOptimize", + "full_name": "google.cloud.appoptimize.v1beta.AppOptimize" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appoptimize_v1beta_generated_AppOptimize_ReadReport_sync", + "title": "Snippet for the read_report call in the AppOptimize service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#read_report.", + "file": "app_optimize/read_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "read_report", + "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#read_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Appoptimize::V1beta::ReadReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Appoptimize::V1beta::ReadReportResponse", + "client": { + "short_name": "AppOptimize::Client", + "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client" + }, + "method": { + "short_name": "ReadReport", + "full_name": "google.cloud.appoptimize.v1beta.AppOptimize.ReadReport", + "service": { + "short_name": "AppOptimize", + "full_name": "google.cloud.appoptimize.v1beta.AppOptimize" + } + } + }, + "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-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_operations_test.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_operations_test.rb new file mode 100644 index 000000000000..06fe20fdf7d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_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/appoptimize/v1beta/app_optimize_pb" +require "google/cloud/appoptimize/v1beta/app_optimize_services_pb" +require "google/cloud/appoptimize/v1beta/app_optimize" + +class ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_paths_test.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_paths_test.rb new file mode 100644 index 000000000000..43160d2524b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_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/appoptimize/v1beta/app_optimize" + +class ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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_application_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.application_path project: "value0", location: "value1", application: "value2" + assert_equal "projects/value0/locations/value1/applications/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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_report_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.report_path project: "value0", location: "value1", report: "value2" + assert_equal "projects/value0/locations/value1/reports/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_rest_test.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_rest_test.rb new file mode 100644 index 000000000000..5b2558d2957c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_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/appoptimize/v1beta/app_optimize_pb" +require "google/cloud/appoptimize/v1beta/app_optimize/rest" + + +class ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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_report + # Create test objects. + 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" + report_id = "hello world" + report = {} + + create_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::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.stub :transcode_create_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_report_client_stub do + # Create client + c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_report({ parent: parent, report_id: report_id, report: report }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_report parent: parent, report_id: report_id, report: report do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_report ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new(parent: parent, report_id: report_id, report: report) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_report({ parent: parent, report_id: report_id, report: report }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_report(::Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new(parent: parent, report_id: report_id, report: report), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_report_client_stub.call_count + end + end + end + + def test_get_report + # Create test objects. + client_result = ::Google::Cloud::Appoptimize::V1beta::Report.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_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::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.stub :transcode_get_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_report_client_stub do + # Create client + c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_report({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_report name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_report ::Google::Cloud::Appoptimize::V1beta::GetReportRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_report({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_report(::Google::Cloud::Appoptimize::V1beta::GetReportRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_report_client_stub.call_count + end + end + end + + def test_list_reports + # Create test objects. + client_result = ::Google::Cloud::Appoptimize::V1beta::ListReportsResponse.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_reports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.stub :transcode_list_reports_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reports_client_stub do + # Create client + c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_reports({ 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_reports 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_reports ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest.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_reports({ 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_reports(::Google::Cloud::Appoptimize::V1beta::ListReportsRequest.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_reports_client_stub.call_count + end + end + end + + def test_delete_report + # 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" + allow_missing = true + + delete_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::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.stub :transcode_delete_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_report_client_stub do + # Create client + c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_report({ name: name, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_report name: name, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_report ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.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_report({ 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_report(::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.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_report_client_stub.call_count + end + end + end + + def test_read_report + # Create test objects. + client_result = ::Google::Cloud::Appoptimize::V1beta::ReadReportResponse.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" + + read_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::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.stub :transcode_read_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, read_report_client_stub do + # Create client + c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.read_report({ 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.read_report 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.read_report ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest.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.read_report({ 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.read_report(::Google::Cloud::Appoptimize::V1beta::ReadReportRequest.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, read_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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_test.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_test.rb new file mode 100644 index 000000000000..3acd8031999b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_test.rb @@ -0,0 +1,437 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/appoptimize/v1beta/app_optimize_pb" +require "google/cloud/appoptimize/v1beta/app_optimize" + +class ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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_report + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + report_id = "hello world" + report = {} + + create_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_report, name + assert_kind_of ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["report_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Appoptimize::V1beta::Report), request["report"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_report_client_stub do + # Create client + c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_report({ parent: parent, report_id: report_id, report: report }) do |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_report parent: parent, report_id: report_id, report: report do |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_report ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new(parent: parent, report_id: report_id, report: report) do |response, operation| + 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_report({ parent: parent, report_id: report_id, report: report }, grpc_options) do |response, operation| + 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_report(::Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new(parent: parent, report_id: report_id, report: report), grpc_options) do |response, operation| + assert_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_report_client_stub.call_rpc_count + end + end + + def test_get_report + # Create GRPC objects. + grpc_response = ::Google::Cloud::Appoptimize::V1beta::Report.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_report, name + assert_kind_of ::Google::Cloud::Appoptimize::V1beta::GetReportRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_report_client_stub do + # Create client + c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_report({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_report name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_report ::Google::Cloud::Appoptimize::V1beta::GetReportRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_report({ 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_report(::Google::Cloud::Appoptimize::V1beta::GetReportRequest.new(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_report_client_stub.call_rpc_count + end + end + + def test_list_reports + # Create GRPC objects. + grpc_response = ::Google::Cloud::Appoptimize::V1beta::ListReportsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_reports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reports, name + assert_kind_of ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest, 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_reports_client_stub do + # Create client + c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_reports({ parent: parent, page_size: page_size, page_token: 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_reports parent: parent, page_size: page_size, page_token: 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_reports ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest.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_reports({ 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_reports(::Google::Cloud::Appoptimize::V1beta::ListReportsRequest.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_reports_client_stub.call_rpc_count + end + end + + def test_delete_report + # 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" + allow_missing = true + + delete_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_report, name + assert_kind_of ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_report_client_stub do + # Create client + c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_report({ name: name, allow_missing: allow_missing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_report name: name, allow_missing: allow_missing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_report ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new(name: name, allow_missing: allow_missing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_report({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_report(::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_report_client_stub.call_rpc_count + end + end + + def test_read_report + # Create GRPC objects. + grpc_response = ::Google::Cloud::Appoptimize::V1beta::ReadReportResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + read_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :read_report, name + assert_kind_of ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest, 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, read_report_client_stub do + # Create client + c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.read_report({ 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.read_report 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.read_report ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest.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.read_report({ 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.read_report(::Google::Cloud::Appoptimize::V1beta::ReadReportRequest.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, read_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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_optimize-v1beta/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-artifact_registry-v1/.gitignore b/owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json new file mode 100644 index 000000000000..b7c7a7f45d14 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "artifactregistry.googleapis.com", + "api_shortname": "artifactregistry", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest", + "distribution_name": "google-cloud-artifact_registry-v1", + "is_cloud": true, + "language": "ruby", + "name": "artifactregistry", + "name_pretty": "Artifact Registry V1 API", + "product_documentation": "https://cloud.google.com/artifact-registry/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details.", + "ruby-cloud-env-prefix": "ARTIFACT_REGISTRY", + "ruby-cloud-product-url": "https://cloud.google.com/artifact-registry/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml b/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml new file mode 100644 index 000000000000..de96e2618870 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-artifact_registry-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-artifact_registry-v1.rb" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/.yardopts b/owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts new file mode 100644 index 000000000000..79e1614b4868 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Artifact Registry 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-artifact_registry-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1ae5019e3c04 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-artifact_registry-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-artifact_registry-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/artifact_registry/v1" + +client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/artifact_registry/v1" + +::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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-artifact_registry-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/artifact_registry/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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-artifact_registry-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/LICENSE.md b/owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1/README.md new file mode 100644 index 000000000000..445805f41ecc --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Artifact Registry V1 API + +Store and manage build artifacts in a scalable and integrated service built on Google infrastructure. + +Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Artifact Registry V1 API. Most users should consider using +the main client gem, +[google-cloud-artifact_registry](https://rubygems.org/gems/google-cloud-artifact_registry). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-artifact_registry-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/artifactregistry.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/artifact_registry/v1" + +client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new +request = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new # (request fields as keyword arguments...) +response = client.list_docker_images request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/artifact-registry/) +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/artifact_registry/v1" +require "logger" + +client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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-artifact_registry`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-artifact_registry-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-artifact_registry`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-artifact_registry-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile b/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile new file mode 100644 index 000000000000..4148fa14709c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["ARTIFACT_REGISTRY_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["ARTIFACT_REGISTRY_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 ARTIFACT_REGISTRY_TEST_PROJECT=test123 ARTIFACT_REGISTRY_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/artifact_registry/v1/artifact_registry/credentials" + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["ARTIFACT_REGISTRY_PROJECT"] = project + ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] = project + ENV["ARTIFACT_REGISTRY_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-artifact_registry-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-artifact_registry-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-artifact_registry-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-artifact_registry-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-artifact_registry-v1" + header "google-cloud-artifact_registry-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-artifact_registry-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-artifact_registry-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-artifact_registry-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-artifact_registry-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-artifact_registry-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json new file mode 100644 index 000000000000..02e8cf3c04bd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json @@ -0,0 +1,268 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.devtools.artifactregistry.v1", + "libraryPackage": "::Google::Cloud::ArtifactRegistry::V1", + "services": { + "ArtifactRegistry": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client", + "rpcs": { + "ListDockerImages": { + "methods": [ + "list_docker_images" + ] + }, + "GetDockerImage": { + "methods": [ + "get_docker_image" + ] + }, + "ListMavenArtifacts": { + "methods": [ + "list_maven_artifacts" + ] + }, + "GetMavenArtifact": { + "methods": [ + "get_maven_artifact" + ] + }, + "ListNpmPackages": { + "methods": [ + "list_npm_packages" + ] + }, + "GetNpmPackage": { + "methods": [ + "get_npm_package" + ] + }, + "ListPythonPackages": { + "methods": [ + "list_python_packages" + ] + }, + "GetPythonPackage": { + "methods": [ + "get_python_package" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "import_apt_artifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "import_yum_artifacts" + ] + }, + "ListRepositories": { + "methods": [ + "list_repositories" + ] + }, + "GetRepository": { + "methods": [ + "get_repository" + ] + }, + "CreateRepository": { + "methods": [ + "create_repository" + ] + }, + "UpdateRepository": { + "methods": [ + "update_repository" + ] + }, + "DeleteRepository": { + "methods": [ + "delete_repository" + ] + }, + "ListPackages": { + "methods": [ + "list_packages" + ] + }, + "GetPackage": { + "methods": [ + "get_package" + ] + }, + "DeletePackage": { + "methods": [ + "delete_package" + ] + }, + "ListVersions": { + "methods": [ + "list_versions" + ] + }, + "GetVersion": { + "methods": [ + "get_version" + ] + }, + "DeleteVersion": { + "methods": [ + "delete_version" + ] + }, + "BatchDeleteVersions": { + "methods": [ + "batch_delete_versions" + ] + }, + "UpdateVersion": { + "methods": [ + "update_version" + ] + }, + "ListFiles": { + "methods": [ + "list_files" + ] + }, + "GetFile": { + "methods": [ + "get_file" + ] + }, + "DeleteFile": { + "methods": [ + "delete_file" + ] + }, + "UpdateFile": { + "methods": [ + "update_file" + ] + }, + "ListTags": { + "methods": [ + "list_tags" + ] + }, + "GetTag": { + "methods": [ + "get_tag" + ] + }, + "CreateTag": { + "methods": [ + "create_tag" + ] + }, + "UpdateTag": { + "methods": [ + "update_tag" + ] + }, + "DeleteTag": { + "methods": [ + "delete_tag" + ] + }, + "CreateRule": { + "methods": [ + "create_rule" + ] + }, + "ListRules": { + "methods": [ + "list_rules" + ] + }, + "GetRule": { + "methods": [ + "get_rule" + ] + }, + "UpdateRule": { + "methods": [ + "update_rule" + ] + }, + "DeleteRule": { + "methods": [ + "delete_rule" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "GetProjectSettings": { + "methods": [ + "get_project_settings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "update_project_settings" + ] + }, + "GetVPCSCConfig": { + "methods": [ + "get_vpcsc_config" + ] + }, + "UpdateVPCSCConfig": { + "methods": [ + "update_vpcsc_config" + ] + }, + "UpdatePackage": { + "methods": [ + "update_package" + ] + }, + "ListAttachments": { + "methods": [ + "list_attachments" + ] + }, + "GetAttachment": { + "methods": [ + "get_attachment" + ] + }, + "CreateAttachment": { + "methods": [ + "create_attachment" + ] + }, + "DeleteAttachment": { + "methods": [ + "delete_attachment" + ] + }, + "ExportArtifact": { + "methods": [ + "export_artifact" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec b/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec new file mode 100644 index 000000000000..47c7a5a724a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/artifact_registry/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-artifact_registry-v1" + gem.version = Google::Cloud::ArtifactRegistry::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details." + gem.summary = "Store and manage build artifacts in a scalable and integrated service built on Google 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" + 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-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb new file mode 100644 index 000000000000..81605be80ce5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-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/artifact_registry/v1" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb new file mode 100644 index 000000000000..0fa4b7bfbe28 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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/artifact_registry/v1/artifact_registry" +require "google/cloud/artifact_registry/v1/version" + +module Google + module Cloud + module ArtifactRegistry + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/artifact_registry/v1" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/artifact_registry/v1" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/artifact_registry/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb new file mode 100644 index 000000000000..ee43fe7eedff --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/artifact_registry/v1/version" + +require "google/cloud/artifact_registry/v1/artifact_registry/credentials" +require "google/cloud/artifact_registry/v1/artifact_registry/paths" +require "google/cloud/artifact_registry/v1/artifact_registry/operations" +require "google/cloud/artifact_registry/v1/artifact_registry/client" +require "google/cloud/artifact_registry/v1/artifact_registry/rest" + +module Google + module Cloud + module ArtifactRegistry + module V1 + ## + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/artifact_registry/v1/artifact_registry" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/artifact_registry/v1/artifact_registry/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + module ArtifactRegistry + end + end + end + end +end + +helper_path = ::File.join __dir__, "artifact_registry", "helpers.rb" +require "google/cloud/artifact_registry/v1/artifact_registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb new file mode 100644 index 000000000000..e71cc0cd853d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb @@ -0,0 +1,5574 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/devtools/artifactregistry/v1/service_pb" +require "google/cloud/location" + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + ## + # Client for the ArtifactRegistry service. + # + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :artifact_registry_stub + + ## + # Configure the ArtifactRegistry Client class. + # + # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ArtifactRegistry clients + # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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", "ArtifactRegistry", "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 ArtifactRegistry 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::ArtifactRegistry::V1::ArtifactRegistry::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 + @artifact_registry_stub.universe_domain + end + + ## + # Create a new ArtifactRegistry client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ArtifactRegistry client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/devtools/artifactregistry/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 + + @artifact_registry_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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 + ) + + @artifact_registry_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 = @artifact_registry_stub.endpoint + config.universe_domain = @artifact_registry_stub.universe_domain + config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @artifact_registry_stub.logger + end + + # Service calls + + ## + # Lists docker images. + # + # @overload list_docker_images(request, options = nil) + # Pass arguments to `list_docker_images` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_docker_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose docker images will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param order_by [::String] + # The field to order the results by. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new + # + # # Call the list_docker_images method. + # result = client.list_docker_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. + # p item + # end + # + def list_docker_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_docker_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_docker_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_docker_images, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, request, response, 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 docker image. + # + # @overload get_docker_image(request, options = nil) + # Pass arguments to `get_docker_image` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_docker_image(name: nil) + # Pass arguments to `get_docker_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 docker images. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new + # + # # Call the get_docker_image method. + # result = client.get_docker_image request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. + # p result + # + def get_docker_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_docker_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_docker_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_docker_image, request, 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 maven artifacts. + # + # @overload list_maven_artifacts(request, options = nil) + # Pass arguments to `list_maven_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_maven_artifacts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_maven_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose maven artifacts will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new + # + # # Call the list_maven_artifacts method. + # result = client.list_maven_artifacts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + # p item + # end + # + def list_maven_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_maven_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_maven_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_maven_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_maven_artifacts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, request, response, 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 maven artifact. + # + # @overload get_maven_artifact(request, options = nil) + # Pass arguments to `get_maven_artifact` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_maven_artifact(name: nil) + # Pass arguments to `get_maven_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 maven artifact. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new + # + # # Call the get_maven_artifact method. + # result = client.get_maven_artifact request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + # p result + # + def get_maven_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_maven_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_maven_artifact.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_maven_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_maven_artifact, request, 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 npm packages. + # + # @overload list_npm_packages(request, options = nil) + # Pass arguments to `list_npm_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_npm_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_npm_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose npm packages will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new + # + # # Call the list_npm_packages method. + # result = client.list_npm_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. + # p item + # end + # + def list_npm_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_npm_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_npm_packages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_npm_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_npm_packages, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, request, response, 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 npm package. + # + # @overload get_npm_package(request, options = nil) + # Pass arguments to `get_npm_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_npm_package(name: nil) + # Pass arguments to `get_npm_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 npm package. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new + # + # # Call the get_npm_package method. + # result = client.get_npm_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. + # p result + # + def get_npm_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_npm_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_npm_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_npm_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_npm_package, request, 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 python packages. + # + # @overload list_python_packages(request, options = nil) + # Pass arguments to `list_python_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_python_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_python_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose python packages will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new + # + # # Call the list_python_packages method. + # result = client.list_python_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. + # p item + # end + # + def list_python_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_python_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_python_packages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_python_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_python_packages, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, request, response, 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 python package. + # + # @overload get_python_package(request, options = nil) + # Pass arguments to `get_python_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_python_package(name: nil) + # Pass arguments to `get_python_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 python package. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new + # + # # Call the get_python_package method. + # result = client.get_python_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. + # p result + # + def get_python_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_python_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_python_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_python_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_python_package, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_apt_artifacts(request, options = nil) + # Pass arguments to `import_apt_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_apt_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new + # + # # Call the import_apt_artifacts method. + # result = client.import_apt_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_apt_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_apt_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_apt_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_yum_artifacts(request, options = nil) + # Pass arguments to `import_yum_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_yum_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new + # + # # Call the import_yum_artifacts method. + # result = client.import_yum_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_yum_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_yum_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_yum_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::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, order_by: nil) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose repositories will be + # listed. + # @param page_size [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # + # Examples of using a filter: + # + # To filter the results of your request to repositories with the name + # `my-repo` in project `my-project` in the `us-central` region, append the + # following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + # @param order_by [::String] + # Optional. The field to order the results by. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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 + + @artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_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 a repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::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. The name of the repository to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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 + + @artifact_registry_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 repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::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_id: nil, repository: 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 name of the parent resource where the repository will be + # created. + # @param repository_id [::String] + # Required. The repository id to use for this repository. + # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] + # Required. The repository to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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 + + @artifact_registry_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 a repository. + # + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::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(repository: nil, update_mask: 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 repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] + # The repository that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new + # + # # Call the update_repository method. + # result = client.update_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. + # p result + # + def update_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-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 + + @artifact_registry_stub.call_rpc :update_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 + + ## + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::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) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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 + + @artifact_registry_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 packages. + # + # @overload list_packages(request, options = nil) + # Pass arguments to `list_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose packages will be listed. + # @param page_size [::Integer] + # The maximum number of packages to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to packages with the name + # `my-package` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + # + # To filter the results of your request to packages with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request": + # + # * `"annotations.external_link:external_link_value"` + # + # To filter the results just for a specific annotation key `external_link`, + # append the following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to packages with the annotation key-value pair + # [`external.link`:`https://example.com/my-package`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-package`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @param order_by [::String] + # Optional. The field to order the results by. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new + # + # # Call the list_packages method. + # result = client.list_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. + # p item + # end + # + def list_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_packages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, 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 package. + # + # @overload get_package(request, options = nil) + # Pass arguments to `get_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_package(name: nil) + # Pass arguments to `get_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 package to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new + # + # # Call the get_package method. + # result = client.get_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + # p result + # + def get_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_package, request, 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 package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + # + # @overload delete_package(request, options = nil) + # Pass arguments to `delete_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_package(name: nil) + # Pass arguments to `delete_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 package to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new + # + # # Call the delete_package method. + # result = client.delete_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest + + # Converts hash and nil to 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_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 versions. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil) + # Pass arguments to `list_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] + # The name of the parent resource whose versions will be listed. + # @param page_size [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + # @param order_by [::String] + # Optional. The field to order the results by. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to versions with the name + # `my-version` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + # + # To filter the results of your request to versions with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to versions with the annotation key-value pair + # [`external.link`:`https://example.com/my-version`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-version`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_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::ArtifactRegistry::V1::Version. + # p item + # end + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_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 a version + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_version(name: nil, view: nil) + # Pass arguments to `get_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] + # The name of the version to retrieve. + # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_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 + + ## + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_version(name: nil, force: nil) + # Pass arguments to `delete_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] + # The name of the version to delete. + # @param force [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest + + # Converts hash and nil to 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_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 multiple versions across a repository. The returned operation will + # complete once the versions have been deleted. + # + # @overload batch_delete_versions(request, options = nil) + # Pass arguments to `batch_delete_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_delete_versions(parent: nil, names: nil, validate_only: nil) + # Pass arguments to `batch_delete_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] + # The name of the repository holding all requested versions. + # @param names [::Array<::String>] + # Required. The names of the versions to delete. + # The maximum number of versions deleted per batch is determined by the + # service and is dependent on the available resources in the region. + # @param validate_only [::Boolean] + # If true, the request is performed without deleting data, following AIP-163. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new + # + # # Call the batch_delete_versions method. + # result = client.batch_delete_versions request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_delete_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest + + # Converts hash and nil to 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_delete_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_delete_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_delete_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :batch_delete_versions, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 version. + # + # @overload update_version(request, options = nil) + # Pass arguments to `update_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_version(version: nil, update_mask: nil) + # Pass arguments to `update_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 version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash] + # Required. The Version that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new + # + # # Call the update_version method. + # result = client.update_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + # p result + # + def update_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest + + # Converts hash and nil to 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_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.version&.name + header_params["version.name"] = request.version.name + end + + request_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_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_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 + + ## + # Lists files. + # + # @overload list_files(request, options = nil) + # Pass arguments to `list_files` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 repository whose files will be listed. For + # example: "projects/p1/locations/us-central1/repositories/repo1 + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `owner` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to files with the name `my_file.txt` + # in project `my-project` in the `us-central` region, in repository + # `my-repo`, append the following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + # + # To filter the results of your request to files owned by the version `1.0` + # in package `pkg1`, append the following filter expression to your request: + # + # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # + # To filter the results of your request to files with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to files with the annotation key-value pair + # [`external.link`:`https://example.com/my-file`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-file`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @param page_size [::Integer] + # The maximum number of files to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param order_by [::String] + # The field to order the results by. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new + # + # # Call the list_files method. + # result = client.list_files request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. + # p item + # end + # + def list_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_files.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, 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 file. + # + # @overload get_file(request, options = nil) + # Pass arguments to `get_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_file(name: nil) + # Pass arguments to `get_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 file to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new + # + # # Call the get_file method. + # result = client.get_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + # p result + # + def get_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_file, request, 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 file and all of its content. It is only allowed on generic + # repositories. The returned operation will complete once the file has been + # deleted. + # + # @overload delete_file(request, options = nil) + # Pass arguments to `delete_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_file(name: nil) + # Pass arguments to `delete_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 file to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new + # + # # Call the delete_file method. + # result = client.delete_file request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest + + # Converts hash and nil to 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_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_file, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 file. + # + # @overload update_file(request, options = nil) + # Pass arguments to `update_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_file(file: nil, update_mask: nil) + # Pass arguments to `update_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash] + # Required. The File that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new + # + # # Call the update_file method. + # result = client.update_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + # p result + # + def update_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest + + # Converts hash and nil to 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_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.file&.name + header_params["file.name"] = request.file.name + end + + request_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_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_file, request, 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 tags. + # + # @overload list_tags(request, options = nil) + # Pass arguments to `list_tags` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tags` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent package whose tags will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `version` + # + # Examples of using a filter: + # + # To filter the results of your request to tags with the name `my-tag` in + # package `my-package` in repository `my-repo` in project "`y-project` in + # the us-central region, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + # + # To filter the results of your request to tags applied to the version + # `1.0` in package `my-package`, append the following filter expression to + # your request: + # + # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # @param page_size [::Integer] + # The maximum number of tags to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new + # + # # Call the list_tags method. + # result = client.list_tags request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. + # p item + # end + # + def list_tags request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tags.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tags.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tags.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, 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 tag. + # + # @overload get_tag(request, options = nil) + # Pass arguments to `get_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_tag(name: nil) + # Pass arguments to `get_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new + # + # # Call the get_tag method. + # result = client.get_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def get_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_tag, request, 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 tag. + # + # @overload create_tag(request, options = nil) + # Pass arguments to `create_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_tag(parent: nil, tag_id: nil, tag: nil) + # Pass arguments to `create_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource where the tag will be created. + # @param tag_id [::String] + # The tag id to use for this repository. + # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] + # The tag to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new + # + # # Call the create_tag method. + # result = client.create_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def create_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest + + # Converts hash and nil to 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :create_tag, request, 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 tag. + # + # @overload update_tag(request, options = nil) + # Pass arguments to `update_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_tag(tag: nil, update_mask: nil) + # Pass arguments to `update_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] + # The tag that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new + # + # # Call the update_tag method. + # result = client.update_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def update_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest + + # Converts hash and nil to 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.tag&.name + header_params["tag.name"] = request.tag.name + end + + request_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_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_tag, request, 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 tag. + # + # @overload delete_tag(request, options = nil) + # Pass arguments to `delete_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_tag(name: nil) + # Pass arguments to `delete_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag 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/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new + # + # # Call the delete_tag method. + # result = client.delete_tag request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest + + # Converts hash and nil to 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_tag, request, 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 rule. + # + # @overload create_rule(request, options = nil) + # Pass arguments to `create_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_rule(parent: nil, rule_id: nil, rule: nil) + # Pass arguments to `create_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource where the rule will be created. + # @param rule_id [::String] + # The rule id to use for this repository. + # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] + # The rule to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new + # + # # Call the create_rule method. + # result = client.create_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def create_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :create_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists rules. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_rules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent repository whose rules will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1`. + # @param page_size [::Integer] + # The maximum number of rules to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. + # p item + # end + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_rules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_rules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_rules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a rule. + # + # @overload get_rule(request, options = nil) + # Pass arguments to `get_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_rule(name: nil) + # Pass arguments to `get_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new + # + # # Call the get_rule method. + # result = client.get_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def get_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a rule. + # + # @overload update_rule(request, options = nil) + # Pass arguments to `update_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_rule(rule: nil, update_mask: nil) + # Pass arguments to `update_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] + # The rule that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new + # + # # Call the update_rule method. + # result = client.update_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def update_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.rule&.name + header_params["rule.name"] = request.rule.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a rule. + # + # @overload delete_rule(request, options = nil) + # Pass arguments to `delete_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_rule(name: nil) + # Pass arguments to `delete_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to delete. + # + # @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/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new + # + # # Call the delete_rule method. + # result = client.delete_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the IAM policy for a given 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/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-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 + + @artifact_registry_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 IAM policy for a given 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/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-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 + + @artifact_registry_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 + + ## + # Tests if the caller has a list of permissions on a resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-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 + + @artifact_registry_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 + + ## + # Retrieves the Settings for the Project. + # + # @overload get_project_settings(request, options = nil) + # Pass arguments to `get_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_project_settings(name: nil) + # Pass arguments to `get_project_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. The name of the projectSettings resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new + # + # # Call the get_project_settings method. + # result = client.get_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + # p result + # + def get_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_project_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_project_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 Settings for the Project. + # + # @overload update_project_settings(request, options = nil) + # Pass arguments to `update_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_project_settings(project_settings: nil, update_mask: nil) + # Pass arguments to `update_project_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 project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash] + # The project settings. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new + # + # # Call the update_project_settings method. + # result = client.update_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + # p result + # + def update_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_project_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.project_settings&.name + header_params["project_settings.name"] = request.project_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_project_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_project_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 the VPCSC Config for the Project. + # + # @overload get_vpcsc_config(request, options = nil) + # Pass arguments to `get_vpcsc_config` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_vpcsc_config(name: nil) + # Pass arguments to `get_vpcsc_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 VPCSCConfig resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new + # + # # Call the get_vpcsc_config method. + # result = client.get_vpcsc_config request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + # p result + # + def get_vpcsc_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_vpcsc_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_vpcsc_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_vpcsc_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 the VPCSC Config for the Project. + # + # @overload update_vpcsc_config(request, options = nil) + # Pass arguments to `update_vpcsc_config` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil) + # Pass arguments to `update_vpcsc_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 vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash] + # The project config. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new + # + # # Call the update_vpcsc_config method. + # result = client.update_vpcsc_config request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + # p result + # + def update_vpcsc_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest + + # Converts hash and nil to 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_vpcsc_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.vpcsc_config&.name + header_params["vpcsc_config.name"] = request.vpcsc_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_vpcsc_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_vpcsc_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_vpcsc_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 package. + # + # @overload update_package(request, options = nil) + # Pass arguments to `update_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_package(package: nil, update_mask: nil) + # Pass arguments to `update_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash] + # The package that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new + # + # # Call the update_package method. + # result = client.update_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + # p result + # + def update_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest + + # Converts hash and nil to 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_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.package&.name + header_params["package.name"] = request.package.name + end + + request_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_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_package, request, 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 attachments. + # + # @overload list_attachments(request, options = nil) + # Pass arguments to `list_attachments` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_attachments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose attachments will be listed. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `target` + # * `type` + # * `attachment_namespace` + # @param page_size [::Integer] + # The maximum number of attachments to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new + # + # # Call the list_attachments method. + # result = client.list_attachments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. + # p item + # end + # + def list_attachments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_attachments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_attachments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_attachments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_attachments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_attachments, request, response, 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 attachment. + # + # @overload get_attachment(request, options = nil) + # Pass arguments to `get_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_attachment(name: nil) + # Pass arguments to `get_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 attachment to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new + # + # # Call the get_attachment method. + # result = client.get_attachment request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. + # p result + # + def get_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_attachment, request, 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 attachment. The returned Operation will finish once the + # attachment has been created. Its response will be the created attachment. + # + # @overload create_attachment(request, options = nil) + # Pass arguments to `create_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil) + # Pass arguments to `create_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 where the attachment will be + # created. + # @param attachment_id [::String] + # Required. The attachment id to use for this attachment. + # @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash] + # Required. The attachment to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new + # + # # Call the create_attachment method. + # result = client.create_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest + + # Converts hash and nil to 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_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :create_attachment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 attachment. The returned Operation will + # finish once the attachments has been deleted. It will not have any + # Operation metadata and will return a `google.protobuf.Empty` response. + # + # @overload delete_attachment(request, options = nil) + # Pass arguments to `delete_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_attachment(name: nil) + # Pass arguments to `delete_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 attachment to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new + # + # # Call the delete_attachment method. + # result = client.delete_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest + + # Converts hash and nil to 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_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_attachment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports an artifact to a Cloud Storage bucket. + # + # @overload export_artifact(request, options = nil) + # Pass arguments to `export_artifact` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_artifact(source_version: nil, source_tag: nil, gcs_path: nil, repository: nil) + # Pass arguments to `export_artifact` via keyword arguments. Note that at + # least one keyword argument is 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_version [::String] + # The artifact version to export. + # Format: + # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} + # + # Note: The following parameters are mutually exclusive: `source_version`, `source_tag`. 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 source_tag [::String] + # The artifact tag to export. + # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} + # + # Note: The following parameters are mutually exclusive: `source_tag`, `source_version`. 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 gcs_path [::String] + # The Cloud Storage path to export the artifact to. Should start with the + # bucket name, and optionally have a directory path. Examples: + # `dst_bucket`, `dst_bucket/sub_dir`. + # Existing objects with the same path will be overwritten. + # @param repository [::String] + # Required. The repository of the artifact to export. + # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new + # + # # Call the export_artifact method. + # result = client.export_artifact request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-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.export_artifact.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :export_artifact, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 ArtifactRegistry API. + # + # This class represents the configuration for ArtifactRegistry, + # providing control 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::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_docker_images to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_docker_images.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_docker_images.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::ArtifactRegistry::V1::ArtifactRegistry::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 = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::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 ArtifactRegistry API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_docker_images` + # @return [::Gapic::Config::Method] + # + attr_reader :list_docker_images + ## + # RPC-specific configuration for `get_docker_image` + # @return [::Gapic::Config::Method] + # + attr_reader :get_docker_image + ## + # RPC-specific configuration for `list_maven_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_maven_artifacts + ## + # RPC-specific configuration for `get_maven_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :get_maven_artifact + ## + # RPC-specific configuration for `list_npm_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_npm_packages + ## + # RPC-specific configuration for `get_npm_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_npm_package + ## + # RPC-specific configuration for `list_python_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_python_packages + ## + # RPC-specific configuration for `get_python_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_python_package + ## + # RPC-specific configuration for `import_apt_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_apt_artifacts + ## + # RPC-specific configuration for `import_yum_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_yum_artifacts + ## + # 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_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_packages + ## + # RPC-specific configuration for `get_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_package + ## + # RPC-specific configuration for `delete_package` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_package + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + ## + # RPC-specific configuration for `batch_delete_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_delete_versions + ## + # RPC-specific configuration for `update_version` + # @return [::Gapic::Config::Method] + # + attr_reader :update_version + ## + # RPC-specific configuration for `list_files` + # @return [::Gapic::Config::Method] + # + attr_reader :list_files + ## + # RPC-specific configuration for `get_file` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file + ## + # RPC-specific configuration for `delete_file` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_file + ## + # RPC-specific configuration for `update_file` + # @return [::Gapic::Config::Method] + # + attr_reader :update_file + ## + # RPC-specific configuration for `list_tags` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tags + ## + # RPC-specific configuration for `get_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tag + ## + # RPC-specific configuration for `create_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tag + ## + # RPC-specific configuration for `update_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tag + ## + # RPC-specific configuration for `delete_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tag + ## + # RPC-specific configuration for `create_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_rule + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `get_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule + ## + # RPC-specific configuration for `update_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule + ## + # RPC-specific configuration for `delete_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_rule + ## + # RPC-specific configuration for `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_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_settings + ## + # RPC-specific configuration for `update_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_settings + ## + # RPC-specific configuration for `get_vpcsc_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vpcsc_config + ## + # RPC-specific configuration for `update_vpcsc_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vpcsc_config + ## + # RPC-specific configuration for `update_package` + # @return [::Gapic::Config::Method] + # + attr_reader :update_package + ## + # RPC-specific configuration for `list_attachments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attachments + ## + # RPC-specific configuration for `get_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attachment + ## + # RPC-specific configuration for `create_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_attachment + ## + # RPC-specific configuration for `delete_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_attachment + ## + # RPC-specific configuration for `export_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :export_artifact + + # @private + def initialize parent_rpcs = nil + list_docker_images_config = parent_rpcs.list_docker_images if parent_rpcs.respond_to? :list_docker_images + @list_docker_images = ::Gapic::Config::Method.new list_docker_images_config + get_docker_image_config = parent_rpcs.get_docker_image if parent_rpcs.respond_to? :get_docker_image + @get_docker_image = ::Gapic::Config::Method.new get_docker_image_config + list_maven_artifacts_config = parent_rpcs.list_maven_artifacts if parent_rpcs.respond_to? :list_maven_artifacts + @list_maven_artifacts = ::Gapic::Config::Method.new list_maven_artifacts_config + get_maven_artifact_config = parent_rpcs.get_maven_artifact if parent_rpcs.respond_to? :get_maven_artifact + @get_maven_artifact = ::Gapic::Config::Method.new get_maven_artifact_config + list_npm_packages_config = parent_rpcs.list_npm_packages if parent_rpcs.respond_to? :list_npm_packages + @list_npm_packages = ::Gapic::Config::Method.new list_npm_packages_config + get_npm_package_config = parent_rpcs.get_npm_package if parent_rpcs.respond_to? :get_npm_package + @get_npm_package = ::Gapic::Config::Method.new get_npm_package_config + list_python_packages_config = parent_rpcs.list_python_packages if parent_rpcs.respond_to? :list_python_packages + @list_python_packages = ::Gapic::Config::Method.new list_python_packages_config + get_python_package_config = parent_rpcs.get_python_package if parent_rpcs.respond_to? :get_python_package + @get_python_package = ::Gapic::Config::Method.new get_python_package_config + import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts + @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config + import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts + @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_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_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages + @list_packages = ::Gapic::Config::Method.new list_packages_config + get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package + @get_package = ::Gapic::Config::Method.new get_package_config + delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package + @delete_package = ::Gapic::Config::Method.new delete_package_config + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions + @batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config + update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version + @update_version = ::Gapic::Config::Method.new update_version_config + list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files + @list_files = ::Gapic::Config::Method.new list_files_config + get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file + @get_file = ::Gapic::Config::Method.new get_file_config + delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file + @delete_file = ::Gapic::Config::Method.new delete_file_config + update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file + @update_file = ::Gapic::Config::Method.new update_file_config + list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags + @list_tags = ::Gapic::Config::Method.new list_tags_config + get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag + @get_tag = ::Gapic::Config::Method.new get_tag_config + create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag + @create_tag = ::Gapic::Config::Method.new create_tag_config + update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag + @update_tag = ::Gapic::Config::Method.new update_tag_config + delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag + @delete_tag = ::Gapic::Config::Method.new delete_tag_config + create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule + @create_rule = ::Gapic::Config::Method.new create_rule_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule + @get_rule = ::Gapic::Config::Method.new get_rule_config + update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule + @update_rule = ::Gapic::Config::Method.new update_rule_config + delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule + @delete_rule = ::Gapic::Config::Method.new delete_rule_config + 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_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings + @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config + update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings + @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config + get_vpcsc_config_config = parent_rpcs.get_vpcsc_config if parent_rpcs.respond_to? :get_vpcsc_config + @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config + update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config + @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config + update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package + @update_package = ::Gapic::Config::Method.new update_package_config + list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments + @list_attachments = ::Gapic::Config::Method.new list_attachments_config + get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment + @get_attachment = ::Gapic::Config::Method.new get_attachment_config + create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment + @create_attachment = ::Gapic::Config::Method.new create_attachment_config + delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment + @delete_attachment = ::Gapic::Config::Method.new delete_attachment_config + export_artifact_config = parent_rpcs.export_artifact if parent_rpcs.respond_to? :export_artifact + @export_artifact = ::Gapic::Config::Method.new export_artifact_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb new file mode 100644 index 000000000000..808d2715f8ee --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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 ArtifactRegistry + module V1 + module ArtifactRegistry + # Credentials for the ArtifactRegistry API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "ARTIFACT_REGISTRY_CREDENTIALS", + "ARTIFACT_REGISTRY_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "ARTIFACT_REGISTRY_CREDENTIALS_JSON", + "ARTIFACT_REGISTRY_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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb new file mode 100644 index 000000000000..57d67f3b167a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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 ArtifactRegistry + module V1 + module ArtifactRegistry + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ArtifactRegistry 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 ArtifactRegistry 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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::ArtifactRegistry::V1::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 = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb new file mode 100644 index 000000000000..624a366f2e6a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb @@ -0,0 +1,333 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + # Path helper methods for the ArtifactRegistry API. + module Paths + ## + # Create a fully-qualified Attachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param attachment [String] + # + # @return [::String] + def attachment_path project:, location:, repository:, attachment: + 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}/attachments/#{attachment}" + end + + ## + # Create a fully-qualified DockerImage resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param docker_image [String] + # + # @return [::String] + def docker_image_path project:, location:, repository:, docker_image: + 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}/dockerImages/#{docker_image}" + end + + ## + # Create a fully-qualified File resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/files/{file}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param file [String] + # + # @return [::String] + def file_path project:, location:, repository:, file: + 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}/files/#{file}" + 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 MavenArtifact resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param maven_artifact [String] + # + # @return [::String] + def maven_artifact_path project:, location:, repository:, maven_artifact: + 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}/mavenArtifacts/#{maven_artifact}" + end + + ## + # Create a fully-qualified NpmPackage resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param npm_package [String] + # + # @return [::String] + def npm_package_path project:, location:, repository:, npm_package: + 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}/npmPackages/#{npm_package}" + end + + ## + # Create a fully-qualified Package resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param package [String] + # + # @return [::String] + def package_path project:, location:, repository:, package: + 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}/packages/#{package}" + end + + ## + # Create a fully-qualified ProjectSettings resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/projectSettings` + # + # @param project [String] + # + # @return [::String] + def project_settings_path project: + "projects/#{project}/projectSettings" + end + + ## + # Create a fully-qualified PythonPackage resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param python_package [String] + # + # @return [::String] + def python_package_path project:, location:, repository:, python_package: + 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}/pythonPackages/#{python_package}" + 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 Rule resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/rules/{rule}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param rule [String] + # + # @return [::String] + def rule_path project:, location:, repository:, 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}/rules/#{rule}" + 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 + + ## + # Create a fully-qualified Tag resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param package [String] + # @param tag [String] + # + # @return [::String] + def tag_path project:, location:, repository:, package:, tag: + 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, "package cannot contain /" if package.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}" + end + + ## + # Create a fully-qualified Version resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param package [String] + # @param version [String] + # + # @return [::String] + def version_path project:, location:, repository:, package:, version: + 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, "package cannot contain /" if package.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/versions/#{version}" + end + + ## + # Create a fully-qualified VpcscConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/vpcscConfig` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def vpcsc_config_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/vpcscConfig" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb new file mode 100644 index 000000000000..64924d2a2ee7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/artifact_registry/v1/version" +require "google/cloud/artifact_registry/v1/bindings_override" + +require "google/cloud/artifact_registry/v1/artifact_registry/credentials" +require "google/cloud/artifact_registry/v1/artifact_registry/paths" +require "google/cloud/artifact_registry/v1/artifact_registry/rest/operations" +require "google/cloud/artifact_registry/v1/artifact_registry/rest/client" + +module Google + module Cloud + module ArtifactRegistry + module V1 + ## + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/artifact_registry/v1/artifact_registry/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + module ArtifactRegistry + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/artifact_registry/v1/artifact_registry/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb new file mode 100644 index 000000000000..735735a49314 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb @@ -0,0 +1,5189 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/devtools/artifactregistry/v1/service_pb" +require "google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + module Rest + ## + # REST client for the ArtifactRegistry service. + # + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :artifact_registry_stub + + ## + # Configure the ArtifactRegistry Client class. + # + # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ArtifactRegistry clients + # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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", "ArtifactRegistry", "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 ArtifactRegistry 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::ArtifactRegistry::V1::ArtifactRegistry::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 + @artifact_registry_stub.universe_domain + end + + ## + # Create a new ArtifactRegistry REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ArtifactRegistry 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::ArtifactRegistry::V1::ArtifactRegistry::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 + + @artifact_registry_stub = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @artifact_registry_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 = @artifact_registry_stub.endpoint + config.universe_domain = @artifact_registry_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @artifact_registry_stub.logger + end + + # Service calls + + ## + # Lists docker images. + # + # @overload list_docker_images(request, options = nil) + # Pass arguments to `list_docker_images` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_docker_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose docker images will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param order_by [::String] + # The field to order the results by. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new + # + # # Call the list_docker_images method. + # result = client.list_docker_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. + # p item + # end + # + def list_docker_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_docker_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_docker_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_docker_images request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, "docker_images", request, result, 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 docker image. + # + # @overload get_docker_image(request, options = nil) + # Pass arguments to `get_docker_image` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_docker_image(name: nil) + # Pass arguments to `get_docker_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 docker images. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new + # + # # Call the get_docker_image method. + # result = client.get_docker_image request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. + # p result + # + def get_docker_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_docker_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_docker_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_docker_image request, 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 maven artifacts. + # + # @overload list_maven_artifacts(request, options = nil) + # Pass arguments to `list_maven_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_maven_artifacts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_maven_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose maven artifacts will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new + # + # # Call the list_maven_artifacts method. + # result = client.list_maven_artifacts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + # p item + # end + # + def list_maven_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_maven_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_maven_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_maven_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_maven_artifacts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, "maven_artifacts", request, result, 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 maven artifact. + # + # @overload get_maven_artifact(request, options = nil) + # Pass arguments to `get_maven_artifact` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_maven_artifact(name: nil) + # Pass arguments to `get_maven_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 maven artifact. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new + # + # # Call the get_maven_artifact method. + # result = client.get_maven_artifact request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + # p result + # + def get_maven_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_maven_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_maven_artifact.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_maven_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_maven_artifact request, 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 npm packages. + # + # @overload list_npm_packages(request, options = nil) + # Pass arguments to `list_npm_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_npm_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_npm_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose npm packages will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new + # + # # Call the list_npm_packages method. + # result = client.list_npm_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. + # p item + # end + # + def list_npm_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_npm_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_npm_packages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_npm_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_npm_packages request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, "npm_packages", request, result, 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 npm package. + # + # @overload get_npm_package(request, options = nil) + # Pass arguments to `get_npm_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_npm_package(name: nil) + # Pass arguments to `get_npm_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 npm package. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new + # + # # Call the get_npm_package method. + # result = client.get_npm_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. + # p result + # + def get_npm_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_npm_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_npm_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_npm_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_npm_package request, 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 python packages. + # + # @overload list_python_packages(request, options = nil) + # Pass arguments to `list_python_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_python_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_python_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose python packages will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new + # + # # Call the list_python_packages method. + # result = client.list_python_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. + # p item + # end + # + def list_python_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_python_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_python_packages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_python_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_python_packages request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, "python_packages", request, result, 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 python package. + # + # @overload get_python_package(request, options = nil) + # Pass arguments to `get_python_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_python_package(name: nil) + # Pass arguments to `get_python_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 python package. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new + # + # # Call the get_python_package method. + # result = client.get_python_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. + # p result + # + def get_python_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_python_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_python_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_python_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_python_package request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_apt_artifacts(request, options = nil) + # Pass arguments to `import_apt_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_apt_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new + # + # # Call the import_apt_artifacts method. + # result = client.import_apt_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_apt_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_apt_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_apt_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.import_apt_artifacts request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_yum_artifacts(request, options = nil) + # Pass arguments to `import_yum_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_yum_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new + # + # # Call the import_yum_artifacts method. + # result = client.import_yum_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_yum_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_yum_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_yum_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.import_yum_artifacts request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::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, order_by: nil) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose repositories will be + # listed. + # @param page_size [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # + # Examples of using a filter: + # + # To filter the results of your request to repositories with the name + # `my-repo` in project `my-project` in the `us-central` region, append the + # following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + # @param order_by [::String] + # Optional. The field to order the results by. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @artifact_registry_stub.list_repositories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_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 a repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::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. The name of the repository to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @artifact_registry_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 repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::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_id: nil, repository: 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 name of the parent resource where the repository will be + # created. + # @param repository_id [::String] + # Required. The repository id to use for this repository. + # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] + # Required. The repository to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @artifact_registry_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 a repository. + # + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::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(repository: nil, update_mask: 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 repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] + # The repository that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new + # + # # Call the update_repository method. + # result = client.update_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. + # p result + # + def update_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @artifact_registry_stub.update_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 + + ## + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::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) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @artifact_registry_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 packages. + # + # @overload list_packages(request, options = nil) + # Pass arguments to `list_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose packages will be listed. + # @param page_size [::Integer] + # The maximum number of packages to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to packages with the name + # `my-package` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + # + # To filter the results of your request to packages with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request": + # + # * `"annotations.external_link:external_link_value"` + # + # To filter the results just for a specific annotation key `external_link`, + # append the following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to packages with the annotation key-value pair + # [`external.link`:`https://example.com/my-package`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-package`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @param order_by [::String] + # Optional. The field to order the results by. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new + # + # # Call the list_packages method. + # result = client.list_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. + # p item + # end + # + def list_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_packages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_packages request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, 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 package. + # + # @overload get_package(request, options = nil) + # Pass arguments to `get_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_package(name: nil) + # Pass arguments to `get_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 package to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new + # + # # Call the get_package method. + # result = client.get_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + # p result + # + def get_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_package request, 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 package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + # + # @overload delete_package(request, options = nil) + # Pass arguments to `delete_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_package(name: nil) + # Pass arguments to `delete_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 package to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new + # + # # Call the delete_package method. + # result = client.delete_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest + + # Converts hash and nil to an 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_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_package request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 versions. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil) + # Pass arguments to `list_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] + # The name of the parent resource whose versions will be listed. + # @param page_size [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + # @param order_by [::String] + # Optional. The field to order the results by. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to versions with the name + # `my-version` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + # + # To filter the results of your request to versions with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to versions with the annotation key-value pair + # [`external.link`:`https://example.com/my-version`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-version`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_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::ArtifactRegistry::V1::Version. + # p item + # end + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_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 a version + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_version(name: nil, view: nil) + # Pass arguments to `get_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] + # The name of the version to retrieve. + # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_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 + + ## + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_version(name: nil, force: nil) + # Pass arguments to `delete_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] + # The name of the version to delete. + # @param force [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest + + # Converts hash and nil to an 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_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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_version request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 multiple versions across a repository. The returned operation will + # complete once the versions have been deleted. + # + # @overload batch_delete_versions(request, options = nil) + # Pass arguments to `batch_delete_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_delete_versions(parent: nil, names: nil, validate_only: nil) + # Pass arguments to `batch_delete_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] + # The name of the repository holding all requested versions. + # @param names [::Array<::String>] + # Required. The names of the versions to delete. + # The maximum number of versions deleted per batch is determined by the + # service and is dependent on the available resources in the region. + # @param validate_only [::Boolean] + # If true, the request is performed without deleting data, following AIP-163. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new + # + # # Call the batch_delete_versions method. + # result = client.batch_delete_versions request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_delete_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest + + # Converts hash and nil to an 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_delete_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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_delete_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_delete_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.batch_delete_versions request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 version. + # + # @overload update_version(request, options = nil) + # Pass arguments to `update_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_version(version: nil, update_mask: nil) + # Pass arguments to `update_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 version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash] + # Required. The Version that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new + # + # # Call the update_version method. + # result = client.update_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + # p result + # + def update_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest + + # Converts hash and nil to an 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_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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_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 + + ## + # Lists files. + # + # @overload list_files(request, options = nil) + # Pass arguments to `list_files` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 repository whose files will be listed. For + # example: "projects/p1/locations/us-central1/repositories/repo1 + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `owner` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to files with the name `my_file.txt` + # in project `my-project` in the `us-central` region, in repository + # `my-repo`, append the following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + # + # To filter the results of your request to files owned by the version `1.0` + # in package `pkg1`, append the following filter expression to your request: + # + # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # + # To filter the results of your request to files with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to files with the annotation key-value pair + # [`external.link`:`https://example.com/my-file`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-file`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @param page_size [::Integer] + # The maximum number of files to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param order_by [::String] + # The field to order the results by. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new + # + # # Call the list_files method. + # result = client.list_files request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. + # p item + # end + # + def list_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_files.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_files request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, 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 file. + # + # @overload get_file(request, options = nil) + # Pass arguments to `get_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_file(name: nil) + # Pass arguments to `get_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 file to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new + # + # # Call the get_file method. + # result = client.get_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + # p result + # + def get_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_file request, 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 file and all of its content. It is only allowed on generic + # repositories. The returned operation will complete once the file has been + # deleted. + # + # @overload delete_file(request, options = nil) + # Pass arguments to `delete_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_file(name: nil) + # Pass arguments to `delete_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 file to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new + # + # # Call the delete_file method. + # result = client.delete_file request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest + + # Converts hash and nil to an 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_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_file request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 file. + # + # @overload update_file(request, options = nil) + # Pass arguments to `update_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_file(file: nil, update_mask: nil) + # Pass arguments to `update_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash] + # Required. The File that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new + # + # # Call the update_file method. + # result = client.update_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + # p result + # + def update_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest + + # Converts hash and nil to an 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_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_file request, 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 tags. + # + # @overload list_tags(request, options = nil) + # Pass arguments to `list_tags` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tags` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent package whose tags will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `version` + # + # Examples of using a filter: + # + # To filter the results of your request to tags with the name `my-tag` in + # package `my-package` in repository `my-repo` in project "`y-project` in + # the us-central region, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + # + # To filter the results of your request to tags applied to the version + # `1.0` in package `my-package`, append the following filter expression to + # your request: + # + # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # @param page_size [::Integer] + # The maximum number of tags to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new + # + # # Call the list_tags method. + # result = client.list_tags request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. + # p item + # end + # + def list_tags request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tags.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_tags.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tags.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_tags request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, 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 tag. + # + # @overload get_tag(request, options = nil) + # Pass arguments to `get_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_tag(name: nil) + # Pass arguments to `get_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new + # + # # Call the get_tag method. + # result = client.get_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def get_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_tag request, 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 tag. + # + # @overload create_tag(request, options = nil) + # Pass arguments to `create_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_tag(parent: nil, tag_id: nil, tag: nil) + # Pass arguments to `create_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource where the tag will be created. + # @param tag_id [::String] + # The tag id to use for this repository. + # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] + # The tag to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new + # + # # Call the create_tag method. + # result = client.create_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def create_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest + + # Converts hash and nil to an 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.create_tag request, 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 tag. + # + # @overload update_tag(request, options = nil) + # Pass arguments to `update_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_tag(tag: nil, update_mask: nil) + # Pass arguments to `update_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] + # The tag that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new + # + # # Call the update_tag method. + # result = client.update_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def update_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest + + # Converts hash and nil to an 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_tag request, 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 tag. + # + # @overload delete_tag(request, options = nil) + # Pass arguments to `delete_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_tag(name: nil) + # Pass arguments to `delete_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag 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/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new + # + # # Call the delete_tag method. + # result = client.delete_tag request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest + + # Converts hash and nil to an 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_tag request, 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 rule. + # + # @overload create_rule(request, options = nil) + # Pass arguments to `create_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_rule(parent: nil, rule_id: nil, rule: nil) + # Pass arguments to `create_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource where the rule will be created. + # @param rule_id [::String] + # The rule id to use for this repository. + # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] + # The rule to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new + # + # # Call the create_rule method. + # result = client.create_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def create_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.create_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists rules. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_rules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent repository whose rules will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1`. + # @param page_size [::Integer] + # The maximum number of rules to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. + # p item + # end + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_rules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_rules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_rules, "rules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a rule. + # + # @overload get_rule(request, options = nil) + # Pass arguments to `get_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_rule(name: nil) + # Pass arguments to `get_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new + # + # # Call the get_rule method. + # result = client.get_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def get_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a rule. + # + # @overload update_rule(request, options = nil) + # Pass arguments to `update_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_rule(rule: nil, update_mask: nil) + # Pass arguments to `update_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] + # The rule that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new + # + # # Call the update_rule method. + # result = client.update_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def update_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a rule. + # + # @overload delete_rule(request, options = nil) + # Pass arguments to `delete_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_rule(name: nil) + # Pass arguments to `delete_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to delete. + # @yield [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/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new + # + # # Call the delete_rule method. + # result = client.delete_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the IAM policy for a given 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/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @artifact_registry_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 IAM policy for a given 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/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @artifact_registry_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 + + ## + # Tests if the caller has a list of permissions on a resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @artifact_registry_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 + + ## + # Retrieves the Settings for the Project. + # + # @overload get_project_settings(request, options = nil) + # Pass arguments to `get_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_project_settings(name: nil) + # Pass arguments to `get_project_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. The name of the projectSettings resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new + # + # # Call the get_project_settings method. + # result = client.get_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + # p result + # + def get_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_project_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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_project_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 Settings for the Project. + # + # @overload update_project_settings(request, options = nil) + # Pass arguments to `update_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_project_settings(project_settings: nil, update_mask: nil) + # Pass arguments to `update_project_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 project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash] + # The project settings. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new + # + # # Call the update_project_settings method. + # result = client.update_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + # p result + # + def update_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_project_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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_project_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 the VPCSC Config for the Project. + # + # @overload get_vpcsc_config(request, options = nil) + # Pass arguments to `get_vpcsc_config` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_vpcsc_config(name: nil) + # Pass arguments to `get_vpcsc_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 VPCSCConfig resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new + # + # # Call the get_vpcsc_config method. + # result = client.get_vpcsc_config request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + # p result + # + def get_vpcsc_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_vpcsc_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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_vpcsc_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_vpcsc_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 the VPCSC Config for the Project. + # + # @overload update_vpcsc_config(request, options = nil) + # Pass arguments to `update_vpcsc_config` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil) + # Pass arguments to `update_vpcsc_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 vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash] + # The project config. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new + # + # # Call the update_vpcsc_config method. + # result = client.update_vpcsc_config request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + # p result + # + def update_vpcsc_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest + + # Converts hash and nil to an 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_vpcsc_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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vpcsc_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_vpcsc_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_vpcsc_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 package. + # + # @overload update_package(request, options = nil) + # Pass arguments to `update_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_package(package: nil, update_mask: nil) + # Pass arguments to `update_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash] + # The package that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new + # + # # Call the update_package method. + # result = client.update_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + # p result + # + def update_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest + + # Converts hash and nil to an 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_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_package request, 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 attachments. + # + # @overload list_attachments(request, options = nil) + # Pass arguments to `list_attachments` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_attachments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 whose attachments will be listed. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `target` + # * `type` + # * `attachment_namespace` + # @param page_size [::Integer] + # The maximum number of attachments to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new + # + # # Call the list_attachments method. + # result = client.list_attachments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. + # p item + # end + # + def list_attachments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_attachments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_attachments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_attachments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_attachments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_attachments, "attachments", request, result, 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 attachment. + # + # @overload get_attachment(request, options = nil) + # Pass arguments to `get_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_attachment(name: nil) + # Pass arguments to `get_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 attachment to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new + # + # # Call the get_attachment method. + # result = client.get_attachment request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. + # p result + # + def get_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_attachment request, 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 attachment. The returned Operation will finish once the + # attachment has been created. Its response will be the created attachment. + # + # @overload create_attachment(request, options = nil) + # Pass arguments to `create_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil) + # Pass arguments to `create_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 where the attachment will be + # created. + # @param attachment_id [::String] + # Required. The attachment id to use for this attachment. + # @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash] + # Required. The attachment to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new + # + # # Call the create_attachment method. + # result = client.create_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest + + # Converts hash and nil to an 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_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.create_attachment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 attachment. The returned Operation will + # finish once the attachments has been deleted. It will not have any + # Operation metadata and will return a `google.protobuf.Empty` response. + # + # @overload delete_attachment(request, options = nil) + # Pass arguments to `delete_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_attachment(name: nil) + # Pass arguments to `delete_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 attachment to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new + # + # # Call the delete_attachment method. + # result = client.delete_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest + + # Converts hash and nil to an 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_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_attachment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports an artifact to a Cloud Storage bucket. + # + # @overload export_artifact(request, options = nil) + # Pass arguments to `export_artifact` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_artifact(source_version: nil, source_tag: nil, gcs_path: nil, repository: nil) + # Pass arguments to `export_artifact` via keyword arguments. Note that at + # least one keyword argument is 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_version [::String] + # The artifact version to export. + # Format: + # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} + # + # Note: The following parameters are mutually exclusive: `source_version`, `source_tag`. 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 source_tag [::String] + # The artifact tag to export. + # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} + # + # Note: The following parameters are mutually exclusive: `source_tag`, `source_version`. 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 gcs_path [::String] + # The Cloud Storage path to export the artifact to. Should start with the + # bucket name, and optionally have a directory path. Examples: + # `dst_bucket`, `dst_bucket/sub_dir`. + # Existing objects with the same path will be overwritten. + # @param repository [::String] + # Required. The repository of the artifact to export. + # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new + # + # # Call the export_artifact method. + # result = client.export_artifact request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_artifact.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.export_artifact request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 ArtifactRegistry REST API. + # + # This class represents the configuration for ArtifactRegistry 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::ArtifactRegistry::V1::ArtifactRegistry::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_docker_images to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_docker_images.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_docker_images.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::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 ArtifactRegistry API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_docker_images` + # @return [::Gapic::Config::Method] + # + attr_reader :list_docker_images + ## + # RPC-specific configuration for `get_docker_image` + # @return [::Gapic::Config::Method] + # + attr_reader :get_docker_image + ## + # RPC-specific configuration for `list_maven_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_maven_artifacts + ## + # RPC-specific configuration for `get_maven_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :get_maven_artifact + ## + # RPC-specific configuration for `list_npm_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_npm_packages + ## + # RPC-specific configuration for `get_npm_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_npm_package + ## + # RPC-specific configuration for `list_python_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_python_packages + ## + # RPC-specific configuration for `get_python_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_python_package + ## + # RPC-specific configuration for `import_apt_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_apt_artifacts + ## + # RPC-specific configuration for `import_yum_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_yum_artifacts + ## + # 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_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_packages + ## + # RPC-specific configuration for `get_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_package + ## + # RPC-specific configuration for `delete_package` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_package + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + ## + # RPC-specific configuration for `batch_delete_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_delete_versions + ## + # RPC-specific configuration for `update_version` + # @return [::Gapic::Config::Method] + # + attr_reader :update_version + ## + # RPC-specific configuration for `list_files` + # @return [::Gapic::Config::Method] + # + attr_reader :list_files + ## + # RPC-specific configuration for `get_file` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file + ## + # RPC-specific configuration for `delete_file` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_file + ## + # RPC-specific configuration for `update_file` + # @return [::Gapic::Config::Method] + # + attr_reader :update_file + ## + # RPC-specific configuration for `list_tags` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tags + ## + # RPC-specific configuration for `get_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tag + ## + # RPC-specific configuration for `create_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tag + ## + # RPC-specific configuration for `update_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tag + ## + # RPC-specific configuration for `delete_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tag + ## + # RPC-specific configuration for `create_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_rule + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `get_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule + ## + # RPC-specific configuration for `update_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule + ## + # RPC-specific configuration for `delete_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_rule + ## + # RPC-specific configuration for `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_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_settings + ## + # RPC-specific configuration for `update_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_settings + ## + # RPC-specific configuration for `get_vpcsc_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vpcsc_config + ## + # RPC-specific configuration for `update_vpcsc_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vpcsc_config + ## + # RPC-specific configuration for `update_package` + # @return [::Gapic::Config::Method] + # + attr_reader :update_package + ## + # RPC-specific configuration for `list_attachments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attachments + ## + # RPC-specific configuration for `get_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attachment + ## + # RPC-specific configuration for `create_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_attachment + ## + # RPC-specific configuration for `delete_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_attachment + ## + # RPC-specific configuration for `export_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :export_artifact + + # @private + def initialize parent_rpcs = nil + list_docker_images_config = parent_rpcs.list_docker_images if parent_rpcs.respond_to? :list_docker_images + @list_docker_images = ::Gapic::Config::Method.new list_docker_images_config + get_docker_image_config = parent_rpcs.get_docker_image if parent_rpcs.respond_to? :get_docker_image + @get_docker_image = ::Gapic::Config::Method.new get_docker_image_config + list_maven_artifacts_config = parent_rpcs.list_maven_artifacts if parent_rpcs.respond_to? :list_maven_artifacts + @list_maven_artifacts = ::Gapic::Config::Method.new list_maven_artifacts_config + get_maven_artifact_config = parent_rpcs.get_maven_artifact if parent_rpcs.respond_to? :get_maven_artifact + @get_maven_artifact = ::Gapic::Config::Method.new get_maven_artifact_config + list_npm_packages_config = parent_rpcs.list_npm_packages if parent_rpcs.respond_to? :list_npm_packages + @list_npm_packages = ::Gapic::Config::Method.new list_npm_packages_config + get_npm_package_config = parent_rpcs.get_npm_package if parent_rpcs.respond_to? :get_npm_package + @get_npm_package = ::Gapic::Config::Method.new get_npm_package_config + list_python_packages_config = parent_rpcs.list_python_packages if parent_rpcs.respond_to? :list_python_packages + @list_python_packages = ::Gapic::Config::Method.new list_python_packages_config + get_python_package_config = parent_rpcs.get_python_package if parent_rpcs.respond_to? :get_python_package + @get_python_package = ::Gapic::Config::Method.new get_python_package_config + import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts + @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config + import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts + @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_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_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages + @list_packages = ::Gapic::Config::Method.new list_packages_config + get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package + @get_package = ::Gapic::Config::Method.new get_package_config + delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package + @delete_package = ::Gapic::Config::Method.new delete_package_config + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions + @batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config + update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version + @update_version = ::Gapic::Config::Method.new update_version_config + list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files + @list_files = ::Gapic::Config::Method.new list_files_config + get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file + @get_file = ::Gapic::Config::Method.new get_file_config + delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file + @delete_file = ::Gapic::Config::Method.new delete_file_config + update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file + @update_file = ::Gapic::Config::Method.new update_file_config + list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags + @list_tags = ::Gapic::Config::Method.new list_tags_config + get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag + @get_tag = ::Gapic::Config::Method.new get_tag_config + create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag + @create_tag = ::Gapic::Config::Method.new create_tag_config + update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag + @update_tag = ::Gapic::Config::Method.new update_tag_config + delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag + @delete_tag = ::Gapic::Config::Method.new delete_tag_config + create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule + @create_rule = ::Gapic::Config::Method.new create_rule_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule + @get_rule = ::Gapic::Config::Method.new get_rule_config + update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule + @update_rule = ::Gapic::Config::Method.new update_rule_config + delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule + @delete_rule = ::Gapic::Config::Method.new delete_rule_config + 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_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings + @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config + update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings + @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config + get_vpcsc_config_config = parent_rpcs.get_vpcsc_config if parent_rpcs.respond_to? :get_vpcsc_config + @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config + update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config + @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config + update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package + @update_package = ::Gapic::Config::Method.new update_package_config + list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments + @list_attachments = ::Gapic::Config::Method.new list_attachments_config + get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment + @get_attachment = ::Gapic::Config::Method.new get_attachment_config + create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment + @create_attachment = ::Gapic::Config::Method.new create_attachment_config + delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment + @delete_attachment = ::Gapic::Config::Method.new delete_attachment_config + export_artifact_config = parent_rpcs.export_artifact if parent_rpcs.respond_to? :export_artifact + @export_artifact = ::Gapic::Config::Method.new export_artifact_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb new file mode 100644 index 000000000000..f3b03abb527f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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 ArtifactRegistry + module V1 + module ArtifactRegistry + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ArtifactRegistry 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 ArtifactRegistry 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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::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{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb new file mode 100644 index 000000000000..fa04cece7736 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb @@ -0,0 +1,3149 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/devtools/artifactregistry/v1/service_pb" + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + module Rest + ## + # REST service stub for the ArtifactRegistry 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_docker_images REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse] + # A result object deserialized from the server's reply + def list_docker_images request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_docker_images_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_docker_images", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_docker_image REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # A result object deserialized from the server's reply + def get_docker_image request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_docker_image_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_docker_image", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.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_maven_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse] + # A result object deserialized from the server's reply + def list_maven_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_maven_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_maven_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_maven_artifact REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # A result object deserialized from the server's reply + def get_maven_artifact request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_maven_artifact_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_maven_artifact", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.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_npm_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse] + # A result object deserialized from the server's reply + def list_npm_packages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_npm_packages_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_npm_packages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_npm_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # A result object deserialized from the server's reply + def get_npm_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_npm_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_npm_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.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_python_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse] + # A result object deserialized from the server's reply + def list_python_packages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_python_packages_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_python_packages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_python_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # A result object deserialized from the server's reply + def get_python_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_python_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_python_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_apt_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_apt_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_apt_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_apt_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_yum_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_yum_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_yum_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_yum_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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::ArtifactRegistry::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::ArtifactRegistry::V1::ListRepositoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # 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::Cloud::ArtifactRegistry::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 delete_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::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_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse] + # A result object deserialized from the server's reply + def list_packages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_packages_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_packages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # A result object deserialized from the server's reply + def get_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Package.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_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse] + # A result object deserialized from the server's reply + def list_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_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_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # A result object deserialized from the server's reply + def get_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_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_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Version.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_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_delete_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_delete_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_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: "batch_delete_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # A result object deserialized from the server's reply + def update_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_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: "update_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Version.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_files REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse] + # A result object deserialized from the server's reply + def list_files request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_files_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_files", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # A result object deserialized from the server's reply + def get_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_file", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::File.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_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_file", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # A result object deserialized from the server's reply + def update_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_file", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::File.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_tags REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse] + # A result object deserialized from the server's reply + def list_tags request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tags_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tags", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # A result object deserialized from the server's reply + def get_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Tag.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_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # A result object deserialized from the server's reply + def create_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Tag.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_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # A result object deserialized from the server's reply + def update_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Tag.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_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tag", + 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_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # A result object deserialized from the server's reply + def create_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_rules REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse] + # A result object deserialized from the server's reply + def list_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_rules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # A result object deserialized from the server's reply + def get_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # A result object deserialized from the server's reply + def update_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the 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_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # A result object deserialized from the server's reply + def get_project_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_project_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_project_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # A result object deserialized from the server's reply + def update_project_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_project_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_project_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_vpcsc_config REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # A result object deserialized from the server's reply + def get_vpcsc_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_vpcsc_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_vpcsc_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.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_vpcsc_config REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # A result object deserialized from the server's reply + def update_vpcsc_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_vpcsc_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_vpcsc_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.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_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # A result object deserialized from the server's reply + def update_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Package.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_attachments REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse] + # A result object deserialized from the server's reply + def list_attachments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_attachments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_attachments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # A result object deserialized from the server's reply + def get_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Attachment.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_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_artifact REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_artifact request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_artifact_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_artifact", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_docker_images REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_docker_images_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dockerImages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_docker_image REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_docker_image_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/dockerImages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_maven_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_maven_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/mavenArtifacts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_maven_artifact REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_maven_artifact_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/mavenArtifacts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_npm_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_npm_packages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/npmPackages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_npm_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_npm_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/npmPackages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_python_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_python_packages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/pythonPackages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_python_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_python_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pythonPackages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_apt_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_apt_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/aptArtifacts:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_yum_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_yum_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/yumArtifacts:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_repositories REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_packages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/packages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest] + # 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_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest] + # 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_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_delete_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest] + # 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_delete_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/versions:batchDelete", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest] + # 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_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{version.name}", + body: "version", + matches: [ + ["version.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_files REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_files_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/files", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest] + # 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_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest] + # 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_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{file.name}", + body: "file", + matches: [ + ["file.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tags REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tags_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tags", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest] + # 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_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tags", + body: "tag", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest] + # 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_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{tag.name}", + body: "tag", + matches: [ + ["tag.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest] + # 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_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rules", + body: "rule", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rules REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/rules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rule.name}", + body: "rule", + matches: [ + ["rule.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_project_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/projectSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_project_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{project_settings.name}", + body: "project_settings", + matches: [ + ["project_settings.name", %r{^projects/[^/]+/projectSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_vpcsc_config REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_vpcsc_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/vpcscConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_vpcsc_config REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest] + # 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_vpcsc_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{vpcsc_config.name}", + body: "vpcsc_config", + matches: [ + ["vpcsc_config.name", %r{^projects/[^/]+/locations/[^/]+/vpcscConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest] + # 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_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{package.name}", + body: "package", + matches: [ + ["package.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_attachments REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_attachments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attachments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/attachments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest] + # 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_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/attachments", + body: "attachment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest] + # 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_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/attachments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_artifact REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_artifact_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{repository}:exportArtifact", + body: "*", + matches: [ + ["repository", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb new file mode 100644 index 000000000000..5cb15289f659 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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 ArtifactRegistry + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/artifact_registry/v1/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ArtifactRegistry"] + 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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb new file mode 100644 index 000000000000..d0a4958ba59d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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/artifact_registry/v1/artifact_registry/rest" +require "google/cloud/artifact_registry/v1/bindings_override" +require "google/cloud/artifact_registry/v1/version" + +module Google + module Cloud + module ArtifactRegistry + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/artifact_registry/v1/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb new file mode 100644 index 000000000000..e60f17647d63 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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 ArtifactRegistry + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb new file mode 100644 index 000000000000..d52d7db02386 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/apt_artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1/apt_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xba\x03\n\x0b\x41ptArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12W\n\x0cpackage_type\x18\x03 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.AptArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcomponent\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x63ontrol_file\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/AptArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}\"B\n\x1bImportAptArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x8d\x01\n\x19ImportAptArtifactsRequest\x12V\n\ngcs_source\x18\x02 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa2\x01\n\x1bImportAptArtifactsErrorInfo\x12V\n\ngcs_source\x18\x01 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xb7\x01\n\x1aImportAptArtifactsResponse\x12G\n\rapt_artifacts\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.AptArtifact\x12P\n\x06\x65rrors\x18\x02 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo\"\x1c\n\x1aImportAptArtifactsMetadataB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10\x41ptArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + AptArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.AptArtifact").msgclass + AptArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.AptArtifact.PackageType").enummodule + ImportAptArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource").msgclass + ImportAptArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsRequest").msgclass + ImportAptArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo").msgclass + ImportAptArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsResponse").msgclass + ImportAptArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb new file mode 100644 index 000000000000..37a131ac39a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/devtools/artifactregistry/v1/artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x04\n\x0b\x44ockerImage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12\x18\n\x10image_size_bytes\x18\x04 \x01(\x03\x12/\n\x0bupload_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nmedia_type\x18\x06 \x01(\t\x12.\n\nbuild_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\rartifact_type\x18\t \x01(\t\x12P\n\x0fimage_manifests\x18\x0b \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.ImageManifestB\x03\xe0\x41\x01:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/DockerImage\x12]projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}\"\xb2\x01\n\rImageManifest\x12\x19\n\x0c\x61rchitecture\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x0f\n\x02os\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x64igest\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmedia_type\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nos_version\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bos_features\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07variant\x18\x07 \x01(\tB\x03\xe0\x41\x01\"g\n\x17ListDockerImagesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\"|\n\x18ListDockerImagesResponse\x12G\n\rdocker_images\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.DockerImage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15GetDockerImageRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+artifactregistry.googleapis.com/DockerImage\"\xf5\x02\n\rMavenArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07pom_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x08group_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61rtifact_id\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\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:\x96\x01\xea\x41\x92\x01\n-artifactregistry.googleapis.com/MavenArtifact\x12\x61projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}\"\x89\x01\n\x19ListMavenArtifactsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-artifactregistry.googleapis.com/MavenArtifact\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1aListMavenArtifactsResponse\x12K\n\x0fmaven_artifacts\x18\x01 \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.MavenArtifact\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17GetMavenArtifactRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-artifactregistry.googleapis.com/MavenArtifact\"\xd0\x02\n\nNpmPackage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0cpackage_name\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x0c\n\x04tags\x18\x05 \x03(\t\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:\x8d\x01\xea\x41\x89\x01\n*artifactregistry.googleapis.com/NpmPackage\x12[projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}\"\x83\x01\n\x16ListNpmPackagesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/NpmPackage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x17ListNpmPackagesResponse\x12\x45\n\x0cnpm_packages\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.NpmPackage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetNpmPackageRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/NpmPackage\"\xe0\x02\n\rPythonPackage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0cpackage_name\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\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:\x96\x01\xea\x41\x92\x01\n-artifactregistry.googleapis.com/PythonPackage\x12\x61projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}\"\x89\x01\n\x19ListPythonPackagesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-artifactregistry.googleapis.com/PythonPackage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1aListPythonPackagesResponse\x12K\n\x0fpython_packages\x18\x01 \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.PythonPackage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17GetPythonPackageRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-artifactregistry.googleapis.com/PythonPackageB\xf8\x01\n\'com.google.devtools.artifactregistry.v1B\rArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + DockerImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DockerImage").msgclass + ImageManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImageManifest").msgclass + ListDockerImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListDockerImagesRequest").msgclass + ListDockerImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListDockerImagesResponse").msgclass + GetDockerImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetDockerImageRequest").msgclass + MavenArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.MavenArtifact").msgclass + ListMavenArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListMavenArtifactsRequest").msgclass + ListMavenArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListMavenArtifactsResponse").msgclass + GetMavenArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetMavenArtifactRequest").msgclass + NpmPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.NpmPackage").msgclass + ListNpmPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListNpmPackagesRequest").msgclass + ListNpmPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListNpmPackagesResponse").msgclass + GetNpmPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetNpmPackageRequest").msgclass + PythonPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.PythonPackage").msgclass + ListPythonPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPythonPackagesRequest").msgclass + ListPythonPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPythonPackagesResponse").msgclass + GetPythonPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetPythonPackageRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb new file mode 100644 index 000000000000..704480588aca --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/attachment.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/devtools/artifactregistry/v1/attachment.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x04\n\nAttachment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x06target\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x1c\n\x14\x61ttachment_namespace\x18\x04 \x01(\t\x12Z\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.Attachment.AnnotationsEntryB\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\x12;\n\x05\x66iles\x18\x08 \x03(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\x12\x1d\n\x10oci_version_name\x18\t \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8c\x01\xea\x41\x88\x01\n*artifactregistry.googleapis.com/Attachment\x12Zprojects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}\"\x98\x01\n\x16ListAttachmentsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Attachment\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"x\n\x17ListAttachmentsResponse\x12\x44\n\x0b\x61ttachments\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.Attachment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetAttachmentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Attachment\"\xc3\x01\n\x17\x43reateAttachmentRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Attachment\x12\x1a\n\rattachment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\nattachment\x18\x03 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.AttachmentB\x03\xe0\x41\x02\"[\n\x17\x44\x65leteAttachmentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/AttachmentB\xfa\x01\n\'com.google.devtools.artifactregistry.v1B\x0f\x41ttachmentProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Attachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Attachment").msgclass + ListAttachmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListAttachmentsRequest").msgclass + ListAttachmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListAttachmentsResponse").msgclass + GetAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetAttachmentRequest").msgclass + CreateAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateAttachmentRequest").msgclass + DeleteAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteAttachmentRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb new file mode 100644 index 000000000000..314b552fdc62 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/export.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/devtools/artifactregistry/v1/file_pb' +require 'google/devtools/artifactregistry/v1/version_pb' + + +descriptor_data = "\n0google/devtools/artifactregistry/v1/export.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a\x31google/devtools/artifactregistry/v1/version.proto\"\x9d\x02\n\x15\x45xportArtifactRequest\x12\x46\n\x0esource_version\x18\x02 \x01(\tB,\xfa\x41)\n\'artifactregistry.googleapis.com/VersionH\x00\x12>\n\nsource_tag\x18\x04 \x01(\tB(\xfa\x41%\n#artifactregistry.googleapis.com/TagH\x00\x12\x12\n\x08gcs_path\x18\x03 \x01(\tH\x01\x12\x46\n\nrepository\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\x11\n\x0fsource_artifactB\r\n\x0b\x64\x65stination\"`\n\x16\x45xportArtifactResponse\x12\x46\n\x10\x65xported_version\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.Version\"\xa9\x02\n\x16\x45xportArtifactMetadata\x12`\n\x0e\x65xported_files\x18\x01 \x03(\x0b\x32H.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile\x1a\xac\x01\n\x0c\x45xportedFile\x12\x19\n\x0fgcs_object_path\x18\x02 \x01(\tH\x00\x12\x37\n\x04name\x18\x01 \x01(\tB)\xfa\x41&\n$artifactregistry.googleapis.com/File\x12\x39\n\x06hashes\x18\x03 \x03(\x0b\x32).google.devtools.artifactregistry.v1.HashB\r\n\x0b\x64\x65stinationB\xf6\x01\n\'com.google.devtools.artifactregistry.v1B\x0b\x45xportProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + ExportArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactRequest").msgclass + ExportArtifactResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactResponse").msgclass + ExportArtifactMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactMetadata").msgclass + ExportArtifactMetadata::ExportedFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb new file mode 100644 index 000000000000..18141ebfddc3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/file.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/devtools/artifactregistry/v1/file.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x01\n\x04Hash\x12@\n\x04type\x18\x01 \x01(\x0e\x32\x32.google.devtools.artifactregistry.v1.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\"M\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\x12\x11\n\rDIRSUM_SHA256\x10\x03\"\x98\x04\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nsize_bytes\x18\x03 \x01(\x03\x12\x39\n\x06hashes\x18\x04 \x03(\x0b\x32).google.devtools.artifactregistry.v1.Hash\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\r\n\x05owner\x18\x07 \x01(\t\x12\x33\n\nfetch_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0b\x61nnotations\x18\t \x03(\x0b\x32:.google.devtools.artifactregistry.v1.File.AnnotationsEntryB\x03\xe0\x41\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:y\xea\x41v\n$artifactregistry.googleapis.com/File\x12Nprojects/{project}/locations/{location}/repositories/{repository}/files/{file}\"\x99\x01\n\x10ListFilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/File\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"f\n\x11ListFilesResponse\x12\x38\n\x05\x66iles\x18\x01 \x03(\x0b\x32).google.devtools.artifactregistry.v1.File\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x0eGetFileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\"O\n\x11\x44\x65leteFileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\"\x87\x01\n\x11UpdateFileRequest\x12<\n\x04\x66ile\x18\x01 \x01(\x0b\x32).google.devtools.artifactregistry.v1.FileB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x42\xf4\x01\n\'com.google.devtools.artifactregistry.v1B\tFileProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Hash").msgclass + Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Hash.HashType").enummodule + File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.File").msgclass + ListFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListFilesRequest").msgclass + ListFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListFilesResponse").msgclass + GetFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetFileRequest").msgclass + DeleteFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteFileRequest").msgclass + UpdateFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateFileRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb new file mode 100644 index 000000000000..4834b13eda56 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/generic.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/devtools/artifactregistry/v1/generic.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x02\n\x0fGenericArtifact\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x9c\x01\xea\x41\x98\x01\n/artifactregistry.googleapis.com/GenericArtifact\x12\x65projects/{project}/locations/{location}/repositories/{repository}/genericArtifacts/{generic_artifact}B\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cGenericProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + GenericArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GenericArtifact").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb new file mode 100644 index 000000000000..a68f52f8871f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/go.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/devtools/artifactregistry/v1/go.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x02\n\x08GoModule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x87\x01\xea\x41\x83\x01\n(artifactregistry.googleapis.com/GoModule\x12Wprojects/{project}/locations/{location}/repositories/{repository}/goModules/{go_module}B\xf2\x01\n\'com.google.devtools.artifactregistry.v1B\x07GoProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + GoModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GoModule").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb new file mode 100644 index 000000000000..dfa39a394c4e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/kfp_artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1/kfp_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc4\x01\n\x0bKfpArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x02 \x01(\t:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/KfpArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/kfpArtifacts/{kfp_artifact}B\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10KfpArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + KfpArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.KfpArtifact").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb new file mode 100644 index 000000000000..40d4e366eaf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/package.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/devtools/artifactregistry/v1/package.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa1\x03\n\x07Package\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12W\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32=.google.devtools.artifactregistry.v1.Package.AnnotationsEntryB\x03\xe0\x41\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:\x82\x01\xea\x41\x7f\n\'artifactregistry.googleapis.com/Package\x12Tprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}\"\xa9\x01\n\x13ListPackagesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'artifactregistry.googleapis.com/Package\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"o\n\x14ListPackagesResponse\x12>\n\x08packages\x18\x01 \x03(\x0b\x32,.google.devtools.artifactregistry.v1.Package\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x11GetPackageRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Package\"U\n\x14\x44\x65letePackageRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Package\"\x86\x01\n\x14UpdatePackageRequest\x12=\n\x07package\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.Package\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cPackageProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Package").msgclass + ListPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPackagesRequest").msgclass + ListPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPackagesResponse").msgclass + GetPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetPackageRequest").msgclass + DeletePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeletePackageRequest").msgclass + UpdatePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdatePackageRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb new file mode 100644 index 000000000000..a2d3a43bb3f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/repository.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' + + +descriptor_data = "\n4google/devtools/artifactregistry/v1/repository.proto\x12#google.devtools.artifactregistry.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\"s\n\x0eUpstreamPolicy\x12\n\n\x02id\x18\x01 \x01(\t\x12\x43\n\nrepository\x18\x02 \x01(\tB/\xfa\x41,\n*artifactregistry.googleapis.com/Repository\x12\x10\n\x08priority\x18\x03 \x01(\x05\"\xa8\x03\n\x16\x43leanupPolicyCondition\x12\\\n\ttag_state\x18\x02 \x01(\x0e\x32\x44.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagStateH\x00\x88\x01\x01\x12\x14\n\x0ctag_prefixes\x18\x03 \x03(\t\x12\x1d\n\x15version_name_prefixes\x18\x04 \x03(\t\x12\x1d\n\x15package_name_prefixes\x18\x05 \x03(\t\x12\x32\n\nolder_than\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x12\x32\n\nnewer_than\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationH\x02\x88\x01\x01\"H\n\x08TagState\x12\x19\n\x15TAG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06TAGGED\x10\x01\x12\x0c\n\x08UNTAGGED\x10\x02\x12\x07\n\x03\x41NY\x10\x03\x42\x0c\n\n_tag_stateB\r\n\x0b_older_thanB\r\n\x0b_newer_than\"h\n\x1f\x43leanupPolicyMostRecentVersions\x12\x1d\n\x15package_name_prefixes\x18\x01 \x03(\t\x12\x17\n\nkeep_count\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\r\n\x0b_keep_count\"\xe8\x02\n\rCleanupPolicy\x12P\n\tcondition\x18\x02 \x01(\x0b\x32;.google.devtools.artifactregistry.v1.CleanupPolicyConditionH\x00\x12\x64\n\x14most_recent_versions\x18\x04 \x01(\x0b\x32\x44.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12I\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x39.google.devtools.artifactregistry.v1.CleanupPolicy.Action\"6\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04KEEP\x10\x02\x42\x10\n\x0e\x63ondition_type\"i\n\x17VirtualRepositoryConfig\x12N\n\x11upstream_policies\x18\x01 \x03(\x0b\x32\x33.google.devtools.artifactregistry.v1.UpstreamPolicy\"\xcd\x1f\n\x16RemoteRepositoryConfig\x12i\n\x11\x64ocker_repository\x18\x02 \x01(\x0b\x32L.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryH\x00\x12g\n\x10maven_repository\x18\x03 \x01(\x0b\x32K.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryH\x00\x12\x63\n\x0enpm_repository\x18\x04 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryH\x00\x12i\n\x11python_repository\x18\x05 \x01(\x0b\x32L.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryH\x00\x12\x63\n\x0e\x61pt_repository\x18\x06 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryH\x00\x12\x63\n\x0eyum_repository\x18\x07 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryH\x00\x12o\n\x11\x63ommon_repository\x18\x0e \x01(\x0b\x32R.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepositoryH\x00\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12r\n\x14upstream_credentials\x18\t \x01(\x0b\x32O.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentialsB\x03\xe0\x41\x01\x12(\n\x1b\x64isable_upstream_validation\x18\x0c \x01(\x08\x42\x03\xe0\x41\x04\x1a\xbf\x02\n\x13UpstreamCredentials\x12\x94\x01\n\x1dusername_password_credentials\x18\x01 \x01(\x0b\x32k.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentialsH\x00\x1a\x81\x01\n\x1bUsernamePasswordCredentials\x12\x10\n\x08username\x18\x01 \x01(\t\x12P\n\x17password_secret_version\x18\x02 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionB\r\n\x0b\x63redentials\x1a\xfe\x02\n\x10\x44ockerRepository\x12z\n\x11public_repository\x18\x01 \x01(\x0e\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepositoryH\x00\x12z\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"E\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x0e\n\nDOCKER_HUB\x10\x01\x42\n\n\x08upstream\x1a\xfe\x02\n\x0fMavenRepository\x12y\n\x11public_repository\x18\x01 \x01(\x0e\x32\\.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepositoryH\x00\x12y\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32\\.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"H\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x11\n\rMAVEN_CENTRAL\x10\x01\x42\n\n\x08upstream\x1a\xf0\x02\n\rNpmRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0e\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"@\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\t\n\x05NPMJS\x10\x01\x42\n\n\x08upstream\x1a\xf8\x02\n\x10PythonRepository\x12z\n\x11public_repository\x18\x01 \x01(\x0e\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepositoryH\x00\x12z\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"?\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x08\n\x04PYPI\x10\x01\x42\n\n\x08upstream\x1a\xc1\x04\n\rAptRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepositoryH\x00\x1a\x90\x02\n\x10PublicRepository\x12\x82\x01\n\x0frepository_base\x18\x01 \x01(\x0e\x32i.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase\x12\x17\n\x0frepository_path\x18\x02 \x01(\t\"^\n\x0eRepositoryBase\x12\x1f\n\x1bREPOSITORY_BASE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45\x42IAN\x10\x01\x12\n\n\x06UBUNTU\x10\x02\x12\x13\n\x0f\x44\x45\x42IAN_SNAPSHOT\x10\x03\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\tB\n\n\x08upstream\x1a\xed\x04\n\rYumRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepositoryH\x00\x1a\xbc\x02\n\x10PublicRepository\x12\x82\x01\n\x0frepository_base\x18\x01 \x01(\x0e\x32i.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase\x12\x17\n\x0frepository_path\x18\x02 \x01(\t\"\x89\x01\n\x0eRepositoryBase\x12\x1f\n\x1bREPOSITORY_BASE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x45NTOS\x10\x01\x12\x10\n\x0c\x43\x45NTOS_DEBUG\x10\x02\x12\x10\n\x0c\x43\x45NTOS_VAULT\x10\x03\x12\x11\n\rCENTOS_STREAM\x10\x04\x12\t\n\x05ROCKY\x10\x05\x12\x08\n\x04\x45PEL\x10\x06\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\tB\n\n\x08upstream\x1a*\n\x16\x43ommonRemoteRepository\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0f\n\rremote_source\"\xbf\x14\n\nRepository\x12]\n\x0cmaven_config\x18\t \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigH\x00\x12_\n\rdocker_config\x18\x11 \x01(\x0b\x32\x46.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigH\x00\x12\x61\n\x19virtual_repository_config\x18\x0e \x01(\x0b\x32<.google.devtools.artifactregistry.v1.VirtualRepositoryConfigH\x01\x12_\n\x18remote_repository_config\x18\x0f \x01(\x0b\x32;.google.devtools.artifactregistry.v1.RemoteRepositoryConfigH\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x36.google.devtools.artifactregistry.v1.Repository.FormatB\x03\xe0\x41\x01\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12K\n\x06labels\x18\x04 \x03(\x0b\x32;.google.devtools.artifactregistry.v1.Repository.LabelsEntry\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\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x12G\n\x04mode\x18\n \x01(\x0e\x32\x34.google.devtools.artifactregistry.v1.Repository.ModeB\x03\xe0\x41\x01\x12\x63\n\x10\x63leanup_policies\x18\x0c \x03(\x0b\x32\x44.google.devtools.artifactregistry.v1.Repository.CleanupPoliciesEntryB\x03\xe0\x41\x01\x12\x17\n\nsize_bytes\x18\r \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12#\n\x16\x63leanup_policy_dry_run\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12w\n\x1dvulnerability_scanning_config\x18\x13 \x01(\x0b\x32K.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfigB\x03\xe0\x41\x01\x12&\n\x19\x64isallow_unspecified_mode\x18\x15 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzi\x18\x16 \x01(\x08\x42\x03\xe0\x41\x03\x12\x19\n\x0cregistry_uri\x18\x1a \x01(\tB\x03\xe0\x41\x03\x1a\xf3\x01\n\x15MavenRepositoryConfig\x12!\n\x19\x61llow_snapshot_overwrites\x18\x01 \x01(\x08\x12k\n\x0eversion_policy\x18\x02 \x01(\x0e\x32S.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy\"J\n\rVersionPolicy\x12\x1e\n\x1aVERSION_POLICY_UNSPECIFIED\x10\x00\x12\x0b\n\x07RELEASE\x10\x01\x12\x0c\n\x08SNAPSHOT\x10\x02\x1a\x30\n\x16\x44ockerRepositoryConfig\x12\x16\n\x0eimmutable_tags\x18\x01 \x01(\x08\x1a\xc7\x04\n\x1bVulnerabilityScanningConfig\x12|\n\x11\x65nablement_config\x18\x01 \x01(\x0e\x32\\.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfigB\x03\xe0\x41\x01\x12\x39\n\x10last_enable_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12z\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32[.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementStateB\x03\xe0\x41\x03\x12$\n\x17\x65nablement_state_reason\x18\x04 \x01(\tB\x03\xe0\x41\x03\"R\n\x10\x45nablementConfig\x12!\n\x1d\x45NABLEMENT_CONFIG_UNSPECIFIED\x10\x00\x12\r\n\tINHERITED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"y\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14SCANNING_UNSUPPORTED\x10\x01\x12\x15\n\x11SCANNING_DISABLED\x10\x02\x12\x13\n\x0fSCANNING_ACTIVE\x10\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aj\n\x14\x43leanupPoliciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.devtools.artifactregistry.v1.CleanupPolicy:\x02\x38\x01\"\x86\x01\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OCKER\x10\x01\x12\t\n\x05MAVEN\x10\x02\x12\x07\n\x03NPM\x10\x03\x12\x07\n\x03\x41PT\x10\x05\x12\x07\n\x03YUM\x10\x06\x12\n\n\x06PYTHON\x10\x08\x12\x07\n\x03KFP\x10\t\x12\x06\n\x02GO\x10\n\x12\x0b\n\x07GENERIC\x10\x0b\x12\x08\n\x04RUBY\x10\x0c\"d\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_REPOSITORY\x10\x01\x12\x16\n\x12VIRTUAL_REPOSITORY\x10\x02\x12\x15\n\x11REMOTE_REPOSITORY\x10\x03:r\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}B\x0f\n\rformat_configB\r\n\x0bmode_config\"\xb0\x01\n\x17ListRepositoriesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x18ListRepositoriesResponse\x12\x45\n\x0crepositories\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Repository\"\xc3\x01\n\x17\x43reateRepositoryRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x1a\n\rrepository_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\nrepository\x18\x03 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.RepositoryB\x03\xe0\x41\x02\"\x8f\x01\n\x17UpdateRepositoryRequest\x12\x43\n\nrepository\x18\x01 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x17\x44\x65leteRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\xe7\x03\n\'com.google.devtools.artifactregistry.v1B\x0fRepositoryProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + UpstreamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpstreamPolicy").msgclass + CleanupPolicyCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyCondition").msgclass + CleanupPolicyCondition::TagState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState").enummodule + CleanupPolicyMostRecentVersions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions").msgclass + CleanupPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicy").msgclass + CleanupPolicy::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicy.Action").enummodule + VirtualRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VirtualRepositoryConfig").msgclass + RemoteRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig").msgclass + RemoteRepositoryConfig::UpstreamCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials").msgclass + RemoteRepositoryConfig::UpstreamCredentials::UsernamePasswordCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials").msgclass + RemoteRepositoryConfig::DockerRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository").msgclass + RemoteRepositoryConfig::DockerRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository").msgclass + RemoteRepositoryConfig::DockerRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository").enummodule + RemoteRepositoryConfig::MavenRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository").msgclass + RemoteRepositoryConfig::MavenRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository").msgclass + RemoteRepositoryConfig::MavenRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository").enummodule + RemoteRepositoryConfig::NpmRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository").msgclass + RemoteRepositoryConfig::NpmRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository").msgclass + RemoteRepositoryConfig::NpmRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository").enummodule + RemoteRepositoryConfig::PythonRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository").msgclass + RemoteRepositoryConfig::PythonRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository").msgclass + RemoteRepositoryConfig::PythonRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository").enummodule + RemoteRepositoryConfig::AptRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository").msgclass + RemoteRepositoryConfig::AptRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository").msgclass + RemoteRepositoryConfig::AptRepository::PublicRepository::RepositoryBase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase").enummodule + RemoteRepositoryConfig::AptRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository").msgclass + RemoteRepositoryConfig::YumRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository").msgclass + RemoteRepositoryConfig::YumRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository").msgclass + RemoteRepositoryConfig::YumRepository::PublicRepository::RepositoryBase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase").enummodule + RemoteRepositoryConfig::YumRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository").msgclass + RemoteRepositoryConfig::CommonRemoteRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository").msgclass + Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository").msgclass + Repository::MavenRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig").msgclass + Repository::MavenRepositoryConfig::VersionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy").enummodule + Repository::DockerRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig").msgclass + Repository::VulnerabilityScanningConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig").msgclass + Repository::VulnerabilityScanningConfig::EnablementConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig").enummodule + Repository::VulnerabilityScanningConfig::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState").enummodule + Repository::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.Format").enummodule + Repository::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.Mode").enummodule + ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRepositoriesRequest").msgclass + ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRepositoriesResponse").msgclass + GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetRepositoryRequest").msgclass + CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateRepositoryRequest").msgclass + UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateRepositoryRequest").msgclass + DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteRepositoryRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb new file mode 100644 index 000000000000..4bac0fc5a283 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/rule.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n.google/devtools/artifactregistry/v1/rule.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\"\xc5\x03\n\x04Rule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.Rule.Action\x12\x46\n\toperation\x18\x03 \x01(\x0e\x32\x33.google.devtools.artifactregistry.v1.Rule.Operation\x12)\n\tcondition\x18\x04 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x12\n\npackage_id\x18\x05 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\"4\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44OWNLOAD\x10\x01:y\xea\x41v\n$artifactregistry.googleapis.com/Rule\x12Nprojects/{project}/locations/{location}/repositories/{repository}/rules/{rule}\"w\n\x10ListRulesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"f\n\x11ListRulesResponse\x12\x38\n\x05rules\x18\x01 \x03(\x0b\x32).google.devtools.artifactregistry.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x0eGetRuleRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/Rule\"\x9b\x01\n\x11\x43reateRuleRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/Rule\x12\x0f\n\x07rule_id\x18\x02 \x01(\t\x12\x37\n\x04rule\x18\x03 \x01(\x0b\x32).google.devtools.artifactregistry.v1.Rule\"}\n\x11UpdateRuleRequest\x12\x37\n\x04rule\x18\x01 \x01(\x0b\x32).google.devtools.artifactregistry.v1.Rule\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"O\n\x11\x44\x65leteRuleRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/RuleB\xf4\x01\n\'com.google.devtools.artifactregistry.v1B\tRuleProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule").msgclass + Rule::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule.Action").enummodule + Rule::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule.Operation").enummodule + ListRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRulesRequest").msgclass + ListRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRulesResponse").msgclass + GetRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetRuleRequest").msgclass + CreateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateRuleRequest").msgclass + UpdateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateRuleRequest").msgclass + DeleteRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteRuleRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb new file mode 100644 index 000000000000..ac3659b2f1e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/devtools/artifactregistry/v1/apt_artifact_pb' +require 'google/devtools/artifactregistry/v1/artifact_pb' +require 'google/devtools/artifactregistry/v1/attachment_pb' +require 'google/devtools/artifactregistry/v1/export_pb' +require 'google/devtools/artifactregistry/v1/file_pb' +require 'google/devtools/artifactregistry/v1/package_pb' +require 'google/devtools/artifactregistry/v1/repository_pb' +require 'google/devtools/artifactregistry/v1/rule_pb' +require 'google/devtools/artifactregistry/v1/settings_pb' +require 'google/devtools/artifactregistry/v1/tag_pb' +require 'google/devtools/artifactregistry/v1/version_pb' +require 'google/devtools/artifactregistry/v1/vpcsc_config_pb' +require 'google/devtools/artifactregistry/v1/yum_artifact_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n1google/devtools/artifactregistry/v1/service.proto\x12#google.devtools.artifactregistry.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x36google/devtools/artifactregistry/v1/apt_artifact.proto\x1a\x32google/devtools/artifactregistry/v1/artifact.proto\x1a\x34google/devtools/artifactregistry/v1/attachment.proto\x1a\x30google/devtools/artifactregistry/v1/export.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a\x31google/devtools/artifactregistry/v1/package.proto\x1a\x34google/devtools/artifactregistry/v1/repository.proto\x1a.google/devtools/artifactregistry/v1/rule.proto\x1a\x32google/devtools/artifactregistry/v1/settings.proto\x1a-google/devtools/artifactregistry/v1/tag.proto\x1a\x31google/devtools/artifactregistry/v1/version.proto\x1a\x36google/devtools/artifactregistry/v1/vpcsc_config.proto\x1a\x36google/devtools/artifactregistry/v1/yum_artifact.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x13\n\x11OperationMetadata2\xa6Z\n\x10\x41rtifactRegistry\x12\xe1\x01\n\x10ListDockerImages\x12<.google.devtools.artifactregistry.v1.ListDockerImagesRequest\x1a=.google.devtools.artifactregistry.v1.ListDockerImagesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages\x12\xce\x01\n\x0eGetDockerImage\x12:.google.devtools.artifactregistry.v1.GetDockerImageRequest\x1a\x30.google.devtools.artifactregistry.v1.DockerImage\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}\x12\xe9\x01\n\x12ListMavenArtifacts\x12>.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest\x1a?.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts\x12\xd6\x01\n\x10GetMavenArtifact\x12<.google.devtools.artifactregistry.v1.GetMavenArtifactRequest\x1a\x32.google.devtools.artifactregistry.v1.MavenArtifact\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}\x12\xdd\x01\n\x0fListNpmPackages\x12;.google.devtools.artifactregistry.v1.ListNpmPackagesRequest\x1a<.google.devtools.artifactregistry.v1.ListNpmPackagesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages\x12\xca\x01\n\rGetNpmPackage\x12\x39.google.devtools.artifactregistry.v1.GetNpmPackageRequest\x1a/.google.devtools.artifactregistry.v1.NpmPackage\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}\x12\xe9\x01\n\x12ListPythonPackages\x12>.google.devtools.artifactregistry.v1.ListPythonPackagesRequest\x1a?.google.devtools.artifactregistry.v1.ListPythonPackagesResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages\x12\xd6\x01\n\x10GetPythonPackage\x12<.google.devtools.artifactregistry.v1.GetPythonPackageRequest\x1a\x32.google.devtools.artifactregistry.v1.PythonPackage\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}\x12\xcb\x02\n\x12ImportAptArtifacts\x12>.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41\x80\x01\n>google.devtools.artifactregistry.v1.ImportAptArtifactsResponse\x12>google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import:\x01*\x12\xcb\x02\n\x12ImportYumArtifacts\x12>.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41\x80\x01\n>google.devtools.artifactregistry.v1.ImportYumArtifactsResponse\x12>google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import:\x01*\x12\xd2\x01\n\x10ListRepositories\x12<.google.devtools.artifactregistry.v1.ListRepositoriesRequest\x1a=.google.devtools.artifactregistry.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.devtools.artifactregistry.v1.GetRepositoryRequest\x1a/.google.devtools.artifactregistry.v1.Repository\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/repositories/*}\x12\xc2\x02\n\x10\x43reateRepository\x12<.google.devtools.artifactregistry.v1.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\xd0\x01\xca\x41g\n.google.devtools.artifactregistry.v1.Repository\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xeb\x01\n\x10UpdateRepository\x12<.google.devtools.artifactregistry.v1.UpdateRepositoryRequest\x1a/.google.devtools.artifactregistry.v1.Repository\"h\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\x82\x02\n\x10\x44\x65leteRepository\x12<.google.devtools.artifactregistry.v1.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xd1\x01\n\x0cListPackages\x12\x38.google.devtools.artifactregistry.v1.ListPackagesRequest\x1a\x39.google.devtools.artifactregistry.v1.ListPackagesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/repositories/*}/packages\x12\xbe\x01\n\nGetPackage\x12\x36.google.devtools.artifactregistry.v1.GetPackageRequest\x1a,.google.devtools.artifactregistry.v1.Package\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/repositories/*/packages/*}\x12\x87\x02\n\rDeletePackage\x12\x39.google.devtools.artifactregistry.v1.DeletePackageRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/repositories/*/packages/*}\x12\xdc\x01\n\x0cListVersions\x12\x38.google.devtools.artifactregistry.v1.ListVersionsRequest\x1a\x39.google.devtools.artifactregistry.v1.ListVersionsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions\x12\xc9\x01\n\nGetVersion\x12\x36.google.devtools.artifactregistry.v1.GetVersionRequest\x1a,.google.devtools.artifactregistry.v1.Version\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\x92\x02\n\rDeleteVersion\x12\x39.google.devtools.artifactregistry.v1.DeleteVersionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xbf\x02\n\x13\x42\x61tchDeleteVersions\x12?.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41X\n\x15google.protobuf.Empty\x12?google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02W\"R/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete:\x01*\x12\xef\x01\n\rUpdateVersion\x12\x39.google.devtools.artifactregistry.v1.UpdateVersionRequest\x1a,.google.devtools.artifactregistry.v1.Version\"u\xda\x41\x13version,update_mask\x82\xd3\xe4\x93\x02Y2N/v1/{version.name=projects/*/locations/*/repositories/*/packages/*/versions/*}:\x07version\x12\xc5\x01\n\tListFiles\x12\x35.google.devtools.artifactregistry.v1.ListFilesRequest\x1a\x36.google.devtools.artifactregistry.v1.ListFilesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/files\x12\xb3\x01\n\x07GetFile\x12\x33.google.devtools.artifactregistry.v1.GetFileRequest\x1a).google.devtools.artifactregistry.v1.File\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/repositories/*/files/**}\x12\xfe\x01\n\nDeleteFile\x12\x36.google.devtools.artifactregistry.v1.DeleteFileRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/files/*}\x12\xcf\x01\n\nUpdateFile\x12\x36.google.devtools.artifactregistry.v1.UpdateFileRequest\x1a).google.devtools.artifactregistry.v1.File\"^\xda\x41\x10\x66ile,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{file.name=projects/*/locations/*/repositories/*/files/*}:\x04\x66ile\x12\xcc\x01\n\x08ListTags\x12\x34.google.devtools.artifactregistry.v1.ListTagsRequest\x1a\x35.google.devtools.artifactregistry.v1.ListTagsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags\x12\xb9\x01\n\x06GetTag\x12\x32.google.devtools.artifactregistry.v1.GetTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xd1\x01\n\tCreateTag\x12\x35.google.devtools.artifactregistry.v1.CreateTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"c\xda\x41\x11parent,tag,tag_id\x82\xd3\xe4\x93\x02I\"B/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags:\x03tag\x12\xd3\x01\n\tUpdateTag\x12\x35.google.devtools.artifactregistry.v1.UpdateTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"e\xda\x41\x0ftag,update_mask\x82\xd3\xe4\x93\x02M2F/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}:\x03tag\x12\xad\x01\n\tDeleteTag\x12\x35.google.devtools.artifactregistry.v1.DeleteTagRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xcd\x01\n\nCreateRule\x12\x36.google.devtools.artifactregistry.v1.CreateRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"\\\xda\x41\x13parent,rule,rule_id\x82\xd3\xe4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/rules:\x04rule\x12\xc5\x01\n\tListRules\x12\x35.google.devtools.artifactregistry.v1.ListRulesRequest\x1a\x36.google.devtools.artifactregistry.v1.ListRulesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/rules\x12\xb2\x01\n\x07GetRule\x12\x33.google.devtools.artifactregistry.v1.GetRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/repositories/*/rules/*}\x12\xcf\x01\n\nUpdateRule\x12\x36.google.devtools.artifactregistry.v1.UpdateRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"^\xda\x41\x10rule,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{rule.name=projects/*/locations/*/repositories/*/rules/*}:\x04rule\x12\xa5\x01\n\nDeleteRule\x12\x36.google.devtools.artifactregistry.v1.DeleteRuleRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/rules/*}\x12\x97\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\x94\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"I\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xbd\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"R\x82\xd3\xe4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\xc0\x01\n\x12GetProjectSettings\x12>.google.devtools.artifactregistry.v1.GetProjectSettingsRequest\x1a\x34.google.devtools.artifactregistry.v1.ProjectSettings\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\x12%/v1/{name=projects/*/projectSettings}\x12\x81\x02\n\x15UpdateProjectSettings\x12\x41.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest\x1a\x34.google.devtools.artifactregistry.v1.ProjectSettings\"o\xda\x41\x1cproject_settings,update_mask\x82\xd3\xe4\x93\x02J26/v1/{project_settings.name=projects/*/projectSettings}:\x10project_settings\x12\xbc\x01\n\x0eGetVPCSCConfig\x12:.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest\x1a\x30.google.devtools.artifactregistry.v1.VPCSCConfig\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/vpcscConfig}\x12\xf1\x01\n\x11UpdateVPCSCConfig\x12=.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest\x1a\x30.google.devtools.artifactregistry.v1.VPCSCConfig\"k\xda\x41\x18vpcsc_config,update_mask\x82\xd3\xe4\x93\x02J2:/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}:\x0cvpcsc_config\x12\xe4\x01\n\rUpdatePackage\x12\x39.google.devtools.artifactregistry.v1.UpdatePackageRequest\x1a,.google.devtools.artifactregistry.v1.Package\"j\xda\x41\x13package,update_mask\x82\xd3\xe4\x93\x02N2C/v1/{package.name=projects/*/locations/*/repositories/*/packages/*}:\x07package\x12\xdd\x01\n\x0fListAttachments\x12;.google.devtools.artifactregistry.v1.ListAttachmentsRequest\x1a<.google.devtools.artifactregistry.v1.ListAttachmentsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/attachments\x12\xca\x01\n\rGetAttachment\x12\x39.google.devtools.artifactregistry.v1.GetAttachmentRequest\x1a/.google.devtools.artifactregistry.v1.Attachment\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/attachments/*}\x12\xd0\x02\n\x10\x43reateAttachment\x12<.google.devtools.artifactregistry.v1.CreateAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\xde\x01\xca\x41g\n.google.devtools.artifactregistry.v1.Attachment\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x1fparent,attachment,attachment_id\x82\xd3\xe4\x93\x02L\">/v1/{parent=projects/*/locations/*/repositories/*}/attachments:\nattachment\x12\x90\x02\n\x10\x44\x65leteAttachment\x12<.google.devtools.artifactregistry.v1.DeleteAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/attachments/*}\x12\xb9\x02\n\x0e\x45xportArtifact\x12:.google.devtools.artifactregistry.v1.ExportArtifactRequest\x1a\x1d.google.longrunning.Operation\"\xcb\x01\xca\x41x\n:google.devtools.artifactregistry.v1.ExportArtifactResponse\x12:google.devtools.artifactregistry.v1.ExportArtifactMetadata\x82\xd3\xe4\x93\x02J\"E/v1/{repository=projects/*/locations/*/repositories/*}:exportArtifact:\x01*\x1a\x8c\x01\xca\x41\x1f\x61rtifactregistry.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cServiceProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb new file mode 100644 index 000000000000..cd63f995e427 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb @@ -0,0 +1,172 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/devtools/artifactregistry/v1/service.proto for package 'Google.Cloud.ArtifactRegistry.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/devtools/artifactregistry/v1/service_pb' + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.devtools.artifactregistry.v1.ArtifactRegistry' + + # Lists docker images. + rpc :ListDockerImages, ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse + # Gets a docker image. + rpc :GetDockerImage, ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Google::Cloud::ArtifactRegistry::V1::DockerImage + # Lists maven artifacts. + rpc :ListMavenArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse + # Gets a maven artifact. + rpc :GetMavenArtifact, ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact + # Lists npm packages. + rpc :ListNpmPackages, ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse + # Gets a npm package. + rpc :GetNpmPackage, ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::NpmPackage + # Lists python packages. + rpc :ListPythonPackages, ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse + # Gets a python package. + rpc :GetPythonPackage, ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::PythonPackage + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + rpc :ImportAptArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Google::Longrunning::Operation + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + rpc :ImportYumArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Google::Longrunning::Operation + # Lists repositories. + rpc :ListRepositories, ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse + # Gets a repository. + rpc :GetRepository, ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1::Repository + # Creates a repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + rpc :CreateRepository, ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, ::Google::Longrunning::Operation + # Updates a repository. + rpc :UpdateRepository, ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1::Repository + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + rpc :DeleteRepository, ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, ::Google::Longrunning::Operation + # Lists packages. + rpc :ListPackages, ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse + # Gets a package. + rpc :GetPackage, ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::Package + # Deletes a package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + rpc :DeletePackage, ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Google::Longrunning::Operation + # Lists versions. + rpc :ListVersions, ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse + # Gets a version + rpc :GetVersion, ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Google::Cloud::ArtifactRegistry::V1::Version + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + rpc :DeleteVersion, ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Google::Longrunning::Operation + # Deletes multiple versions across a repository. The returned operation will + # complete once the versions have been deleted. + rpc :BatchDeleteVersions, ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Google::Longrunning::Operation + # Updates a version. + rpc :UpdateVersion, ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Google::Cloud::ArtifactRegistry::V1::Version + # Lists files. + rpc :ListFiles, ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse + # Gets a file. + rpc :GetFile, ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Google::Cloud::ArtifactRegistry::V1::File + # Deletes a file and all of its content. It is only allowed on generic + # repositories. The returned operation will complete once the file has been + # deleted. + rpc :DeleteFile, ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Google::Longrunning::Operation + # Updates a file. + rpc :UpdateFile, ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Google::Cloud::ArtifactRegistry::V1::File + # Lists tags. + rpc :ListTags, ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse + # Gets a tag. + rpc :GetTag, ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag + # Creates a tag. + rpc :CreateTag, ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag + # Updates a tag. + rpc :UpdateTag, ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag + # Deletes a tag. + rpc :DeleteTag, ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Google::Protobuf::Empty + # Creates a rule. + rpc :CreateRule, ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule + # Lists rules. + rpc :ListRules, ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse + # Gets a rule. + rpc :GetRule, ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule + # Updates a rule. + rpc :UpdateRule, ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule + # Deletes a rule. + rpc :DeleteRule, ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Google::Protobuf::Empty + # Updates the IAM policy for a given resource. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the IAM policy for a given resource. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Tests if the caller has a list of permissions on a resource. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Retrieves the Settings for the Project. + rpc :GetProjectSettings, ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings + # Updates the Settings for the Project. + rpc :UpdateProjectSettings, ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings + # Retrieves the VPCSC Config for the Project. + rpc :GetVPCSCConfig, ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig + # Updates the VPCSC Config for the Project. + rpc :UpdateVPCSCConfig, ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig + # Updates a package. + rpc :UpdatePackage, ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Google::Cloud::ArtifactRegistry::V1::Package + # Lists attachments. + rpc :ListAttachments, ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse + # Gets an attachment. + rpc :GetAttachment, ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Google::Cloud::ArtifactRegistry::V1::Attachment + # Creates an attachment. The returned Operation will finish once the + # attachment has been created. Its response will be the created attachment. + rpc :CreateAttachment, ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Google::Longrunning::Operation + # Deletes an attachment. The returned Operation will + # finish once the attachments has been deleted. It will not have any + # Operation metadata and will return a `google.protobuf.Empty` response. + rpc :DeleteAttachment, ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Google::Longrunning::Operation + # Exports an artifact to a Cloud Storage bucket. + rpc :ExportArtifact, ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb new file mode 100644 index 000000000000..0c2cce6155dc --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/settings.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n2google/devtools/artifactregistry/v1/settings.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x88\x04\n\x0fProjectSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12g\n\x18legacy_redirection_state\x18\x02 \x01(\x0e\x32\x45.google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState\x12\x14\n\x0cpull_percent\x18\x03 \x01(\x05\"\x8d\x02\n\x10RedirectionState\x12!\n\x1dREDIRECTION_STATE_UNSPECIFIED\x10\x00\x12$\n REDIRECTION_FROM_GCR_IO_DISABLED\x10\x01\x12#\n\x1fREDIRECTION_FROM_GCR_IO_ENABLED\x10\x02\x12)\n!REDIRECTION_FROM_GCR_IO_FINALIZED\x10\x03\x1a\x02\x08\x01\x12/\n+REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING\x10\x05\x12/\n+REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING\x10\x06:X\xea\x41U\n/artifactregistry.googleapis.com/ProjectSettings\x12\"projects/{project}/projectSettings\"b\n\x19GetProjectSettingsRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/artifactregistry.googleapis.com/ProjectSettings\"\x9f\x01\n\x1cUpdateProjectSettingsRequest\x12N\n\x10project_settings\x18\x02 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1.ProjectSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xf8\x01\n\'com.google.devtools.artifactregistry.v1B\rSettingsProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + ProjectSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ProjectSettings").msgclass + ProjectSettings::RedirectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState").enummodule + GetProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetProjectSettingsRequest").msgclass + UpdateProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb new file mode 100644 index 000000000000..bb7df2a34734 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/tag.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n-google/devtools/artifactregistry/v1/tag.proto\x12#google.devtools.artifactregistry.v1\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb1\x01\n\x03Tag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t:\x8a\x01\xea\x41\x86\x01\n#artifactregistry.googleapis.com/Tag\x12_projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}\"X\n\x0fListTagsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"c\n\x10ListTagsResponse\x12\x36\n\x04tags\x18\x01 \x03(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1d\n\rGetTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"i\n\x10\x43reateTagRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06tag_id\x18\x02 \x01(\t\x12\x35\n\x03tag\x18\x03 \x01(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\"z\n\x10UpdateTagRequest\x12\x35\n\x03tag\x18\x01 \x01(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\" \n\x10\x44\x65leteTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\xf3\x01\n\'com.google.devtools.artifactregistry.v1B\x08TagProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Tag").msgclass + ListTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListTagsRequest").msgclass + ListTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListTagsResponse").msgclass + GetTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetTagRequest").msgclass + CreateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateTagRequest").msgclass + UpdateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateTagRequest").msgclass + DeleteTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteTagRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb new file mode 100644 index 000000000000..d391b66a4f6d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/version.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/devtools/artifactregistry/v1/file_pb' +require 'google/devtools/artifactregistry/v1/tag_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/devtools/artifactregistry/v1/version.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a-google/devtools/artifactregistry/v1/tag.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xea\x04\n\x07Version\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x0crelated_tags\x18\x07 \x03(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12W\n\x0b\x61nnotations\x18\t \x03(\x0b\x32=.google.devtools.artifactregistry.v1.Version.AnnotationsEntryB\x03\xe0\x41\x01\x12\x44\n\x0c\x66ingerprints\x18\n \x03(\x0b\x32).google.devtools.artifactregistry.v1.HashB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x96\x01\xea\x41\x92\x01\n\'artifactregistry.googleapis.com/Version\x12gprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}\"\xb8\x01\n\x13ListVersionsRequest\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>\n\x04view\x18\x04 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.VersionView\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x06 \x01(\tB\x03\xe0\x41\x01\"o\n\x14ListVersionsResponse\x12>\n\x08versions\x18\x01 \x03(\x0b\x32,.google.devtools.artifactregistry.v1.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x11GetVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x04view\x18\x02 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.VersionView\"3\n\x14\x44\x65leteVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"\xb1\x01\n\x1a\x42\x61tchDeleteVersionsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xfa\x41)\x12\'artifactregistry.googleapis.com/Version\x12>\n\x05names\x18\x02 \x03(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Version\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"6\n\x1b\x42\x61tchDeleteVersionsMetadata\x12\x17\n\x0f\x66\x61iled_versions\x18\x02 \x03(\t\"\x8b\x01\n\x14UpdateVersionRequest\x12\x42\n\x07version\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.VersionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask*@\n\x0bVersionView\x12\x1c\n\x18VERSION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cVersionProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Version").msgclass + ListVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListVersionsRequest").msgclass + ListVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListVersionsResponse").msgclass + GetVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetVersionRequest").msgclass + DeleteVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteVersionRequest").msgclass + BatchDeleteVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest").msgclass + BatchDeleteVersionsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata").msgclass + UpdateVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateVersionRequest").msgclass + VersionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VersionView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb new file mode 100644 index 000000000000..dbb9ba0543ee --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/vpcsc_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1/vpcsc_config.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x98\x02\n\x0bVPCSCConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12R\n\x0cvpcsc_policy\x18\x02 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy\"@\n\x0bVPCSCPolicy\x12\x1c\n\x18VPCSC_POLICY_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44\x45NY\x10\x01\x12\t\n\x05\x41LLOW\x10\x02:e\xea\x41\x62\n+artifactregistry.googleapis.com/VpcscConfig\x12\x33projects/{project}/locations/{location}/vpcscConfig\"Z\n\x15GetVPCSCConfigRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+artifactregistry.googleapis.com/VpcscConfig\"\x93\x01\n\x18UpdateVPCSCConfigRequest\x12\x46\n\x0cvpcsc_config\x18\x01 \x01(\x0b\x32\x30.google.devtools.artifactregistry.v1.VPCSCConfig\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10VPCSCConfigProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + VPCSCConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VPCSCConfig").msgclass + VPCSCConfig::VPCSCPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy").enummodule + GetVPCSCConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetVPCSCConfigRequest").msgclass + UpdateVPCSCConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb new file mode 100644 index 000000000000..a52fb7f9c0ff --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/yum_artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1/yum_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\x87\x03\n\x0bYumArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12W\n\x0cpackage_type\x18\x03 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.YumArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/YumArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}\"B\n\x1bImportYumArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x8d\x01\n\x19ImportYumArtifactsRequest\x12V\n\ngcs_source\x18\x02 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa2\x01\n\x1bImportYumArtifactsErrorInfo\x12V\n\ngcs_source\x18\x01 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xb7\x01\n\x1aImportYumArtifactsResponse\x12G\n\ryum_artifacts\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.YumArtifact\x12P\n\x06\x65rrors\x18\x02 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo\"\x1c\n\x1aImportYumArtifactsMetadataB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10YumArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + YumArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.YumArtifact").msgclass + YumArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.YumArtifact.PackageType").enummodule + ImportYumArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource").msgclass + ImportYumArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsRequest").msgclass + ImportYumArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo").msgclass + ImportYumArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsResponse").msgclass + ImportYumArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md new file mode 100644 index 000000000000..94b4fba12369 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Artifact Registry 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-artifact_registry-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb new file mode 100644 index 000000000000..a312b90573bf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # A detailed representation of an Apt artifact. Information in the record + # is derived from the archive's control file. + # See https://www.debian.org/doc/debian-policy/ch-controlfields.html + # @!attribute [r] name + # @return [::String] + # Output only. The Artifact Registry resource name of the artifact. + # @!attribute [r] package_name + # @return [::String] + # Output only. The Apt package name of the artifact. + # @!attribute [r] package_type + # @return [::Google::Cloud::ArtifactRegistry::V1::AptArtifact::PackageType] + # Output only. An artifact is a binary or source package. + # @!attribute [r] architecture + # @return [::String] + # Output only. Operating system architecture of the artifact. + # @!attribute [r] component + # @return [::String] + # Output only. Repository component of the artifact. + # @!attribute [r] control_file + # @return [::String] + # Output only. Contents of the artifact's control metadata file. + class AptArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Package type is either binary or source. + module PackageType + # Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0 + + # Binary package. + BINARY = 1 + + # Source package. + SOURCE = 2 + end + end + + # Google Cloud Storage location where the artifacts currently reside. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + # @!attribute [rw] use_wildcards + # @return [::Boolean] + # Supports URI wildcards for matching multiple objects from a single URI. + class ImportAptArtifactsGcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to import new apt artifacts. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource] + # Google Cloud Storage location where input content is located. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the artifacts will be imported. + class ImportAptArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Error information explaining why a package was not imported. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource] + # Google Cloud Storage location requested. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The detailed error status. + class ImportAptArtifactsErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message from importing APT artifacts. + # @!attribute [rw] apt_artifacts + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::AptArtifact>] + # The Apt artifacts imported. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsErrorInfo>] + # Detailed error info for packages that were not imported. + class ImportAptArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The operation metadata for importing artifacts. + class ImportAptArtifactsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb new file mode 100644 index 000000000000..19aa2ab91f75 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb @@ -0,0 +1,384 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # DockerImage represents a docker artifact. + # The following fields are returned as untyped metadata in the Version + # resource, using camelcase keys (i.e. metadata.imageSizeBytes): + # * imageSizeBytes + # * mediaType + # * buildTime + # @!attribute [rw] name + # @return [::String] + # Required. registry_location, project_id, repository_name and image id forms + # a unique image + # name:`projects//locations//repositories//dockerImages/`. + # For example, + # "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ + # nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", + # where "us-west4" is the registry_location, "test-project" is the + # project_id, "test-repo" is the repository_name and + # "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" + # is the image's digest. + # @!attribute [rw] uri + # @return [::String] + # Required. URL to access the image. + # Example: + # us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf + # @!attribute [rw] tags + # @return [::Array<::String>] + # Tags attached to this image. + # @!attribute [rw] image_size_bytes + # @return [::Integer] + # Calculated size of the image. + # This field is returned as the 'metadata.imageSizeBytes' field in the + # Version resource. + # @!attribute [rw] upload_time + # @return [::Google::Protobuf::Timestamp] + # Time the image was uploaded. + # @!attribute [rw] media_type + # @return [::String] + # Media type of this image, e.g. + # "application/vnd.docker.distribution.manifest.v2+json". + # This field is returned as the 'metadata.mediaType' field in the + # Version resource. + # @!attribute [rw] build_time + # @return [::Google::Protobuf::Timestamp] + # The time this image was built. + # This field is returned as the 'metadata.buildTime' field in the + # Version resource. + # The build time is returned to the client as an RFC 3339 string, which can + # be easily used with the JavaScript Date constructor. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the docker image was last updated. + # @!attribute [rw] artifact_type + # @return [::String] + # ArtifactType of this image, e.g. "application/vnd.example+type". + # If the `subject_digest` is set and no `artifact_type` is given, the + # `media_type` will be considered as the `artifact_type`. This field is + # returned as the `metadata.artifactType` field in the Version resource. + # @!attribute [rw] image_manifests + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImageManifest>] + # Optional. For multi-arch images (manifest lists), this field contains the + # list of image manifests. + class DockerImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of a single image manifest within a multi-arch image. + # @!attribute [rw] architecture + # @return [::String] + # Optional. The CPU architecture of the image. + # Values are provided by the Docker client and are not validated by Artifact + # Registry. Example values include "amd64", "arm64", "ppc64le", "s390x", + # "riscv64", "mips64le", etc. + # @!attribute [rw] os + # @return [::String] + # Optional. The operating system of the image. + # Values are provided by the Docker client and are not validated by Artifact + # Registry. Example values include "linux", "windows", "darwin", "aix", etc. + # @!attribute [rw] digest + # @return [::String] + # Optional. The manifest digest, in the format "sha256:". + # @!attribute [rw] media_type + # @return [::String] + # Optional. The media type of the manifest, e.g., + # "application/vnd.docker.distribution.manifest.v2+json" + # @!attribute [rw] os_version + # @return [::String] + # Optional. The OS version of the image, for example on Windows + # `10.0.14393.1066`. + # @!attribute [rw] os_features + # @return [::Array<::String>] + # Optional. The required OS features for the image, for example on Windows + # `win32k`. + # @!attribute [rw] variant + # @return [::String] + # Optional. The variant of the CPU in the image, for example `v7` to specify + # ARMv7 when architecture is `arm`. + class ImageManifest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list docker images. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose docker images will be + # listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] order_by + # @return [::String] + # The field to order the results by. + class ListDockerImagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing docker images. + # @!attribute [rw] docker_images + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] + # The docker images returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of artifacts, or empty if there are no + # more artifacts to return. + class ListDockerImagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get docker images. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the docker images. + class GetDockerImageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MavenArtifact represents a maven artifact. + # @!attribute [rw] name + # @return [::String] + # Required. registry_location, project_id, repository_name and maven_artifact + # forms a unique artifact For example, + # "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ + # com.google.guava:guava:31.0-jre", + # where "us-west4" is the registry_location, "test-project" is the + # project_id, "test-repo" is the repository_name and + # "com.google.guava:guava:31.0-jre" + # is the maven artifact. + # @!attribute [rw] pom_uri + # @return [::String] + # Required. URL to access the pom file of the artifact. + # Example: + # us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom + # @!attribute [rw] group_id + # @return [::String] + # Group ID for the artifact. + # Example: + # com.google.guava + # @!attribute [rw] artifact_id + # @return [::String] + # Artifact ID for the artifact. + # @!attribute [rw] version + # @return [::String] + # Version of this artifact. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the artifact was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the artifact was updated. + class MavenArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list maven artifacts. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose maven artifacts will be + # listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListMavenArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing maven artifacts. + # @!attribute [rw] maven_artifacts + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] + # The maven artifacts returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of artifacts, or empty if there are no + # more artifacts to return. + class ListMavenArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get maven artifacts. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the maven artifact. + class GetMavenArtifactRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NpmPackage represents an npm artifact. + # @!attribute [rw] name + # @return [::String] + # Required. registry_location, project_id, repository_name and npm_package + # forms a unique package For example, + # "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ + # npm_test:1.0.0", + # where "us-west4" is the registry_location, "test-project" is the + # project_id, "test-repo" is the repository_name and + # npm_test:1.0.0" is the npm package. + # @!attribute [rw] package_name + # @return [::String] + # Package for the artifact. + # @!attribute [rw] version + # @return [::String] + # Version of this package. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Tags attached to this package. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the package was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the package was updated. + class NpmPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list npm packages. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose npm packages will be + # listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListNpmPackagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing npm packages. + # @!attribute [rw] npm_packages + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] + # The npm packages returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of artifacts, or empty if there are no + # more artifacts to return. + class ListNpmPackagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get npm packages. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the npm package. + class GetNpmPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PythonPackage represents a python artifact. + # @!attribute [rw] name + # @return [::String] + # Required. registry_location, project_id, repository_name and python_package + # forms a unique package + # name:`projects//locations//repository//pythonPackages/`. + # For example, + # "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ + # python_package:1.0.0", + # where "us-west4" is the registry_location, "test-project" is the + # project_id, "test-repo" is the repository_name and + # python_package:1.0.0" is the python package. + # @!attribute [rw] uri + # @return [::String] + # Required. URL to access the package. + # Example: + # us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz + # @!attribute [rw] package_name + # @return [::String] + # Package for the artifact. + # @!attribute [rw] version + # @return [::String] + # Version of this package. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the package was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the package was updated. + class PythonPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list python packages. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose python packages will be + # listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListPythonPackagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing python packages. + # @!attribute [rw] python_packages + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] + # The python packages returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of artifacts, or empty if there are no + # more artifacts to return. + class ListPythonPackagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get python packages. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the python package. + class GetPythonPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb new file mode 100644 index 000000000000..4f4aa4117723 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # An Attachment refers to additional metadata that can be attached to + # artifacts in Artifact Registry. An attachment consists of one or more files. + # @!attribute [rw] name + # @return [::String] + # The name of the attachment. E.g. + # `projects/p1/locations/us/repositories/repo/attachments/sbom`. + # @!attribute [rw] target + # @return [::String] + # Required. The target the attachment is for, can be a Version, Package or + # Repository. E.g. + # `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. + # @!attribute [rw] type + # @return [::String] + # Type of attachment. + # E.g. `application/vnd.spdx+json` + # @!attribute [rw] attachment_namespace + # @return [::String] + # The namespace this attachment belongs to. + # E.g. If an attachment is created by artifact analysis, namespace is set + # to `artifactanalysis.googleapis.com`. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User annotations. These attributes can only be set and used by + # the user, and not by Artifact Registry. See + # https://google.aip.dev/128#annotations for more details such as format and + # size limitations. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the attachment was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the attachment was last updated. + # @!attribute [rw] files + # @return [::Array<::String>] + # Required. The files that belong to this attachment. + # If the file ID part contains slashes, they are escaped. E.g. + # `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. + # @!attribute [r] oci_version_name + # @return [::String] + # Output only. The name of the OCI version that this attachment created. Only + # populated for Docker attachments. E.g. + # `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. + class Attachment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request to list attachments. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose attachments will be listed. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `target` + # * `type` + # * `attachment_namespace` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of attachments to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListAttachmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing attachments. + # @!attribute [rw] attachments + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Attachment>] + # The attachments returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of attachments, or empty if there are + # no more attachments to return. + class ListAttachmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve an attachment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the attachment to retrieve. + class GetAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new attachment. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource where the attachment will be + # created. + # @!attribute [rw] attachment_id + # @return [::String] + # Required. The attachment id to use for this attachment. + # @!attribute [rw] attachment + # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # Required. The attachment to be created. + class CreateAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete an attachment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the attachment to delete. + class DeleteAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb new file mode 100644 index 000000000000..a94ff905b658 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.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! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # The request for exporting an artifact to a destination. + # @!attribute [rw] source_version + # @return [::String] + # The artifact version to export. + # Format: + # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} + # + # Note: The following fields are mutually exclusive: `source_version`, `source_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] source_tag + # @return [::String] + # The artifact tag to export. + # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} + # + # Note: The following fields are mutually exclusive: `source_tag`, `source_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs_path + # @return [::String] + # The Cloud Storage path to export the artifact to. Should start with the + # bucket name, and optionally have a directory path. Examples: + # `dst_bucket`, `dst_bucket/sub_dir`. + # Existing objects with the same path will be overwritten. + # @!attribute [rw] repository + # @return [::String] + # Required. The repository of the artifact to export. + # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} + class ExportArtifactRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for exporting an artifact to a destination. + # @!attribute [rw] exported_version + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # The exported version. Should be the same as the request version with + # fingerprint resource name. + class ExportArtifactResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The LRO metadata for exporting an artifact. + # @!attribute [rw] exported_files + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ExportArtifactMetadata::ExportedFile>] + # The exported artifact files. + class ExportArtifactMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The exported artifact file. + # @!attribute [rw] gcs_object_path + # @return [::String] + # Cloud Storage Object path of the exported file. Examples: + # `dst_bucket/file1`, `dst_bucket/sub_dir/file1` + # @!attribute [rw] name + # @return [::String] + # Name of the exported artifact file. + # Format: `projects/p1/locations/us/repositories/repo1/files/file1` + # @!attribute [rw] hashes + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] + # The hashes of the file content. + class ExportedFile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb new file mode 100644 index 000000000000..e07c055ac9d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.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! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # A hash of file content. + # @!attribute [rw] type + # @return [::Google::Cloud::ArtifactRegistry::V1::Hash::HashType] + # The algorithm used to compute the hash value. + # @!attribute [rw] value + # @return [::String] + # The hash value. + class Hash + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The algorithm used to compute the hash. + module HashType + # Unspecified. + HASH_TYPE_UNSPECIFIED = 0 + + # SHA256 hash. + SHA256 = 1 + + # MD5 hash. + MD5 = 2 + + # Dirsum SHA256 hash. + DIRSUM_SHA256 = 3 + end + end + + # Files store content that is potentially associated with Packages or Versions. + # @!attribute [rw] name + # @return [::String] + # The name of the file, for example: + # `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`. + # If the file ID part contains slashes, they are escaped. + # @!attribute [rw] size_bytes + # @return [::Integer] + # The size of the File in bytes. + # @!attribute [rw] hashes + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] + # The hashes of the file content. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the File was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the File was last updated. + # @!attribute [rw] owner + # @return [::String] + # The name of the Package or Version that owns this file, if any. + # @!attribute [r] fetch_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the last attempt to refresh the file's data was + # made. Only set when the repository is remote. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client specified annotations. + class File + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request to list files. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the repository whose files will be listed. For + # example: "projects/p1/locations/us-central1/repositories/repo1 + # @!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` + # * `owner` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to files with the name `my_file.txt` + # in project `my-project` in the `us-central` region, in repository + # `my-repo`, append the following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + # + # To filter the results of your request to files owned by the version `1.0` + # in package `pkg1`, append the following filter expression to your request: + # + # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # + # To filter the results of your request to files with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to files with the annotation key-value pair + # [`external.link`:`https://example.com/my-file`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-file`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of files to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] order_by + # @return [::String] + # The field to order the results by. + class ListFilesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing files. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::File>] + # The files returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of files, or empty if there are no + # more files to return. + class ListFilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a file. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the file to retrieve. + class GetFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a file. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the file to delete. + class DeleteFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a file. + # @!attribute [rw] file + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # Required. The File that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb new file mode 100644 index 000000000000..e851d178d658 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.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 Cloud + module ArtifactRegistry + module V1 + # GenericArtifact represents a generic artifact + # @!attribute [rw] name + # @return [::String] + # Resource name of the generic artifact. + # project, location, repository, package_id and version_id + # create a unique generic artifact. + # i.e. "projects/test-project/locations/us-west4/repositories/test-repo/ + # genericArtifacts/package_id:version_id" + # @!attribute [rw] version + # @return [::String] + # The version of the generic artifact. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Generic module is created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Generic module is updated. + class GenericArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb new file mode 100644 index 000000000000..ad71da265c27 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.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 ArtifactRegistry + module V1 + # GoModule represents a Go module. + # @!attribute [rw] name + # @return [::String] + # The resource name of a Go module. + # @!attribute [rw] version + # @return [::String] + # The version of the Go module. Must be a valid canonical version as defined + # in https://go.dev/ref/mod#glos-canonical-version. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Go module is created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Go module is updated. + class GoModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb new file mode 100644 index 000000000000..2b69b5b6bb0d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.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 ArtifactRegistry + module V1 + # A detailed representation of a KFP artifact. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of the KFP artifact. Since users don't directly + # interact with this resource, the name will be derived from the associated + # version. For example, when version = ".../versions/sha256:abcdef...", the + # name will be ".../kfpArtifacts/sha256:abcdef...". + # @!attribute [rw] version + # @return [::String] + # The version associated with the KFP artifact. Must follow the Semantic + # Versioning standard. + class KfpArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb new file mode 100644 index 000000000000..b7e1ad069172 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.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! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # Packages are named collections of versions. + # @!attribute [rw] name + # @return [::String] + # The name of the package, for example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + # If the package ID part contains slashes, the slashes are escaped. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the package. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the package was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the package was last updated. This includes publishing a new + # version of the package. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client specified annotations. + class Package + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request to list packages. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose packages will be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of packages to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to packages with the name + # `my-package` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + # + # To filter the results of your request to packages with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request": + # + # * `"annotations.external_link:external_link_value"` + # + # To filter the results just for a specific annotation key `external_link`, + # append the following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to packages with the annotation key-value pair + # [`external.link`:`https://example.com/my-package`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-package`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @!attribute [rw] order_by + # @return [::String] + # Optional. The field to order the results by. + class ListPackagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing packages. + # @!attribute [rw] packages + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Package>] + # The packages returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of packages, or empty if there are no + # more packages to return. + class ListPackagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a package. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the package to retrieve. + class GetPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a package. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the package to delete. + class DeletePackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a package. + # @!attribute [rw] package + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # The package that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdatePackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb new file mode 100644 index 000000000000..4f78625826fd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb @@ -0,0 +1,848 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # Artifact policy configuration for the repository contents. + # @!attribute [rw] id + # @return [::String] + # The user-provided ID of the upstream policy. + # @!attribute [rw] repository + # @return [::String] + # A reference to the repository resource, for example: + # `projects/p1/locations/us-central1/repositories/repo1`. + # @!attribute [rw] priority + # @return [::Integer] + # Entries with a greater priority value take precedence in the pull order. + class UpstreamPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. + # If multiple entries are set, all must be satisfied for the condition to be + # satisfied. + # @!attribute [rw] tag_state + # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyCondition::TagState] + # Match versions by tag status. + # @!attribute [rw] tag_prefixes + # @return [::Array<::String>] + # Match versions by tag prefix. Applied on any prefix match. + # @!attribute [rw] version_name_prefixes + # @return [::Array<::String>] + # Match versions by version name prefix. Applied on any prefix match. + # @!attribute [rw] package_name_prefixes + # @return [::Array<::String>] + # Match versions by package prefix. Applied on any prefix match. + # @!attribute [rw] older_than + # @return [::Google::Protobuf::Duration] + # Match versions older than a duration. + # @!attribute [rw] newer_than + # @return [::Google::Protobuf::Duration] + # Match versions newer than a duration. + class CleanupPolicyCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Statuses applying to versions. + module TagState + # Tag status not specified. + TAG_STATE_UNSPECIFIED = 0 + + # Applies to tagged versions only. + TAGGED = 1 + + # Applies to untagged versions only. + UNTAGGED = 2 + + # Applies to all versions. + ANY = 3 + end + end + + # CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy + # for retaining a minimum number of versions. + # @!attribute [rw] package_name_prefixes + # @return [::Array<::String>] + # List of package name prefixes that will apply this rule. + # @!attribute [rw] keep_count + # @return [::Integer] + # Minimum number of versions to keep. + class CleanupPolicyMostRecentVersions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Artifact policy configuration for repository cleanup policies. + # @!attribute [rw] condition + # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyCondition] + # Policy condition for matching versions. + # + # Note: The following fields are mutually exclusive: `condition`, `most_recent_versions`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] most_recent_versions + # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyMostRecentVersions] + # Policy condition for retaining a minimum number of versions. May only be + # specified with a Keep action. + # + # Note: The following fields are mutually exclusive: `most_recent_versions`, `condition`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # The user-provided ID of the cleanup policy. + # @!attribute [rw] action + # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy::Action] + # Policy action. + class CleanupPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Action type for a cleanup policy. + module Action + # Action not specified. + ACTION_UNSPECIFIED = 0 + + # Delete action. + DELETE = 1 + + # Keep action. + KEEP = 2 + end + end + + # Virtual repository configuration. + # @!attribute [rw] upstream_policies + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::UpstreamPolicy>] + # Policies that configure the upstream artifacts distributed by the Virtual + # Repository. Upstream policies cannot be set on a standard repository. + class VirtualRepositoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Remote repository configuration. + # @!attribute [rw] docker_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository] + # Specific settings for a Docker remote repository. + # + # Note: The following fields are mutually exclusive: `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] maven_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository] + # Specific settings for a Maven remote repository. + # + # Note: The following fields are mutually exclusive: `maven_repository`, `docker_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] npm_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository] + # Specific settings for an Npm remote repository. + # + # Note: The following fields are mutually exclusive: `npm_repository`, `docker_repository`, `maven_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] python_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository] + # Specific settings for a Python remote repository. + # + # Note: The following fields are mutually exclusive: `python_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] apt_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository] + # Specific settings for an Apt remote repository. + # + # Note: The following fields are mutually exclusive: `apt_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] yum_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository] + # Specific settings for a Yum remote repository. + # + # Note: The following fields are mutually exclusive: `yum_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] common_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::CommonRemoteRepository] + # Common remote repository settings. + # Used as the remote repository upstream URL. + # + # Note: The following fields are mutually exclusive: `common_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] description + # @return [::String] + # The description of the remote source. + # @!attribute [rw] upstream_credentials + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::UpstreamCredentials] + # Optional. The credentials used to access the remote repository. + # @!attribute [rw] disable_upstream_validation + # @return [::Boolean] + # Input only. A create/update remote repo option to avoid making a HEAD/GET + # request to validate a remote repo and any supplied upstream credentials. + class RemoteRepositoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The credentials to access the remote repository. + # @!attribute [rw] username_password_credentials + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::UpstreamCredentials::UsernamePasswordCredentials] + # Use username and password to access the remote repository. + class UpstreamCredentials + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Username and password credentials. + # @!attribute [rw] username + # @return [::String] + # The username to access the remote repository. + # @!attribute [rw] password_secret_version + # @return [::String] + # The Secret Manager key version that holds the password to access the + # remote repository. Must be in the format of + # `projects/{project}/secrets/{secret}/versions/{version}`. + class UsernamePasswordCredentials + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for a Docker remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository::PublicRepository] + # One of the publicly available Docker repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DockerRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the custom remote repository, for ex: + # "https://registry-1.docker.io". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Predefined list of publicly available Docker repositories like Docker + # Hub. + module PublicRepository + # Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0 + + # Docker Hub. + DOCKER_HUB = 1 + end + end + + # Configuration for a Maven remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository::PublicRepository] + # One of the publicly available Maven repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class MavenRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the upstream remote repository, for ex: + # "https://my.maven.registry/". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Predefined list of publicly available Maven repositories like Maven + # Central. + module PublicRepository + # Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0 + + # Maven Central. + MAVEN_CENTRAL = 1 + end + end + + # Configuration for a Npm remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository::PublicRepository] + # One of the publicly available Npm repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class NpmRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the upstream remote repository, for ex: + # "https://my.npm.registry/". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Predefined list of publicly available NPM repositories like npmjs. + module PublicRepository + # Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0 + + # npmjs. + NPMJS = 1 + end + end + + # Configuration for a Python remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository::PublicRepository] + # One of the publicly available Python repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class PythonRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the upstream remote repository, for ex: + # "https://my.python.registry/". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Predefined list of publicly available Python repositories like PyPI.org. + module PublicRepository + # Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0 + + # PyPI. + PYPI = 1 + end + end + + # Configuration for an Apt remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::PublicRepository] + # One of the publicly available Apt repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AptRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Publicly available Apt repositories constructed from a common repository + # base and a custom repository path. + # @!attribute [rw] repository_base + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::PublicRepository::RepositoryBase] + # A common public repository base for Apt. + # @!attribute [rw] repository_path + # @return [::String] + # A custom field to define a path to a specific repository from the base. + class PublicRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Predefined list of publicly available repository bases for Apt. + module RepositoryBase + # Unspecified repository base. + REPOSITORY_BASE_UNSPECIFIED = 0 + + # Debian. + DEBIAN = 1 + + # Ubuntu LTS/Pro. + UBUNTU = 2 + + # Archived Debian. + DEBIAN_SNAPSHOT = 3 + end + end + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the upstream remote repository, for ex: + # "https://my.apt.registry/". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for a Yum remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::PublicRepository] + # One of the publicly available Yum repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class YumRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Publicly available Yum repositories constructed from a common repository + # base and a custom repository path. + # @!attribute [rw] repository_base + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::PublicRepository::RepositoryBase] + # A common public repository base for Yum. + # @!attribute [rw] repository_path + # @return [::String] + # A custom field to define a path to a specific repository from the base. + class PublicRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Predefined list of publicly available repository bases for Yum. + module RepositoryBase + # Unspecified repository base. + REPOSITORY_BASE_UNSPECIFIED = 0 + + # CentOS. + CENTOS = 1 + + # CentOS Debug. + CENTOS_DEBUG = 2 + + # CentOS Vault. + CENTOS_VAULT = 3 + + # CentOS Stream. + CENTOS_STREAM = 4 + + # Rocky. + ROCKY = 5 + + # Fedora Extra Packages for Enterprise Linux (EPEL). + EPEL = 6 + end + end + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the upstream remote repository, for ex: + # "https://my.yum.registry/". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Common remote repository settings type. + # @!attribute [rw] uri + # @return [::String] + # Required. A common public repository base for remote repository. + class CommonRemoteRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A Repository for storing artifacts with a specific format. + # @!attribute [rw] maven_config + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::MavenRepositoryConfig] + # Maven repository config contains repository level configuration + # for the repositories of maven type. + # + # Note: The following fields are mutually exclusive: `maven_config`, `docker_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] docker_config + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::DockerRepositoryConfig] + # Docker repository config contains repository level configuration + # for the repositories of docker type. + # + # Note: The following fields are mutually exclusive: `docker_config`, `maven_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] virtual_repository_config + # @return [::Google::Cloud::ArtifactRegistry::V1::VirtualRepositoryConfig] + # Configuration specific for a Virtual Repository. + # + # Note: The following fields are mutually exclusive: `virtual_repository_config`, `remote_repository_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] remote_repository_config + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig] + # Configuration specific for a Remote Repository. + # + # Note: The following fields are mutually exclusive: `remote_repository_config`, `virtual_repository_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # The name of the repository, for example: + # `projects/p1/locations/us-central1/repositories/repo1`. For each location + # in a project, repository names must be unique. + # @!attribute [rw] format + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::Format] + # Optional. The format of packages that are stored in the repository. + # @!attribute [rw] description + # @return [::String] + # The user-provided description of the repository. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels with user-defined metadata. + # This field may contain up to 64 entries. Label keys and values may be no + # longer than 63 characters. Label keys must begin with a lowercase letter + # and may only contain lowercase letters, numeric characters, underscores, + # and dashes. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the repository was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the repository was last updated. + # @!attribute [rw] kms_key_name + # @return [::String] + # The Cloud KMS resource name of the customer managed encryption key that's + # used to encrypt the contents of the Repository. Has the form: + # `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. + # This value may not be changed after the Repository has been created. + # @!attribute [rw] mode + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::Mode] + # Optional. The mode of the repository. + # @!attribute [rw] cleanup_policies + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy}] + # Optional. Cleanup policies for this repository. Cleanup policies indicate + # when certain package versions can be automatically deleted. Map keys are + # policy IDs supplied by users during policy creation. They must unique + # within a repository and be under 128 characters in length. + # @!attribute [r] size_bytes + # @return [::Integer] + # Output only. The size, in bytes, of all artifact storage in this + # repository. Repositories that are generally available or in public preview + # use this to calculate storage costs. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Whether or not this repository satisfies PZS. + # @!attribute [rw] cleanup_policy_dry_run + # @return [::Boolean] + # Optional. If true, the cleanup pipeline is prevented from deleting versions + # in this repository. + # @!attribute [rw] vulnerability_scanning_config + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig] + # Optional. Config and state for vulnerability scanning of resources within + # this Repository. + # @!attribute [rw] disallow_unspecified_mode + # @return [::Boolean] + # Optional. If this is true, an unspecified repo type will be treated as + # error rather than defaulting to standard. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Whether or not this repository satisfies PZI. + # @!attribute [r] registry_uri + # @return [::String] + # Output only. The repository endpoint, for example: + # `us-docker.pkg.dev/my-proj/my-repo`. + class Repository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # MavenRepositoryConfig is maven related repository details. + # Provides additional configuration details for repositories of the maven + # format type. + # @!attribute [rw] allow_snapshot_overwrites + # @return [::Boolean] + # The repository with this flag will allow publishing + # the same snapshot versions. + # @!attribute [rw] version_policy + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::MavenRepositoryConfig::VersionPolicy] + # Version policy defines the versions that the registry will accept. + class MavenRepositoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VersionPolicy is the version policy for the repository. + module VersionPolicy + # VERSION_POLICY_UNSPECIFIED - the version policy is not defined. + # When the version policy is not defined, no validation is performed + # for the versions. + VERSION_POLICY_UNSPECIFIED = 0 + + # RELEASE - repository will accept only Release versions. + RELEASE = 1 + + # SNAPSHOT - repository will accept only Snapshot versions. + SNAPSHOT = 2 + end + end + + # DockerRepositoryConfig is docker related repository details. + # Provides additional configuration details for repositories of the docker + # format type. + # @!attribute [rw] immutable_tags + # @return [::Boolean] + # The repository which enabled this flag prevents all tags from being + # modified, moved or deleted. This does not prevent tags from being + # created. + class DockerRepositoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config on whether to perform vulnerability scanning for resources in this + # repository, as well as output fields describing current state. + # @!attribute [rw] enablement_config + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig::EnablementConfig] + # Optional. Config for whether this repository has vulnerability scanning + # disabled. + # @!attribute [r] last_enable_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time this repository config was enabled. + # @!attribute [r] enablement_state + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig::EnablementState] + # Output only. State of feature enablement, combining repository enablement + # config and API enablement state. + # @!attribute [r] enablement_state_reason + # @return [::String] + # Output only. Reason for the repository state. + class VulnerabilityScanningConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Config for vulnerability scanning of resources in this repository. + module EnablementConfig + # Not set. This will be treated as INHERITED for Docker repositories and + # DISABLED for non-Docker repositories. + ENABLEMENT_CONFIG_UNSPECIFIED = 0 + + # Scanning is Enabled, but dependent on API enablement. + INHERITED = 1 + + # No automatic vulnerability scanning will be performed for this + # repository. + DISABLED = 2 + end + + # Describes the state of vulnerability scanning in this repository, + # including both repository enablement and API enablement. + module EnablementState + # Enablement state is unclear. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # Repository does not support vulnerability scanning. + SCANNING_UNSUPPORTED = 1 + + # Vulnerability scanning is disabled for this repository. + SCANNING_DISABLED = 2 + + # Vulnerability scanning is active for this repository. + SCANNING_ACTIVE = 3 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy] + class CleanupPoliciesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A package format. + module Format + # Unspecified package format. + FORMAT_UNSPECIFIED = 0 + + # Docker package format. + DOCKER = 1 + + # Maven package format. + MAVEN = 2 + + # NPM package format. + NPM = 3 + + # APT package format. + APT = 5 + + # YUM package format. + YUM = 6 + + # Python package format. + PYTHON = 8 + + # Kubeflow Pipelines package format. + KFP = 9 + + # Go package format. + GO = 10 + + # Generic package format. + GENERIC = 11 + + # Ruby package format. + RUBY = 12 + end + + # The mode configures the repository to serve artifacts from different + # sources. + module Mode + # Unspecified mode. + MODE_UNSPECIFIED = 0 + + # A standard repository storing artifacts. + STANDARD_REPOSITORY = 1 + + # A virtual repository to serve artifacts from one or more sources. + VIRTUAL_REPOSITORY = 2 + + # A remote repository to serve artifacts from a remote source. + REMOTE_REPOSITORY = 3 + end + end + + # The request to list repositories. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose repositories will be + # listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # + # Examples of using a filter: + # + # To filter the results of your request to repositories with the name + # `my-repo` in project `my-project` in the `us-central` region, append the + # following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + # @!attribute [rw] order_by + # @return [::String] + # Optional. The field to order the results by. + class ListRepositoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing repositories. + # @!attribute [rw] repositories + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Repository>] + # The repositories returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of repositories, or empty if there are + # no more repositories to return. + class ListRepositoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a repository. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the repository to retrieve. + class GetRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new repository. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource where the repository will be + # created. + # @!attribute [rw] repository_id + # @return [::String] + # Required. The repository id to use for this repository. + # @!attribute [rw] repository + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # Required. The repository to be created. + class CreateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a repository. + # @!attribute [rw] repository + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # The repository that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a repository. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the repository to delete. + class DeleteRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb new file mode 100644 index 000000000000..0bdb1d2172c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb @@ -0,0 +1,149 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # A rule defines the deny or allow action of the operation it applies to and + # the conditions required for the rule to apply. You can set one rule for an + # entire repository and one rule for each package within. + # @!attribute [rw] name + # @return [::String] + # The name of the rule, for example: + # `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. + # @!attribute [rw] action + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule::Action] + # The action this rule takes. + # @!attribute [rw] operation + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule::Operation] + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # Optional. A CEL expression for conditions that must be met in order for the + # rule to apply. If not provided, the rule matches all objects. + # @!attribute [rw] package_id + # @return [::String] + # The package ID the rule applies to. + # If empty, this rule applies to all packages inside the repository. + class Rule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the action of the rule. + module Action + # Action not specified. + ACTION_UNSPECIFIED = 0 + + # Allow the operation. + ALLOW = 1 + + # Deny the operation. + DENY = 2 + end + + # The operation the rule applies to. + module Operation + # Operation not specified. + OPERATION_UNSPECIFIED = 0 + + # Download operation. + DOWNLOAD = 1 + end + end + + # The request to list rules. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent repository whose rules will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of rules to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing rules. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Rule>] + # The rules returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of rules, or empty if there are no + # more rules to return. + class ListRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a rule. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to retrieve. + class GetRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new rule. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource where the rule will be created. + # @!attribute [rw] rule_id + # @return [::String] + # The rule id to use for this repository. + # @!attribute [rw] rule + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # The rule to be created. + class CreateRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a rule. + # @!attribute [rw] rule + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # The rule that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a rule. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to delete. + class DeleteRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb new file mode 100644 index 000000000000..2ee4fa0cdea8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.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 ArtifactRegistry + module V1 + # Metadata type for longrunning-operations, currently empty. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb new file mode 100644 index 000000000000..a545ef0668e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.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 ArtifactRegistry + module V1 + # The Artifact Registry settings that apply to a Project. + # @!attribute [rw] name + # @return [::String] + # The name of the project's settings. + # + # Always of the form: + # projects/\\{project-id}/projectSettings + # + # In update request: never set + # In response: always set + # @!attribute [rw] legacy_redirection_state + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings::RedirectionState] + # The redirection state of the legacy repositories in this project. + # @!attribute [rw] pull_percent + # @return [::Integer] + # The percentage of pull traffic to redirect from GCR to AR when using + # partial redirection. + class ProjectSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible redirection states for legacy repositories. + module RedirectionState + # No redirection status has been set. + REDIRECTION_STATE_UNSPECIFIED = 0 + + # Redirection is disabled. + REDIRECTION_FROM_GCR_IO_DISABLED = 1 + + # Redirection is enabled. + REDIRECTION_FROM_GCR_IO_ENABLED = 2 + + # Redirection is enabled, and has been finalized so cannot be reverted. + REDIRECTION_FROM_GCR_IO_FINALIZED = 3 + + # Redirection is enabled and missing images are copied from GCR + REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING = 5 + + # Redirection is partially enabled and missing images are copied from GCR + REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING = 6 + end + end + + # Gets the redirection status for a project. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the projectSettings resource. + class GetProjectSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sets the settings of the project. + # @!attribute [rw] project_settings + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # The project settings. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Field mask to support partial updates. + class UpdateProjectSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb new file mode 100644 index 000000000000..a9a41f7a2b11 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # Tags point to a version and represent an alternative name that can be used + # to access the version. + # @!attribute [rw] name + # @return [::String] + # The name of the tag, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". + # If the package part contains slashes, the slashes are escaped. + # The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else + # must be URL encoded. + # @!attribute [rw] version + # @return [::String] + # The name of the version the tag refers to, for example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` + # If the package or version ID parts contain slashes, the slashes are + # escaped. + class Tag + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list tags. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent package whose tags will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + # @!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` + # * `version` + # + # Examples of using a filter: + # + # To filter the results of your request to tags with the name `my-tag` in + # package `my-package` in repository `my-repo` in project "`y-project` in + # the us-central region, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + # + # To filter the results of your request to tags applied to the version + # `1.0` in package `my-package`, append the following filter expression to + # your request: + # + # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of tags to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListTagsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing tags. + # @!attribute [rw] tags + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # The tags returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of tags, or empty if there are no + # more tags to return. + class ListTagsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a tag. + # @!attribute [rw] name + # @return [::String] + # The name of the tag to retrieve. + class GetTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new tag. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the tag will be created. + # @!attribute [rw] tag_id + # @return [::String] + # The tag id to use for this repository. + # @!attribute [rw] tag + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # The tag to be created. + class CreateTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create or update a tag. + # @!attribute [rw] tag + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # The tag that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a tag. + # @!attribute [rw] name + # @return [::String] + # The name of the tag to delete. + class DeleteTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb new file mode 100644 index 000000000000..9c9c3ee8a90f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb @@ -0,0 +1,237 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # The body of a version resource. A version resource represents a + # collection of components, such as files and other data. This may correspond + # to a version in many package management schemes. + # @!attribute [rw] name + # @return [::String] + # The name of the version, for example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. + # If the package or version ID parts contain slashes, the slashes are + # escaped. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the version, as specified in its metadata. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the version was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the version was last updated. + # @!attribute [rw] related_tags + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # Output only. A list of related tags. Will contain up to 100 tags that + # reference this version. + # @!attribute [r] metadata + # @return [::Google::Protobuf::Struct] + # Output only. Repository-specific Metadata stored against this version. + # The fields returned are defined by the underlying repository-specific + # resource. Currently, the resources could be: + # {::Google::Cloud::ArtifactRegistry::V1::DockerImage DockerImage} + # {::Google::Cloud::ArtifactRegistry::V1::MavenArtifact MavenArtifact} + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client specified annotations. + # @!attribute [r] fingerprints + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] + # Output only. Immutable reference for the version, calculated based on the + # version's content. Currently we only support dirsum_sha256 hash algorithm. + # Additional hash algorithms may be added in the future. + class Version + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request to list versions. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource whose versions will be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] view + # @return [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The field to order the results by. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to versions with the name + # `my-version` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + # + # To filter the results of your request to versions with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to versions with the annotation key-value pair + # [`external.link`:`https://example.com/my-version`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-version`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + class ListVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing versions. + # @!attribute [rw] versions + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Version>] + # The versions returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of versions, or empty if there are no + # more versions to return. + class ListVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a version. + # @!attribute [rw] name + # @return [::String] + # The name of the version to retrieve. + # @!attribute [rw] view + # @return [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + class GetVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a version. + # @!attribute [rw] name + # @return [::String] + # The name of the version to delete. + # @!attribute [rw] force + # @return [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + class DeleteVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete multiple versions across a repository. + # @!attribute [rw] parent + # @return [::String] + # The name of the repository holding all requested versions. + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The names of the versions to delete. + # The maximum number of versions deleted per batch is determined by the + # service and is dependent on the available resources in the region. + # @!attribute [rw] validate_only + # @return [::Boolean] + # If true, the request is performed without deleting data, following AIP-163. + class BatchDeleteVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata of an LRO from deleting multiple versions. + # @!attribute [rw] failed_versions + # @return [::Array<::String>] + # The versions the operation failed to delete. + class BatchDeleteVersionsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a version. + # @!attribute [rw] version + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # Required. The Version that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The view, which determines what version information is returned in a + # response. + module VersionView + # The default / unset value. + # The API will default to the BASIC view. + VERSION_VIEW_UNSPECIFIED = 0 + + # Includes basic information about the version, but not any related tags. + BASIC = 1 + + # Include everything. + FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb new file mode 100644 index 000000000000..ddeb66c66eaa --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.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 Cloud + module ArtifactRegistry + module V1 + # The Artifact Registry VPC SC config that apply to a Project. + # @!attribute [rw] name + # @return [::String] + # The name of the project's VPC SC Config. + # + # Always of the form: + # projects/\\{projectID}/locations/\\{location}/vpcscConfig + # + # In update request: never set + # In response: always set + # @!attribute [rw] vpcsc_policy + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig::VPCSCPolicy] + # The project per location VPC SC policy that defines the VPC SC behavior for + # the Remote Repository (Allow/Deny). + class VPCSCConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VPCSCPolicy is the VPC SC policy for project and location. + module VPCSCPolicy + # VPCSC_POLICY_UNSPECIFIED - the VPS SC policy is not defined. + # When VPS SC policy is not defined - the Service will use the default + # behavior (VPCSC_DENY). + VPCSC_POLICY_UNSPECIFIED = 0 + + # VPCSC_DENY - repository will block the requests to the Upstreams for the + # Remote Repositories if the resource is in the perimeter. + DENY = 1 + + # VPCSC_ALLOW - repository will allow the requests to the Upstreams for the + # Remote Repositories if the resource is in the perimeter. + ALLOW = 2 + end + end + + # Gets the VPC SC config for a project. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the VPCSCConfig resource. + class GetVPCSCConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sets the VPCSC config of the project. + # @!attribute [rw] vpcsc_config + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # The project config. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Field mask to support partial updates. + class UpdateVPCSCConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb new file mode 100644 index 000000000000..dac974efbbdf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.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! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # A detailed representation of a Yum artifact. + # @!attribute [r] name + # @return [::String] + # Output only. The Artifact Registry resource name of the artifact. + # @!attribute [r] package_name + # @return [::String] + # Output only. The yum package name of the artifact. + # @!attribute [r] package_type + # @return [::Google::Cloud::ArtifactRegistry::V1::YumArtifact::PackageType] + # Output only. An artifact is a binary or source package. + # @!attribute [r] architecture + # @return [::String] + # Output only. Operating system architecture of the artifact. + class YumArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Package type is either binary or source. + module PackageType + # Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0 + + # Binary package (.rpm). + BINARY = 1 + + # Source package (.srpm). + SOURCE = 2 + end + end + + # Google Cloud Storage location where the artifacts currently reside. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + # @!attribute [rw] use_wildcards + # @return [::Boolean] + # Supports URI wildcards for matching multiple objects from a single URI. + class ImportYumArtifactsGcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to import new yum artifacts. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource] + # Google Cloud Storage location where input content is located. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the artifacts will be imported. + class ImportYumArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Error information explaining why a package was not imported. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource] + # Google Cloud Storage location requested. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The detailed error status. + class ImportYumArtifactsErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message from importing YUM artifacts. + # @!attribute [rw] yum_artifacts + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::YumArtifact>] + # The yum artifacts imported. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsErrorInfo>] + # Detailed error info for packages that were not imported. + class ImportYumArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The operation metadata for importing artifacts. + class ImportYumArtifactsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile new file mode 100644 index 000000000000..459cdcd60fe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1", path: "../" +else + gem "google-cloud-artifact_registry-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-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb new file mode 100644 index 000000000000..3551d1fea5e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.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 artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the batch_delete_versions call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions. +# +def batch_delete_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new + + # Call the batch_delete_versions method. + result = client.batch_delete_versions request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb new file mode 100644 index 000000000000..faa2d06ad650 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.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 artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the create_attachment call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment. +# +def create_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new + + # Call the create_attachment method. + result = client.create_attachment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb new file mode 100644 index 000000000000..da79982e2f09 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the create_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository. +# +def create_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::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 artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb new file mode 100644 index 000000000000..446cae77d141 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the create_rule call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule. +# +def create_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new + + # Call the create_rule method. + result = client.create_rule request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb new file mode 100644 index 000000000000..614917acd763 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the create_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag. +# +def create_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new + + # Call the create_tag method. + result = client.create_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb new file mode 100644 index 000000000000..a5a7848c4daa --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.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 artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_attachment call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment. +# +def delete_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new + + # Call the delete_attachment method. + result = client.delete_attachment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb new file mode 100644 index 000000000000..fdcd3ccaa467 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.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 artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_file call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file. +# +def delete_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new + + # Call the delete_file method. + result = client.delete_file request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb new file mode 100644 index 000000000000..5a655c2e4962 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.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 artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package. +# +def delete_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new + + # Call the delete_package method. + result = client.delete_package request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb new file mode 100644 index 000000000000..640b18b6b3c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository. +# +def delete_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::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 artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb new file mode 100644 index 000000000000..558ed7cef6e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_rule call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule. +# +def delete_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new + + # Call the delete_rule method. + result = client.delete_rule request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb new file mode 100644 index 000000000000..91e16a183ca6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag. +# +def delete_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new + + # Call the delete_tag method. + result = client.delete_tag request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb new file mode 100644 index 000000000000..3eaddca23f51 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.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 artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_version call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version. +# +def delete_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new + + # Call the delete_version method. + result = client.delete_version request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb new file mode 100644 index 000000000000..5f1daba9d5a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.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 artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the export_artifact call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact. +# +def export_artifact + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new + + # Call the export_artifact method. + result = client.export_artifact request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb new file mode 100644 index 000000000000..b5b108c71355 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_attachment call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment. +# +def get_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new + + # Call the get_attachment method. + result = client.get_attachment request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb new file mode 100644 index 000000000000..0ef05ed884cb --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_docker_image call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image. +# +def get_docker_image + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new + + # Call the get_docker_image method. + result = client.get_docker_image request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb new file mode 100644 index 000000000000..197816935c4b --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_file call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file. +# +def get_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new + + # Call the get_file method. + result = client.get_file request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb new file mode 100644 index 000000000000..1afea8a55d98 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_iam_policy call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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 artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb new file mode 100644 index 000000000000..565ab113d0f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_maven_artifact call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact. +# +def get_maven_artifact + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new + + # Call the get_maven_artifact method. + result = client.get_maven_artifact request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb new file mode 100644 index 000000000000..e3fb548ad087 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_npm_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package. +# +def get_npm_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new + + # Call the get_npm_package method. + result = client.get_npm_package request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb new file mode 100644 index 000000000000..e8bca8350df6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package. +# +def get_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new + + # Call the get_package method. + result = client.get_package request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb new file mode 100644 index 000000000000..cfb98bbd9209 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_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 artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_project_settings call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings. +# +def get_project_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new + + # Call the get_project_settings method. + result = client.get_project_settings request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb new file mode 100644 index 000000000000..df5c6449c907 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_python_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package. +# +def get_python_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new + + # Call the get_python_package method. + result = client.get_python_package request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb new file mode 100644 index 000000000000..4919f715af65 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository. +# +def get_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new + + # Call the get_repository method. + result = client.get_repository request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb new file mode 100644 index 000000000000..64edea734465 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_rule call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule. +# +def get_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new + + # Call the get_rule method. + result = client.get_rule request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb new file mode 100644 index 000000000000..38020d4c9027 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag. +# +def get_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new + + # Call the get_tag method. + result = client.get_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb new file mode 100644 index 000000000000..ebfc4996d184 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_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 artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_version call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version. +# +def get_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new + + # Call the get_version method. + result = client.get_version request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb new file mode 100644 index 000000000000..6396617d1fd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_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 artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_vpcsc_config call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config. +# +def get_vpcsc_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new + + # Call the get_vpcsc_config method. + result = client.get_vpcsc_config request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb new file mode 100644 index 000000000000..1d1c19f659e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.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 artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the import_apt_artifacts call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts. +# +def import_apt_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new + + # Call the import_apt_artifacts method. + result = client.import_apt_artifacts request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb new file mode 100644 index 000000000000..3b576e4026b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.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 artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the import_yum_artifacts call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts. +# +def import_yum_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new + + # Call the import_yum_artifacts method. + result = client.import_yum_artifacts request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb new file mode 100644 index 000000000000..c0e7bcf3df0d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.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 artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_attachments call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments. +# +def list_attachments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new + + # Call the list_attachments method. + result = client.list_attachments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb new file mode 100644 index 000000000000..f5ae43a24fcb --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.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 artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_docker_images call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images. +# +def list_docker_images + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new + + # Call the list_docker_images method. + result = client.list_docker_images request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb new file mode 100644 index 000000000000..ef775fe14faa --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.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 artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_files call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files. +# +def list_files + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new + + # Call the list_files method. + result = client.list_files request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb new file mode 100644 index 000000000000..9485dc527e7e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.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 artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_maven_artifacts call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts. +# +def list_maven_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new + + # Call the list_maven_artifacts method. + result = client.list_maven_artifacts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb new file mode 100644 index 000000000000..5139dde54193 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.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 artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_npm_packages call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages. +# +def list_npm_packages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new + + # Call the list_npm_packages method. + result = client.list_npm_packages request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb new file mode 100644 index 000000000000..13c4c0a14971 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.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 artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_packages call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages. +# +def list_packages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new + + # Call the list_packages method. + result = client.list_packages request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb new file mode 100644 index 000000000000..d87b40b2c0cf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.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 artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_python_packages call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages. +# +def list_python_packages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new + + # Call the list_python_packages method. + result = client.list_python_packages request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb new file mode 100644 index 000000000000..097d7c46cbf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_repositories call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories. +# +def list_repositories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::V1::Repository. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb new file mode 100644 index 000000000000..0e2f6de5c8fe --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_rules call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules. +# +def list_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new + + # Call the list_rules method. + result = client.list_rules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb new file mode 100644 index 000000000000..0e0ed6c2658e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.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 artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_tags call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags. +# +def list_tags + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new + + # Call the list_tags method. + result = client.list_tags request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb new file mode 100644 index 000000000000..4c0c49ab3fe0 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_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 artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_versions call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions. +# +def list_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new + + # Call the list_versions method. + result = client.list_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::ArtifactRegistry::V1::Version. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb new file mode 100644 index 000000000000..976e507f153a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the set_iam_policy call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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 artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb new file mode 100644 index 000000000000..df231fd7b342 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the test_iam_permissions call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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 artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb new file mode 100644 index 000000000000..b45c4176571a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_file call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file. +# +def update_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new + + # Call the update_file method. + result = client.update_file request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb new file mode 100644 index 000000000000..39121b1eecdd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package. +# +def update_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new + + # Call the update_package method. + result = client.update_package request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb new file mode 100644 index 000000000000..fbc2f9584b3c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_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 artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_project_settings call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings. +# +def update_project_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new + + # Call the update_project_settings method. + result = client.update_project_settings request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb new file mode 100644 index 000000000000..7831d02528b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_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 artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository. +# +def update_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new + + # Call the update_repository method. + result = client.update_repository request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb new file mode 100644 index 000000000000..3304a6d9f6f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_rule call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule. +# +def update_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new + + # Call the update_rule method. + result = client.update_rule request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb new file mode 100644 index 000000000000..658e94dda101 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag. +# +def update_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new + + # Call the update_tag method. + result = client.update_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb new file mode 100644 index 000000000000..b1e1b1b96fea --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_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 artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_version call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version. +# +def update_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new + + # Call the update_version method. + result = client.update_version request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb new file mode 100644 index 000000000000..2d206b7333ad --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_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 artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_vpcsc_config call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config. +# +def update_vpcsc_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new + + # Call the update_vpcsc_config method. + result = client.update_vpcsc_config request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json new file mode 100644 index 000000000000..5ee717882e69 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json @@ -0,0 +1,2015 @@ +{ + "client_library": { + "name": "google-cloud-artifact_registry-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.devtools.artifactregistry.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync", + "title": "Snippet for the list_docker_images call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images.", + "file": "artifact_registry/list_docker_images.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_docker_images", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListDockerImages", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImages", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync", + "title": "Snippet for the get_docker_image call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image.", + "file": "artifact_registry/get_docker_image.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_docker_image", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::DockerImage", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetDockerImage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync", + "title": "Snippet for the list_maven_artifacts call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts.", + "file": "artifact_registry/list_maven_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_maven_artifacts", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListMavenArtifacts", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifacts", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync", + "title": "Snippet for the get_maven_artifact call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact.", + "file": "artifact_registry/get_maven_artifact.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_maven_artifact", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::MavenArtifact", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetMavenArtifact", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifact", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync", + "title": "Snippet for the list_npm_packages call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages.", + "file": "artifact_registry/list_npm_packages.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_npm_packages", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListNpmPackages", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackages", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync", + "title": "Snippet for the get_npm_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package.", + "file": "artifact_registry/get_npm_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_npm_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::NpmPackage", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetNpmPackage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync", + "title": "Snippet for the list_python_packages call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages.", + "file": "artifact_registry/list_python_packages.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_python_packages", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListPythonPackages", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackages", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync", + "title": "Snippet for the get_python_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package.", + "file": "artifact_registry/get_python_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_python_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::PythonPackage", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetPythonPackage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync", + "title": "Snippet for the import_apt_artifacts call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts.", + "file": "artifact_registry/import_apt_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_apt_artifacts", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ImportAptArtifacts", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync", + "title": "Snippet for the import_yum_artifacts call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts.", + "file": "artifact_registry/import_yum_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_yum_artifacts", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ImportYumArtifacts", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync", + "title": "Snippet for the list_repositories call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories.", + "file": "artifact_registry/list_repositories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_repositories", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListRepositories", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositories", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync", + "title": "Snippet for the get_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository.", + "file": "artifact_registry/get_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Repository", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetRepository", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync", + "title": "Snippet for the create_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository.", + "file": "artifact_registry/create_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateRepository", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync", + "title": "Snippet for the update_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository.", + "file": "artifact_registry/update_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Repository", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateRepository", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync", + "title": "Snippet for the delete_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository.", + "file": "artifact_registry/delete_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteRepository", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync", + "title": "Snippet for the list_packages call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages.", + "file": "artifact_registry/list_packages.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_packages", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListPackages", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync", + "title": "Snippet for the get_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package.", + "file": "artifact_registry/get_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Package", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetPackage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync", + "title": "Snippet for the delete_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package.", + "file": "artifact_registry/delete_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeletePackage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync", + "title": "Snippet for the list_versions call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions.", + "file": "artifact_registry/list_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_versions", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListVersions", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync", + "title": "Snippet for the get_version call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version.", + "file": "artifact_registry/get_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_version", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Version", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetVersion", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync", + "title": "Snippet for the delete_version call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version.", + "file": "artifact_registry/delete_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_version", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteVersion", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync", + "title": "Snippet for the batch_delete_versions call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions.", + "file": "artifact_registry/batch_delete_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_delete_versions", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "BatchDeleteVersions", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersions", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync", + "title": "Snippet for the update_version call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version.", + "file": "artifact_registry/update_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_version", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Version", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateVersion", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersion", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync", + "title": "Snippet for the list_files call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files.", + "file": "artifact_registry/list_files.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_files", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListFiles", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync", + "title": "Snippet for the get_file call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file.", + "file": "artifact_registry/get_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_file", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::File", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetFile", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync", + "title": "Snippet for the delete_file call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file.", + "file": "artifact_registry/delete_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_file", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteFile", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFile", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync", + "title": "Snippet for the update_file call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file.", + "file": "artifact_registry/update_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_file", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::File", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateFile", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFile", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync", + "title": "Snippet for the list_tags call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags.", + "file": "artifact_registry/list_tags.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tags", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListTags", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync", + "title": "Snippet for the get_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag.", + "file": "artifact_registry/get_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetTag", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync", + "title": "Snippet for the create_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag.", + "file": "artifact_registry/create_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateTag", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync", + "title": "Snippet for the update_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag.", + "file": "artifact_registry/update_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateTag", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync", + "title": "Snippet for the delete_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag.", + "file": "artifact_registry/delete_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteTag", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync", + "title": "Snippet for the create_rule call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule.", + "file": "artifact_registry/create_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_rule", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateRule", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRule", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync", + "title": "Snippet for the list_rules call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules.", + "file": "artifact_registry/list_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rules", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListRules", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRules", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync", + "title": "Snippet for the get_rule call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule.", + "file": "artifact_registry/get_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_rule", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetRule", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRule", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync", + "title": "Snippet for the update_rule call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule.", + "file": "artifact_registry/update_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_rule", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateRule", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRule", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync", + "title": "Snippet for the delete_rule call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule.", + "file": "artifact_registry/delete_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_rule", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteRule", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRule", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy.", + "file": "artifact_registry/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy.", + "file": "artifact_registry/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions.", + "file": "artifact_registry/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync", + "title": "Snippet for the get_project_settings call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings.", + "file": "artifact_registry/get_project_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_project_settings", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ProjectSettings", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetProjectSettings", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync", + "title": "Snippet for the update_project_settings call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings.", + "file": "artifact_registry/update_project_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_project_settings", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ProjectSettings", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateProjectSettings", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync", + "title": "Snippet for the get_vpcsc_config call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config.", + "file": "artifact_registry/get_vpcsc_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_vpcsc_config", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetVPCSCConfig", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfig", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync", + "title": "Snippet for the update_vpcsc_config call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config.", + "file": "artifact_registry/update_vpcsc_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_vpcsc_config", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateVPCSCConfig", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfig", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync", + "title": "Snippet for the update_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package.", + "file": "artifact_registry/update_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Package", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdatePackage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync", + "title": "Snippet for the list_attachments call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments.", + "file": "artifact_registry/list_attachments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_attachments", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListAttachments", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachments", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync", + "title": "Snippet for the get_attachment call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment.", + "file": "artifact_registry/get_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_attachment", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Attachment", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetAttachment", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachment", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync", + "title": "Snippet for the create_attachment call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment.", + "file": "artifact_registry/create_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_attachment", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateAttachment", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachment", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync", + "title": "Snippet for the delete_attachment call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment.", + "file": "artifact_registry/delete_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_attachment", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteAttachment", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachment", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync", + "title": "Snippet for the export_artifact call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact.", + "file": "artifact_registry/export_artifact.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_artifact", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ExportArtifact", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifact", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "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-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb new file mode 100644 index 000000000000..4fabdd26d3a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/devtools/artifactregistry/v1/service_pb" +require "google/devtools/artifactregistry/v1/service_services_pb" +require "google/cloud/artifact_registry/v1/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb new file mode 100644 index 000000000000..ee6f6455b726 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb @@ -0,0 +1,223 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/artifact_registry/v1/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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_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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.attachment_path project: "value0", location: "value1", repository: "value2", attachment: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/attachments/value3", path + end + end + + def test_docker_image_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.docker_image_path project: "value0", location: "value1", repository: "value2", docker_image: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/dockerImages/value3", path + end + end + + def test_file_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.file_path project: "value0", location: "value1", repository: "value2", file: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/files/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::ArtifactRegistry::V1::ArtifactRegistry::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_maven_artifact_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.maven_artifact_path project: "value0", location: "value1", repository: "value2", maven_artifact: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/mavenArtifacts/value3", path + end + end + + def test_npm_package_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.npm_package_path project: "value0", location: "value1", repository: "value2", npm_package: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/npmPackages/value3", path + end + end + + def test_package_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.package_path project: "value0", location: "value1", repository: "value2", package: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3", path + end + end + + def test_project_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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_settings_path project: "value0" + assert_equal "projects/value0/projectSettings", path + end + end + + def test_python_package_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.python_package_path project: "value0", location: "value1", repository: "value2", python_package: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/pythonPackages/value3", 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::ArtifactRegistry::V1::ArtifactRegistry::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_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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rule_path project: "value0", location: "value1", repository: "value2", rule: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/rules/value3", path + end + end + + def test_secret_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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 + + def test_tag_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tag_path project: "value0", location: "value1", repository: "value2", package: "value3", tag: "value4" + assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/tags/value4", path + end + end + + def test_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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.version_path project: "value0", location: "value1", repository: "value2", package: "value3", version: "value4" + assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/versions/value4", path + end + end + + def test_vpcsc_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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.vpcsc_config_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/vpcscConfig", path + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb new file mode 100644 index 000000000000..2a53db24bba7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb @@ -0,0 +1,2861 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/devtools/artifactregistry/v1/service_pb" +require "google/cloud/artifact_registry/v1/artifact_registry/rest" + + +class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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_docker_images + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.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" + order_by = "hello world" + + list_docker_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_docker_images_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_docker_images_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_docker_images parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_docker_images ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_docker_images(::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_docker_images_client_stub.call_count + end + end + end + + def test_get_docker_image + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_docker_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_docker_image_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_docker_image_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_docker_image({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_docker_image name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_docker_image ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_docker_image({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_docker_image(::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_docker_image_client_stub.call_count + end + end + end + + def test_list_maven_artifacts + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.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_maven_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_maven_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_maven_artifacts_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_maven_artifacts({ 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_maven_artifacts 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_maven_artifacts ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.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_maven_artifacts({ 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_maven_artifacts(::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.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_maven_artifacts_client_stub.call_count + end + end + end + + def test_get_maven_artifact + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_maven_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_maven_artifact_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_maven_artifact_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_maven_artifact({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_maven_artifact name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_maven_artifact ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_maven_artifact({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_maven_artifact(::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_maven_artifact_client_stub.call_count + end + end + end + + def test_list_npm_packages + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.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_npm_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_npm_packages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_npm_packages_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_npm_packages({ 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_npm_packages 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_npm_packages ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.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_npm_packages({ 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_npm_packages(::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.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_npm_packages_client_stub.call_count + end + end + end + + def test_get_npm_package + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_npm_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_npm_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_npm_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_npm_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_npm_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_npm_package ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_npm_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_npm_package(::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_npm_package_client_stub.call_count + end + end + end + + def test_list_python_packages + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.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_python_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_python_packages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_python_packages_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_python_packages({ 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_python_packages 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_python_packages ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.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_python_packages({ 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_python_packages(::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.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_python_packages_client_stub.call_count + end + end + end + + def test_get_python_package + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_python_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_python_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_python_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_python_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_python_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_python_package ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_python_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_python_package(::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_python_package_client_stub.call_count + end + end + end + + def test_import_apt_artifacts + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_apt_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_apt_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_apt_artifacts_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.import_apt_artifacts gcs_source: gcs_source, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_apt_artifacts_client_stub.call_count + end + end + end + + def test_import_yum_artifacts + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_yum_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_yum_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_yum_artifacts_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.import_yum_artifacts gcs_source: gcs_source, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_yum_artifacts_client_stub.call_count + end + end + end + + def test_list_repositories + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::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" + order_by = "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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_repositories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_repositories_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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, order_by: order_by }) 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, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_repositories ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.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_repositories({ 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_repositories(::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.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_repositories_client_stub.call_count + end + end + end + + def test_get_repository + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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_id = "hello world" + repository = {} + + 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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_repository parent: parent, repository_id: repository_id, repository: repository do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_repository ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_repository(::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), 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::Cloud::ArtifactRegistry::V1::Repository.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + repository = {} + update_mask = {} + + 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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_repository({ repository: repository, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_repository repository: repository, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_repository ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_repository({ repository: repository, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_repository(::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), 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" + + 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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_repository({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_repository name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_repository ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_repository({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_repository(::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name), 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_packages + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.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_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_packages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_packages_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_packages({ 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_packages 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_packages ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.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_packages({ 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_packages(::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.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_packages_client_stub.call_count + end + end + end + + def test_get_package + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Package.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_package ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_package(::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_package_client_stub.call_count + end + end + end + + def test_delete_package + # Create test objects. + 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_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_package ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_package(::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_package_client_stub.call_count + end + end + end + + def test_list_versions + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + order_by = "hello world" + filter = "hello world" + + list_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_versions ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_versions(::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_versions_client_stub.call_count + end + end + end + + def test_get_version + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Version.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + + get_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_version_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_version({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_version name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_version ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_version({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_version(::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_count + end + end + end + + def test_delete_version + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_version({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_version name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_version ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_version({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_version(::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_version_client_stub.call_count + end + end + end + + def test_batch_delete_versions + # Create test objects. + 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"] + validate_only = true + + batch_delete_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_batch_delete_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_delete_versions_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_delete_versions parent: parent, names: names, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_delete_versions ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_delete_versions(::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_delete_versions_client_stub.call_count + end + end + end + + def test_update_version + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Version.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + version = {} + update_mask = {} + + update_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_version_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_version({ version: version, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_version version: version, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_version ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_version({ version: version, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_version(::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_version_client_stub.call_count + end + end + end + + def test_list_files + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.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" + order_by = "hello world" + + list_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_files_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_files_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_files parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_files ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_files(::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_files_client_stub.call_count + end + end + end + + def test_get_file + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::File.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_file_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_file({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_file name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_file ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_file({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_file(::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_file_client_stub.call_count + end + end + end + + def test_delete_file + # Create test objects. + 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_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_file_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_file({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_file name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_file ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_file({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_file(::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_file_client_stub.call_count + end + end + end + + def test_update_file + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::File.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + file = {} + update_mask = {} + + update_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_file_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_file({ file: file, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_file file: file, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_file ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_file({ file: file, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_file(::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_file_client_stub.call_count + end + end + end + + def test_list_tags + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.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_tags_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_tags_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tags_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_tags({ 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_tags 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_tags ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.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_tags({ 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_tags(::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.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_tags_client_stub.call_count + end + end + end + + def test_get_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_tag({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_tag name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_tag ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_tag({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_tag(::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_tag_client_stub.call_count + end + end + end + + def test_create_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tag_id = "hello world" + tag = {} + + create_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_tag parent: parent, tag_id: tag_id, tag: tag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_tag ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_tag(::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_tag_client_stub.call_count + end + end + end + + def test_update_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + tag = {} + update_mask = {} + + update_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_tag({ tag: tag, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_tag tag: tag, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_tag ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_tag({ tag: tag, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_tag(::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_tag_client_stub.call_count + end + end + end + + def test_delete_tag + # 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_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_tag({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_tag name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_tag ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_tag({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_tag(::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_tag_client_stub.call_count + end + end + end + + def test_create_rule + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rule_id = "hello world" + rule = {} + + create_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_rule_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_rule({ parent: parent, rule_id: rule_id, rule: rule }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_rule parent: parent, rule_id: rule_id, rule: rule do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_rule ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_rule({ parent: parent, rule_id: rule_id, rule: rule }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_rule(::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_rule_client_stub.call_count + end + end + end + + def test_list_rules + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_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_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_rules ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.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_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_rules(::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.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_rules_client_stub.call_count + end + end + end + + def test_get_rule + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_rule_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_rule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_rule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_rule ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_rule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_rule(::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_rule_client_stub.call_count + end + end + end + + def test_update_rule + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rule = {} + update_mask = {} + + update_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_rule_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_rule({ rule: rule, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_rule rule: rule, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_rule ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_rule({ rule: rule, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_rule(::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_rule_client_stub.call_count + end + end + end + + def test_delete_rule + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_rule_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_rule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_rule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_rule ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_rule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_rule(::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_rule_client_stub.call_count + end + end + end + + def test_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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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_project_settings + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_project_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_project_settings_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_project_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_project_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_project_settings ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_project_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_project_settings(::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_project_settings_client_stub.call_count + end + end + end + + def test_update_project_settings + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + project_settings = {} + update_mask = {} + + update_project_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_project_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_project_settings_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_project_settings project_settings: project_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_project_settings ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_project_settings({ project_settings: project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings_client_stub.call_count + end + end + end + + def test_get_vpcsc_config + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_vpcsc_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_vpcsc_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_vpcsc_config_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_vpcsc_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_vpcsc_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_vpcsc_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_vpcsc_config_client_stub.call_count + end + end + end + + def test_update_vpcsc_config + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + vpcsc_config = {} + update_mask = {} + + update_vpcsc_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_vpcsc_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_vpcsc_config_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_vpcsc_config vpcsc_config: vpcsc_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_vpcsc_config({ vpcsc_config: vpcsc_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_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_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_vpcsc_config_client_stub.call_count + end + end + end + + def test_update_package + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Package.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + package = {} + update_mask = {} + + update_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_package({ package: package, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_package package: package, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_package ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_package({ package: package, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_package(::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_package_client_stub.call_count + end + end + end + + def test_list_attachments + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.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_attachments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_attachments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_attachments_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_attachments({ 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_attachments 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_attachments ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.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_attachments({ 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_attachments(::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.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_attachments_client_stub.call_count + end + end + end + + def test_get_attachment + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Attachment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_attachment_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_attachment ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_attachment(::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_attachment_client_stub.call_count + end + end + end + + def test_create_attachment + # Create test objects. + 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" + attachment_id = "hello world" + attachment = {} + + create_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_attachment_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_attachment parent: parent, attachment_id: attachment_id, attachment: attachment do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_attachment ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_attachment(::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_attachment_client_stub.call_count + end + end + end + + def test_delete_attachment + # Create test objects. + 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_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_attachment_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_attachment ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_attachment(::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_attachment_client_stub.call_count + end + end + end + + def test_export_artifact + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + source_version = "hello world" + gcs_path = "hello world" + repository = "hello world" + + export_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_export_artifact_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_artifact_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.export_artifact source_version: source_version, gcs_path: gcs_path, repository: repository do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.export_artifact ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.export_artifact(::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_artifact_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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb new file mode 100644 index 000000000000..ddbb91ec308d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb @@ -0,0 +1,3256 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/devtools/artifactregistry/v1/service_pb" +require "google/cloud/artifact_registry/v1/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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_docker_images + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + + list_docker_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_docker_images, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, 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["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_docker_images_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, 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_docker_images parent: parent, page_size: page_size, page_token: page_token, 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_docker_images ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, 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_docker_images({ parent: parent, page_size: page_size, page_token: page_token, 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_docker_images(::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, 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_docker_images_client_stub.call_rpc_count + end + end + + def test_get_docker_image + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_docker_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_docker_image, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_docker_image_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_docker_image({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_docker_image name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_docker_image ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_docker_image({ 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_docker_image(::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(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_docker_image_client_stub.call_rpc_count + end + end + + def test_list_maven_artifacts + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_maven_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_maven_artifacts, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, 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_maven_artifacts_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_maven_artifacts({ parent: parent, page_size: page_size, page_token: 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_maven_artifacts parent: parent, page_size: page_size, page_token: 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_maven_artifacts ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.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_maven_artifacts({ 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_maven_artifacts(::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.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_maven_artifacts_client_stub.call_rpc_count + end + end + + def test_get_maven_artifact + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_maven_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_maven_artifact, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_maven_artifact_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_maven_artifact({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_maven_artifact name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_maven_artifact ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_maven_artifact({ 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_maven_artifact(::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(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_maven_artifact_client_stub.call_rpc_count + end + end + + def test_list_npm_packages + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_npm_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_npm_packages, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, 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_npm_packages_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_npm_packages({ parent: parent, page_size: page_size, page_token: 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_npm_packages parent: parent, page_size: page_size, page_token: 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_npm_packages ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.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_npm_packages({ 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_npm_packages(::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.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_npm_packages_client_stub.call_rpc_count + end + end + + def test_get_npm_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_npm_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_npm_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_npm_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_npm_package({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_npm_package name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_npm_package ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_npm_package({ 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_npm_package(::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(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_npm_package_client_stub.call_rpc_count + end + end + + def test_list_python_packages + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_python_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_python_packages, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, 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_python_packages_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_python_packages({ parent: parent, page_size: page_size, page_token: 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_python_packages parent: parent, page_size: page_size, page_token: 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_python_packages ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.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_python_packages({ 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_python_packages(::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.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_python_packages_client_stub.call_rpc_count + end + end + + def test_get_python_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_python_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_python_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_python_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_python_package({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_python_package name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_python_package ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_python_package({ 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_python_package(::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(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_python_package_client_stub.call_rpc_count + end + end + + def test_import_apt_artifacts + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_apt_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_apt_artifacts, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource), request["gcs_source"] + assert_equal :gcs_source, request.source + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_apt_artifacts_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.import_apt_artifacts({ gcs_source: gcs_source, 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.import_apt_artifacts gcs_source: gcs_source, 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.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, 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.import_apt_artifacts({ gcs_source: gcs_source, 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.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, 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, import_apt_artifacts_client_stub.call_rpc_count + end + end + + def test_import_yum_artifacts + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_yum_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_yum_artifacts, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource), request["gcs_source"] + assert_equal :gcs_source, request.source + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_yum_artifacts_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.import_yum_artifacts({ gcs_source: gcs_source, 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.import_yum_artifacts gcs_source: gcs_source, 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.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, 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.import_yum_artifacts({ gcs_source: gcs_source, 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.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, 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, import_yum_artifacts_client_stub.call_rpc_count + end + end + + def test_list_repositories + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::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" + order_by = "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::ArtifactRegistry::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["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_repositories_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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, 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_repositories 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_repositories ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.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_repositories({ 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_repositories(::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.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_repositories_client_stub.call_rpc_count + end + end + + def test_get_repository + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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_id = "hello world" + repository = {} + + create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["repository_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Repository), request["repository"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |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_id: repository_id, repository: repository do |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::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |response, operation| + 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_id: repository_id, repository: repository }, grpc_options) do |response, operation| + 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::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), grpc_options) do |response, operation| + assert_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::Cloud::ArtifactRegistry::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. + repository = {} + update_mask = {} + + update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Repository), request["repository"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_repository({ repository: repository, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_repository repository: repository, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_repository ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, 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_repository({ repository: repository, 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_repository(::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, 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_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" + + delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_repository({ 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_repository 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_repository ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.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_repository({ 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_repository(::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.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_repository_client_stub.call_rpc_count + end + end + + def test_list_packages + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_packages, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, 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_packages_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_packages({ 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_packages 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_packages ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.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_packages({ 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_packages(::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.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_packages_client_stub.call_rpc_count + end + end + + def test_get_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Package.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_package({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_package name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_package ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_package({ 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_package(::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(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_package_client_stub.call_rpc_count + end + end + + def test_delete_package + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_package({ 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_package 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_package ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.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_package({ 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_package(::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.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_package_client_stub.call_rpc_count + end + end + + def test_list_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + order_by = "hello world" + filter = "hello world" + + list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_versions, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_versions_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, 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_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, 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_versions ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, 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_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, 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_versions(::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, 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_versions_client_stub.call_rpc_count + end + end + + def test_get_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Version.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + + get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_version, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_version_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_version({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_version name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_version ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_version({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_version(::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_rpc_count + end + end + + def test_delete_version + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_version, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_version_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_version({ name: name, 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_version name: name, 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_version ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, 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_version({ name: name, 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_version(::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, 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_version_client_stub.call_rpc_count + end + end + + def test_batch_delete_versions + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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"] + validate_only = true + + batch_delete_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_delete_versions, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_delete_versions_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_delete_versions({ parent: parent, names: names, 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.batch_delete_versions parent: parent, names: names, 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.batch_delete_versions ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, 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.batch_delete_versions({ parent: parent, names: names, 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.batch_delete_versions(::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, 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, batch_delete_versions_client_stub.call_rpc_count + end + end + + def test_update_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Version.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + version = {} + update_mask = {} + + update_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_version, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Version), request["version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_version_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_version({ version: version, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_version version: version, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_version ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, 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_version({ version: version, 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_version(::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, 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_version_client_stub.call_rpc_count + end + end + + def test_list_files + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + + list_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_files, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, 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 "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_files_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_files parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_files ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_files(::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_files_client_stub.call_rpc_count + end + end + + def test_get_file + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::File.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_file, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_file_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_file({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_file name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_file ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_file({ 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_file(::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(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_file_client_stub.call_rpc_count + end + end + + def test_delete_file + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_file, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_file_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_file({ 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_file 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_file ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.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_file({ 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_file(::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.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_file_client_stub.call_rpc_count + end + end + + def test_update_file + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::File.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + file = {} + update_mask = {} + + update_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_file, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::File), request["file"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_file_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_file({ file: file, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_file file: file, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_file ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, 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_file({ file: file, 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_file(::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, 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_file_client_stub.call_rpc_count + end + end + + def test_list_tags + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_tags_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tags, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, 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_tags_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_tags({ 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_tags 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_tags ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.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_tags({ 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_tags(::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.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_tags_client_stub.call_rpc_count + end + end + + def test_get_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_tag({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_tag name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_tag ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_tag({ 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_tag(::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(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_tag_client_stub.call_rpc_count + end + end + + def test_create_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tag_id = "hello world" + tag = {} + + create_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["tag_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Tag), request["tag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_tag parent: parent, tag_id: tag_id, tag: tag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_tag ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_tag(::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_tag_client_stub.call_rpc_count + end + end + + def test_update_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + tag = {} + update_mask = {} + + update_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Tag), request["tag"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_tag({ tag: tag, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_tag tag: tag, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_tag ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, 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_tag({ tag: tag, 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_tag(::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, 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_tag_client_stub.call_rpc_count + end + end + + def test_delete_tag + # 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_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_tag({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_tag name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_tag ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_tag({ 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_tag(::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(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_tag_client_stub.call_rpc_count + end + end + + def test_create_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rule_id = "hello world" + rule = {} + + create_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_rule, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["rule_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Rule), request["rule"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_rule_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_rule({ parent: parent, rule_id: rule_id, rule: rule }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_rule parent: parent, rule_id: rule_id, rule: rule do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_rule ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_rule({ parent: parent, rule_id: rule_id, rule: rule }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_rule(::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_rule_client_stub.call_rpc_count + end + end + + def test_list_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rules, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, 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_rules_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_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_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_rules ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.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_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_rules(::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.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_rules_client_stub.call_rpc_count + end + end + + def test_get_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_rule, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_rule_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_rule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_rule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_rule ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_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_rule(::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_rule_client_stub.call_rpc_count + end + end + + def test_update_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + rule = {} + update_mask = {} + + update_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_rule, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Rule), request["rule"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_rule_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_rule({ rule: rule, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_rule rule: rule, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_rule ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_rule({ rule: rule, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_rule(::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_rule_client_stub.call_rpc_count + end + end + + def test_delete_rule + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_rule, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_rule_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_rule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_rule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_rule ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_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.delete_rule(::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(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_rule_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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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_project_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_project_settings, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_project_settings_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_project_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_project_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_project_settings ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_project_settings_client_stub.call_rpc_count + end + end + + def test_update_project_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + project_settings = {} + update_mask = {} + + update_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_project_settings, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings), request["project_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_project_settings_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_project_settings project_settings: project_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_project_settings ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings({ project_settings: project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings_client_stub.call_rpc_count + end + end + + def test_get_vpcsc_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_vpcsc_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_vpcsc_config, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_vpcsc_config_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_vpcsc_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_vpcsc_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_vpcsc_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_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(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_vpcsc_config_client_stub.call_rpc_count + end + end + + def test_update_vpcsc_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + vpcsc_config = {} + update_mask = {} + + update_vpcsc_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_vpcsc_config, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig), request["vpcsc_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_vpcsc_config_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_vpcsc_config vpcsc_config: vpcsc_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_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_vpcsc_config({ vpcsc_config: vpcsc_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_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_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_vpcsc_config_client_stub.call_rpc_count + end + end + + def test_update_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Package.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + package = {} + update_mask = {} + + update_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Package), request["package"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_package({ package: package, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_package package: package, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_package ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, 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_package({ package: package, 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_package(::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, 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_package_client_stub.call_rpc_count + end + end + + def test_list_attachments + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_attachments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_attachments, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, 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_attachments_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_attachments({ 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_attachments 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_attachments ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.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_attachments({ 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_attachments(::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.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_attachments_client_stub.call_rpc_count + end + end + + def test_get_attachment + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Attachment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_attachment, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_attachment_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_attachment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_attachment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_attachment ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_attachment({ 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_attachment(::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(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_attachment_client_stub.call_rpc_count + end + end + + def test_create_attachment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + attachment_id = "hello world" + attachment = {} + + create_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_attachment, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["attachment_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Attachment), request["attachment"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_attachment_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }) do |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_attachment parent: parent, attachment_id: attachment_id, attachment: attachment do |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_attachment ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment) do |response, operation| + 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_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }, grpc_options) do |response, operation| + 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_attachment(::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment), grpc_options) do |response, operation| + assert_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_attachment_client_stub.call_rpc_count + end + end + + def test_delete_attachment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_attachment, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_attachment_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_attachment({ 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_attachment 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_attachment ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.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_attachment({ 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_attachment(::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.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_attachment_client_stub.call_rpc_count + end + end + + def test_export_artifact + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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_version = "hello world" + gcs_path = "hello world" + repository = "hello world" + + export_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_artifact, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, request + assert_equal "hello world", request["source_version"] + assert_equal :source_version, request.source_artifact + assert_equal "hello world", request["gcs_path"] + assert_equal :gcs_path, request.destination + assert_equal "hello world", request["repository"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_artifact_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }) do |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.export_artifact source_version: source_version, gcs_path: gcs_path, repository: repository do |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.export_artifact ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository) do |response, operation| + 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.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }, grpc_options) do |response, operation| + 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.export_artifact(::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_artifact_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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/.gitignore b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/.repo-metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json new file mode 100644 index 000000000000..7910a7e9b677 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "artifactregistry.googleapis.com", + "api_shortname": "artifactregistry", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest", + "distribution_name": "google-cloud-artifact_registry-v1beta2", + "is_cloud": true, + "language": "ruby", + "name": "artifactregistry", + "name_pretty": "Artifact Registry V1beta2 API", + "product_documentation": "https://cloud.google.com/artifact-registry/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details.", + "ruby-cloud-env-prefix": "ARTIFACT_REGISTRY", + "ruby-cloud-product-url": "https://cloud.google.com/artifact-registry/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml new file mode 100644 index 000000000000..6d12e8a99a67 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-artifact_registry-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-artifact_registry-v1beta2.rb" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/.yardopts b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts new file mode 100644 index 000000000000..577e906ef894 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Artifact Registry 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-artifact_registry-v1beta2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md new file mode 100644 index 000000000000..658611b9d9e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-artifact_registry-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-artifact_registry-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/artifact_registry/v1beta2" + +client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/artifact_registry/v1beta2" + +::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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-artifact_registry-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/artifact_registry/v1beta2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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-artifact_registry-v1beta2/CHANGELOG.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/LICENSE.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md new file mode 100644 index 000000000000..c83c61757d75 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Artifact Registry V1beta2 API + +Store and manage build artifacts in a scalable and integrated service built on Google infrastructure. + +Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Artifact Registry V1beta2 API. Most users should consider using +the main client gem, +[google-cloud-artifact_registry](https://rubygems.org/gems/google-cloud-artifact_registry). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-artifact_registry-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/artifactregistry.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/artifact_registry/v1beta2" + +client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new +request = ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new # (request fields as keyword arguments...) +response = client.import_apt_artifacts request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/artifact-registry/) +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/artifact_registry/v1beta2" +require "logger" + +client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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-artifact_registry`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-artifact_registry-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-artifact_registry`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-artifact_registry-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-artifact_registry-v1beta2/Rakefile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile new file mode 100644 index 000000000000..1d749b6abb41 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["ARTIFACT_REGISTRY_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["ARTIFACT_REGISTRY_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 ARTIFACT_REGISTRY_TEST_PROJECT=test123 ARTIFACT_REGISTRY_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["ARTIFACT_REGISTRY_PROJECT"] = project + ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] = project + ENV["ARTIFACT_REGISTRY_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-artifact_registry-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-artifact_registry-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-artifact_registry-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-artifact_registry-v1beta2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-artifact_registry-v1beta2" + header "google-cloud-artifact_registry-v1beta2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-artifact_registry-v1beta2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-artifact_registry-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-artifact_registry-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-artifact_registry-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-artifact_registry-v1beta2/gapic_metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json new file mode 100644 index 000000000000..478bacfc4ddd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json @@ -0,0 +1,143 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.devtools.artifactregistry.v1beta2", + "libraryPackage": "::Google::Cloud::ArtifactRegistry::V1beta2", + "services": { + "ArtifactRegistry": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client", + "rpcs": { + "ImportAptArtifacts": { + "methods": [ + "import_apt_artifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "import_yum_artifacts" + ] + }, + "ListRepositories": { + "methods": [ + "list_repositories" + ] + }, + "GetRepository": { + "methods": [ + "get_repository" + ] + }, + "CreateRepository": { + "methods": [ + "create_repository" + ] + }, + "UpdateRepository": { + "methods": [ + "update_repository" + ] + }, + "DeleteRepository": { + "methods": [ + "delete_repository" + ] + }, + "ListPackages": { + "methods": [ + "list_packages" + ] + }, + "GetPackage": { + "methods": [ + "get_package" + ] + }, + "DeletePackage": { + "methods": [ + "delete_package" + ] + }, + "ListVersions": { + "methods": [ + "list_versions" + ] + }, + "GetVersion": { + "methods": [ + "get_version" + ] + }, + "DeleteVersion": { + "methods": [ + "delete_version" + ] + }, + "ListFiles": { + "methods": [ + "list_files" + ] + }, + "GetFile": { + "methods": [ + "get_file" + ] + }, + "ListTags": { + "methods": [ + "list_tags" + ] + }, + "GetTag": { + "methods": [ + "get_tag" + ] + }, + "CreateTag": { + "methods": [ + "create_tag" + ] + }, + "UpdateTag": { + "methods": [ + "update_tag" + ] + }, + "DeleteTag": { + "methods": [ + "delete_tag" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "GetProjectSettings": { + "methods": [ + "get_project_settings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "update_project_settings" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec new file mode 100644 index 000000000000..d0cda2334ff6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/artifact_registry/v1beta2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-artifact_registry-v1beta2" + gem.version = Google::Cloud::ArtifactRegistry::V1beta2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details." + gem.summary = "Store and manage build artifacts in a scalable and integrated service built on Google 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" + 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-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb new file mode 100644 index 000000000000..42773d56b713 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-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/artifact_registry/v1beta2" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb new file mode 100644 index 000000000000..5a48465dc9de --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/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/artifact_registry/v1beta2/artifact_registry" +require "google/cloud/artifact_registry/v1beta2/version" + +module Google + module Cloud + module ArtifactRegistry + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/artifact_registry/v1beta2" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/artifact_registry/v1beta2" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + module V1beta2 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta2", "_helpers.rb" +require "google/cloud/artifact_registry/v1beta2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb new file mode 100644 index 000000000000..de5f1fa1ee86 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/artifact_registry/v1beta2/version" + +require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/paths" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/operations" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/client" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + ## + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/artifact_registry/v1beta2/artifact_registry" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + module ArtifactRegistry + end + end + end + end +end + +helper_path = ::File.join __dir__, "artifact_registry", "helpers.rb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb new file mode 100644 index 000000000000..a334974e17a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb @@ -0,0 +1,3004 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/devtools/artifactregistry/v1beta2/service_pb" +require "google/cloud/location" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + ## + # Client for the ArtifactRegistry service. + # + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :artifact_registry_stub + + ## + # Configure the ArtifactRegistry Client class. + # + # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ArtifactRegistry clients + # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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", "ArtifactRegistry", "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_repositories.timeout = 30.0 + default_config.rpcs.list_repositories.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_repository.timeout = 30.0 + default_config.rpcs.get_repository.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_repository.timeout = 30.0 + + default_config.rpcs.update_repository.timeout = 30.0 + + default_config.rpcs.delete_repository.timeout = 30.0 + default_config.rpcs.delete_repository.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_packages.timeout = 30.0 + default_config.rpcs.list_packages.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_package.timeout = 30.0 + default_config.rpcs.get_package.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_package.timeout = 30.0 + default_config.rpcs.delete_package.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_versions.timeout = 30.0 + default_config.rpcs.list_versions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_version.timeout = 30.0 + default_config.rpcs.get_version.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_version.timeout = 30.0 + default_config.rpcs.delete_version.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_files.timeout = 30.0 + default_config.rpcs.list_files.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_file.timeout = 30.0 + default_config.rpcs.get_file.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tags.timeout = 30.0 + default_config.rpcs.list_tags.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_tag.timeout = 30.0 + default_config.rpcs.get_tag.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_tag.timeout = 30.0 + + default_config.rpcs.update_tag.timeout = 30.0 + + default_config.rpcs.delete_tag.timeout = 30.0 + default_config.rpcs.delete_tag.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy.timeout = 30.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.test_iam_permissions.timeout = 30.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ArtifactRegistry 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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 + @artifact_registry_stub.universe_domain + end + + ## + # Create a new ArtifactRegistry client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ArtifactRegistry client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/devtools/artifactregistry/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 + + @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 + + @artifact_registry_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 + ) + + @artifact_registry_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 = @artifact_registry_stub.endpoint + config.universe_domain = @artifact_registry_stub.universe_domain + config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @artifact_registry_stub.logger + end + + # Service calls + + ## + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_apt_artifacts(request, options = nil) + # Pass arguments to `import_apt_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_apt_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new + # + # # Call the import_apt_artifacts method. + # result = client.import_apt_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_apt_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_apt_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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.import_apt_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_apt_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_yum_artifacts(request, options = nil) + # Pass arguments to `import_yum_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_yum_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new + # + # # Call the import_yum_artifacts method. + # result = client.import_yum_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_yum_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_yum_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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.import_yum_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_yum_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose repositories will be listed. + # @param page_size [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 + + @artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_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 a repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_repository(name: nil) + # Pass arguments to `get_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 + + @artifact_registry_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 repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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_id: nil, repository: 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 name of the parent resource where the repository will be created. + # @param repository_id [::String] + # The repository id to use for this repository. + # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] + # The repository to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 + + @artifact_registry_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 a repository. + # + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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(repository: nil, update_mask: 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 repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] + # The repository that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new + # + # # Call the update_repository method. + # result = client.update_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. + # p result + # + def update_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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.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 + + @artifact_registry_stub.call_rpc :update_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 + + ## + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 + + @artifact_registry_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 packages. + # + # @overload list_packages(request, options = nil) + # Pass arguments to `list_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose packages will be listed. + # @param page_size [::Integer] + # The maximum number of packages to return. + # Maximum page size is 10,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new + # + # # Call the list_packages method. + # result = client.list_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. + # p item + # end + # + def list_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_packages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, 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 package. + # + # @overload get_package(request, options = nil) + # Pass arguments to `get_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_package(name: nil) + # Pass arguments to `get_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the package to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new + # + # # Call the get_package method. + # result = client.get_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. + # p result + # + def get_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_package, request, 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 package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + # + # @overload delete_package(request, options = nil) + # Pass arguments to `delete_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_package(name: nil) + # Pass arguments to `delete_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the package to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new + # + # # Call the delete_package method. + # result = client.delete_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest + + # Converts hash and nil to 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_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 versions. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil) + # Pass arguments to `list_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] + # The name of the parent resource whose versions will be listed. + # @param page_size [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + # @param order_by [::String] + # Optional. The field to order the results by. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_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::ArtifactRegistry::V1beta2::Version. + # p item + # end + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_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::ArtifactRegistry::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_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_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 a version + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_version(name: nil, view: nil) + # Pass arguments to `get_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] + # The name of the version to retrieve. + # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_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::ArtifactRegistry::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_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_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 + + ## + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_version(name: nil, force: nil) + # Pass arguments to `delete_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] + # The name of the version to delete. + # @param force [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest + + # Converts hash and nil to 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_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::ArtifactRegistry::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_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 files. + # + # @overload list_files(request, options = nil) + # Pass arguments to `list_files` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the repository whose files will be listed. For example: + # "projects/p1/locations/us-central1/repositories/repo1 + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `owner` + # + # An example of using a filter: + # + # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + # ID starting with "a/b/". + # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + # Files owned by the version `1.0` in package `pkg1`. + # @param page_size [::Integer] + # The maximum number of files to return. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new + # + # # Call the list_files method. + # result = client.list_files request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. + # p item + # end + # + def list_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_files.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, 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 file. + # + # @overload get_file(request, options = nil) + # Pass arguments to `get_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_file(name: nil) + # Pass arguments to `get_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the file to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new + # + # # Call the get_file method. + # result = client.get_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. + # p result + # + def get_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_file, request, 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 tags. + # + # @overload list_tags(request, options = nil) + # Pass arguments to `list_tags` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tags` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose tags will be listed. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `version` + # + # An example of using a filter: + # + # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + # --> Tags that are applied to the version `1.0` in package `pkg1`. + # @param page_size [::Integer] + # The maximum number of tags to return. Maximum page size is 10,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new + # + # # Call the list_tags method. + # result = client.list_tags request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p item + # end + # + def list_tags request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tags.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_tags.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tags.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, 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 tag. + # + # @overload get_tag(request, options = nil) + # Pass arguments to `get_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_tag(name: nil) + # Pass arguments to `get_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new + # + # # Call the get_tag method. + # result = client.get_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def get_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_tag, request, 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 tag. + # + # @overload create_tag(request, options = nil) + # Pass arguments to `create_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_tag(parent: nil, tag_id: nil, tag: nil) + # Pass arguments to `create_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource where the tag will be created. + # @param tag_id [::String] + # The tag id to use for this repository. + # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] + # The tag to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new + # + # # Call the create_tag method. + # result = client.create_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def create_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest + + # Converts hash and nil to 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :create_tag, request, 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 tag. + # + # @overload update_tag(request, options = nil) + # Pass arguments to `update_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_tag(tag: nil, update_mask: nil) + # Pass arguments to `update_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] + # The tag that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new + # + # # Call the update_tag method. + # result = client.update_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def update_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest + + # Converts hash and nil to 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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.tag&.name + header_params["tag.name"] = request.tag.name + end + + request_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_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_tag, request, 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 tag. + # + # @overload delete_tag(request, options = nil) + # Pass arguments to `delete_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_tag(name: nil) + # Pass arguments to `delete_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag 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/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new + # + # # Call the delete_tag method. + # result = client.delete_tag request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest + + # Converts hash and nil to 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_tag, request, 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 IAM policy for a given 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/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 + + @artifact_registry_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 IAM policy for a given 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/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 + + @artifact_registry_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 + + ## + # Tests if the caller has a list of permissions on a resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 + + @artifact_registry_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 + + ## + # Retrieves the Settings for the Project. + # + # @overload get_project_settings(request, options = nil) + # Pass arguments to `get_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_project_settings(name: nil) + # Pass arguments to `get_project_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. The name of the projectSettings resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new + # + # # Call the get_project_settings method. + # result = client.get_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + # p result + # + def get_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_project_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::ArtifactRegistry::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_project_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_project_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 Settings for the Project. + # + # @overload update_project_settings(request, options = nil) + # Pass arguments to `update_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_project_settings(project_settings: nil, update_mask: nil) + # Pass arguments to `update_project_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 project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash] + # The project settings. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new + # + # # Call the update_project_settings method. + # result = client.update_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + # p result + # + def update_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_project_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::ArtifactRegistry::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.project_settings&.name + header_params["project_settings.name"] = request.project_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_project_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_project_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 + + ## + # Configuration class for the ArtifactRegistry API. + # + # This class represents the configuration for ArtifactRegistry, + # providing control 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::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # import_apt_artifacts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.import_apt_artifacts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.import_apt_artifacts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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 = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::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 ArtifactRegistry API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `import_apt_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_apt_artifacts + ## + # RPC-specific configuration for `import_yum_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_yum_artifacts + ## + # 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_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_packages + ## + # RPC-specific configuration for `get_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_package + ## + # RPC-specific configuration for `delete_package` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_package + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + ## + # RPC-specific configuration for `list_files` + # @return [::Gapic::Config::Method] + # + attr_reader :list_files + ## + # RPC-specific configuration for `get_file` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file + ## + # RPC-specific configuration for `list_tags` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tags + ## + # RPC-specific configuration for `get_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tag + ## + # RPC-specific configuration for `create_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tag + ## + # RPC-specific configuration for `update_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tag + ## + # RPC-specific configuration for `delete_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tag + ## + # 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_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_settings + ## + # RPC-specific configuration for `update_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_settings + + # @private + def initialize parent_rpcs = nil + import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts + @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config + import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts + @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_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_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages + @list_packages = ::Gapic::Config::Method.new list_packages_config + get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package + @get_package = ::Gapic::Config::Method.new get_package_config + delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package + @delete_package = ::Gapic::Config::Method.new delete_package_config + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files + @list_files = ::Gapic::Config::Method.new list_files_config + get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file + @get_file = ::Gapic::Config::Method.new get_file_config + list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags + @list_tags = ::Gapic::Config::Method.new list_tags_config + get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag + @get_tag = ::Gapic::Config::Method.new get_tag_config + create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag + @create_tag = ::Gapic::Config::Method.new create_tag_config + update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag + @update_tag = ::Gapic::Config::Method.new update_tag_config + delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag + @delete_tag = ::Gapic::Config::Method.new delete_tag_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_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings + @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config + update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings + @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb new file mode 100644 index 000000000000..bca5d7763a5e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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 ArtifactRegistry + module V1beta2 + module ArtifactRegistry + # Credentials for the ArtifactRegistry API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "ARTIFACT_REGISTRY_CREDENTIALS", + "ARTIFACT_REGISTRY_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "ARTIFACT_REGISTRY_CREDENTIALS_JSON", + "ARTIFACT_REGISTRY_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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb new file mode 100644 index 000000000000..3d15132574aa --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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 ArtifactRegistry + module V1beta2 + module ArtifactRegistry + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ArtifactRegistry 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 ArtifactRegistry 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::ArtifactRegistry::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.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::ArtifactRegistry::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_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::ArtifactRegistry::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_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::ArtifactRegistry::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.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::ArtifactRegistry::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 + + 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 = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb new file mode 100644 index 000000000000..4b937ff38983 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.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 ArtifactRegistry + module V1beta2 + module ArtifactRegistry + # Path helper methods for the ArtifactRegistry 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 ProjectSettings resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/projectSettings` + # + # @param project [String] + # + # @return [::String] + def project_settings_path project: + "projects/#{project}/projectSettings" + 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 Tag resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param package [String] + # @param tag [String] + # + # @return [::String] + def tag_path project:, location:, repository:, package:, tag: + 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, "package cannot contain /" if package.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb new file mode 100644 index 000000000000..4e4826632d6d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/artifact_registry/v1beta2/version" +require "google/cloud/artifact_registry/v1beta2/bindings_override" + +require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/paths" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + ## + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + module ArtifactRegistry + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb new file mode 100644 index 000000000000..8fde50261255 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb @@ -0,0 +1,2794 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/devtools/artifactregistry/v1beta2/service_pb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + module Rest + ## + # REST client for the ArtifactRegistry service. + # + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :artifact_registry_stub + + ## + # Configure the ArtifactRegistry Client class. + # + # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ArtifactRegistry clients + # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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", "ArtifactRegistry", "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_repositories.timeout = 30.0 + default_config.rpcs.list_repositories.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_repository.timeout = 30.0 + default_config.rpcs.get_repository.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_repository.timeout = 30.0 + + default_config.rpcs.update_repository.timeout = 30.0 + + default_config.rpcs.delete_repository.timeout = 30.0 + default_config.rpcs.delete_repository.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_packages.timeout = 30.0 + default_config.rpcs.list_packages.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_package.timeout = 30.0 + default_config.rpcs.get_package.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_package.timeout = 30.0 + default_config.rpcs.delete_package.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_versions.timeout = 30.0 + default_config.rpcs.list_versions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_version.timeout = 30.0 + default_config.rpcs.get_version.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_version.timeout = 30.0 + default_config.rpcs.delete_version.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_files.timeout = 30.0 + default_config.rpcs.list_files.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_file.timeout = 30.0 + default_config.rpcs.get_file.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tags.timeout = 30.0 + default_config.rpcs.list_tags.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_tag.timeout = 30.0 + default_config.rpcs.get_tag.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_tag.timeout = 30.0 + + default_config.rpcs.update_tag.timeout = 30.0 + + default_config.rpcs.delete_tag.timeout = 30.0 + default_config.rpcs.delete_tag.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy.timeout = 30.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.test_iam_permissions.timeout = 30.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ArtifactRegistry 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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 + @artifact_registry_stub.universe_domain + end + + ## + # Create a new ArtifactRegistry REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ArtifactRegistry 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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 + + @artifact_registry_stub = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @artifact_registry_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 = @artifact_registry_stub.endpoint + config.universe_domain = @artifact_registry_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @artifact_registry_stub.logger + end + + # Service calls + + ## + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_apt_artifacts(request, options = nil) + # Pass arguments to `import_apt_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_apt_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new + # + # # Call the import_apt_artifacts method. + # result = client.import_apt_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_apt_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_apt_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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.import_apt_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_apt_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.import_apt_artifacts request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_yum_artifacts(request, options = nil) + # Pass arguments to `import_yum_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_yum_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new + # + # # Call the import_yum_artifacts method. + # result = client.import_yum_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_yum_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_yum_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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.import_yum_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_yum_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.import_yum_artifacts request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose repositories will be listed. + # @param page_size [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 + + @artifact_registry_stub.list_repositories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_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 a repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_repository(name: nil) + # Pass arguments to `get_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 + + @artifact_registry_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 repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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_id: nil, repository: 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 name of the parent resource where the repository will be created. + # @param repository_id [::String] + # The repository id to use for this repository. + # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] + # The repository to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 + + @artifact_registry_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 a repository. + # + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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(repository: nil, update_mask: 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 repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] + # The repository that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new + # + # # Call the update_repository method. + # result = client.update_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. + # p result + # + def update_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 + + @artifact_registry_stub.update_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 + + ## + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 + + @artifact_registry_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 packages. + # + # @overload list_packages(request, options = nil) + # Pass arguments to `list_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose packages will be listed. + # @param page_size [::Integer] + # The maximum number of packages to return. + # Maximum page size is 10,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new + # + # # Call the list_packages method. + # result = client.list_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. + # p item + # end + # + def list_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_packages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_packages request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, 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 package. + # + # @overload get_package(request, options = nil) + # Pass arguments to `get_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_package(name: nil) + # Pass arguments to `get_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the package to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new + # + # # Call the get_package method. + # result = client.get_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. + # p result + # + def get_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_package request, 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 package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + # + # @overload delete_package(request, options = nil) + # Pass arguments to `delete_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_package(name: nil) + # Pass arguments to `delete_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the package to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new + # + # # Call the delete_package method. + # result = client.delete_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest + + # Converts hash and nil to an 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_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_package request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 versions. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil) + # Pass arguments to `list_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] + # The name of the parent resource whose versions will be listed. + # @param page_size [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + # @param order_by [::String] + # Optional. The field to order the results by. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_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::ArtifactRegistry::V1beta2::Version. + # p item + # end + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_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::ArtifactRegistry::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_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_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 a version + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_version(name: nil, view: nil) + # Pass arguments to `get_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] + # The name of the version to retrieve. + # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_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::ArtifactRegistry::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_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_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 + + ## + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_version(name: nil, force: nil) + # Pass arguments to `delete_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] + # The name of the version to delete. + # @param force [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest + + # Converts hash and nil to an 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_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::ArtifactRegistry::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_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_version request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 files. + # + # @overload list_files(request, options = nil) + # Pass arguments to `list_files` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the repository whose files will be listed. For example: + # "projects/p1/locations/us-central1/repositories/repo1 + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `owner` + # + # An example of using a filter: + # + # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + # ID starting with "a/b/". + # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + # Files owned by the version `1.0` in package `pkg1`. + # @param page_size [::Integer] + # The maximum number of files to return. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new + # + # # Call the list_files method. + # result = client.list_files request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. + # p item + # end + # + def list_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_files.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_files request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, 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 file. + # + # @overload get_file(request, options = nil) + # Pass arguments to `get_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_file(name: nil) + # Pass arguments to `get_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the file to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new + # + # # Call the get_file method. + # result = client.get_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. + # p result + # + def get_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_file request, 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 tags. + # + # @overload list_tags(request, options = nil) + # Pass arguments to `list_tags` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tags` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose tags will be listed. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `version` + # + # An example of using a filter: + # + # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + # --> Tags that are applied to the version `1.0` in package `pkg1`. + # @param page_size [::Integer] + # The maximum number of tags to return. Maximum page size is 10,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new + # + # # Call the list_tags method. + # result = client.list_tags request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p item + # end + # + def list_tags request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tags.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_tags.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tags.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_tags request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, 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 tag. + # + # @overload get_tag(request, options = nil) + # Pass arguments to `get_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_tag(name: nil) + # Pass arguments to `get_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new + # + # # Call the get_tag method. + # result = client.get_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def get_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_tag request, 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 tag. + # + # @overload create_tag(request, options = nil) + # Pass arguments to `create_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_tag(parent: nil, tag_id: nil, tag: nil) + # Pass arguments to `create_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource where the tag will be created. + # @param tag_id [::String] + # The tag id to use for this repository. + # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] + # The tag to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new + # + # # Call the create_tag method. + # result = client.create_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def create_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest + + # Converts hash and nil to an 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.create_tag request, 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 tag. + # + # @overload update_tag(request, options = nil) + # Pass arguments to `update_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_tag(tag: nil, update_mask: nil) + # Pass arguments to `update_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] + # The tag that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new + # + # # Call the update_tag method. + # result = client.update_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def update_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest + + # Converts hash and nil to an 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_tag request, 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 tag. + # + # @overload delete_tag(request, options = nil) + # Pass arguments to `delete_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_tag(name: nil) + # Pass arguments to `delete_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag 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/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new + # + # # Call the delete_tag method. + # result = client.delete_tag request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest + + # Converts hash and nil to an 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_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_tag request, 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 IAM policy for a given 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/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 + + @artifact_registry_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 IAM policy for a given 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/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 + + @artifact_registry_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 + + ## + # Tests if the caller has a list of permissions on a resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 + + @artifact_registry_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 + + ## + # Retrieves the Settings for the Project. + # + # @overload get_project_settings(request, options = nil) + # Pass arguments to `get_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_project_settings(name: nil) + # Pass arguments to `get_project_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. The name of the projectSettings resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new + # + # # Call the get_project_settings method. + # result = client.get_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + # p result + # + def get_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_project_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::ArtifactRegistry::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_project_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_project_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 Settings for the Project. + # + # @overload update_project_settings(request, options = nil) + # Pass arguments to `update_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_project_settings(project_settings: nil, update_mask: nil) + # Pass arguments to `update_project_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 project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash] + # The project settings. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new + # + # # Call the update_project_settings method. + # result = client.update_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + # p result + # + def update_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_project_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::ArtifactRegistry::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_project_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_project_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 + + ## + # Configuration class for the ArtifactRegistry REST API. + # + # This class represents the configuration for ArtifactRegistry 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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 + # # import_apt_artifacts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.import_apt_artifacts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.import_apt_artifacts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::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 ArtifactRegistry API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `import_apt_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_apt_artifacts + ## + # RPC-specific configuration for `import_yum_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_yum_artifacts + ## + # 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_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_packages + ## + # RPC-specific configuration for `get_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_package + ## + # RPC-specific configuration for `delete_package` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_package + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + ## + # RPC-specific configuration for `list_files` + # @return [::Gapic::Config::Method] + # + attr_reader :list_files + ## + # RPC-specific configuration for `get_file` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file + ## + # RPC-specific configuration for `list_tags` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tags + ## + # RPC-specific configuration for `get_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tag + ## + # RPC-specific configuration for `create_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tag + ## + # RPC-specific configuration for `update_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tag + ## + # RPC-specific configuration for `delete_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tag + ## + # 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_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_settings + ## + # RPC-specific configuration for `update_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_settings + + # @private + def initialize parent_rpcs = nil + import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts + @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config + import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts + @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_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_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages + @list_packages = ::Gapic::Config::Method.new list_packages_config + get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package + @get_package = ::Gapic::Config::Method.new get_package_config + delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package + @delete_package = ::Gapic::Config::Method.new delete_package_config + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files + @list_files = ::Gapic::Config::Method.new list_files_config + get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file + @get_file = ::Gapic::Config::Method.new get_file_config + list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags + @list_tags = ::Gapic::Config::Method.new list_tags_config + get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag + @get_tag = ::Gapic::Config::Method.new get_tag_config + create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag + @create_tag = ::Gapic::Config::Method.new create_tag_config + update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag + @update_tag = ::Gapic::Config::Method.new update_tag_config + delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag + @delete_tag = ::Gapic::Config::Method.new delete_tag_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_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings + @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config + update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings + @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb new file mode 100644 index 000000000000..2177e2eb1d4d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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 ArtifactRegistry + module V1beta2 + module ArtifactRegistry + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ArtifactRegistry 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 ArtifactRegistry 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::ArtifactRegistry::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_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::ArtifactRegistry::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_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::ArtifactRegistry::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_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::ArtifactRegistry::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.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 = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::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: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb new file mode 100644 index 000000000000..ec6f1a7ce763 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb @@ -0,0 +1,1615 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/devtools/artifactregistry/v1beta2/service_pb" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + module Rest + ## + # REST service stub for the ArtifactRegistry 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 import_apt_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_apt_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_apt_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_apt_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_yum_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_yum_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_yum_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_yum_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::ListRepositoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # 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::Cloud::ArtifactRegistry::V1beta2::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 delete_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::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_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse] + # A result object deserialized from the server's reply + def list_packages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_packages_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_packages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # A result object deserialized from the server's reply + def get_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.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_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse] + # A result object deserialized from the server's reply + def list_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_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_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # A result object deserialized from the server's reply + def get_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_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_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.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_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_files REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse] + # A result object deserialized from the server's reply + def list_files request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_files_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_files", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # A result object deserialized from the server's reply + def get_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_file", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::File.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_tags REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse] + # A result object deserialized from the server's reply + def list_tags request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tags_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tags", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # A result object deserialized from the server's reply + def get_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.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_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # A result object deserialized from the server's reply + def create_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.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_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # A result object deserialized from the server's reply + def update_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.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_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tag", + 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_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # A result object deserialized from the server's reply + def get_project_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_project_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_project_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # A result object deserialized from the server's reply + def update_project_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_project_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_project_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.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 import_apt_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_apt_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}/aptArtifacts:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_yum_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_yum_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}/yumArtifacts:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_repositories REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::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: "/v1beta2/{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::ArtifactRegistry::V1beta2::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: "/v1beta2/{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::ArtifactRegistry::V1beta2::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: "/v1beta2/{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::ArtifactRegistry::V1beta2::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: "/v1beta2/{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::ArtifactRegistry::V1beta2::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: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_packages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/packages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest] + # 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_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest] + # 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_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_files REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_files_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/files", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tags REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tags_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/tags", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest] + # 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_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}/tags", + body: "tag", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest] + # 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_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta2/{tag.name}", + body: "tag", + matches: [ + ["tag.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest] + # 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_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, 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/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, 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/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, 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/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_project_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/projectSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_project_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta2/{project_settings.name}", + body: "project_settings", + matches: [ + ["project_settings.name", %r{^projects/[^/]+/projectSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb new file mode 100644 index 000000000000..51f57d10ff56 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/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 ArtifactRegistry + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/artifact_registry/v1beta2/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + module V1beta2 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ArtifactRegistry"] + 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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb new file mode 100644 index 000000000000..d25e48a6eb93 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/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/artifact_registry/v1beta2/artifact_registry/rest" +require "google/cloud/artifact_registry/v1beta2/bindings_override" +require "google/cloud/artifact_registry/v1beta2/version" + +module Google + module Cloud + module ArtifactRegistry + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/artifact_registry/v1beta2/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + module V1beta2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb new file mode 100644 index 000000000000..8a820cee0d3a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/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 ArtifactRegistry + module V1beta2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb new file mode 100644 index 000000000000..27134bb36c91 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/apt_artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n;google/devtools/artifactregistry/v1beta2/apt_artifact.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xbf\x03\n\x0b\x41ptArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0cpackage_type\x18\x03 \x01(\x0e\x32\x41.google.devtools.artifactregistry.v1beta2.AptArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcomponent\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x63ontrol_file\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/AptArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}\"B\n\x1bImportAptArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x92\x01\n\x19ImportAptArtifactsRequest\x12[\n\ngcs_source\x18\x02 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa7\x01\n\x1bImportAptArtifactsErrorInfo\x12[\n\ngcs_source\x18\x01 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xc1\x01\n\x1aImportAptArtifactsResponse\x12L\n\rapt_artifacts\x18\x01 \x03(\x0b\x32\x35.google.devtools.artifactregistry.v1beta2.AptArtifact\x12U\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo\"\x1c\n\x1aImportAptArtifactsMetadataB\x94\x02\n,com.google.devtools.artifactregistry.v1beta2B\x10\x41ptArtifactProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + AptArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.AptArtifact").msgclass + AptArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType").enummodule + ImportAptArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource").msgclass + ImportAptArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest").msgclass + ImportAptArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo").msgclass + ImportAptArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse").msgclass + ImportAptArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb new file mode 100644 index 000000000000..a1cc80819447 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/file.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/devtools/artifactregistry/v1beta2/file.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x98\x01\n\x04Hash\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.devtools.artifactregistry.v1beta2.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\":\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\"\xd4\x02\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nsize_bytes\x18\x03 \x01(\x03\x12>\n\x06hashes\x18\x04 \x03(\x0b\x32..google.devtools.artifactregistry.v1beta2.Hash\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05owner\x18\x07 \x01(\t:y\xea\x41v\n$artifactregistry.googleapis.com/File\x12Nprojects/{project}/locations/{location}/repositories/{repository}/files/{file}\"Y\n\x10ListFilesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x11ListFilesResponse\x12=\n\x05\x66iles\x18\x01 \x03(\x0b\x32..google.devtools.artifactregistry.v1beta2.File\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1e\n\x0eGetFileRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x8d\x02\n,com.google.devtools.artifactregistry.v1beta2B\tFileProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Hash").msgclass + Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Hash.HashType").enummodule + File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.File").msgclass + ListFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListFilesRequest").msgclass + ListFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListFilesResponse").msgclass + GetFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetFileRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb new file mode 100644 index 000000000000..29552f5694d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/package.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/package.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x01\n\x07Package\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"L\n\x13ListPackagesRequest\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\"t\n\x14ListPackagesResponse\x12\x43\n\x08packages\x18\x01 \x03(\x0b\x32\x31.google.devtools.artifactregistry.v1beta2.Package\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"!\n\x11GetPackageRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"$\n\x14\x44\x65letePackageRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cPackageProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Package").msgclass + ListPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListPackagesRequest").msgclass + ListPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListPackagesResponse").msgclass + GetPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetPackageRequest").msgclass + DeletePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeletePackageRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb new file mode 100644 index 000000000000..9c549297f124 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/repository.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/devtools/artifactregistry/v1beta2/repository.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x07\n\nRepository\x12\x62\n\x0cmaven_config\x18\t \x01(\x0b\x32J.google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfigH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x06\x66ormat\x18\x02 \x01(\x0e\x32;.google.devtools.artifactregistry.v1beta2.Repository.Format\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12P\n\x06labels\x18\x04 \x03(\x0b\x32@.google.devtools.artifactregistry.v1beta2.Repository.LabelsEntry\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x1a\xf8\x01\n\x15MavenRepositoryConfig\x12!\n\x19\x61llow_snapshot_overwrites\x18\x01 \x01(\x08\x12p\n\x0eversion_policy\x18\x02 \x01(\x0e\x32X.google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy\"J\n\rVersionPolicy\x12\x1e\n\x1aVERSION_POLICY_UNSPECIFIED\x10\x00\x12\x0b\n\x07RELEASE\x10\x01\x12\x0c\n\x08SNAPSHOT\x10\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OCKER\x10\x01\x12\t\n\x05MAVEN\x10\x02\x12\x07\n\x03NPM\x10\x03\x12\x07\n\x03\x41PT\x10\x05\x12\x07\n\x03YUM\x10\x06\x12\n\n\x06PYTHON\x10\x08:r\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}B\x0f\n\rformat_config\"\x84\x01\n\x17ListRepositoriesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x7f\n\x18ListRepositoriesResponse\x12J\n\x0crepositories\x18\x01 \x03(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Repository\"\xbe\x01\n\x17\x43reateRepositoryRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x15\n\rrepository_id\x18\x02 \x01(\t\x12H\n\nrepository\x18\x03 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\"\x94\x01\n\x17UpdateRepositoryRequest\x12H\n\nrepository\x18\x01 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x17\x44\x65leteRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\x93\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0fRepositoryProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository").msgclass + Repository::MavenRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig").msgclass + Repository::MavenRepositoryConfig::VersionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy").enummodule + Repository::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.Format").enummodule + ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest").msgclass + ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse").msgclass + GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetRepositoryRequest").msgclass + CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest").msgclass + UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest").msgclass + DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb new file mode 100644 index 000000000000..e30893147e79 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/devtools/artifactregistry/v1beta2/apt_artifact_pb' +require 'google/devtools/artifactregistry/v1beta2/file_pb' +require 'google/devtools/artifactregistry/v1beta2/package_pb' +require 'google/devtools/artifactregistry/v1beta2/repository_pb' +require 'google/devtools/artifactregistry/v1beta2/settings_pb' +require 'google/devtools/artifactregistry/v1beta2/tag_pb' +require 'google/devtools/artifactregistry/v1beta2/version_pb' +require 'google/devtools/artifactregistry/v1beta2/yum_artifact_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/service.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a;google/devtools/artifactregistry/v1beta2/apt_artifact.proto\x1a\x33google/devtools/artifactregistry/v1beta2/file.proto\x1a\x36google/devtools/artifactregistry/v1beta2/package.proto\x1a\x39google/devtools/artifactregistry/v1beta2/repository.proto\x1a\x37google/devtools/artifactregistry/v1beta2/settings.proto\x1a\x32google/devtools/artifactregistry/v1beta2/tag.proto\x1a\x36google/devtools/artifactregistry/v1beta2/version.proto\x1a;google/devtools/artifactregistry/v1beta2/yum_artifact.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x13\n\x11OperationMetadata2\xe6/\n\x10\x41rtifactRegistry\x12\xdf\x02\n\x12ImportAptArtifacts\x12\x43.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41\x8a\x01\nCgoogle.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse\x12\x43google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata\x82\xd3\xe4\x93\x02P\"K/v1beta2/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import:\x01*\x12\xdf\x02\n\x12ImportYumArtifacts\x12\x43.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41\x8a\x01\nCgoogle.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse\x12\x43google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata\x82\xd3\xe4\x93\x02P\"K/v1beta2/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import:\x01*\x12\xe1\x01\n\x10ListRepositories\x12\x41.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest\x1a\x42.google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta2/{parent=projects/*/locations/*}/repositories\x12\xcb\x01\n\rGetRepository\x12>.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest\x1a\x34.google.devtools.artifactregistry.v1beta2.Repository\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta2/{name=projects/*/locations/*/repositories/*}\x12\xd6\x02\n\x10\x43reateRepository\x12\x41.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41q\n3google.devtools.artifactregistry.v1beta2.Repository\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02\x43\"5/v1beta2/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xfa\x01\n\x10UpdateRepository\x12\x41.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest\x1a\x34.google.devtools.artifactregistry.v1beta2.Repository\"m\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02N2@/v1beta2/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\x91\x02\n\x10\x44\x65leteRepository\x12\x41.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta2/{name=projects/*/locations/*/repositories/*}\x12\xe0\x01\n\x0cListPackages\x12=.google.devtools.artifactregistry.v1beta2.ListPackagesRequest\x1a>.google.devtools.artifactregistry.v1beta2.ListPackagesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages\x12\xcd\x01\n\nGetPackage\x12;.google.devtools.artifactregistry.v1beta2.GetPackageRequest\x1a\x31.google.devtools.artifactregistry.v1beta2.Package\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}\x12\x96\x02\n\rDeletePackage\x12>.google.devtools.artifactregistry.v1beta2.DeletePackageRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}\x12\xeb\x01\n\x0cListVersions\x12=.google.devtools.artifactregistry.v1beta2.ListVersionsRequest\x1a>.google.devtools.artifactregistry.v1beta2.ListVersionsResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12K/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions\x12\xd8\x01\n\nGetVersion\x12;.google.devtools.artifactregistry.v1beta2.GetVersionRequest\x1a\x31.google.devtools.artifactregistry.v1beta2.Version\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12K/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xa1\x02\n\rDeleteVersion\x12>.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02M*K/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xd4\x01\n\tListFiles\x12:.google.devtools.artifactregistry.v1beta2.ListFilesRequest\x1a;.google.devtools.artifactregistry.v1beta2.ListFilesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1beta2/{parent=projects/*/locations/*/repositories/*}/files\x12\xc2\x01\n\x07GetFile\x12\x38.google.devtools.artifactregistry.v1beta2.GetFileRequest\x1a..google.devtools.artifactregistry.v1beta2.File\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}\x12\xdb\x01\n\x08ListTags\x12\x39.google.devtools.artifactregistry.v1beta2.ListTagsRequest\x1a:.google.devtools.artifactregistry.v1beta2.ListTagsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags\x12\xc8\x01\n\x06GetTag\x12\x37.google.devtools.artifactregistry.v1beta2.GetTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xe0\x01\n\tCreateTag\x12:.google.devtools.artifactregistry.v1beta2.CreateTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"h\xda\x41\x11parent,tag,tag_id\x82\xd3\xe4\x93\x02N\"G/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags:\x03tag\x12\xe2\x01\n\tUpdateTag\x12:.google.devtools.artifactregistry.v1beta2.UpdateTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"j\xda\x41\x0ftag,update_mask\x82\xd3\xe4\x93\x02R2K/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}:\x03tag\x12\xb7\x01\n\tDeleteTag\x12:.google.devtools.artifactregistry.v1beta2.DeleteTagRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I*G/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\x9c\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Q\x82\xd3\xe4\x93\x02K\"F/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\x99\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"N\x82\xd3\xe4\x93\x02H\x12\x46/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xc2\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"W\x82\xd3\xe4\x93\x02Q\"L/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\xcf\x01\n\x12GetProjectSettings\x12\x43.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest\x1a\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1beta2/{name=projects/*/projectSettings}\x12\x90\x02\n\x15UpdateProjectSettings\x12\x46.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest\x1a\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\"t\xda\x41\x1cproject_settings,update_mask\x82\xd3\xe4\x93\x02O2;/v1beta2/{project_settings.name=projects/*/projectSettings}:\x10project_settings\x1a\x8c\x01\xca\x41\x1f\x61rtifactregistry.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cServiceProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb new file mode 100644 index 000000000000..aaa057d35013 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb @@ -0,0 +1,116 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/devtools/artifactregistry/v1beta2/service.proto for package 'Google.Cloud.ArtifactRegistry.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/devtools/artifactregistry/v1beta2/service_pb' + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.devtools.artifactregistry.v1beta2.ArtifactRegistry' + + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + rpc :ImportAptArtifacts, ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Google::Longrunning::Operation + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + rpc :ImportYumArtifacts, ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Google::Longrunning::Operation + # Lists repositories. + rpc :ListRepositories, ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse + # Gets a repository. + rpc :GetRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Repository + # Creates a repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + rpc :CreateRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, ::Google::Longrunning::Operation + # Updates a repository. + rpc :UpdateRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Repository + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + rpc :DeleteRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, ::Google::Longrunning::Operation + # Lists packages. + rpc :ListPackages, ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse + # Gets a package. + rpc :GetPackage, ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Package + # Deletes a package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + rpc :DeletePackage, ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Google::Longrunning::Operation + # Lists versions. + rpc :ListVersions, ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse + # Gets a version + rpc :GetVersion, ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Version + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + rpc :DeleteVersion, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Google::Longrunning::Operation + # Lists files. + rpc :ListFiles, ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse + # Gets a file. + rpc :GetFile, ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::File + # Lists tags. + rpc :ListTags, ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse + # Gets a tag. + rpc :GetTag, ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag + # Creates a tag. + rpc :CreateTag, ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag + # Updates a tag. + rpc :UpdateTag, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag + # Deletes a tag. + rpc :DeleteTag, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Google::Protobuf::Empty + # Updates the IAM policy for a given resource. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the IAM policy for a given resource. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Tests if the caller has a list of permissions on a resource. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Retrieves the Settings for the Project. + rpc :GetProjectSettings, ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings + # Updates the Settings for the Project. + rpc :UpdateProjectSettings, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb new file mode 100644 index 000000000000..7dec3dc9290c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/settings.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n7google/devtools/artifactregistry/v1beta2/settings.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x91\x03\n\x0fProjectSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12l\n\x18legacy_redirection_state\x18\x02 \x01(\x0e\x32J.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState\"\xa7\x01\n\x10RedirectionState\x12!\n\x1dREDIRECTION_STATE_UNSPECIFIED\x10\x00\x12$\n REDIRECTION_FROM_GCR_IO_DISABLED\x10\x01\x12#\n\x1fREDIRECTION_FROM_GCR_IO_ENABLED\x10\x02\x12%\n!REDIRECTION_FROM_GCR_IO_FINALIZED\x10\x03:X\xea\x41U\n/artifactregistry.googleapis.com/ProjectSettings\x12\"projects/{project}/projectSettings\"b\n\x19GetProjectSettingsRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/artifactregistry.googleapis.com/ProjectSettings\"\xa4\x01\n\x1cUpdateProjectSettingsRequest\x12S\n\x10project_settings\x18\x02 \x01(\x0b\x32\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x91\x02\n,com.google.devtools.artifactregistry.v1beta2B\rSettingsProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + ProjectSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ProjectSettings").msgclass + ProjectSettings::RedirectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState").enummodule + GetProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest").msgclass + UpdateProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb new file mode 100644 index 000000000000..658061a8e001 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/tag.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n2google/devtools/artifactregistry/v1beta2/tag.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb1\x01\n\x03Tag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t:\x8a\x01\xea\x41\x86\x01\n#artifactregistry.googleapis.com/Tag\x12_projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}\"X\n\x0fListTagsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"h\n\x10ListTagsResponse\x12;\n\x04tags\x18\x01 \x03(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1d\n\rGetTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"n\n\x10\x43reateTagRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06tag_id\x18\x02 \x01(\t\x12:\n\x03tag\x18\x03 \x01(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\"\x7f\n\x10UpdateTagRequest\x12:\n\x03tag\x18\x01 \x01(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\" \n\x10\x44\x65leteTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x8c\x02\n,com.google.devtools.artifactregistry.v1beta2B\x08TagProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Tag").msgclass + ListTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListTagsRequest").msgclass + ListTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListTagsResponse").msgclass + GetTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetTagRequest").msgclass + CreateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.CreateTagRequest").msgclass + UpdateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateTagRequest").msgclass + DeleteTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteTagRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb new file mode 100644 index 000000000000..e557d358711e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/version.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/devtools/artifactregistry/v1beta2/tag_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/version.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/devtools/artifactregistry/v1beta2/tag.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x03\n\x07Version\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0crelated_tags\x18\x07 \x03(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03:\x96\x01\xea\x41\x92\x01\n\'artifactregistry.googleapis.com/Version\x12gprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}\"\xa8\x01\n\x13ListVersionsRequest\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\x43\n\x04view\x18\x04 \x01(\x0e\x32\x35.google.devtools.artifactregistry.v1beta2.VersionView\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"t\n\x14ListVersionsResponse\x12\x43\n\x08versions\x18\x01 \x03(\x0b\x32\x31.google.devtools.artifactregistry.v1beta2.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"f\n\x11GetVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x43\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.devtools.artifactregistry.v1beta2.VersionView\"3\n\x14\x44\x65leteVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08*@\n\x0bVersionView\x12\x1c\n\x18VERSION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cVersionProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Version").msgclass + ListVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListVersionsRequest").msgclass + ListVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListVersionsResponse").msgclass + GetVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetVersionRequest").msgclass + DeleteVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteVersionRequest").msgclass + VersionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.VersionView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb new file mode 100644 index 000000000000..7391ace9af17 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/yum_artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n;google/devtools/artifactregistry/v1beta2/yum_artifact.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\x8c\x03\n\x0bYumArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0cpackage_type\x18\x03 \x01(\x0e\x32\x41.google.devtools.artifactregistry.v1beta2.YumArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/YumArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}\"B\n\x1bImportYumArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x92\x01\n\x19ImportYumArtifactsRequest\x12[\n\ngcs_source\x18\x02 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa7\x01\n\x1bImportYumArtifactsErrorInfo\x12[\n\ngcs_source\x18\x01 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xc1\x01\n\x1aImportYumArtifactsResponse\x12L\n\ryum_artifacts\x18\x01 \x03(\x0b\x32\x35.google.devtools.artifactregistry.v1beta2.YumArtifact\x12U\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo\"\x1c\n\x1aImportYumArtifactsMetadataB\x94\x02\n,com.google.devtools.artifactregistry.v1beta2B\x10YumArtifactProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + YumArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.YumArtifact").msgclass + YumArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType").enummodule + ImportYumArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource").msgclass + ImportYumArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest").msgclass + ImportYumArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo").msgclass + ImportYumArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse").msgclass + ImportYumArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md new file mode 100644 index 000000000000..2d7f47c14fc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Artifact Registry 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-artifact_registry-v1beta2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb new file mode 100644 index 000000000000..87bcf0a3806a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # A detailed representation of an Apt artifact. Information in the record + # is derived from the archive's control file. + # See https://www.debian.org/doc/debian-policy/ch-controlfields.html + # @!attribute [r] name + # @return [::String] + # Output only. The Artifact Registry resource name of the artifact. + # @!attribute [r] package_name + # @return [::String] + # Output only. The Apt package name of the artifact. + # @!attribute [r] package_type + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::AptArtifact::PackageType] + # Output only. An artifact is a binary or source package. + # @!attribute [r] architecture + # @return [::String] + # Output only. Operating system architecture of the artifact. + # @!attribute [r] component + # @return [::String] + # Output only. Repository component of the artifact. + # @!attribute [r] control_file + # @return [::String] + # Output only. Contents of the artifact's control metadata file. + class AptArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Package type is either binary or source. + module PackageType + # Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0 + + # Binary package. + BINARY = 1 + + # Source package. + SOURCE = 2 + end + end + + # Google Cloud Storage location where the artifacts currently reside. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + # @!attribute [rw] use_wildcards + # @return [::Boolean] + # Supports URI wildcards for matching multiple objects from a single URI. + class ImportAptArtifactsGcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to import new apt artifacts. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource] + # Google Cloud Storage location where input content is located. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the artifacts will be imported. + class ImportAptArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Error information explaining why a package was not imported. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource] + # Google Cloud Storage location requested. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The detailed error status. + class ImportAptArtifactsErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message from importing APT artifacts. + # @!attribute [rw] apt_artifacts + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::AptArtifact>] + # The Apt artifacts imported. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsErrorInfo>] + # Detailed error info for artifacts that were not imported. + class ImportAptArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The operation metadata for importing artifacts. + class ImportAptArtifactsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb new file mode 100644 index 000000000000..b01bb4f451a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.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 ArtifactRegistry + module V1beta2 + # A hash of file content. + # @!attribute [rw] type + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Hash::HashType] + # The algorithm used to compute the hash value. + # @!attribute [rw] value + # @return [::String] + # The hash value. + class Hash + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The algorithm used to compute the hash. + module HashType + # Unspecified. + HASH_TYPE_UNSPECIFIED = 0 + + # SHA256 hash. + SHA256 = 1 + + # MD5 hash. + MD5 = 2 + end + end + + # Files store content that is potentially associated with Packages or Versions. + # @!attribute [rw] name + # @return [::String] + # The name of the file, for example: + # "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". + # If the file ID part contains slashes, they are escaped. + # @!attribute [rw] size_bytes + # @return [::Integer] + # The size of the File in bytes. + # @!attribute [rw] hashes + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Hash>] + # The hashes of the file content. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the File was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the File was last updated. + # @!attribute [rw] owner + # @return [::String] + # The name of the Package or Version that owns this file, if any. + class File + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list files. + # @!attribute [rw] parent + # @return [::String] + # The name of the repository whose files will be listed. For example: + # "projects/p1/locations/us-central1/repositories/repo1 + # @!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` + # * `owner` + # + # An example of using a filter: + # + # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + # ID starting with "a/b/". + # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + # Files owned by the version `1.0` in package `pkg1`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of files to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListFilesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing files. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::File>] + # The files returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of files, or empty if there are no + # more files to return. + class ListFilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a file. + # @!attribute [rw] name + # @return [::String] + # The name of the file to retrieve. + class GetFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb new file mode 100644 index 000000000000..24ee1b9b6dc3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb @@ -0,0 +1,93 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # Packages are named collections of versions. + # @!attribute [rw] name + # @return [::String] + # The name of the package, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". + # @!attribute [rw] display_name + # @return [::String] + # The display name of the package. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the package was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the package was last updated. This includes publishing a new + # version of the package. + class Package + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list packages. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource whose packages will be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of packages to return. + # Maximum page size is 10,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListPackagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing packages. + # @!attribute [rw] packages + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] + # The packages returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of packages, or empty if there are no + # more packages to return. + class ListPackagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a package. + # @!attribute [rw] name + # @return [::String] + # The name of the package to retrieve. + class GetPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a package. + # @!attribute [rw] name + # @return [::String] + # The name of the package to delete. + class DeletePackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb new file mode 100644 index 000000000000..30184abcdddf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb @@ -0,0 +1,202 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # A Repository for storing artifacts with a specific format. + # @!attribute [rw] maven_config + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::MavenRepositoryConfig] + # Maven repository config contains repository level configuration + # for the repositories of maven type. + # @!attribute [rw] name + # @return [::String] + # The name of the repository, for example: + # "projects/p1/locations/us-central1/repositories/repo1". + # @!attribute [rw] format + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::Format] + # The format of packages that are stored in the repository. + # @!attribute [rw] description + # @return [::String] + # The user-provided description of the repository. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels with user-defined metadata. + # This field may contain up to 64 entries. Label keys and values may be no + # longer than 63 characters. Label keys must begin with a lowercase letter + # and may only contain lowercase letters, numeric characters, underscores, + # and dashes. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the repository was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the repository was last updated. + # @!attribute [rw] kms_key_name + # @return [::String] + # The Cloud KMS resource name of the customer managed encryption key that’s + # used to encrypt the contents of the Repository. Has the form: + # `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. + # This value may not be changed after the Repository has been created. + class Repository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # MavenRepositoryConfig is maven related repository details. + # Provides additional configuration details for repositories of the maven + # format type. + # @!attribute [rw] allow_snapshot_overwrites + # @return [::Boolean] + # The repository with this flag will allow publishing + # the same snapshot versions. + # @!attribute [rw] version_policy + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::MavenRepositoryConfig::VersionPolicy] + # Version policy defines the versions that the registry will accept. + class MavenRepositoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VersionPolicy is the version policy for the repository. + module VersionPolicy + # VERSION_POLICY_UNSPECIFIED - the version policy is not defined. + # When the version policy is not defined, no validation is performed + # for the versions. + VERSION_POLICY_UNSPECIFIED = 0 + + # RELEASE - repository will accept only Release versions. + RELEASE = 1 + + # SNAPSHOT - repository will accept only Snapshot versions. + SNAPSHOT = 2 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A package format. + module Format + # Unspecified package format. + FORMAT_UNSPECIFIED = 0 + + # Docker package format. + DOCKER = 1 + + # Maven package format. + MAVEN = 2 + + # NPM package format. + NPM = 3 + + # APT package format. + APT = 5 + + # YUM package format. + YUM = 6 + + # Python package format. + PYTHON = 8 + end + end + + # The request to list repositories. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose repositories will be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListRepositoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing repositories. + # @!attribute [rw] repositories + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] + # The repositories returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of repositories, or empty if there are + # no more repositories to return. + class ListRepositoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a repository. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the repository to retrieve. + class GetRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new repository. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource where the repository will be created. + # @!attribute [rw] repository_id + # @return [::String] + # The repository id to use for this repository. + # @!attribute [rw] repository + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # The repository to be created. + class CreateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a repository. + # @!attribute [rw] repository + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # The repository that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a repository. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the repository to delete. + class DeleteRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb new file mode 100644 index 000000000000..cf0245f23a64 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.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 ArtifactRegistry + module V1beta2 + # Metadata type for longrunning-operations, currently empty. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb new file mode 100644 index 000000000000..b2fdc4b27fd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # The Artifact Registry settings that apply to a Project. + # @!attribute [rw] name + # @return [::String] + # The name of the project's settings. + # + # Always of the form: + # projects/\\{project-id}/projectSettings + # + # In update request: never set + # In response: always set + # @!attribute [rw] legacy_redirection_state + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings::RedirectionState] + # The redirection state of the legacy repositories in this project. + class ProjectSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible redirection states for legacy repositories. + module RedirectionState + # No redirection status has been set. + REDIRECTION_STATE_UNSPECIFIED = 0 + + # Redirection is disabled. + REDIRECTION_FROM_GCR_IO_DISABLED = 1 + + # Redirection is enabled. + REDIRECTION_FROM_GCR_IO_ENABLED = 2 + + # Redirection is enabled, and has been finalized so cannot be reverted. + REDIRECTION_FROM_GCR_IO_FINALIZED = 3 + end + end + + # Gets the redirection status for a project. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the projectSettings resource. + class GetProjectSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sets the settings of the project. + # @!attribute [rw] project_settings + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # The project settings. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Field mask to support partial updates. + class UpdateProjectSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb new file mode 100644 index 000000000000..2a6ea04aff2a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.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 ArtifactRegistry + module V1beta2 + # Tags point to a version and represent an alternative name that can be used + # to access the version. + # @!attribute [rw] name + # @return [::String] + # The name of the tag, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". + # If the package part contains slashes, the slashes are escaped. + # The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else + # must be URL encoded. + # @!attribute [rw] version + # @return [::String] + # The name of the version the tag refers to, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" + # If the package or version ID parts contain slashes, the slashes are + # escaped. + class Tag + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list tags. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource whose tags will be listed. + # @!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: + # + # * `version` + # + # An example of using a filter: + # + # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + # --> Tags that are applied to the version `1.0` in package `pkg1`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of tags to return. Maximum page size is 10,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListTagsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing tags. + # @!attribute [rw] tags + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # The tags returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of tags, or empty if there are no + # more tags to return. + class ListTagsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a tag. + # @!attribute [rw] name + # @return [::String] + # The name of the tag to retrieve. + class GetTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new tag. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the tag will be created. + # @!attribute [rw] tag_id + # @return [::String] + # The tag id to use for this repository. + # @!attribute [rw] tag + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # The tag to be created. + class CreateTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create or update a tag. + # @!attribute [rw] tag + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # The tag that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a tag. + # @!attribute [rw] name + # @return [::String] + # The name of the tag to delete. + class DeleteTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb new file mode 100644 index 000000000000..51bc9a408b69 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.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 ArtifactRegistry + module V1beta2 + # The body of a version resource. A version resource represents a + # collection of components, such as files and other data. This may correspond + # to a version in many package management schemes. + # @!attribute [rw] name + # @return [::String] + # The name of the version, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1". + # If the package or version ID parts contain slashes, the slashes are + # escaped. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the version, as specified in its metadata. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the version was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the version was last updated. + # @!attribute [rw] related_tags + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # Output only. A list of related tags. Will contain up to 100 tags that + # reference this version. + # @!attribute [r] metadata + # @return [::Google::Protobuf::Struct] + # Output only. Repository-specific Metadata stored against this version. + # The fields returned are defined by the underlying repository-specific + # resource. Currently, the only resource in use is + # [DockerImage][google.devtools.artifactregistry.v1.DockerImage] + class Version + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list versions. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource whose versions will be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] view + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The field to order the results by. + class ListVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing versions. + # @!attribute [rw] versions + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] + # The versions returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of versions, or empty if there are no + # more versions to return. + class ListVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a version. + # @!attribute [rw] name + # @return [::String] + # The name of the version to retrieve. + # @!attribute [rw] view + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + class GetVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a version. + # @!attribute [rw] name + # @return [::String] + # The name of the version to delete. + # @!attribute [rw] force + # @return [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + class DeleteVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The view, which determines what version information is returned in a + # response. + module VersionView + # The default / unset value. + # The API will default to the BASIC view. + VERSION_VIEW_UNSPECIFIED = 0 + + # Includes basic information about the version, but not any related tags. + BASIC = 1 + + # Include everything. + FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb new file mode 100644 index 000000000000..1bf31d939f3d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.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! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # A detailed representation of a Yum artifact. + # @!attribute [r] name + # @return [::String] + # Output only. The Artifact Registry resource name of the artifact. + # @!attribute [r] package_name + # @return [::String] + # Output only. The yum package name of the artifact. + # @!attribute [r] package_type + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::YumArtifact::PackageType] + # Output only. An artifact is a binary or source package. + # @!attribute [r] architecture + # @return [::String] + # Output only. Operating system architecture of the artifact. + class YumArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Package type is either binary or source. + module PackageType + # Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0 + + # Binary package (.rpm). + BINARY = 1 + + # Source package (.srpm). + SOURCE = 2 + end + end + + # Google Cloud Storage location where the artifacts currently reside. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + # @!attribute [rw] use_wildcards + # @return [::Boolean] + # Supports URI wildcards for matching multiple objects from a single URI. + class ImportYumArtifactsGcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to import new yum artifacts. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource] + # Google Cloud Storage location where input content is located. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the artifacts will be imported. + class ImportYumArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Error information explaining why a package was not imported. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource] + # Google Cloud Storage location requested. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The detailed error status. + class ImportYumArtifactsErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message from importing YUM artifacts. + # @!attribute [rw] yum_artifacts + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::YumArtifact>] + # The yum artifacts imported. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsErrorInfo>] + # Detailed error info for artifacts that were not imported. + class ImportYumArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The operation metadata for importing artifacts. + class ImportYumArtifactsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/snippets/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile new file mode 100644 index 000000000000..6aaca3591deb --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2", path: "../" +else + gem "google-cloud-artifact_registry-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-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb new file mode 100644 index 000000000000..b4aec628bdf3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the create_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository. +# +def create_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::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 artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb new file mode 100644 index 000000000000..ea333cf7fe5d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the create_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag. +# +def create_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new + + # Call the create_tag method. + result = client.create_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb new file mode 100644 index 000000000000..3a5fe36a176f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.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 artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the delete_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package. +# +def delete_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new + + # Call the delete_package method. + result = client.delete_package request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb new file mode 100644 index 000000000000..9d4a02cbddc5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the delete_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository. +# +def delete_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::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 artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb new file mode 100644 index 000000000000..f712c0a18063 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the delete_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag. +# +def delete_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new + + # Call the delete_tag method. + result = client.delete_tag request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb new file mode 100644 index 000000000000..1240bb6fbb67 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.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 artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the delete_version call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version. +# +def delete_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new + + # Call the delete_version method. + result = client.delete_version request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb new file mode 100644 index 000000000000..b69d234386f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_file call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file. +# +def get_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new + + # Call the get_file method. + result = client.get_file request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb new file mode 100644 index 000000000000..75c9dd1f58a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_iam_policy call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb new file mode 100644 index 000000000000..24c3dd6d088f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package. +# +def get_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new + + # Call the get_package method. + result = client.get_package request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb new file mode 100644 index 000000000000..1504ae352b97 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_project_settings call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings. +# +def get_project_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new + + # Call the get_project_settings method. + result = client.get_project_settings request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb new file mode 100644 index 000000000000..6b62a92d27cf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository. +# +def get_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new + + # Call the get_repository method. + result = client.get_repository request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb new file mode 100644 index 000000000000..227f1cb970c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag. +# +def get_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new + + # Call the get_tag method. + result = client.get_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb new file mode 100644 index 000000000000..053bede11d21 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_version call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version. +# +def get_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new + + # Call the get_version method. + result = client.get_version request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb new file mode 100644 index 000000000000..749491500cbe --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.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 artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the import_apt_artifacts call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts. +# +def import_apt_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new + + # Call the import_apt_artifacts method. + result = client.import_apt_artifacts request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb new file mode 100644 index 000000000000..b177cea98dc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.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 artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the import_yum_artifacts call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts. +# +def import_yum_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new + + # Call the import_yum_artifacts method. + result = client.import_yum_artifacts request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb new file mode 100644 index 000000000000..0cccd6b55a02 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.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 artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the list_files call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files. +# +def list_files + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new + + # Call the list_files method. + result = client.list_files request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. + p item + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb new file mode 100644 index 000000000000..3d5971af0c9d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.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 artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the list_packages call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages. +# +def list_packages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new + + # Call the list_packages method. + result = client.list_packages request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. + p item + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb new file mode 100644 index 000000000000..b371d20afeb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the list_repositories call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories. +# +def list_repositories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::Repository. + p item + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb new file mode 100644 index 000000000000..ba98059582c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.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 artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the list_tags call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags. +# +def list_tags + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new + + # Call the list_tags method. + result = client.list_tags request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. + p item + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb new file mode 100644 index 000000000000..f1ec20f158bd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_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 artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the list_versions call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions. +# +def list_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new + + # Call the list_versions method. + result = client.list_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::ArtifactRegistry::V1beta2::Version. + p item + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb new file mode 100644 index 000000000000..dca645f107d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the set_iam_policy call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb new file mode 100644 index 000000000000..7990b39f1d6a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the test_iam_permissions call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb new file mode 100644 index 000000000000..0aca5331f573 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_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 artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the update_project_settings call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings. +# +def update_project_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new + + # Call the update_project_settings method. + result = client.update_project_settings request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb new file mode 100644 index 000000000000..b49bb58893ec --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_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 artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the update_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository. +# +def update_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new + + # Call the update_repository method. + result = client.update_repository request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb new file mode 100644 index 000000000000..477573a098df --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the update_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag. +# +def update_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new + + # Call the update_tag method. + result = client.update_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json new file mode 100644 index 000000000000..344fe59d344c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json @@ -0,0 +1,1015 @@ +{ + "client_library": { + "name": "google-cloud-artifact_registry-v1beta2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.devtools.artifactregistry.v1beta2", + "version": "v1beta2" + } + ] + }, + "snippets": [ + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync", + "title": "Snippet for the import_apt_artifacts call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts.", + "file": "artifact_registry/import_apt_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_apt_artifacts", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ImportAptArtifacts", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifacts", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync", + "title": "Snippet for the import_yum_artifacts call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts.", + "file": "artifact_registry/import_yum_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_yum_artifacts", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ImportYumArtifacts", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifacts", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync", + "title": "Snippet for the list_repositories call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories.", + "file": "artifact_registry/list_repositories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_repositories", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListRepositories", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositories", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync", + "title": "Snippet for the get_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository.", + "file": "artifact_registry/get_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Repository", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetRepository", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync", + "title": "Snippet for the create_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository.", + "file": "artifact_registry/create_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateRepository", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync", + "title": "Snippet for the update_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository.", + "file": "artifact_registry/update_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Repository", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateRepository", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync", + "title": "Snippet for the delete_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository.", + "file": "artifact_registry/delete_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteRepository", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync", + "title": "Snippet for the list_packages call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages.", + "file": "artifact_registry/list_packages.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_packages", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListPackages", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackages", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync", + "title": "Snippet for the get_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package.", + "file": "artifact_registry/get_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Package", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetPackage", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync", + "title": "Snippet for the delete_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package.", + "file": "artifact_registry/delete_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeletePackage", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync", + "title": "Snippet for the list_versions call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions.", + "file": "artifact_registry/list_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_versions", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListVersions", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersions", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync", + "title": "Snippet for the get_version call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version.", + "file": "artifact_registry/get_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_version", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Version", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetVersion", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersion", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync", + "title": "Snippet for the delete_version call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version.", + "file": "artifact_registry/delete_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_version", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteVersion", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersion", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync", + "title": "Snippet for the list_files call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files.", + "file": "artifact_registry/list_files.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_files", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListFiles", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFiles", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync", + "title": "Snippet for the get_file call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file.", + "file": "artifact_registry/get_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_file", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::File", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetFile", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFile", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync", + "title": "Snippet for the list_tags call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags.", + "file": "artifact_registry/list_tags.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tags", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListTags", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTags", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync", + "title": "Snippet for the get_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag.", + "file": "artifact_registry/get_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetTag", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync", + "title": "Snippet for the create_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag.", + "file": "artifact_registry/create_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateTag", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync", + "title": "Snippet for the update_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag.", + "file": "artifact_registry/update_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateTag", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync", + "title": "Snippet for the delete_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag.", + "file": "artifact_registry/delete_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteTag", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy.", + "file": "artifact_registry/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicy", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy.", + "file": "artifact_registry/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetIamPolicy", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions.", + "file": "artifact_registry/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissions", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync", + "title": "Snippet for the get_project_settings call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings.", + "file": "artifact_registry/get_project_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_project_settings", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetProjectSettings", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettings", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync", + "title": "Snippet for the update_project_settings call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings.", + "file": "artifact_registry/update_project_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_project_settings", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateProjectSettings", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettings", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "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-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb new file mode 100644 index 000000000000..fbe142f1b655 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/devtools/artifactregistry/v1beta2/service_pb" +require "google/devtools/artifactregistry/v1beta2/service_services_pb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb new file mode 100644 index 000000000000..81fee8ae756c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_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/artifact_registry/v1beta2/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_settings_path project: "value0" + assert_equal "projects/value0/projectSettings", 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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_tag_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tag_path project: "value0", location: "value1", repository: "value2", package: "value3", tag: "value4" + assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/tags/value4", path + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb new file mode 100644 index 000000000000..31d16e9467ad --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb @@ -0,0 +1,1478 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/devtools/artifactregistry/v1beta2/service_pb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" + + +class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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_import_apt_artifacts + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_apt_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_apt_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_apt_artifacts_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.import_apt_artifacts gcs_source: gcs_source, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_apt_artifacts_client_stub.call_count + end + end + end + + def test_import_yum_artifacts + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_yum_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_yum_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_yum_artifacts_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.import_yum_artifacts gcs_source: gcs_source, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_yum_artifacts_client_stub.call_count + end + end + end + + def test_list_repositories + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::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" + + 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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_repositories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_repositories_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 }) 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 do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_repositories ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.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_repositories({ 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_repositories(::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.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_repositories_client_stub.call_count + end + end + end + + def test_get_repository + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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_id = "hello world" + repository = {} + + 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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_repository parent: parent, repository_id: repository_id, repository: repository do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_repository ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_repository(::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), 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::Cloud::ArtifactRegistry::V1beta2::Repository.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + repository = {} + update_mask = {} + + 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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_repository({ repository: repository, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_repository repository: repository, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_repository ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_repository({ repository: repository, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_repository(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), 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" + + 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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_repository({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_repository name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_repository ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_repository({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_repository(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name), 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_packages + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.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_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_packages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_packages_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_packages({ 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_packages 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_packages ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.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_packages({ 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_packages(::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.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_packages_client_stub.call_count + end + end + end + + def test_get_package + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_package ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_package(::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_package_client_stub.call_count + end + end + end + + def test_delete_package + # Create test objects. + 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_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_package ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_package(::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_package_client_stub.call_count + end + end + end + + def test_list_versions + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + order_by = "hello world" + + list_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_versions ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_versions(::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_versions_client_stub.call_count + end + end + end + + def test_get_version + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + + get_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_version_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_version({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_version name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_version ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_version({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_version(::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_count + end + end + end + + def test_delete_version + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_version({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_version name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_version ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_version({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_version(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_version_client_stub.call_count + end + end + end + + def test_list_files + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.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_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_files_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_files_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_files({ 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_files 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_files ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.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_files({ 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_files(::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.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_files_client_stub.call_count + end + end + end + + def test_get_file + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::File.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_file_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_file({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_file name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_file ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_file({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_file(::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_file_client_stub.call_count + end + end + end + + def test_list_tags + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.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_tags_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_tags_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tags_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_tags({ 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_tags 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_tags ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.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_tags({ 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_tags(::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.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_tags_client_stub.call_count + end + end + end + + def test_get_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_tag({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_tag name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_tag ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_tag({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_tag(::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_tag_client_stub.call_count + end + end + end + + def test_create_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tag_id = "hello world" + tag = {} + + create_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_tag parent: parent, tag_id: tag_id, tag: tag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_tag ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_tag(::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_tag_client_stub.call_count + end + end + end + + def test_update_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + tag = {} + update_mask = {} + + update_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_tag({ tag: tag, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_tag tag: tag, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_tag ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_tag({ tag: tag, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_tag(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_tag_client_stub.call_count + end + end + end + + def test_delete_tag + # 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_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_tag({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_tag name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_tag ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_tag({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_tag(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_tag_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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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_project_settings + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_project_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_project_settings_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_project_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_project_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_project_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_project_settings_client_stub.call_count + end + end + end + + def test_update_project_settings + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + project_settings = {} + update_mask = {} + + update_project_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_project_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_project_settings_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_project_settings project_settings: project_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_project_settings({ project_settings: project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings_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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb new file mode 100644 index 000000000000..160cd4e1338f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb @@ -0,0 +1,1683 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/devtools/artifactregistry/v1beta2/service_pb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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_import_apt_artifacts + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_apt_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_apt_artifacts, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource), request["gcs_source"] + assert_equal :gcs_source, request.source + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_apt_artifacts_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.import_apt_artifacts({ gcs_source: gcs_source, 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.import_apt_artifacts gcs_source: gcs_source, 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.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, 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.import_apt_artifacts({ gcs_source: gcs_source, 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.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, 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, import_apt_artifacts_client_stub.call_rpc_count + end + end + + def test_import_yum_artifacts + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_yum_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_yum_artifacts, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource), request["gcs_source"] + assert_equal :gcs_source, request.source + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_yum_artifacts_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.import_yum_artifacts({ gcs_source: gcs_source, 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.import_yum_artifacts gcs_source: gcs_source, 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.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, 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.import_yum_artifacts({ gcs_source: gcs_source, 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.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, 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, import_yum_artifacts_client_stub.call_rpc_count + end + end + + def test_list_repositories + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::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" + + list_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_repositories, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, 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_repositories_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 }) 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 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::ArtifactRegistry::V1beta2::ListRepositoriesRequest.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_repositories({ 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_repositories(::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.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_repositories_client_stub.call_rpc_count + end + end + + def test_get_repository + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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_id = "hello world" + repository = {} + + create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["repository_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Repository), request["repository"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |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_id: repository_id, repository: repository do |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::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |response, operation| + 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_id: repository_id, repository: repository }, grpc_options) do |response, operation| + 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::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), grpc_options) do |response, operation| + assert_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::Cloud::ArtifactRegistry::V1beta2::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. + repository = {} + update_mask = {} + + update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Repository), request["repository"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_repository({ repository: repository, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_repository repository: repository, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_repository ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, 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_repository({ repository: repository, 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_repository(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, 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_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" + + delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_repository_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_repository({ 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_repository 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_repository ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.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_repository({ 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_repository(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.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_repository_client_stub.call_rpc_count + end + end + + def test_list_packages + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_packages, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, 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_packages_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_packages({ parent: parent, page_size: page_size, page_token: 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_packages parent: parent, page_size: page_size, page_token: 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_packages ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.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_packages({ 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_packages(::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.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_packages_client_stub.call_rpc_count + end + end + + def test_get_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_package({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_package name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_package ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_package({ 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_package(::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(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_package_client_stub.call_rpc_count + end + end + + def test_delete_package + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_package_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_package({ 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_package 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_package ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.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_package({ 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_package(::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.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_package_client_stub.call_rpc_count + end + end + + def test_list_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + order_by = "hello world" + + list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_versions, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_versions_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, 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_versions parent: parent, page_size: page_size, page_token: page_token, view: view, 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_versions ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, 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_versions(::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_versions_client_stub.call_rpc_count + end + end + + def test_get_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + + get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_version, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_version_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_version({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_version name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_version ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_version({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_version(::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_rpc_count + end + end + + def test_delete_version + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_version, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_version_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_version({ name: name, 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_version name: name, 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_version ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, 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_version({ name: name, 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_version(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, 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_version_client_stub.call_rpc_count + end + end + + def test_list_files + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_files, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, 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_files_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_files({ 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_files 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_files ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.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_files({ 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_files(::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.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_files_client_stub.call_rpc_count + end + end + + def test_get_file + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::File.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_file, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_file_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_file({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_file name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_file ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_file({ 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_file(::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(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_file_client_stub.call_rpc_count + end + end + + def test_list_tags + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_tags_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tags, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, 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_tags_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_tags({ 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_tags 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_tags ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.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_tags({ 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_tags(::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.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_tags_client_stub.call_rpc_count + end + end + + def test_get_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_tag({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_tag name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_tag ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_tag({ 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_tag(::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(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_tag_client_stub.call_rpc_count + end + end + + def test_create_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tag_id = "hello world" + tag = {} + + create_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["tag_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Tag), request["tag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_tag parent: parent, tag_id: tag_id, tag: tag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_tag ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_tag(::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_tag_client_stub.call_rpc_count + end + end + + def test_update_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + tag = {} + update_mask = {} + + update_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Tag), request["tag"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_tag({ tag: tag, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_tag tag: tag, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_tag ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, 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_tag({ tag: tag, 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_tag(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, 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_tag_client_stub.call_rpc_count + end + end + + def test_delete_tag + # 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_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_tag_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_tag({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_tag name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_tag ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_tag({ 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_tag(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(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_tag_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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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_project_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_project_settings, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_project_settings_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_project_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_project_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_project_settings_client_stub.call_rpc_count + end + end + + def test_update_project_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + project_settings = {} + update_mask = {} + + update_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_project_settings, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings), request["project_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_project_settings_client_stub do + # Create client + c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_project_settings project_settings: project_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings({ project_settings: project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings_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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-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-assured_workloads-v1/.gitignore b/owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json new file mode 100644 index 000000000000..69650035435c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "assuredworkloads.googleapis.com", + "api_shortname": "assuredworkloads", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1/latest", + "distribution_name": "google-cloud-assured_workloads-v1", + "is_cloud": true, + "language": "ruby", + "name": "assuredworkloads", + "name_pretty": "Assured Workloads for Government V1 API", + "product_documentation": "https://cloud.google.com/assured-workloads/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details.", + "ruby-cloud-env-prefix": "ASSURED_WORKLOADS", + "ruby-cloud-product-url": "https://cloud.google.com/assured-workloads/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml b/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml new file mode 100644 index 000000000000..1a84e3a85a74 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-assured_workloads-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-assured_workloads-v1.rb" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/.yardopts b/owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts new file mode 100644 index 000000000000..fd857a4e0231 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Assured Workloads for Government 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-assured_workloads-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..3fba6040c2eb --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-assured_workloads-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-assured_workloads-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/assured_workloads/v1" + +client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/assured_workloads/v1" + +::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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-assured_workloads-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/assured_workloads/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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-assured_workloads-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/LICENSE.md b/owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1/README.md new file mode 100644 index 000000000000..c244150a73b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Assured Workloads for Government V1 API + +API Client library for the Assured Workloads for Government V1 API + +Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads 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 Assured Workloads for Government V1 API. Most users should consider using +the main client gem, +[google-cloud-assured_workloads](https://rubygems.org/gems/google-cloud-assured_workloads). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-assured_workloads-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/assuredworkloads.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/assured_workloads/v1" + +client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new +request = ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new # (request fields as keyword arguments...) +response = client.create_workload request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/assured-workloads/) +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/assured_workloads/v1" +require "logger" + +client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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-assured_workloads`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-assured_workloads-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-assured_workloads`. +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-assured_workloads-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-assured_workloads-v1/Rakefile b/owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile new file mode 100644 index 000000000000..e8a4e1de245c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["ASSURED_WORKLOADS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["ASSURED_WORKLOADS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["ASSURED_WORKLOADS_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 ASSURED_WORKLOADS_TEST_PROJECT=test123 ASSURED_WORKLOADS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["ASSURED_WORKLOADS_PROJECT"] = project + ENV["ASSURED_WORKLOADS_TEST_PROJECT"] = project + ENV["ASSURED_WORKLOADS_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-assured_workloads-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-assured_workloads-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-assured_workloads-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-assured_workloads-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-assured_workloads-v1" + header "google-cloud-assured_workloads-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-assured_workloads-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-assured_workloads-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-assured_workloads-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-assured_workloads-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-assured_workloads-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json new file mode 100644 index 000000000000..4117f432b2e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.assuredworkloads.v1", + "libraryPackage": "::Google::Cloud::AssuredWorkloads::V1", + "services": { + "AssuredWorkloadsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client", + "rpcs": { + "CreateWorkload": { + "methods": [ + "create_workload" + ] + }, + "UpdateWorkload": { + "methods": [ + "update_workload" + ] + }, + "RestrictAllowedResources": { + "methods": [ + "restrict_allowed_resources" + ] + }, + "DeleteWorkload": { + "methods": [ + "delete_workload" + ] + }, + "GetWorkload": { + "methods": [ + "get_workload" + ] + }, + "ListWorkloads": { + "methods": [ + "list_workloads" + ] + }, + "ListViolations": { + "methods": [ + "list_violations" + ] + }, + "GetViolation": { + "methods": [ + "get_violation" + ] + }, + "AcknowledgeViolation": { + "methods": [ + "acknowledge_violation" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec b/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec new file mode 100644 index 000000000000..05bda029be10 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/assured_workloads/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-assured_workloads-v1" + gem.version = Google::Cloud::AssuredWorkloads::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details." + gem.summary = "API Client library for the Assured Workloads for Government V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb new file mode 100644 index 000000000000..24f2ce22bdb4 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-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/assured_workloads/v1" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb new file mode 100644 index 000000000000..8a860900f3a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/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/assured_workloads/v1/assured_workloads_service" +require "google/cloud/assured_workloads/v1/version" + +module Google + module Cloud + module AssuredWorkloads + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/assured_workloads/v1" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/assured_workloads/v1" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/assured_workloads/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb new file mode 100644 index 000000000000..ea39cd61c3bf --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/assured_workloads/v1/version" + +require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" +require "google/cloud/assured_workloads/v1/assured_workloads_service/paths" +require "google/cloud/assured_workloads/v1/assured_workloads_service/operations" +require "google/cloud/assured_workloads/v1/assured_workloads_service/client" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" + +module Google + module Cloud + module AssuredWorkloads + module V1 + ## + # Service to manage AssuredWorkloads. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/assured_workloads/v1/assured_workloads_service" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + module AssuredWorkloadsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "assured_workloads_service", "helpers.rb" +require "google/cloud/assured_workloads/v1/assured_workloads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb new file mode 100644 index 000000000000..d7c596a875d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb @@ -0,0 +1,1305 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/assuredworkloads/v1/assuredworkloads_pb" + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + ## + # Client for the AssuredWorkloadsService service. + # + # Service to manage AssuredWorkloads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :assured_workloads_service_stub + + ## + # Configure the AssuredWorkloadsService Client class. + # + # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssuredWorkloadsService clients + # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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", "AssuredWorkloads", "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 AssuredWorkloadsService 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::AssuredWorkloads::V1::AssuredWorkloadsService::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 + @assured_workloads_service_stub.universe_domain + end + + ## + # Create a new AssuredWorkloadsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssuredWorkloadsService 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/assuredworkloads/v1/assuredworkloads_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 + + @assured_workloads_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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 + ) + + @assured_workloads_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::AssuredWorkloads::V1::AssuredWorkloadsService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @assured_workloads_service_stub.logger + end + + # Service calls + + ## + # Creates Assured Workload. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workload(parent: nil, workload: nil, external_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] + # Required. Assured Workload to create + # @param external_id [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest + + # Converts hash and nil to 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing workload. + # Currently allows updating of workload display_name and labels. + # For force updates don't set etag field in the Workload. + # Only one update operation per workload can be in progress. + # + # @overload update_workload(request, options = nil) + # Pass arguments to `update_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workload(workload: nil, update_mask: nil) + # Pass arguments to `update_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] + # Required. The workload to update. + # The workload's `name` field is used to identify the workload to be updated. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new + # + # # Call the update_workload method. + # result = client.update_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + # p result + # + def update_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest + + # Converts hash and nil to 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.workload&.name + header_params["workload.name"] = request.workload.name + end + + request_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_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restrict the list of resources allowed in the Workload environment. + # The current list of allowed products can be found at + # https://cloud.google.com/assured-workloads/docs/supported-products + # In addition to assuredworkloads.workload.update permission, the user should + # also have orgpolicy.policy.set permission on the folder resource + # to use this functionality. + # + # @overload restrict_allowed_resources(request, options = nil) + # Pass arguments to `restrict_allowed_resources` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restrict_allowed_resources(name: nil, restriction_type: nil) + # Pass arguments to `restrict_allowed_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 name [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new + # + # # Call the restrict_allowed_resources method. + # result = client.restrict_allowed_resources request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. + # p result + # + def restrict_allowed_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restrict_allowed_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::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :restrict_allowed_resources, request, 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 workload. Make sure that workload's direct children are already + # in a deleted state, otherwise the request will fail with a + # FAILED_PRECONDITION error. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workload(name: nil, etag: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param etag [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + # + # @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/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest + + # Converts hash and nil to 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets Assured Workload associated with a CRM Node + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Workload to fetch. This is the workload's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Assured Workloads under a CRM Node. + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent Resource to list workloads from. + # Must be of the form `organizations/{org_id}/locations/{location}`. + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token returned from previous request. Page token contains context from + # previous request. Page token needs to be passed in the second and following + # requests. + # @param filter [::String] + # A custom filter for filtering by properties of a workload. At this time, + # only filtering by labels is supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the Violations in the AssuredWorkload Environment. + # Callers may also choose to read across multiple Workloads as per + # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + # character) as a wildcard character instead of workload-id in the parent. + # Format `organizations/{org_id}/locations/{location}/workloads/-` + # + # @overload list_violations(request, options = nil) + # Pass arguments to `list_violations` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_violations(parent: nil, interval: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_violations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The Workload name. + # Format `organizations/{org_id}/locations/{location}/workloads/{workload}`. + # @param interval [::Google::Cloud::AssuredWorkloads::V1::TimeWindow, ::Hash] + # Optional. Specifies the time window for retrieving active Violations. + # When specified, retrieves Violations that were active between start_time + # and end_time. + # @param page_size [::Integer] + # Optional. Page size. + # @param page_token [::String] + # Optional. Page token returned from previous request. + # @param filter [::String] + # Optional. A custom filter for filtering by the Violations properties. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Violation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Violation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new + # + # # Call the list_violations method. + # result = client.list_violations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Violation. + # p item + # end + # + def list_violations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_violations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::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_violations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_violations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :list_violations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_violations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves Assured Workload Violation based on ID. + # + # @overload get_violation(request, options = nil) + # Pass arguments to `get_violation` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_violation(name: nil) + # Pass arguments to `get_violation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Violation to fetch (ie. Violation.name). + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Violation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new + # + # # Call the get_violation method. + # result = client.get_violation request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Violation. + # p result + # + def get_violation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_violation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::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.get_violation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_violation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :get_violation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Acknowledges an existing violation. By acknowledging a violation, users + # acknowledge the existence of a compliance violation in their workload and + # decide to ignore it due to a valid business justification. Acknowledgement + # is a permanent operation and it cannot be reverted. + # + # @overload acknowledge_violation(request, options = nil) + # Pass arguments to `acknowledge_violation` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload acknowledge_violation(name: nil, comment: nil, non_compliant_org_policy: nil) + # Pass arguments to `acknowledge_violation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Violation to acknowledge. + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} + # @param comment [::String] + # Required. Business justification explaining the need for violation acknowledgement + # @param non_compliant_org_policy [::String] + # Optional. This field is deprecated and will be removed in future version of the API. + # Name of the OrgPolicy which was modified with non-compliant change and + # resulted in this violation. + # Format: + # projects/\\{project_number}/policies/\\{constraint_name} + # folders/\\{folder_id}/policies/\\{constraint_name} + # organizations/\\{organization_id}/policies/\\{constraint_name} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new + # + # # Call the acknowledge_violation method. + # result = client.acknowledge_violation request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse. + # p result + # + def acknowledge_violation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.acknowledge_violation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::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.acknowledge_violation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.acknowledge_violation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :acknowledge_violation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssuredWorkloadsService API. + # + # This class represents the configuration for AssuredWorkloadsService, + # providing control 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::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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 = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::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 AssuredWorkloadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `update_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workload + ## + # RPC-specific configuration for `restrict_allowed_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :restrict_allowed_resources + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + ## + # RPC-specific configuration for `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + ## + # RPC-specific configuration for `list_violations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_violations + ## + # RPC-specific configuration for `get_violation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_violation + ## + # RPC-specific configuration for `acknowledge_violation` + # @return [::Gapic::Config::Method] + # + attr_reader :acknowledge_violation + + # @private + def initialize parent_rpcs = nil + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload + @update_workload = ::Gapic::Config::Method.new update_workload_config + restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources + @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations + @list_violations = ::Gapic::Config::Method.new list_violations_config + get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation + @get_violation = ::Gapic::Config::Method.new get_violation_config + acknowledge_violation_config = parent_rpcs.acknowledge_violation if parent_rpcs.respond_to? :acknowledge_violation + @acknowledge_violation = ::Gapic::Config::Method.new acknowledge_violation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb new file mode 100644 index 000000000000..51ac08fa7943 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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 AssuredWorkloads + module V1 + module AssuredWorkloadsService + # Credentials for the AssuredWorkloadsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "ASSURED_WORKLOADS_CREDENTIALS", + "ASSURED_WORKLOADS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "ASSURED_WORKLOADS_CREDENTIALS_JSON", + "ASSURED_WORKLOADS_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb new file mode 100644 index 000000000000..37716c9322d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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 AssuredWorkloads + module V1 + module AssuredWorkloadsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AssuredWorkloadsService 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 AssuredWorkloadsService 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::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AssuredWorkloads::V1::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 = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb new file mode 100644 index 000000000000..14045503975a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.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 AssuredWorkloads + module V1 + module AssuredWorkloadsService + # Path helper methods for the AssuredWorkloadsService API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified Violation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}` + # + # @param organization [String] + # @param location [String] + # @param workload [String] + # @param violation [String] + # + # @return [::String] + def violation_path organization:, location:, workload:, violation: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "workload cannot contain /" if workload.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/workloads/#{workload}/violations/#{violation}" + end + + ## + # Create a fully-qualified Workload resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/workloads/{workload}` + # + # @param organization [String] + # @param location [String] + # @param workload [String] + # + # @return [::String] + def workload_path organization:, location:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/workloads/#{workload}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb new file mode 100644 index 000000000000..277bb37f1f6d --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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/assured_workloads/v1/version" + +require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" +require "google/cloud/assured_workloads/v1/assured_workloads_service/paths" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/client" + +module Google + module Cloud + module AssuredWorkloads + module V1 + ## + # Service to manage AssuredWorkloads. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + module AssuredWorkloadsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb new file mode 100644 index 000000000000..83406c2c4a70 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb @@ -0,0 +1,930 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/assuredworkloads/v1/assuredworkloads_pb" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub" + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + module Rest + ## + # REST client for the AssuredWorkloadsService service. + # + # Service to manage AssuredWorkloads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :assured_workloads_service_stub + + ## + # Configure the AssuredWorkloadsService Client class. + # + # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssuredWorkloadsService clients + # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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", "AssuredWorkloads", "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 AssuredWorkloadsService 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::AssuredWorkloads::V1::AssuredWorkloadsService::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 + @assured_workloads_service_stub.universe_domain + end + + ## + # Create a new AssuredWorkloadsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssuredWorkloadsService 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::AssuredWorkloads::V1::AssuredWorkloadsService::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 + + @assured_workloads_service_stub = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @assured_workloads_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::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @assured_workloads_service_stub.logger + end + + # Service calls + + ## + # Creates Assured Workload. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workload(parent: nil, workload: nil, external_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] + # Required. Assured Workload to create + # @param external_id [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest + + # Converts hash and nil to an 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.create_workload request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workload. + # Currently allows updating of workload display_name and labels. + # For force updates don't set etag field in the Workload. + # Only one update operation per workload can be in progress. + # + # @overload update_workload(request, options = nil) + # Pass arguments to `update_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workload(workload: nil, update_mask: nil) + # Pass arguments to `update_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] + # Required. The workload to update. + # The workload's `name` field is used to identify the workload to be updated. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new + # + # # Call the update_workload method. + # result = client.update_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + # p result + # + def update_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest + + # Converts hash and nil to an 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.update_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restrict the list of resources allowed in the Workload environment. + # The current list of allowed products can be found at + # https://cloud.google.com/assured-workloads/docs/supported-products + # In addition to assuredworkloads.workload.update permission, the user should + # also have orgpolicy.policy.set permission on the folder resource + # to use this functionality. + # + # @overload restrict_allowed_resources(request, options = nil) + # Pass arguments to `restrict_allowed_resources` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restrict_allowed_resources(name: nil, restriction_type: nil) + # Pass arguments to `restrict_allowed_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 name [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new + # + # # Call the restrict_allowed_resources method. + # result = client.restrict_allowed_resources request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. + # p result + # + def restrict_allowed_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restrict_allowed_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::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.restrict_allowed_resources request, 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 workload. Make sure that workload's direct children are already + # in a deleted state, otherwise the request will fail with a + # FAILED_PRECONDITION error. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workload(name: nil, etag: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param etag [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + # @yield [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/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest + + # Converts hash and nil to an 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.delete_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets Assured Workload associated with a CRM Node + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Workload to fetch. This is the workload's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.get_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Assured Workloads under a CRM Node. + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent Resource to list workloads from. + # Must be of the form `organizations/{org_id}/locations/{location}`. + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token returned from previous request. Page token contains context from + # previous request. Page token needs to be passed in the second and following + # requests. + # @param filter [::String] + # A custom filter for filtering by properties of a workload. At this time, + # only filtering by labels is supported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.list_workloads request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, "workloads", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssuredWorkloadsService REST API. + # + # This class represents the configuration for AssuredWorkloadsService 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::AssuredWorkloads::V1::AssuredWorkloadsService::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_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::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 AssuredWorkloadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `update_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workload + ## + # RPC-specific configuration for `restrict_allowed_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :restrict_allowed_resources + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + ## + # RPC-specific configuration for `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + + # @private + def initialize parent_rpcs = nil + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload + @update_workload = ::Gapic::Config::Method.new update_workload_config + restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources + @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb new file mode 100644 index 000000000000..0efaf6545122 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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 AssuredWorkloads + module V1 + module AssuredWorkloadsService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AssuredWorkloadsService 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 AssuredWorkloadsService 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::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::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{^organizations/[^/]+/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{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb new file mode 100644 index 000000000000..54af58066810 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/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/cloud/assuredworkloads/v1/assuredworkloads_pb" + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + module Rest + ## + # REST service stub for the AssuredWorkloadsService 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_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # A result object deserialized from the server's reply + def update_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AssuredWorkloads::V1::Workload.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the restrict_allowed_resources REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # A result object deserialized from the server's reply + def restrict_allowed_resources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restrict_allowed_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: "restrict_allowed_resources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.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_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workload", + 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_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # A result object deserialized from the server's reply + def get_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AssuredWorkloads::V1::Workload.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workloads REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse] + # A result object deserialized from the server's reply + def list_workloads request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_workloads", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.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_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest] + # 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_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/workloads", + body: "workload", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest] + # 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_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{workload.name}", + body: "workload", + matches: [ + ["workload.name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restrict_allowed_resources REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restrict_allowed_resources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:restrictAllowedResources", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest] + # 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_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workloads REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workloads_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workloads", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb new file mode 100644 index 000000000000..159eef6467bf --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/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/assured_workloads/v1/assured_workloads_service/rest" +require "google/cloud/assured_workloads/v1/version" + +module Google + module Cloud + module AssuredWorkloads + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/assured_workloads/v1/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb new file mode 100644 index 000000000000..43514745eb32 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/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 AssuredWorkloads + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb new file mode 100644 index 000000000000..1695e94ae30e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/assuredworkloads/v1/assuredworkloads.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/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n7google/cloud/assuredworkloads/v1/assuredworkloads.proto\x12 google.cloud.assuredworkloads.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\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb6\x01\n\x15\x43reateWorkloadRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\x12\x41\n\x08workload\x18\x02 \x01(\x0b\x32*.google.cloud.assuredworkloads.v1.WorkloadB\x03\xe0\x41\x02\x12\x18\n\x0b\x65xternal_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x90\x01\n\x15UpdateWorkloadRequest\x12\x41\n\x08workload\x18\x01 \x01(\x0b\x32*.google.cloud.assuredworkloads.v1.WorkloadB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"j\n\x15\x44\x65leteWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x12GetWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\"\x8f\x01\n\x14ListWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\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\"o\n\x15ListWorkloadsResponse\x12=\n\tworkloads\x18\x01 \x03(\x0b\x32*.google.cloud.assuredworkloads.v1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb6\x15\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\tresources\x18\x03 \x03(\x0b\x32\x37.google.cloud.assuredworkloads.v1.Workload.ResourceInfoB\x03\xe0\x41\x03\x12^\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32;.google.cloud.assuredworkloads.v1.Workload.ComplianceRegimeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x37\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1c\n\x0f\x62illing_account\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.assuredworkloads.v1.Workload.LabelsEntryB\x03\xe0\x41\x01\x12)\n\x1cprovisioned_resources_parent\x18\r \x01(\tB\x03\xe0\x41\x04\x12S\n\x0ckms_settings\x18\x0e \x01(\x0b\x32\x36.google.cloud.assuredworkloads.v1.Workload.KMSSettingsB\x05\x18\x01\xe0\x41\x04\x12[\n\x11resource_settings\x18\x0f \x03(\x0b\x32;.google.cloud.assuredworkloads.v1.Workload.ResourceSettingsB\x03\xe0\x41\x04\x12`\n\x14kaj_enrollment_state\x18\x11 \x01(\x0e\x32=.google.cloud.assuredworkloads.v1.Workload.KajEnrollmentStateB\x03\xe0\x41\x03\x12&\n\x19\x65nable_sovereign_controls\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12\x66\n\x17saa_enrollment_response\x18\x14 \x01(\x0b\x32@.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponseB\x03\xe0\x41\x03\x12.\n!compliant_but_disallowed_services\x18\x18 \x03(\tB\x03\xe0\x41\x03\x12H\n\x07partner\x18\x19 \x01(\x0e\x32\x32.google.cloud.assuredworkloads.v1.Workload.PartnerB\x03\xe0\x41\x01\x1a\x89\x02\n\x0cResourceInfo\x12\x13\n\x0bresource_id\x18\x01 \x01(\x03\x12[\n\rresource_type\x18\x02 \x01(\x0e\x32\x44.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType\"\x86\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x10\x43ONSUMER_PROJECT\x10\x01\x1a\x02\x08\x01\x12\x13\n\x0f\x43ONSUMER_FOLDER\x10\x04\x12\x1b\n\x17\x45NCRYPTION_KEYS_PROJECT\x10\x02\x12\x0b\n\x07KEYRING\x10\x03\x1a\x93\x01\n\x0bKMSSettings\x12\x41\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05\x12=\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1a\x9a\x01\n\x10ResourceSettings\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12[\n\rresource_type\x18\x02 \x01(\x0e\x32\x44.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x1a\xfc\x03\n\x15SaaEnrollmentResponse\x12\x66\n\x0csetup_status\x18\x01 \x01(\x0e\x32K.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupStateH\x00\x88\x01\x01\x12\x61\n\x0csetup_errors\x18\x02 \x03(\x0e\x32K.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError\"R\n\nSetupState\x12\x1b\n\x17SETUP_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_PENDING\x10\x01\x12\x13\n\x0fSTATUS_COMPLETE\x10\x02\"\xb2\x01\n\nSetupError\x12\x1b\n\x17SETUP_ERROR_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45RROR_INVALID_BASE_SETUP\x10\x01\x12&\n\"ERROR_MISSING_EXTERNAL_SIGNING_KEY\x10\x02\x12#\n\x1f\x45RROR_NOT_ALL_SERVICES_ENROLLED\x10\x03\x12\x1c\n\x18\x45RROR_SETUP_CHECK_FAILED\x10\x04\x42\x0f\n\r_setup_status\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa5\x02\n\x10\x43omplianceRegime\x12!\n\x1d\x43OMPLIANCE_REGIME_UNSPECIFIED\x10\x00\x12\x07\n\x03IL4\x10\x01\x12\x08\n\x04\x43JIS\x10\x02\x12\x10\n\x0c\x46\x45\x44RAMP_HIGH\x10\x03\x12\x14\n\x10\x46\x45\x44RAMP_MODERATE\x10\x04\x12\x16\n\x12US_REGIONAL_ACCESS\x10\x05\x12\t\n\x05HIPAA\x10\x06\x12\x0b\n\x07HITRUST\x10\x07\x12\x1a\n\x16\x45U_REGIONS_AND_SUPPORT\x10\x08\x12\x1a\n\x16\x43\x41_REGIONS_AND_SUPPORT\x10\t\x12\x08\n\x04ITAR\x10\n\x12\x1d\n\x19\x41U_REGIONS_AND_US_SUPPORT\x10\x0b\x12\"\n\x1e\x41SSURED_WORKLOADS_FOR_PARTNERS\x10\x0c\"\x7f\n\x12KajEnrollmentState\x12$\n KAJ_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cKAJ_ENROLLMENT_STATE_PENDING\x10\x01\x12!\n\x1dKAJ_ENROLLMENT_STATE_COMPLETE\x10\x02\">\n\x07Partner\x12\x17\n\x13PARTNER_UNSPECIFIED\x10\x00\x12\x1a\n\x16LOCAL_CONTROLS_BY_S3NS\x10\x01:u\xea\x41r\n(assuredworkloads.googleapis.com/Workload\x12\x46organizations/{organization}/locations/{location}/workloads/{workload}\"\xe4\x01\n\x1f\x43reateWorkloadOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12[\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32;.google.cloud.assuredworkloads.v1.Workload.ComplianceRegimeB\x03\xe0\x41\x01\"\x97\x02\n\x1fRestrictAllowedResourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12p\n\x10restriction_type\x18\x02 \x01(\x0e\x32Q.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionTypeB\x03\xe0\x41\x02\"o\n\x0fRestrictionType\x12 \n\x1cRESTRICTION_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x41LLOW_ALL_GCP_RESOURCES\x10\x01\x12\x1d\n\x19\x41LLOW_COMPLIANT_RESOURCES\x10\x02\"\"\n RestrictAllowedResourcesResponse\"o\n\x1b\x41\x63knowledgeViolationRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63omment\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x18non_compliant_org_policy\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x01\"\x1e\n\x1c\x41\x63knowledgeViolationResponse\"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe5\x01\n\x15ListViolationsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)assuredworkloads.googleapis.com/Violation\x12\x43\n\x08interval\x18\x02 \x01(\x0b\x32,.google.cloud.assuredworkloads.v1.TimeWindowB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"r\n\x16ListViolationsResponse\x12?\n\nviolations\x18\x01 \x03(\x0b\x32+.google.cloud.assuredworkloads.v1.Violation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x13GetViolationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)assuredworkloads.googleapis.com/Violation\"\x8e\x0e\n\tViolation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nbegin_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0cresolve_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x07 \x01(\x0e\x32\x31.google.cloud.assuredworkloads.v1.Violation.StateB\x03\xe0\x41\x03\x12%\n\x15org_policy_constraint\x18\x08 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1e\n\x0e\x61udit_log_link\x18\x0b \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12(\n\x18non_compliant_org_policy\x18\x0c \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12Q\n\x0bremediation\x18\r \x01(\x0b\x32\x37.google.cloud.assuredworkloads.v1.Violation.RemediationB\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63knowledged\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x12\x42\n\x14\x61\x63knowledgement_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12(\n\x18\x65xception_audit_log_link\x18\x10 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x1a\x8c\x07\n\x0bRemediation\x12_\n\x0cinstructions\x18\x01 \x01(\x0b\x32\x44.google.cloud.assuredworkloads.v1.Violation.Remediation.InstructionsB\x03\xe0\x41\x02\x12\x18\n\x10\x63ompliant_values\x18\x02 \x03(\t\x12\x66\n\x10remediation_type\x18\x03 \x01(\x0e\x32G.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationTypeB\x03\xe0\x41\x03\x1a\xfa\x02\n\x0cInstructions\x12h\n\x13gcloud_instructions\x18\x01 \x01(\x0b\x32K.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud\x12j\n\x14\x63onsole_instructions\x18\x02 \x01(\x0b\x32L.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console\x1aJ\n\x06Gcloud\x12\x17\n\x0fgcloud_commands\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\x1aH\n\x07\x43onsole\x12\x14\n\x0c\x63onsole_uris\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\"\x9c\x02\n\x0fRemediationType\x12 \n\x1cREMEDIATION_TYPE_UNSPECIFIED\x10\x00\x12,\n(REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION\x10\x01\x12\x38\n4REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION\x10\x02\x12\x37\n3REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION\x10\x03\x12\x46\nBREMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION\x10\x04\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOLVED\x10\x02\x12\x0e\n\nUNRESOLVED\x10\x03\x12\r\n\tEXCEPTION\x10\x04:\x8e\x01\xea\x41\x8a\x01\n)assuredworkloads.googleapis.com/Violation\x12]organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}B\x17\n\x15_acknowledgement_time2\x86\x0e\n\x17\x41ssuredWorkloadsService\x12\xef\x01\n\x0e\x43reateWorkload\x12\x37.google.cloud.assuredworkloads.v1.CreateWorkloadRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41+\n\x08Workload\x12\x1f\x43reateWorkloadOperationMetadata\xda\x41\x0fparent,workload\x82\xd3\xe4\x93\x02>\"2/v1/{parent=organizations/*/locations/*}/workloads:\x08workload\x12\xdb\x01\n\x0eUpdateWorkload\x12\x37.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest\x1a*.google.cloud.assuredworkloads.v1.Workload\"d\xda\x41\x14workload,update_mask\x82\xd3\xe4\x93\x02G2;/v1/{workload.name=organizations/*/locations/*/workloads/*}:\x08workload\x12\xf9\x01\n\x18RestrictAllowedResources\x12\x41.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest\x1a\x42.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse\"V\x82\xd3\xe4\x93\x02P\"K/v1/{name=organizations/*/locations/*/workloads/*}:restrictAllowedResources:\x01*\x12\xa4\x01\n\x0e\x44\x65leteWorkload\x12\x37.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/locations/*/workloads/*}\x12\xb2\x01\n\x0bGetWorkload\x12\x34.google.cloud.assuredworkloads.v1.GetWorkloadRequest\x1a*.google.cloud.assuredworkloads.v1.Workload\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/locations/*/workloads/*}\x12\xc5\x01\n\rListWorkloads\x12\x36.google.cloud.assuredworkloads.v1.ListWorkloadsRequest\x1a\x37.google.cloud.assuredworkloads.v1.ListWorkloadsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*/locations/*}/workloads\x12\x8e\x01\n\x0eListViolations\x12\x37.google.cloud.assuredworkloads.v1.ListViolationsRequest\x1a\x38.google.cloud.assuredworkloads.v1.ListViolationsResponse\"\t\xda\x41\x06parent\x12{\n\x0cGetViolation\x12\x35.google.cloud.assuredworkloads.v1.GetViolationRequest\x1a+.google.cloud.assuredworkloads.v1.Violation\"\x07\xda\x41\x04name\x12\x97\x01\n\x14\x41\x63knowledgeViolation\x12=.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest\x1a>.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse\"\x00\x1aS\xca\x41\x1f\x61ssuredworkloads.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdd\x02\n$com.google.cloud.assuredworkloads.v1B\x15\x41ssuredworkloadsProtoP\x01ZPcloud.google.com/go/assuredworkloads/apiv1/assuredworkloadspb;assuredworkloadspb\xaa\x02 Google.Cloud.AssuredWorkloads.V1\xca\x02 Google\\Cloud\\AssuredWorkloads\\V1\xea\x02#Google::Cloud::AssuredWorkloads::V1\xea\x41]\n(assuredworkloads.googleapis.com/Location\x12\x31organizations/{organization}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AssuredWorkloads + module V1 + CreateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.CreateWorkloadRequest").msgclass + UpdateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.UpdateWorkloadRequest").msgclass + DeleteWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.DeleteWorkloadRequest").msgclass + GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.GetWorkloadRequest").msgclass + ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListWorkloadsRequest").msgclass + ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListWorkloadsResponse").msgclass + Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload").msgclass + Workload::ResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceInfo").msgclass + Workload::ResourceInfo::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType").enummodule + Workload::KMSSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.KMSSettings").msgclass + Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceSettings").msgclass + Workload::SaaEnrollmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse").msgclass + Workload::SaaEnrollmentResponse::SetupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState").enummodule + Workload::SaaEnrollmentResponse::SetupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError").enummodule + Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ComplianceRegime").enummodule + Workload::KajEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState").enummodule + Workload::Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.Partner").enummodule + CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata").msgclass + RestrictAllowedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest").msgclass + RestrictAllowedResourcesRequest::RestrictionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType").enummodule + RestrictAllowedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse").msgclass + AcknowledgeViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest").msgclass + AcknowledgeViolationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse").msgclass + TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.TimeWindow").msgclass + ListViolationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListViolationsRequest").msgclass + ListViolationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListViolationsResponse").msgclass + GetViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.GetViolationRequest").msgclass + Violation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation").msgclass + Violation::Remediation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation").msgclass + Violation::Remediation::Instructions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions").msgclass + Violation::Remediation::Instructions::Gcloud = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud").msgclass + Violation::Remediation::Instructions::Console = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console").msgclass + Violation::Remediation::RemediationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType").enummodule + Violation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb new file mode 100644 index 000000000000..438ddf9b93f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb @@ -0,0 +1,78 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/assuredworkloads/v1/assuredworkloads.proto for package 'Google.Cloud.AssuredWorkloads.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/assuredworkloads/v1/assuredworkloads_pb' + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + # Service to manage AssuredWorkloads. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.assuredworkloads.v1.AssuredWorkloadsService' + + # Creates Assured Workload. + rpc :CreateWorkload, ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Google::Longrunning::Operation + # Updates an existing workload. + # Currently allows updating of workload display_name and labels. + # For force updates don't set etag field in the Workload. + # Only one update operation per workload can be in progress. + rpc :UpdateWorkload, ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1::Workload + # Restrict the list of resources allowed in the Workload environment. + # The current list of allowed products can be found at + # https://cloud.google.com/assured-workloads/docs/supported-products + # In addition to assuredworkloads.workload.update permission, the user should + # also have orgpolicy.policy.set permission on the folder resource + # to use this functionality. + rpc :RestrictAllowedResources, ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse + # Deletes the workload. Make sure that workload's direct children are already + # in a deleted state, otherwise the request will fail with a + # FAILED_PRECONDITION error. + rpc :DeleteWorkload, ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Google::Protobuf::Empty + # Gets Assured Workload associated with a CRM Node + rpc :GetWorkload, ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1::Workload + # Lists Assured Workloads under a CRM Node. + rpc :ListWorkloads, ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse + # Lists the Violations in the AssuredWorkload Environment. + # Callers may also choose to read across multiple Workloads as per + # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + # character) as a wildcard character instead of workload-id in the parent. + # Format `organizations/{org_id}/locations/{location}/workloads/-` + rpc :ListViolations, ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, ::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse + # Retrieves Assured Workload Violation based on ID. + rpc :GetViolation, ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, ::Google::Cloud::AssuredWorkloads::V1::Violation + # Acknowledges an existing violation. By acknowledging a violation, users + # acknowledge the existence of a compliance violation in their workload and + # decide to ignore it due to a valid business justification. Acknowledgement + # is a permanent operation and it cannot be reverted. + rpc :AcknowledgeViolation, ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md new file mode 100644 index 000000000000..f6053cce5a45 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Assured Workloads for Government 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-assured_workloads-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb new file mode 100644 index 000000000000..29b652613713 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb @@ -0,0 +1,720 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AssuredWorkloads + module V1 + # Request for creating a workload. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @!attribute [rw] workload + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # Required. Assured Workload to create + # @!attribute [rw] external_id + # @return [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + class CreateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for Updating a workload. + # @!attribute [rw] workload + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # Required. The workload to update. + # The workload's `name` field is used to identify the workload to be updated. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to be updated. + class UpdateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a Workload. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + class DeleteWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching a workload. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Workload to fetch. This is the workload's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + class GetWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching workloads in an organization. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent Resource to list workloads from. + # Must be of the form `organizations/{org_id}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token returned from previous request. Page token contains context from + # previous request. Page token needs to be passed in the second and following + # requests. + # @!attribute [rw] filter + # @return [::String] + # A custom filter for filtering by properties of a workload. At this time, + # only filtering by labels is supported. + class ListWorkloadsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of ListWorkloads endpoint. + # @!attribute [rw] workloads + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload>] + # List of Workloads under a given parent. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token. Return empty if reached the last page. + class ListWorkloadsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Workload object for managing highly regulated workloads of cloud + # customers. + # @!attribute [rw] name + # @return [::String] + # Optional. The resource name of the workload. + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload} + # + # Read-only. + # @!attribute [rw] display_name + # @return [::String] + # Required. The user-assigned display name of the Workload. + # When present it must be between 4 to 30 characters. + # Allowed characters are: lowercase and uppercase letters, numbers, + # hyphen, and spaces. + # + # Example: My Workload + # @!attribute [r] resources + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo>] + # Output only. The resources associated with this workload. + # These resources will be created when creating the workload. + # If any of the projects already exist, the workload creation will fail. + # Always read only. + # @!attribute [rw] compliance_regime + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ComplianceRegime] + # Required. Immutable. Compliance Regime associated with this workload. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Immutable. The Workload creation timestamp. + # @!attribute [rw] billing_account + # @return [::String] + # Optional. The billing account used for the resources which are + # direct children of workload. This billing account is initially associated + # with the resources created as part of Workload creation. + # After the initial creation of these resources, the customer can change + # the assigned billing account. + # The resource name has the form + # `billingAccounts/{billing_account_id}`. For example, + # `billingAccounts/012345-567890-ABCDEF`. + # @!attribute [rw] etag + # @return [::String] + # Optional. ETag of the workload, it is calculated on the basis + # of the Workload contents. It will be used in Update & Delete operations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels applied to the workload. + # @!attribute [rw] provisioned_resources_parent + # @return [::String] + # Input only. The parent resource for the resources managed by this Assured Workload. May + # be either empty or a folder resource which is a child of the + # Workload parent. If not specified all resources are created under the + # parent organization. + # Format: + # folders/\\{folder_id} + # @!attribute [rw] kms_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::KMSSettings] + # Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS + # CMEK key is provisioned. + # This field is deprecated as of Feb 28, 2022. + # In order to create a Keyring, callers should specify, + # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + # @!attribute [rw] resource_settings + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceSettings>] + # Input only. Resource properties that are used to customize workload resources. + # These properties (such as custom project id) will be used to create + # workload resources if possible. This field is optional. + # @!attribute [r] kaj_enrollment_state + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::KajEnrollmentState] + # Output only. Represents the KAJ enrollment state of the given workload. + # @!attribute [rw] enable_sovereign_controls + # @return [::Boolean] + # Optional. Indicates the sovereignty status of the given workload. + # Currently meant to be used by Europe/Canada customers. + # @!attribute [r] saa_enrollment_response + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse] + # Output only. Represents the SAA enrollment response of the given workload. + # SAA enrollment response is queried during GetWorkload call. + # In failure cases, user friendly error message is shown in SAA details page. + # @!attribute [r] compliant_but_disallowed_services + # @return [::Array<::String>] + # Output only. Urls for services which are compliant for this Assured Workload, but which + # are currently disallowed by the ResourceUsageRestriction org policy. + # Invoke RestrictAllowedResources endpoint to allow your project developers + # to use these services in their environment." + # @!attribute [rw] partner + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::Partner] + # Optional. Compliance Regime associated with this workload. + class Workload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represent the resources that are children of this Workload. + # @!attribute [rw] resource_id + # @return [::Integer] + # Resource identifier. + # For a project this represents project_number. + # @!attribute [rw] resource_type + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo::ResourceType] + # Indicates the type of resource. + class ResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of resource. + module ResourceType + # Unknown resource type. + RESOURCE_TYPE_UNSPECIFIED = 0 + + # Consumer project. + # AssuredWorkloads Projects are no longer supported. This field will be + # ignored only in CreateWorkload requests. ListWorkloads and GetWorkload + # will continue to provide projects information. + # Use CONSUMER_FOLDER instead. + CONSUMER_PROJECT = 1 + + # Consumer Folder. + CONSUMER_FOLDER = 4 + + # Consumer project containing encryption keys. + ENCRYPTION_KEYS_PROJECT = 2 + + # Keyring resource that hosts encryption keys. + KEYRING = 3 + end + end + + # Settings specific to the Key Management Service. + # This message is deprecated. + # In order to create a Keyring, callers should specify, + # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] next_rotation_time + # @return [::Google::Protobuf::Timestamp] + # Required. Input only. Immutable. The time at which the Key Management Service will automatically create a + # new version of the crypto key and mark it as the primary. + # @!attribute [rw] rotation_period + # @return [::Google::Protobuf::Duration] + # Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key + # Management Service automatically rotates a key. Must be at least 24 hours + # and at most 876,000 hours. + class KMSSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represent the custom settings for the resources to be created. + # @!attribute [rw] resource_id + # @return [::String] + # Resource identifier. + # For a project this represents project_id. If the project is already + # taken, the workload creation will fail. + # For KeyRing, this represents the keyring_id. + # For a folder, don't set this value as folder_id is assigned by Google. + # @!attribute [rw] resource_type + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo::ResourceType] + # Indicates the type of resource. This field should be specified to + # correspond the id to the right resource type (CONSUMER_FOLDER or + # ENCRYPTION_KEYS_PROJECT) + # @!attribute [rw] display_name + # @return [::String] + # User-assigned resource display name. + # If not empty it will be used to create a resource with the specified + # name. + class ResourceSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Signed Access Approvals (SAA) enrollment response. + # @!attribute [rw] setup_status + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse::SetupState] + # Indicates SAA enrollment status of a given workload. + # @!attribute [rw] setup_errors + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse::SetupError>] + # Indicates SAA enrollment setup error if any. + class SaaEnrollmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Setup state of SAA enrollment. + module SetupState + # Unspecified. + SETUP_STATE_UNSPECIFIED = 0 + + # SAA enrollment pending. + STATUS_PENDING = 1 + + # SAA enrollment comopleted. + STATUS_COMPLETE = 2 + end + + # Setup error of SAA enrollment. + module SetupError + # Unspecified. + SETUP_ERROR_UNSPECIFIED = 0 + + # Invalid states for all customers, to be redirected to AA UI for + # additional details. + ERROR_INVALID_BASE_SETUP = 1 + + # Returned when there is not an EKM key configured. + ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 + + # Returned when there are no enrolled services or the customer is + # enrolled in CAA only for a subset of services. + ERROR_NOT_ALL_SERVICES_ENROLLED = 3 + + # Returned when exception was encountered during evaluation of other + # criteria. + ERROR_SETUP_CHECK_FAILED = 4 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Supported Compliance Regimes. + module ComplianceRegime + # Unknown compliance regime. + COMPLIANCE_REGIME_UNSPECIFIED = 0 + + # Information protection as per DoD IL4 requirements. + IL4 = 1 + + # Criminal Justice Information Services (CJIS) Security policies. + CJIS = 2 + + # FedRAMP High data protection controls + FEDRAMP_HIGH = 3 + + # FedRAMP Moderate data protection controls + FEDRAMP_MODERATE = 4 + + # Assured Workloads For US Regions data protection controls + US_REGIONAL_ACCESS = 5 + + # Health Insurance Portability and Accountability Act controls + HIPAA = 6 + + # Health Information Trust Alliance controls + HITRUST = 7 + + # Assured Workloads For EU Regions and Support controls + EU_REGIONS_AND_SUPPORT = 8 + + # Assured Workloads For Canada Regions and Support controls + CA_REGIONS_AND_SUPPORT = 9 + + # International Traffic in Arms Regulations + ITAR = 10 + + # Assured Workloads for Australia Regions and Support controls + # Available for public preview consumption. + # Don't create production workloads. + AU_REGIONS_AND_US_SUPPORT = 11 + + # Assured Workloads for Partners + ASSURED_WORKLOADS_FOR_PARTNERS = 12 + end + + # Key Access Justifications(KAJ) Enrollment State. + module KajEnrollmentState + # Default State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Pending State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_PENDING = 1 + + # Complete State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_COMPLETE = 2 + end + + # Supported Assured Workloads Partners. + module Partner + # Unknown partner regime/controls. + PARTNER_UNSPECIFIED = 0 + + # S3NS regime/controls. + LOCAL_CONTROLS_BY_S3NS = 1 + end + end + + # Operation metadata to give request details of CreateWorkload. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Time when the operation was created. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the workload. + # @!attribute [rw] parent + # @return [::String] + # Optional. The parent of the workload. + # @!attribute [rw] compliance_regime + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ComplianceRegime] + # Optional. Compliance controls that should be applied to the resources managed by + # the workload. + class CreateWorkloadOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for restricting list of available resources in Workload environment. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @!attribute [rw] restriction_type + # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + class RestrictAllowedResourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of restriction. + module RestrictionType + # Unknown restriction type. + RESTRICTION_TYPE_UNSPECIFIED = 0 + + # Allow the use all of all gcp products, irrespective of the compliance + # posture. This effectively removes gcp.restrictServiceUsage OrgPolicy + # on the AssuredWorkloads Folder. + ALLOW_ALL_GCP_RESOURCES = 1 + + # Based on Workload's compliance regime, allowed list changes. + # See - https://cloud.google.com/assured-workloads/docs/supported-products + # for the list of supported resources. + ALLOW_COMPLIANT_RESOURCES = 2 + end + end + + # Response for restricting the list of allowed resources. + class RestrictAllowedResourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for acknowledging the violation + # Next Id: 4 + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Violation to acknowledge. + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} + # @!attribute [rw] comment + # @return [::String] + # Required. Business justification explaining the need for violation acknowledgement + # @!attribute [rw] non_compliant_org_policy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. This field is deprecated and will be removed in future version of the API. + # Name of the OrgPolicy which was modified with non-compliant change and + # resulted in this violation. + # Format: + # projects/\\{project_number}/policies/\\{constraint_name} + # folders/\\{folder_id}/policies/\\{constraint_name} + # organizations/\\{organization_id}/policies/\\{constraint_name} + class AcknowledgeViolationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for violation acknowledgement + class AcknowledgeViolationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Interval defining a time window. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The start of the time window. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The end of the time window. + class TimeWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching violations in an organization. + # @!attribute [rw] parent + # @return [::String] + # Required. The Workload name. + # Format `organizations/{org_id}/locations/{location}/workloads/{workload}`. + # @!attribute [rw] interval + # @return [::Google::Cloud::AssuredWorkloads::V1::TimeWindow] + # Optional. Specifies the time window for retrieving active Violations. + # When specified, retrieves Violations that were active between start_time + # and end_time. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Page size. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token returned from previous request. + # @!attribute [rw] filter + # @return [::String] + # Optional. A custom filter for filtering by the Violations properties. + class ListViolationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of ListViolations endpoint. + # @!attribute [rw] violations + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Violation>] + # List of Violations under a Workload. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token. Returns empty if reached the last page. + class ListViolationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching a Workload Violation. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Violation to fetch (ie. Violation.name). + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} + class GetViolationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Workload monitoring Violation. + # @!attribute [r] name + # @return [::String] + # Output only. Immutable. Name of the Violation. + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload_id}/violations/\\{violations_id} + # @!attribute [r] description + # @return [::String] + # Output only. Description for the Violation. + # e.g. OrgPolicy gcp.resourceLocations has non compliant value. + # @!attribute [r] begin_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time of the event which triggered the Violation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time when the Violation record was updated. + # @!attribute [r] resolve_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time of the event which fixed the Violation. + # If the violation is ACTIVE this will be empty. + # @!attribute [r] category + # @return [::String] + # Output only. Category under which this violation is mapped. + # e.g. Location, Service Usage, Access, Encryption, etc. + # @!attribute [r] state + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::State] + # Output only. State of the violation + # @!attribute [r] org_policy_constraint + # @return [::String] + # Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in + # this violation. + # @!attribute [r] audit_log_link + # @return [::String] + # Output only. Immutable. Audit Log Link for violated resource + # Format: + # https://console.cloud.google.com/logs/query;query=\\{logName}\\{protoPayload.resourceName}\\{timeRange}\\{folder} + # @!attribute [r] non_compliant_org_policy + # @return [::String] + # Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and + # resulted this violation. + # Format: + # projects/\\{project_number}/policies/\\{constraint_name} + # folders/\\{folder_id}/policies/\\{constraint_name} + # organizations/\\{organization_id}/policies/\\{constraint_name} + # @!attribute [r] remediation + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation] + # Output only. Compliance violation remediation + # @!attribute [r] acknowledged + # @return [::Boolean] + # Output only. A boolean that indicates if the violation is acknowledged + # @!attribute [rw] acknowledgement_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Timestamp when this violation was acknowledged last. + # This will be absent when acknowledged field is marked as false. + # @!attribute [r] exception_audit_log_link + # @return [::String] + # Output only. Immutable. Audit Log link to find business justification provided for violation + # exception. Format: + # https://console.cloud.google.com/logs/query;query=\\{logName}\\{protoPayload.resourceName}\\{protoPayload.methodName}\\{timeRange}\\{organization} + class Violation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents remediation guidance to resolve compliance violation for + # AssuredWorkload + # @!attribute [rw] instructions + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions] + # Required. Remediation instructions to resolve violations + # @!attribute [rw] compliant_values + # @return [::Array<::String>] + # Values that can resolve the violation + # For example: for list org policy violations, this will either be the list + # of allowed or denied values + # @!attribute [r] remediation_type + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::RemediationType] + # Output only. Reemediation type based on the type of org policy values violated + class Remediation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Instructions to remediate violation + # @!attribute [rw] gcloud_instructions + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions::Gcloud] + # Remediation instructions to resolve violation via gcloud cli + # @!attribute [rw] console_instructions + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions::Console] + # Remediation instructions to resolve violation via cloud console + class Instructions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Remediation instructions to resolve violation via gcloud cli + # @!attribute [rw] gcloud_commands + # @return [::Array<::String>] + # Gcloud command to resolve violation + # @!attribute [rw] steps + # @return [::Array<::String>] + # Steps to resolve violation via gcloud cli + # @!attribute [rw] additional_links + # @return [::Array<::String>] + # Additional urls for more information about steps + class Gcloud + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Remediation instructions to resolve violation via cloud console + # @!attribute [rw] console_uris + # @return [::Array<::String>] + # Link to console page where violations can be resolved + # @!attribute [rw] steps + # @return [::Array<::String>] + # Steps to resolve violation via cloud console + # @!attribute [rw] additional_links + # @return [::Array<::String>] + # Additional urls for more information about steps + class Console + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Classifying remediation into various types based on the kind of + # violation. For example, violations caused due to changes in boolean org + # policy requires different remediation instructions compared to violation + # caused due to changes in allowed values of list org policy. + module RemediationType + # Unspecified remediation type + REMEDIATION_TYPE_UNSPECIFIED = 0 + + # Remediation type for boolean org policy + REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION = 1 + + # Remediation type for list org policy which have allowed values in the + # monitoring rule + REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION = 2 + + # Remediation type for list org policy which have denied values in the + # monitoring rule + REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION = 3 + + # Remediation type for gcp.restrictCmekCryptoKeyProjects + REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION = 4 + end + end + + # Violation State Values + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Violation is resolved. + RESOLVED = 2 + + # Violation is Unresolved + UNRESOLVED = 3 + + # Violation is Exception + EXCEPTION = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile new file mode 100644 index 000000000000..49bd814d146e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1", path: "../" +else + gem "google-cloud-assured_workloads-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-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb new file mode 100644 index 000000000000..e2828db3324c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the acknowledge_violation call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation. +# +def acknowledge_violation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new + + # Call the acknowledge_violation method. + result = client.acknowledge_violation request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb new file mode 100644 index 000000000000..c3ab7fb1bcf6 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.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 assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the create_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload. +# +def create_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new + + # Call the create_workload method. + result = client.create_workload request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb new file mode 100644 index 000000000000..9b95aca15297 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the delete_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload. +# +def delete_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new + + # Call the delete_workload method. + result = client.delete_workload request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb new file mode 100644 index 000000000000..c957fe2e6f20 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the get_violation call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation. +# +def get_violation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new + + # Call the get_violation method. + result = client.get_violation request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Violation. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb new file mode 100644 index 000000000000..4c570c4bf025 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the get_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload. +# +def get_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new + + # Call the get_workload method. + result = client.get_workload request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb new file mode 100644 index 000000000000..8592a9b4a1c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the list_violations call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations. +# +def list_violations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new + + # Call the list_violations method. + result = client.list_violations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Violation. + p item + end +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb new file mode 100644 index 000000000000..480c6982ac6a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the list_workloads call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads. +# +def list_workloads + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new + + # Call the list_workloads method. + result = client.list_workloads request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. + p item + end +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb new file mode 100644 index 000000000000..e6804ae174be --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources. +# +def restrict_allowed_resources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new + + # Call the restrict_allowed_resources method. + result = client.restrict_allowed_resources request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb new file mode 100644 index 000000000000..6a0d2952fd66 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the update_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload. +# +def update_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new + + # Call the update_workload method. + result = client.update_workload request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json new file mode 100644 index 000000000000..95dad32c09ec --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json @@ -0,0 +1,375 @@ +{ + "client_library": { + "name": "google-cloud-assured_workloads-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.assuredworkloads.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync", + "title": "Snippet for the create_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload.", + "file": "assured_workloads_service/create_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "CreateWorkload", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.CreateWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync", + "title": "Snippet for the update_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload.", + "file": "assured_workloads_service/update_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::Workload", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "UpdateWorkload", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.UpdateWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync", + "title": "Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources.", + "file": "assured_workloads_service/restrict_allowed_resources.rb", + "language": "RUBY", + "client_method": { + "short_name": "restrict_allowed_resources", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "RestrictAllowedResources", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.RestrictAllowedResources", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync", + "title": "Snippet for the delete_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload.", + "file": "assured_workloads_service/delete_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "DeleteWorkload", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.DeleteWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync", + "title": "Snippet for the get_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload.", + "file": "assured_workloads_service/get_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::Workload", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "GetWorkload", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync", + "title": "Snippet for the list_workloads call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads.", + "file": "assured_workloads_service/list_workloads.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workloads", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "ListWorkloads", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListWorkloads", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync", + "title": "Snippet for the list_violations call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations.", + "file": "assured_workloads_service/list_violations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_violations", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "ListViolations", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListViolations", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync", + "title": "Snippet for the get_violation call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation.", + "file": "assured_workloads_service/get_violation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_violation", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::Violation", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "GetViolation", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetViolation", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync", + "title": "Snippet for the acknowledge_violation call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation.", + "file": "assured_workloads_service/acknowledge_violation.rb", + "language": "RUBY", + "client_method": { + "short_name": "acknowledge_violation", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "AcknowledgeViolation", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.AcknowledgeViolation", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "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-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb new file mode 100644 index 000000000000..5527cbf0077f --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_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/assuredworkloads/v1/assuredworkloads_pb" +require "google/cloud/assuredworkloads/v1/assuredworkloads_services_pb" +require "google/cloud/assured_workloads/v1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb new file mode 100644 index 000000000000..a6a2edfb3038 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_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/assured_workloads/v1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_violation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.violation_path organization: "value0", location: "value1", workload: "value2", violation: "value3" + assert_equal "organizations/value0/locations/value1/workloads/value2/violations/value3", path + end + end + + def test_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workload_path organization: "value0", location: "value1", workload: "value2" + assert_equal "organizations/value0/locations/value1/workloads/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb new file mode 100644 index 000000000000..7154f9af9842 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb @@ -0,0 +1,431 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" + + +class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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_workload + # Create test objects. + 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" + workload = {} + external_id = "hello world" + + create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_workload parent: parent, workload: workload, external_id: external_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_workload ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_workload({ parent: parent, workload: workload, external_id: external_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_workload(::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workload_client_stub.call_count + end + end + end + + def test_update_workload + # Create test objects. + client_result = ::Google::Cloud::AssuredWorkloads::V1::Workload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + workload = {} + update_mask = {} + + update_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_update_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_workload({ workload: workload, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_workload workload: workload, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_workload ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_workload({ workload: workload, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_workload(::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workload_client_stub.call_count + end + end + end + + def test_restrict_allowed_resources + # Create test objects. + client_result = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + restriction_type = :RESTRICTION_TYPE_UNSPECIFIED + + restrict_allowed_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::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_restrict_allowed_resources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restrict_allowed_resources_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.restrict_allowed_resources name: name, restriction_type: restriction_type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restrict_allowed_resources_client_stub.call_count + end + end + end + + def test_delete_workload + # 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_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_workload({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_workload name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_workload ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_workload({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_workload(::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.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_workload_client_stub.call_count + end + end + end + + def test_get_workload + # Create test objects. + client_result = ::Google::Cloud::AssuredWorkloads::V1::Workload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_workload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_workload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_workload ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_workload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_workload(::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_count + end + end + end + + def test_list_workloads + # Create test objects. + client_result = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.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_workloads_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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb new file mode 100644 index 000000000000..d79badf210d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb @@ -0,0 +1,683 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/assuredworkloads/v1/assuredworkloads_pb" +require "google/cloud/assured_workloads/v1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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_workload + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workload = {} + external_id = "hello world" + + create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::Workload), request["workload"] + assert_equal "hello world", request["external_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_workload({ parent: parent, workload: workload, external_id: external_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_workload parent: parent, workload: workload, external_id: external_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_workload ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_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_workload({ parent: parent, workload: workload, external_id: external_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_workload(::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_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_workload_client_stub.call_rpc_count + end + end + + def test_update_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Workload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workload = {} + update_mask = {} + + update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::Workload), request["workload"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_workload({ workload: workload, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_workload workload: workload, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_workload ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, 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_workload({ workload: workload, 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_workload(::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, 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_workload_client_stub.call_rpc_count + end + end + + def test_restrict_allowed_resources + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + restriction_type = :RESTRICTION_TYPE_UNSPECIFIED + + restrict_allowed_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restrict_allowed_resources, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, request + assert_equal "hello world", request["name"] + assert_equal :RESTRICTION_TYPE_UNSPECIFIED, request["restriction_type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, restrict_allowed_resources_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.restrict_allowed_resources name: name, restriction_type: restriction_type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restrict_allowed_resources_client_stub.call_rpc_count + end + end + + def test_delete_workload + # 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_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_workload({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_workload name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_workload ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.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_workload({ 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_workload(::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.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_workload_client_stub.call_rpc_count + end + end + + def test_get_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Workload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_workload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_workload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_workload ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_workload({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_workload(::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_rpc_count + end + end + + def test_list_workloads + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workloads, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workloads_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.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_workloads_client_stub.call_rpc_count + end + end + + def test_list_violations + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + interval = {} + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_violations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_violations, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::TimeWindow), request["interval"] + 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_violations_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_violations({ parent: parent, interval: interval, 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_violations parent: parent, interval: interval, 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_violations ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new(parent: parent, interval: interval, 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_violations({ parent: parent, interval: interval, 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_violations(::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new(parent: parent, interval: interval, 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_violations_client_stub.call_rpc_count + end + end + + def test_get_violation + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Violation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_violation, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_violation_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_violation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_violation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_violation ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_violation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_violation(::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_violation_client_stub.call_rpc_count + end + end + + def test_acknowledge_violation + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + comment = "hello world" + non_compliant_org_policy = "hello world" + + acknowledge_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :acknowledge_violation, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["comment"] + assert_equal "hello world", request["non_compliant_org_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, acknowledge_violation_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.acknowledge_violation({ name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.acknowledge_violation name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.acknowledge_violation ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new(name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.acknowledge_violation({ name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.acknowledge_violation(::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new(name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, acknowledge_violation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/.gitignore b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..f2e12959542e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "assuredworkloads.googleapis.com", + "api_shortname": "assuredworkloads", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1beta1/latest", + "distribution_name": "google-cloud-assured_workloads-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "assuredworkloads", + "name_pretty": "Assured Workloads for Government V1beta1 API", + "product_documentation": "https://cloud.google.com/assured-workloads/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details.", + "ruby-cloud-env-prefix": "ASSURED_WORKLOADS", + "ruby-cloud-product-url": "https://cloud.google.com/assured-workloads/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..81a9ba91c667 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-assured_workloads-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-assured_workloads-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/.yardopts b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts new file mode 100644 index 000000000000..a6fffa2ff6ae --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Assured Workloads for Government 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-assured_workloads-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..741738ed213d --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-assured_workloads-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-assured_workloads-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/assured_workloads/v1beta1" + +client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/assured_workloads/v1beta1" + +::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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-assured_workloads-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/assured_workloads/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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-assured_workloads-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md new file mode 100644 index 000000000000..340da681774a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Assured Workloads for Government V1beta1 API + +API Client library for the Assured Workloads for Government V1beta1 API + +Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads 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 Assured Workloads for Government V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-assured_workloads](https://rubygems.org/gems/google-cloud-assured_workloads). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-assured_workloads-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/assuredworkloads.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/assured_workloads/v1beta1" + +client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new +request = ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new # (request fields as keyword arguments...) +response = client.create_workload request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/assured-workloads/) +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/assured_workloads/v1beta1" +require "logger" + +client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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-assured_workloads`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-assured_workloads-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-assured_workloads`. +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-assured_workloads-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-assured_workloads-v1beta1/Rakefile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile new file mode 100644 index 000000000000..d453b207ad79 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["ASSURED_WORKLOADS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["ASSURED_WORKLOADS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["ASSURED_WORKLOADS_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 ASSURED_WORKLOADS_TEST_PROJECT=test123 ASSURED_WORKLOADS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" + ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["ASSURED_WORKLOADS_PROJECT"] = project + ENV["ASSURED_WORKLOADS_TEST_PROJECT"] = project + ENV["ASSURED_WORKLOADS_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-assured_workloads-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-assured_workloads-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-assured_workloads-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-assured_workloads-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-assured_workloads-v1beta1" + header "google-cloud-assured_workloads-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-assured_workloads-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-assured_workloads-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-assured_workloads-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-assured_workloads-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-assured_workloads-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..578c2e88d018 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.assuredworkloads.v1beta1", + "libraryPackage": "::Google::Cloud::AssuredWorkloads::V1beta1", + "services": { + "AssuredWorkloadsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client", + "rpcs": { + "CreateWorkload": { + "methods": [ + "create_workload" + ] + }, + "UpdateWorkload": { + "methods": [ + "update_workload" + ] + }, + "RestrictAllowedResources": { + "methods": [ + "restrict_allowed_resources" + ] + }, + "DeleteWorkload": { + "methods": [ + "delete_workload" + ] + }, + "GetWorkload": { + "methods": [ + "get_workload" + ] + }, + "AnalyzeWorkloadMove": { + "methods": [ + "analyze_workload_move" + ] + }, + "ListWorkloads": { + "methods": [ + "list_workloads" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec new file mode 100644 index 000000000000..f71457c6bfc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/assured_workloads/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-assured_workloads-v1beta1" + gem.version = Google::Cloud::AssuredWorkloads::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details." + gem.summary = "API Client library for the Assured Workloads for Government 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-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb new file mode 100644 index 000000000000..4b23acdd7178 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-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/assured_workloads/v1beta1" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb new file mode 100644 index 000000000000..4395df713d7c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/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/assured_workloads/v1beta1/assured_workloads_service" +require "google/cloud/assured_workloads/v1beta1/version" + +module Google + module Cloud + module AssuredWorkloads + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/assured_workloads/v1beta1" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/assured_workloads/v1beta1" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + module V1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/assured_workloads/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb new file mode 100644 index 000000000000..077d6ddf1b47 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/assured_workloads/v1beta1/version" + +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/client" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + ## + # Service to manage AssuredWorkloads. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + module AssuredWorkloadsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "assured_workloads_service", "helpers.rb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb new file mode 100644 index 000000000000..e6d7c99a4c68 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb @@ -0,0 +1,1123 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/assuredworkloads/v1beta1/assuredworkloads_service_pb" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + ## + # Client for the AssuredWorkloadsService service. + # + # Service to manage AssuredWorkloads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :assured_workloads_service_stub + + ## + # Configure the AssuredWorkloadsService Client class. + # + # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssuredWorkloadsService clients + # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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", "AssuredWorkloads", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_workload.timeout = 60.0 + + default_config.rpcs.update_workload.timeout = 60.0 + + default_config.rpcs.delete_workload.timeout = 60.0 + default_config.rpcs.delete_workload.retry_policy = { + initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_workload.timeout = 60.0 + default_config.rpcs.get_workload.retry_policy = { + initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.analyze_workload_move.timeout = 60.0 + default_config.rpcs.analyze_workload_move.retry_policy = { + initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workloads.timeout = 60.0 + default_config.rpcs.list_workloads.retry_policy = { + initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssuredWorkloadsService 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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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 + @assured_workloads_service_stub.universe_domain + end + + ## + # Create a new AssuredWorkloadsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssuredWorkloadsService 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/assuredworkloads/v1beta1/assuredworkloads_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 + + @assured_workloads_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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 + ) + + @assured_workloads_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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @assured_workloads_service_stub.logger + end + + # Service calls + + ## + # Creates Assured Workload. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workload(parent: nil, workload: nil, external_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] + # Required. Assured Workload to create + # @param external_id [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest + + # Converts hash and nil to 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::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_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing workload. + # Currently allows updating of workload display_name and labels. + # For force updates don't set etag field in the Workload. + # Only one update operation per workload can be in progress. + # + # @overload update_workload(request, options = nil) + # Pass arguments to `update_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workload(workload: nil, update_mask: nil) + # Pass arguments to `update_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] + # Required. The workload to update. + # The workload's `name` field is used to identify the workload to be updated. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new + # + # # Call the update_workload method. + # result = client.update_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. + # p result + # + def update_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest + + # Converts hash and nil to 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::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.update_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restrict the list of resources allowed in the Workload environment. + # The current list of allowed products can be found at + # https://cloud.google.com/assured-workloads/docs/supported-products + # In addition to assuredworkloads.workload.update permission, the user should + # also have orgpolicy.policy.set permission on the folder resource + # to use this functionality. + # + # @overload restrict_allowed_resources(request, options = nil) + # Pass arguments to `restrict_allowed_resources` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restrict_allowed_resources(name: nil, restriction_type: nil) + # Pass arguments to `restrict_allowed_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 name [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new + # + # # Call the restrict_allowed_resources method. + # result = client.restrict_allowed_resources request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. + # p result + # + def restrict_allowed_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restrict_allowed_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::AssuredWorkloads::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.restrict_allowed_resources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :restrict_allowed_resources, request, 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 workload. Make sure that workload's direct children are already + # in a deleted state, otherwise the request will fail with a + # FAILED_PRECONDITION error. + # In addition to assuredworkloads.workload.delete permission, the user should + # also have orgpolicy.policy.set permission on the deleted folder to remove + # Assured Workloads OrgPolicies. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workload(name: nil, etag: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param etag [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + # + # @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/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest + + # Converts hash and nil to 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::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_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets Assured Workload associated with a CRM Node + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Workload to fetch. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::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.get_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Analyze if the source Assured Workloads can be moved to the target Assured + # Workload + # + # @overload analyze_workload_move(request, options = nil) + # Pass arguments to `analyze_workload_move` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload analyze_workload_move(source: nil, project: nil, target: nil) + # Pass arguments to `analyze_workload_move` via keyword arguments. Note that at + # least one keyword argument is 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 [::String] + # The source type is a project-based workload. Specify the workloads's + # relative resource name, formatted as: + # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" + # For example: + # "organizations/123/locations/us-east1/workloads/assured-workload-1" + # + # Note: The following parameters are mutually exclusive: `source`, `project`. 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 project [::String] + # The source type is a project. Specify the project's relative resource + # name, formatted as either a project number or a project ID: + # "projects/\\{PROJECT_NUMBER}" or "projects/\\{PROJECT_ID}" + # For example: + # "projects/951040570662" when specifying a project number, or + # "projects/my-project-123" when specifying a project ID. + # + # Note: The following parameters are mutually exclusive: `project`, `source`. 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 target [::String] + # Required. The resource ID of the folder-based destination workload. This workload is + # where the source project will hypothetically be moved to. Specify the + # workload's relative resource name, formatted as: + # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" + # For example: + # "organizations/123/locations/us-east1/workloads/assured-workload-2" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new + # + # # Call the analyze_workload_move method. + # result = client.analyze_workload_move request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse. + # p result + # + def analyze_workload_move request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.analyze_workload_move.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::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.analyze_workload_move.timeout, + metadata: metadata, + retry_policy: @config.rpcs.analyze_workload_move.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :analyze_workload_move, request, 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 Assured Workloads under a CRM Node. + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent Resource to list workloads from. + # Must be of the form `organizations/{org_id}/locations/{location}`. + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token returned from previous request. Page token contains context from + # previous request. Page token needs to be passed in the second and following + # requests. + # @param filter [::String] + # A custom filter for filtering by properties of a workload. At this time, + # only filtering by labels is supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::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.list_workloads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssuredWorkloadsService API. + # + # This class represents the configuration for AssuredWorkloadsService, + # providing control 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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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 = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::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 AssuredWorkloadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `update_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workload + ## + # RPC-specific configuration for `restrict_allowed_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :restrict_allowed_resources + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + ## + # RPC-specific configuration for `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `analyze_workload_move` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_workload_move + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + + # @private + def initialize parent_rpcs = nil + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload + @update_workload = ::Gapic::Config::Method.new update_workload_config + restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources + @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + analyze_workload_move_config = parent_rpcs.analyze_workload_move if parent_rpcs.respond_to? :analyze_workload_move + @analyze_workload_move = ::Gapic::Config::Method.new analyze_workload_move_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb new file mode 100644 index 000000000000..c940ead393b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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 AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + # Credentials for the AssuredWorkloadsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "ASSURED_WORKLOADS_CREDENTIALS", + "ASSURED_WORKLOADS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "ASSURED_WORKLOADS_CREDENTIALS_JSON", + "ASSURED_WORKLOADS_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb new file mode 100644 index 000000000000..2ff113682d1a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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 AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AssuredWorkloadsService 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 AssuredWorkloadsService 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::AssuredWorkloads::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::AssuredWorkloads::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::AssuredWorkloads::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::AssuredWorkloads::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::AssuredWorkloads::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 = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb new file mode 100644 index 000000000000..abdcfdd68cde --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.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 AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + # Path helper methods for the AssuredWorkloadsService API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified Workload resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/workloads/{workload}` + # + # @param organization [String] + # @param location [String] + # @param workload [String] + # + # @return [::String] + def workload_path organization:, location:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/workloads/#{workload}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb new file mode 100644 index 000000000000..6c4602274f15 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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/assured_workloads/v1beta1/version" + +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + ## + # Service to manage AssuredWorkloads. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + module AssuredWorkloadsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb new file mode 100644 index 000000000000..40d652c51c19 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb @@ -0,0 +1,655 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/assuredworkloads/v1beta1/assuredworkloads_service_pb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + module Rest + ## + # REST client for the AssuredWorkloadsService service. + # + # Service to manage AssuredWorkloads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :assured_workloads_service_stub + + ## + # Configure the AssuredWorkloadsService Client class. + # + # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssuredWorkloadsService clients + # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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", "AssuredWorkloads", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_workload.timeout = 60.0 + + default_config.rpcs.delete_workload.timeout = 60.0 + default_config.rpcs.delete_workload.retry_policy = { + initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssuredWorkloadsService 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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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 + @assured_workloads_service_stub.universe_domain + end + + ## + # Create a new AssuredWorkloadsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssuredWorkloadsService 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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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 + + @assured_workloads_service_stub = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @assured_workloads_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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @assured_workloads_service_stub.logger + end + + # Service calls + + ## + # Creates Assured Workload. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workload(parent: nil, workload: nil, external_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] + # Required. Assured Workload to create + # @param external_id [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest + + # Converts hash and nil to an 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::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_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.create_workload request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restrict the list of resources allowed in the Workload environment. + # The current list of allowed products can be found at + # https://cloud.google.com/assured-workloads/docs/supported-products + # In addition to assuredworkloads.workload.update permission, the user should + # also have orgpolicy.policy.set permission on the folder resource + # to use this functionality. + # + # @overload restrict_allowed_resources(request, options = nil) + # Pass arguments to `restrict_allowed_resources` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restrict_allowed_resources(name: nil, restriction_type: nil) + # Pass arguments to `restrict_allowed_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 name [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new + # + # # Call the restrict_allowed_resources method. + # result = client.restrict_allowed_resources request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. + # p result + # + def restrict_allowed_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restrict_allowed_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::AssuredWorkloads::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.restrict_allowed_resources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.restrict_allowed_resources request, 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 workload. Make sure that workload's direct children are already + # in a deleted state, otherwise the request will fail with a + # FAILED_PRECONDITION error. + # In addition to assuredworkloads.workload.delete permission, the user should + # also have orgpolicy.policy.set permission on the deleted folder to remove + # Assured Workloads OrgPolicies. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workload(name: nil, etag: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param etag [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + # @yield [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/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest + + # Converts hash and nil to an 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_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::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_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.delete_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssuredWorkloadsService REST API. + # + # This class represents the configuration for AssuredWorkloadsService 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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::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 AssuredWorkloadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `restrict_allowed_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :restrict_allowed_resources + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + + # @private + def initialize parent_rpcs = nil + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources + @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb new file mode 100644 index 000000000000..95867d5f579e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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 AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AssuredWorkloadsService 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 AssuredWorkloadsService 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::AssuredWorkloads::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::AssuredWorkloads::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::AssuredWorkloads::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::AssuredWorkloads::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 = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::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{^organizations/[^/]+/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{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb new file mode 100644 index 000000000000..e3b6724a99f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb @@ -0,0 +1,266 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + module Rest + ## + # REST service stub for the AssuredWorkloadsService 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_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the restrict_allowed_resources REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # A result object deserialized from the server's reply + def restrict_allowed_resources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restrict_allowed_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: "restrict_allowed_resources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.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_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workload", + 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_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest] + # 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_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/workloads", + body: "workload", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restrict_allowed_resources REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restrict_allowed_resources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:restrictAllowedResources", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest] + # 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_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb new file mode 100644 index 000000000000..8e2c6c93872f --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/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/assured_workloads/v1beta1/assured_workloads_service/rest" +require "google/cloud/assured_workloads/v1beta1/version" + +module Google + module Cloud + module AssuredWorkloads + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/assured_workloads/v1beta1/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + module V1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb new file mode 100644 index 000000000000..871b2223ff1d --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/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 AssuredWorkloads + module V1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb new file mode 100644 index 000000000000..8c8ba5ca8ba8 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads.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' + + +descriptor_data = "\n\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x12GetWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\"s\n\x1a\x41nalyzeWorkloadMoveRequest\x12\x10\n\x06source\x18\x01 \x01(\tH\x00\x12\x11\n\x07project\x18\x03 \x01(\tH\x00\x12\x13\n\x06target\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x1b\n\x19projectOrWorkloadResource\"/\n\x1b\x41nalyzeWorkloadMoveResponse\x12\x10\n\x08\x62lockers\x18\x01 \x03(\t\"\x8f\x01\n\x14ListWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"t\n\x15ListWorkloadsResponse\x12\x42\n\tworkloads\x18\x01 \x03(\x0b\x32/.google.cloud.assuredworkloads.v1beta1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd2\x1b\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\tresources\x18\x03 \x03(\x0b\x32<.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfoB\x03\xe0\x41\x03\x12\x63\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegimeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x37\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1c\n\x0f\x62illing_account\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12]\n\x0cil4_settings\x18\x07 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.IL4SettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12_\n\rcjis_settings\x18\x08 \x01(\x0b\x32<.google.cloud.assuredworkloads.v1beta1.Workload.CJISSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12n\n\x15\x66\x65\x64ramp_high_settings\x18\x0b \x01(\x0b\x32\x43.google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12v\n\x19\x66\x65\x64ramp_moderate_settings\x18\x0c \x01(\x0b\x32G.google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\n \x03(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.LabelsEntryB\x03\xe0\x41\x01\x12)\n\x1cprovisioned_resources_parent\x18\r \x01(\tB\x03\xe0\x41\x04\x12X\n\x0ckms_settings\x18\x0e \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x05\x18\x01\xe0\x41\x04\x12`\n\x11resource_settings\x18\x0f \x03(\x0b\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettingsB\x03\xe0\x41\x04\x12\x65\n\x14kaj_enrollment_state\x18\x11 \x01(\x0e\x32\x42.google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentStateB\x03\xe0\x41\x03\x12&\n\x19\x65nable_sovereign_controls\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12k\n\x17saa_enrollment_response\x18\x14 \x01(\x0b\x32\x45.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponseB\x03\xe0\x41\x03\x12.\n!compliant_but_disallowed_services\x18\x18 \x03(\tB\x03\xe0\x41\x03\x1a\x8e\x02\n\x0cResourceInfo\x12\x13\n\x0bresource_id\x18\x01 \x01(\x03\x12`\n\rresource_type\x18\x02 \x01(\x0e\x32I.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType\"\x86\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x10\x43ONSUMER_PROJECT\x10\x01\x1a\x02\x08\x01\x12\x13\n\x0f\x43ONSUMER_FOLDER\x10\x04\x12\x1b\n\x17\x45NCRYPTION_KEYS_PROJECT\x10\x02\x12\x0b\n\x07KEYRING\x10\x03\x1a\x93\x01\n\x0bKMSSettings\x12\x41\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05\x12=\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1al\n\x0bIL4Settings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1am\n\x0c\x43JISSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1at\n\x13\x46\x65\x64rampHighSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1ax\n\x17\x46\x65\x64rampModerateSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1a\x9f\x01\n\x10ResourceSettings\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12`\n\rresource_type\x18\x02 \x01(\x0e\x32I.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x1a\x86\x04\n\x15SaaEnrollmentResponse\x12k\n\x0csetup_status\x18\x01 \x01(\x0e\x32P.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupStateH\x00\x88\x01\x01\x12\x66\n\x0csetup_errors\x18\x02 \x03(\x0e\x32P.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError\"R\n\nSetupState\x12\x1b\n\x17SETUP_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_PENDING\x10\x01\x12\x13\n\x0fSTATUS_COMPLETE\x10\x02\"\xb2\x01\n\nSetupError\x12\x1b\n\x17SETUP_ERROR_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45RROR_INVALID_BASE_SETUP\x10\x01\x12&\n\"ERROR_MISSING_EXTERNAL_SIGNING_KEY\x10\x02\x12#\n\x1f\x45RROR_NOT_ALL_SERVICES_ENROLLED\x10\x03\x12\x1c\n\x18\x45RROR_SETUP_CHECK_FAILED\x10\x04\x42\x0f\n\r_setup_status\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x81\x02\n\x10\x43omplianceRegime\x12!\n\x1d\x43OMPLIANCE_REGIME_UNSPECIFIED\x10\x00\x12\x07\n\x03IL4\x10\x01\x12\x08\n\x04\x43JIS\x10\x02\x12\x10\n\x0c\x46\x45\x44RAMP_HIGH\x10\x03\x12\x14\n\x10\x46\x45\x44RAMP_MODERATE\x10\x04\x12\x16\n\x12US_REGIONAL_ACCESS\x10\x05\x12\t\n\x05HIPAA\x10\x06\x12\x0b\n\x07HITRUST\x10\x07\x12\x1a\n\x16\x45U_REGIONS_AND_SUPPORT\x10\x08\x12\x1a\n\x16\x43\x41_REGIONS_AND_SUPPORT\x10\t\x12\x08\n\x04ITAR\x10\n\x12\x1d\n\x19\x41U_REGIONS_AND_US_SUPPORT\x10\x0b\"\x7f\n\x12KajEnrollmentState\x12$\n KAJ_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cKAJ_ENROLLMENT_STATE_PENDING\x10\x01\x12!\n\x1dKAJ_ENROLLMENT_STATE_COMPLETE\x10\x02:u\xea\x41r\n(assuredworkloads.googleapis.com/Workload\x12\x46organizations/{organization}/locations/{location}/workloads/{workload}B\x1c\n\x1a\x63ompliance_regime_settings\"\xcb\x02\n\x1f\x43reateWorkloadOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12`\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegimeB\x03\xe0\x41\x01\x12`\n\x11resource_settings\x18\x05 \x03(\x0b\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettingsB\x03\xe0\x41\x01\x42\xf6\x02\n)com.google.cloud.assuredworkloads.v1beta1B\x15\x41ssuredworkloadsProtoP\x01ZUcloud.google.com/go/assuredworkloads/apiv1beta1/assuredworkloadspb;assuredworkloadspb\xaa\x02%Google.Cloud.AssuredWorkloads.V1Beta1\xca\x02%Google\\Cloud\\AssuredWorkloads\\V1beta1\xea\x02(Google::Cloud::AssuredWorkloads::V1beta1\xea\x41]\n(assuredworkloads.googleapis.com/Location\x12\x31organizations/{organization}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + CreateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest").msgclass + UpdateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest").msgclass + RestrictAllowedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest").msgclass + RestrictAllowedResourcesRequest::RestrictionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest.RestrictionType").enummodule + RestrictAllowedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesResponse").msgclass + DeleteWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest").msgclass + GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest").msgclass + AnalyzeWorkloadMoveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest").msgclass + AnalyzeWorkloadMoveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveResponse").msgclass + ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest").msgclass + ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse").msgclass + Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload").msgclass + Workload::ResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo").msgclass + Workload::ResourceInfo::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType").enummodule + Workload::KMSSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings").msgclass + Workload::IL4Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings").msgclass + Workload::CJISSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings").msgclass + Workload::FedrampHighSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings").msgclass + Workload::FedrampModerateSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings").msgclass + Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings").msgclass + Workload::SaaEnrollmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse").msgclass + Workload::SaaEnrollmentResponse::SetupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState").enummodule + Workload::SaaEnrollmentResponse::SetupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError").enummodule + Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime").enummodule + Workload::KajEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState").enummodule + CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb new file mode 100644 index 000000000000..99b60a0169c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\nDgoogle/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto\x12%google.cloud.assuredworkloads.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a] + # 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-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb new file mode 100644 index 000000000000..dac4e9559b55 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb @@ -0,0 +1,557 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + # Request for creating a workload. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @!attribute [rw] workload + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # Required. Assured Workload to create + # @!attribute [rw] external_id + # @return [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + class CreateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for Updating a workload. + # @!attribute [rw] workload + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # Required. The workload to update. + # The workload's `name` field is used to identify the workload to be updated. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to be updated. + class UpdateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for restricting list of available resources in Workload environment. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @!attribute [rw] restriction_type + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + class RestrictAllowedResourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of restriction. + module RestrictionType + # Unknown restriction type. + RESTRICTION_TYPE_UNSPECIFIED = 0 + + # Allow the use all of all gcp products, irrespective of the compliance + # posture. This effectively removes gcp.restrictServiceUsage OrgPolicy + # on the AssuredWorkloads Folder. + ALLOW_ALL_GCP_RESOURCES = 1 + + # Based on Workload's compliance regime, allowed list changes. + # See - https://cloud.google.com/assured-workloads/docs/supported-products + # for the list of supported resources. + ALLOW_COMPLIANT_RESOURCES = 2 + end + end + + # Response for restricting the list of allowed resources. + class RestrictAllowedResourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a Workload. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + class DeleteWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching a workload. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Workload to fetch. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + class GetWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to analyze a hypothetical move of a source project or project-based + # workload to a target (destination) folder-based workload. + # @!attribute [rw] source + # @return [::String] + # The source type is a project-based workload. Specify the workloads's + # relative resource name, formatted as: + # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" + # For example: + # "organizations/123/locations/us-east1/workloads/assured-workload-1" + # + # Note: The following fields are mutually exclusive: `source`, `project`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] project + # @return [::String] + # The source type is a project. Specify the project's relative resource + # name, formatted as either a project number or a project ID: + # "projects/\\{PROJECT_NUMBER}" or "projects/\\{PROJECT_ID}" + # For example: + # "projects/951040570662" when specifying a project number, or + # "projects/my-project-123" when specifying a project ID. + # + # Note: The following fields are mutually exclusive: `project`, `source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] target + # @return [::String] + # Required. The resource ID of the folder-based destination workload. This workload is + # where the source project will hypothetically be moved to. Specify the + # workload's relative resource name, formatted as: + # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" + # For example: + # "organizations/123/locations/us-east1/workloads/assured-workload-2" + class AnalyzeWorkloadMoveRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response that includes the analysis of the hypothetical resource move. + # @!attribute [rw] blockers + # @return [::Array<::String>] + # A list of blockers that should be addressed before moving the source + # project or project-based workload to the destination folder-based workload. + class AnalyzeWorkloadMoveResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching workloads in an organization. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent Resource to list workloads from. + # Must be of the form `organizations/{org_id}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token returned from previous request. Page token contains context from + # previous request. Page token needs to be passed in the second and following + # requests. + # @!attribute [rw] filter + # @return [::String] + # A custom filter for filtering by properties of a workload. At this time, + # only filtering by labels is supported. + class ListWorkloadsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of ListWorkloads endpoint. + # @!attribute [rw] workloads + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] + # List of Workloads under a given parent. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token. Return empty if reached the last page. + class ListWorkloadsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An Workload object for managing highly regulated workloads of cloud + # customers. + # @!attribute [rw] name + # @return [::String] + # Optional. The resource name of the workload. + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload} + # + # Read-only. + # @!attribute [rw] display_name + # @return [::String] + # Required. The user-assigned display name of the Workload. + # When present it must be between 4 to 30 characters. + # Allowed characters are: lowercase and uppercase letters, numbers, + # hyphen, and spaces. + # + # Example: My Workload + # @!attribute [r] resources + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo>] + # Output only. The resources associated with this workload. + # These resources will be created when creating the workload. + # If any of the projects already exist, the workload creation will fail. + # Always read only. + # @!attribute [rw] compliance_regime + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] + # Required. Immutable. Compliance Regime associated with this workload. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Immutable. The Workload creation timestamp. + # @!attribute [r] billing_account + # @return [::String] + # Output only. The billing account used for the resources which are + # direct children of workload. This billing account is initially associated + # with the resources created as part of Workload creation. + # After the initial creation of these resources, the customer can change + # the assigned billing account. + # The resource name has the form + # `billingAccounts/{billing_account_id}`. For example, + # `billingAccounts/012345-567890-ABCDEF`. + # @!attribute [rw] il4_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::IL4Settings] + # Input only. Immutable. Settings specific to resources needed for IL4. + # + # Note: The following fields are mutually exclusive: `il4_settings`, `cjis_settings`, `fedramp_high_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cjis_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::CJISSettings] + # Input only. Immutable. Settings specific to resources needed for CJIS. + # + # Note: The following fields are mutually exclusive: `cjis_settings`, `il4_settings`, `fedramp_high_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] fedramp_high_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampHighSettings] + # Input only. Immutable. Settings specific to resources needed for FedRAMP High. + # + # Note: The following fields are mutually exclusive: `fedramp_high_settings`, `il4_settings`, `cjis_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] fedramp_moderate_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampModerateSettings] + # Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. + # + # Note: The following fields are mutually exclusive: `fedramp_moderate_settings`, `il4_settings`, `cjis_settings`, `fedramp_high_settings`. 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 workload, it is calculated on the basis + # of the Workload contents. It will be used in Update & Delete operations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels applied to the workload. + # @!attribute [rw] provisioned_resources_parent + # @return [::String] + # Input only. The parent resource for the resources managed by this Assured Workload. May + # be either empty or a folder resource which is a child of the + # Workload parent. If not specified all resources are created under the + # parent organization. + # Format: + # folders/\\{folder_id} + # @!attribute [rw] kms_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] + # Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS + # CMEK key is provisioned. + # This field is deprecated as of Feb 28, 2022. + # In order to create a Keyring, callers should specify, + # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + # @!attribute [rw] resource_settings + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] + # Input only. Resource properties that are used to customize workload resources. + # These properties (such as custom project id) will be used to create + # workload resources if possible. This field is optional. + # @!attribute [r] kaj_enrollment_state + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KajEnrollmentState] + # Output only. Represents the KAJ enrollment state of the given workload. + # @!attribute [rw] enable_sovereign_controls + # @return [::Boolean] + # Optional. Indicates the sovereignty status of the given workload. + # Currently meant to be used by Europe/Canada customers. + # @!attribute [r] saa_enrollment_response + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse] + # Output only. Represents the SAA enrollment response of the given workload. + # SAA enrollment response is queried during GetWorkload call. + # In failure cases, user friendly error message is shown in SAA details page. + # @!attribute [r] compliant_but_disallowed_services + # @return [::Array<::String>] + # Output only. Urls for services which are compliant for this Assured Workload, but which + # are currently disallowed by the ResourceUsageRestriction org policy. + # Invoke RestrictAllowedResources endpoint to allow your project developers + # to use these services in their environment." + class Workload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represent the resources that are children of this Workload. + # @!attribute [rw] resource_id + # @return [::Integer] + # Resource identifier. + # For a project this represents project_number. + # @!attribute [rw] resource_type + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo::ResourceType] + # Indicates the type of resource. + class ResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of resource. + module ResourceType + # Unknown resource type. + RESOURCE_TYPE_UNSPECIFIED = 0 + + # Deprecated. Existing workloads will continue to support this, but new + # CreateWorkloadRequests should not specify this as an input value. + CONSUMER_PROJECT = 1 + + # Consumer Folder. + CONSUMER_FOLDER = 4 + + # Consumer project containing encryption keys. + ENCRYPTION_KEYS_PROJECT = 2 + + # Keyring resource that hosts encryption keys. + KEYRING = 3 + end + end + + # Settings specific to the Key Management Service. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] next_rotation_time + # @return [::Google::Protobuf::Timestamp] + # Required. Input only. Immutable. The time at which the Key Management Service will automatically create a + # new version of the crypto key and mark it as the primary. + # @!attribute [rw] rotation_period + # @return [::Google::Protobuf::Duration] + # Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key + # Management Service automatically rotates a key. Must be at least 24 hours + # and at most 876,000 hours. + class KMSSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to resources needed for IL4. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] kms_settings + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] + # Input only. Immutable. Settings used to create a CMEK crypto key. + class IL4Settings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to resources needed for CJIS. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] kms_settings + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] + # Input only. Immutable. Settings used to create a CMEK crypto key. + class CJISSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to resources needed for FedRAMP High. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] kms_settings + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] + # Input only. Immutable. Settings used to create a CMEK crypto key. + class FedrampHighSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to resources needed for FedRAMP Moderate. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] kms_settings + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] + # Input only. Immutable. Settings used to create a CMEK crypto key. + class FedrampModerateSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represent the custom settings for the resources to be created. + # @!attribute [rw] resource_id + # @return [::String] + # Resource identifier. + # For a project this represents project_id. If the project is already + # taken, the workload creation will fail. + # For KeyRing, this represents the keyring_id. + # For a folder, don't set this value as folder_id is assigned by Google. + # @!attribute [rw] resource_type + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo::ResourceType] + # Indicates the type of resource. This field should be specified to + # correspond the id to the right project type (CONSUMER_PROJECT or + # ENCRYPTION_KEYS_PROJECT) + # @!attribute [rw] display_name + # @return [::String] + # User-assigned resource display name. + # If not empty it will be used to create a resource with the specified + # name. + class ResourceSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Signed Access Approvals (SAA) enrollment response. + # @!attribute [rw] setup_status + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupState] + # Indicates SAA enrollment status of a given workload. + # @!attribute [rw] setup_errors + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupError>] + # Indicates SAA enrollment setup error if any. + class SaaEnrollmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Setup state of SAA enrollment. + module SetupState + # Unspecified. + SETUP_STATE_UNSPECIFIED = 0 + + # SAA enrollment pending. + STATUS_PENDING = 1 + + # SAA enrollment comopleted. + STATUS_COMPLETE = 2 + end + + # Setup error of SAA enrollment. + module SetupError + # Unspecified. + SETUP_ERROR_UNSPECIFIED = 0 + + # Invalid states for all customers, to be redirected to AA UI for + # additional details. + ERROR_INVALID_BASE_SETUP = 1 + + # Returned when there is not an EKM key configured. + ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 + + # Returned when there are no enrolled services or the customer is + # enrolled in CAA only for a subset of services. + ERROR_NOT_ALL_SERVICES_ENROLLED = 3 + + # Returned when exception was encountered during evaluation of other + # criteria. + ERROR_SETUP_CHECK_FAILED = 4 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Supported Compliance Regimes. + module ComplianceRegime + # Unknown compliance regime. + COMPLIANCE_REGIME_UNSPECIFIED = 0 + + # Information protection as per DoD IL4 requirements. + IL4 = 1 + + # Criminal Justice Information Services (CJIS) Security policies. + CJIS = 2 + + # FedRAMP High data protection controls + FEDRAMP_HIGH = 3 + + # FedRAMP Moderate data protection controls + FEDRAMP_MODERATE = 4 + + # Assured Workloads For US Regions data protection controls + US_REGIONAL_ACCESS = 5 + + # Health Insurance Portability and Accountability Act controls + HIPAA = 6 + + # Health Information Trust Alliance controls + HITRUST = 7 + + # Assured Workloads For EU Regions and Support controls + EU_REGIONS_AND_SUPPORT = 8 + + # Assured Workloads For Canada Regions and Support controls + CA_REGIONS_AND_SUPPORT = 9 + + # International Traffic in Arms Regulations + ITAR = 10 + + # Assured Workloads for Australia Regions and Support controls + AU_REGIONS_AND_US_SUPPORT = 11 + end + + # Key Access Justifications(KAJ) Enrollment State. + module KajEnrollmentState + # Default State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Pending State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_PENDING = 1 + + # Complete State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_COMPLETE = 2 + end + end + + # Operation metadata to give request details of CreateWorkload. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Time when the operation was created. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the workload. + # @!attribute [rw] parent + # @return [::String] + # Optional. The parent of the workload. + # @!attribute [rw] compliance_regime + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] + # Optional. Compliance controls that should be applied to the resources managed by + # the workload. + # @!attribute [rw] resource_settings + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] + # Optional. Resource properties in the input that are used for creating/customizing + # workload resources. + class CreateWorkloadOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..fa17d8d9c654 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1", path: "../" +else + gem "google-cloud-assured_workloads-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-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb new file mode 100644 index 000000000000..81b408eee261 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the analyze_workload_move call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move. +# +def analyze_workload_move + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new + + # Call the analyze_workload_move method. + result = client.analyze_workload_move request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse. + p result +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb new file mode 100644 index 000000000000..014d6ac23a14 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.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 assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the create_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload. +# +def create_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new + + # Call the create_workload method. + result = client.create_workload request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb new file mode 100644 index 000000000000..4f48c90e6969 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the delete_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload. +# +def delete_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new + + # Call the delete_workload method. + result = client.delete_workload request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb new file mode 100644 index 000000000000..32cce0425b59 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the get_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload. +# +def get_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new + + # Call the get_workload method. + result = client.get_workload request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. + p result +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb new file mode 100644 index 000000000000..f5978bf7a2ef --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the list_workloads call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads. +# +def list_workloads + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new + + # Call the list_workloads method. + result = client.list_workloads request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload. + p item + end +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb new file mode 100644 index 000000000000..4323e4795eac --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources. +# +def restrict_allowed_resources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new + + # Call the restrict_allowed_resources method. + result = client.restrict_allowed_resources request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. + p result +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb new file mode 100644 index 000000000000..3f066388fe20 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the update_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload. +# +def update_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new + + # Call the update_workload method. + result = client.update_workload request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. + p result +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json new file mode 100644 index 000000000000..5156be35c227 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-cloud-assured_workloads-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.assuredworkloads.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync", + "title": "Snippet for the create_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload.", + "file": "assured_workloads_service/create_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "CreateWorkload", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.CreateWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync", + "title": "Snippet for the update_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload.", + "file": "assured_workloads_service/update_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::Workload", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "UpdateWorkload", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.UpdateWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync", + "title": "Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources.", + "file": "assured_workloads_service/restrict_allowed_resources.rb", + "language": "RUBY", + "client_method": { + "short_name": "restrict_allowed_resources", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "RestrictAllowedResources", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.RestrictAllowedResources", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync", + "title": "Snippet for the delete_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload.", + "file": "assured_workloads_service/delete_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "DeleteWorkload", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.DeleteWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync", + "title": "Snippet for the get_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload.", + "file": "assured_workloads_service/get_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::Workload", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "GetWorkload", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.GetWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync", + "title": "Snippet for the analyze_workload_move call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move.", + "file": "assured_workloads_service/analyze_workload_move.rb", + "language": "RUBY", + "client_method": { + "short_name": "analyze_workload_move", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "AnalyzeWorkloadMove", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.AnalyzeWorkloadMove", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync", + "title": "Snippet for the list_workloads call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads.", + "file": "assured_workloads_service/list_workloads.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workloads", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "ListWorkloads", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.ListWorkloads", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "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-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb new file mode 100644 index 000000000000..37e84aaa124c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_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/assuredworkloads/v1beta1/assuredworkloads_service_pb" +require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb new file mode 100644 index 000000000000..e911089b4572 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workload_path organization: "value0", location: "value1", workload: "value2" + assert_equal "organizations/value0/locations/value1/workloads/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb new file mode 100644 index 000000000000..3f1893f059fe --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" + + +class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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_workload + # Create test objects. + 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" + workload = {} + external_id = "hello world" + + create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_workload parent: parent, workload: workload, external_id: external_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_workload ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_workload({ parent: parent, workload: workload, external_id: external_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_workload(::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workload_client_stub.call_count + end + end + end + + def test_restrict_allowed_resources + # Create test objects. + client_result = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + restriction_type = :RESTRICTION_TYPE_UNSPECIFIED + + restrict_allowed_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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_restrict_allowed_resources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restrict_allowed_resources_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.restrict_allowed_resources name: name, restriction_type: restriction_type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restrict_allowed_resources_client_stub.call_count + end + end + end + + def test_delete_workload + # 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_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_workload({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_workload name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_workload ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_workload({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_workload(::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.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_workload_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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb new file mode 100644 index 000000000000..2c16e5d2cfde --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb @@ -0,0 +1,553 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/assuredworkloads/v1beta1/assuredworkloads_service_pb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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_workload + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workload = {} + external_id = "hello world" + + create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1beta1::Workload), request["workload"] + assert_equal "hello world", request["external_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_workload({ parent: parent, workload: workload, external_id: external_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_workload parent: parent, workload: workload, external_id: external_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_workload ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_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_workload({ parent: parent, workload: workload, external_id: external_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_workload(::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_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_workload_client_stub.call_rpc_count + end + end + + def test_update_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workload = {} + update_mask = {} + + update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1beta1::Workload), request["workload"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_workload({ workload: workload, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_workload workload: workload, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_workload ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new(workload: workload, 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_workload({ workload: workload, 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_workload(::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new(workload: workload, 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_workload_client_stub.call_rpc_count + end + end + + def test_restrict_allowed_resources + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + restriction_type = :RESTRICTION_TYPE_UNSPECIFIED + + restrict_allowed_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restrict_allowed_resources, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, request + assert_equal "hello world", request["name"] + assert_equal :RESTRICTION_TYPE_UNSPECIFIED, request["restriction_type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, restrict_allowed_resources_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.restrict_allowed_resources name: name, restriction_type: restriction_type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restrict_allowed_resources_client_stub.call_rpc_count + end + end + + def test_delete_workload + # 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_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_workload({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_workload name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_workload ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.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_workload({ 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_workload(::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.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_workload_client_stub.call_rpc_count + end + end + + def test_get_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workload_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_workload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_workload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_workload ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_workload({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_workload(::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_rpc_count + end + end + + def test_analyze_workload_move + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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 = "hello world" + target = "hello world" + + analyze_workload_move_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :analyze_workload_move, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest, request + assert_equal "hello world", request["source"] + assert_equal :source, request.projectOrWorkloadResource + assert_equal "hello world", request["target"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, analyze_workload_move_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.analyze_workload_move({ source: source, target: target }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.analyze_workload_move source: source, target: target do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.analyze_workload_move ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new(source: source, target: target) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.analyze_workload_move({ source: source, target: target }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.analyze_workload_move(::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new(source: source, target: target), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, analyze_workload_move_client_stub.call_rpc_count + end + end + + def test_list_workloads + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workloads, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workloads_client_stub do + # Create client + c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.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_workloads_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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-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-audit_manager-v1/.gitignore b/owl-bot-staging/google-cloud-audit_manager-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-audit_manager-v1/.repo-metadata.json new file mode 100644 index 000000000000..79b6f54eca7a --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "auditmanager.googleapis.com", + "api_shortname": "auditmanager", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-audit_manager-v1/latest", + "distribution_name": "google-cloud-audit_manager-v1", + "is_cloud": true, + "language": "ruby", + "name": "auditmanager", + "name_pretty": "Audit Manager V1 API", + "product_documentation": "https://cloud.google.com/audit-manager/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-audit_manager-v1 is the official client library for the Audit Manager V1 API. Note that google-cloud-audit_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-audit_manager instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/audit-manager/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/.rubocop.yml b/owl-bot-staging/google-cloud-audit_manager-v1/.rubocop.yml new file mode 100644 index 000000000000..df2253ebb8eb --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-audit_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-audit_manager-v1.rb" diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/.toys.rb b/owl-bot-staging/google-cloud-audit_manager-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/.yardopts b/owl-bot-staging/google-cloud-audit_manager-v1/.yardopts new file mode 100644 index 000000000000..7527916b9591 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Audit 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-audit_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-audit_manager-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..dd712b122b90 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-audit_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-audit_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/audit_manager/v1" + +client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/audit_manager/v1" + +::Google::Cloud::AuditManager::V1::AuditManager::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AuditManager::V1::AuditManager::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-audit_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/audit_manager/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AuditManager::V1::AuditManager::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-audit_manager-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-audit_manager-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/Gemfile b/owl-bot-staging/google-cloud-audit_manager-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/LICENSE.md b/owl-bot-staging/google-cloud-audit_manager-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/README.md b/owl-bot-staging/google-cloud-audit_manager-v1/README.md new file mode 100644 index 000000000000..b9d5c9381c4b --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Audit Manager V1 API + +API Client library for the Audit Manager V1 API + +google-cloud-audit_manager-v1 is the official client library for the Audit Manager V1 API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Audit Manager V1 API. Most users should consider using +the main client gem, +[google-cloud-audit_manager](https://rubygems.org/gems/google-cloud-audit_manager). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-audit_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/auditmanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/audit_manager/v1" + +client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new +request = ::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new # (request fields as keyword arguments...) +response = client.enroll_resource request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-audit_manager-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/audit-manager/docs) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/audit_manager/v1" +require "logger" + +client = ::Google::Cloud::AuditManager::V1::AuditManager::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-audit_manager`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-audit_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-audit_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-audit_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-audit_manager-v1/Rakefile b/owl-bot-staging/google-cloud-audit_manager-v1/Rakefile new file mode 100644 index 000000000000..c2a304288a91 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_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/audit_manager/v1/audit_manager/credentials" + ::Google::Cloud::AuditManager::V1::AuditManager::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-audit_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-audit_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-audit_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-audit_manager-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-audit_manager-v1" + header "google-cloud-audit_manager-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-audit_manager-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-audit_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-audit_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-audit_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-audit_manager-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-audit_manager-v1/gapic_metadata.json new file mode 100644 index 000000000000..7c6bcdb7df81 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/gapic_metadata.json @@ -0,0 +1,58 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.auditmanager.v1", + "libraryPackage": "::Google::Cloud::AuditManager::V1", + "services": { + "AuditManager": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AuditManager::V1::AuditManager::Client", + "rpcs": { + "EnrollResource": { + "methods": [ + "enroll_resource" + ] + }, + "GenerateAuditScopeReport": { + "methods": [ + "generate_audit_scope_report" + ] + }, + "GenerateAuditReport": { + "methods": [ + "generate_audit_report" + ] + }, + "ListAuditReports": { + "methods": [ + "list_audit_reports" + ] + }, + "GetAuditReport": { + "methods": [ + "get_audit_report" + ] + }, + "GetResourceEnrollmentStatus": { + "methods": [ + "get_resource_enrollment_status" + ] + }, + "ListResourceEnrollmentStatuses": { + "methods": [ + "list_resource_enrollment_statuses" + ] + }, + "ListControls": { + "methods": [ + "list_controls" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/google-cloud-audit_manager-v1.gemspec b/owl-bot-staging/google-cloud-audit_manager-v1/google-cloud-audit_manager-v1.gemspec new file mode 100644 index 000000000000..06238bb1f723 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/google-cloud-audit_manager-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/audit_manager/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-audit_manager-v1" + gem.version = Google::Cloud::AuditManager::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-audit_manager-v1 is the official client library for the Audit Manager V1 API. Note that google-cloud-audit_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-audit_manager instead. See the readme for more details." + gem.summary = "API Client library for the Audit Manager V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.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-audit_manager-v1/lib/google-cloud-audit_manager-v1.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google-cloud-audit_manager-v1.rb new file mode 100644 index 000000000000..bb20369bcc56 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google-cloud-audit_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/audit_manager/v1" diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1.rb new file mode 100644 index 000000000000..8a50aa11c308 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_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/audit_manager/v1/audit_manager" +require "google/cloud/audit_manager/v1/version" + +module Google + module Cloud + module AuditManager + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/audit_manager/v1" + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/audit_manager/v1" + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/audit_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager.rb new file mode 100644 index 000000000000..2c30855f4db6 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_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/audit_manager/v1/version" + +require "google/cloud/audit_manager/v1/audit_manager/credentials" +require "google/cloud/audit_manager/v1/audit_manager/paths" +require "google/cloud/audit_manager/v1/audit_manager/operations" +require "google/cloud/audit_manager/v1/audit_manager/client" +require "google/cloud/audit_manager/v1/audit_manager/rest" + +module Google + module Cloud + module AuditManager + module V1 + ## + # Service describing handlers for resources + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/audit_manager/v1/audit_manager" + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/audit_manager/v1/audit_manager/rest" + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + module AuditManager + end + end + end + end +end + +helper_path = ::File.join __dir__, "audit_manager", "helpers.rb" +require "google/cloud/audit_manager/v1/audit_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/client.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/client.rb new file mode 100644 index 000000000000..a399ea04dab4 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/client.rb @@ -0,0 +1,1275 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/auditmanager/v1/auditmanager_pb" +require "google/cloud/location" + +module Google + module Cloud + module AuditManager + module V1 + module AuditManager + ## + # Client for the AuditManager service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "auditmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :audit_manager_stub + + ## + # Configure the AuditManager Client class. + # + # See {::Google::Cloud::AuditManager::V1::AuditManager::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AuditManager clients + # ::Google::Cloud::AuditManager::V1::AuditManager::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", "AuditManager", "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.enroll_resource.timeout = 60.0 + + default_config.rpcs.generate_audit_scope_report.timeout = 60.0 + + default_config.rpcs.generate_audit_report.timeout = 60.0 + + default_config.rpcs.list_audit_reports.timeout = 60.0 + default_config.rpcs.list_audit_reports.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_audit_report.timeout = 60.0 + default_config.rpcs.get_audit_report.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_resource_enrollment_status.timeout = 60.0 + default_config.rpcs.get_resource_enrollment_status.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_resource_enrollment_statuses.timeout = 60.0 + default_config.rpcs.list_resource_enrollment_statuses.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_controls.timeout = 60.0 + default_config.rpcs.list_controls.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AuditManager 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::AuditManager::V1::AuditManager::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 + @audit_manager_stub.universe_domain + end + + ## + # Create a new AuditManager client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AuditManager 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/auditmanager/v1/auditmanager_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 + + @audit_manager_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AuditManager::V1::AuditManager::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 + ) + + @audit_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 = @audit_manager_stub.endpoint + config.universe_domain = @audit_manager_stub.universe_domain + config.logger = @audit_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AuditManager::V1::AuditManager::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @audit_manager_stub.logger + end + + # Service calls + + ## + # Enrolls the customer resource(folder/project/organization) to the audit + # manager service by creating the audit managers Service Agent in customers + # workload and granting required permissions to the Service Agent. Please + # note that if enrollment request is made on the already enrolled workload + # then enrollment is executed overriding the existing set of destinations. + # + # @overload enroll_resource(request, options = nil) + # Pass arguments to `enroll_resource` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::EnrollResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::EnrollResourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enroll_resource(scope: nil, destinations: nil) + # Pass arguments to `enroll_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 scope [::String] + # Required. The resource to be enrolled to the audit manager. Scope format + # should be resource_type/resource_identifier Eg: + # projects/\\{project}/locations/\\{location}, + # folders/\\{folder}/locations/\\{location} + # organizations/\\{organization}/locations/\\{location} + # @param destinations [::Array<::Google::Cloud::AuditManager::V1::EnrollResourceRequest::EligibleDestination, ::Hash>] + # Required. List of destination among which customer can choose to upload + # their reports during the audit process. While enrolling at a + # organization/folder level, customer can choose Cloud storage bucket in any + # project. If the audit is triggered at project level using the service agent + # at organization/folder level, all the destination options associated with + # respective organization/folder level service agent will be available to + # auditing projects. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AuditManager::V1::Enrollment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AuditManager::V1::Enrollment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::EnrollResourceRequest.new + # + # # Call the enroll_resource method. + # result = client.enroll_resource request + # + # # The returned object is of type Google::Cloud::AuditManager::V1::Enrollment. + # p result + # + def enroll_resource request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::EnrollResourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enroll_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::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope + header_params["scope"] = request.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enroll_resource.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enroll_resource.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.call_rpc :enroll_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 + + ## + # Generates a demo report highlighting different responsibilities + # (Google/Customer/ shared) required to be fulfilled for the customer's + # workload to be compliant with the given standard. + # + # @overload generate_audit_scope_report(request, options = nil) + # Pass arguments to `generate_audit_scope_report` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_audit_scope_report(scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil) + # Pass arguments to `generate_audit_scope_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 scope [::String] + # Required. Scope for which the AuditScopeReport is required. Must be of + # format resource_type/resource_identifier Eg: + # projects/\\{project}/locations/\\{location}, + # folders/\\{folder}/locations/\\{location} + # @param compliance_standard [::String] + # Required. Compliance Standard against which the Scope Report must be + # generated. Eg: FEDRAMP_MODERATE + # @param report_format [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest::AuditScopeReportFormat] + # Required. The format in which the Scope report bytes should be returned. + # @param compliance_framework [::String] + # Required. Compliance framework against which the Scope Report must be + # generated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditScopeReport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AuditManager::V1::AuditScopeReport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new + # + # # Call the generate_audit_scope_report method. + # result = client.generate_audit_scope_report request + # + # # The returned object is of type Google::Cloud::AuditManager::V1::AuditScopeReport. + # p result + # + def generate_audit_scope_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest + + # Converts hash and nil to 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_audit_scope_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::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope + header_params["scope"] = request.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_audit_scope_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_audit_scope_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.call_rpc :generate_audit_scope_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 + + ## + # Register the Audit Report generation requests and returns the OperationId + # using which the customer can track the report generation progress. + # + # @overload generate_audit_report(request, options = nil) + # Pass arguments to `generate_audit_report` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_audit_report(gcs_uri: nil, scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil) + # Pass arguments to `generate_audit_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 gcs_uri [::String] + # Destination Cloud storage bucket where report and evidence must be + # uploaded. The Cloud storage bucket provided here must be selected among + # the buckets entered during the enrollment process. + # @param scope [::String] + # Required. Scope for which the AuditScopeReport is required. Must be of + # format resource_type/resource_identifier Eg: + # projects/\\{project}/locations/\\{location}, + # folders/\\{folder}/locations/\\{location} + # @param compliance_standard [::String] + # Required. Compliance Standard against which the Scope Report must be + # generated. Eg: FEDRAMP_MODERATE + # @param report_format [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest::AuditReportFormat] + # Required. The format in which the audit report should be created. + # @param compliance_framework [::String] + # Required. Compliance framework against which the Report must be generated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new + # + # # Call the generate_audit_report method. + # result = client.generate_audit_report request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def generate_audit_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest + + # Converts hash and nil to 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_audit_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::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope + header_params["scope"] = request.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_audit_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_audit_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.call_rpc :generate_audit_report, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 audit reports in the selected parent scope + # + # @overload list_audit_reports(request, options = nil) + # Pass arguments to `list_audit_reports` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::ListAuditReportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::ListAuditReportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_audit_reports(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_audit_reports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent scope for which to list the reports. + # @param page_size [::Integer] + # Optional. The maximum number of resources to return. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditReport>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditReport>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::ListAuditReportsRequest.new + # + # # Call the list_audit_reports method. + # result = client.list_audit_reports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AuditManager::V1::AuditReport. + # p item + # end + # + def list_audit_reports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListAuditReportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_audit_reports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_audit_reports.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_audit_reports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.call_rpc :list_audit_reports, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @audit_manager_stub, :list_audit_reports, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the overall audit report + # + # @overload get_audit_report(request, options = nil) + # Pass arguments to `get_audit_report` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::GetAuditReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::GetAuditReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_audit_report(name: nil) + # Pass arguments to `get_audit_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 name [::String] + # Required. Format + # projects/\\{project}/locations/\\{location}/auditReports/\\{audit_report}, + # folders/\\{folder}/locations/\\{location}/auditReports/\\{audit_report} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditReport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AuditManager::V1::AuditReport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::GetAuditReportRequest.new + # + # # Call the get_audit_report method. + # result = client.get_audit_report request + # + # # The returned object is of type Google::Cloud::AuditManager::V1::AuditReport. + # p result + # + def get_audit_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GetAuditReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_audit_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::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_audit_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_audit_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.call_rpc :get_audit_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 + + ## + # Get a resource along with its enrollment status. + # + # @overload get_resource_enrollment_status(request, options = nil) + # Pass arguments to `get_resource_enrollment_status` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_enrollment_status(name: nil) + # Pass arguments to `get_resource_enrollment_status` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Format + # folders/\\{folder}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, + # projects/\\{project}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, + # organizations/\\{organization}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new + # + # # Call the get_resource_enrollment_status method. + # result = client.get_resource_enrollment_status request + # + # # The returned object is of type Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. + # p result + # + def get_resource_enrollment_status request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest + + # Converts hash and nil to an 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_enrollment_status.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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_enrollment_status.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_resource_enrollment_status.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.call_rpc :get_resource_enrollment_status, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches all resources under the parent along with their enrollment. + # + # @overload list_resource_enrollment_statuses(request, options = nil) + # Pass arguments to `list_resource_enrollment_statuses` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_enrollment_statuses(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_resource_enrollment_statuses` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent scope for which the list of resources with enrollments + # are required. + # @param page_size [::Integer] + # Optional. The maximum number of resources to return. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.new + # + # # Call the list_resource_enrollment_statuses method. + # result = client.list_resource_enrollment_statuses request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. + # p item + # end + # + def list_resource_enrollment_statuses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest + + # Converts hash and nil to an 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_enrollment_statuses.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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_enrollment_statuses.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_enrollment_statuses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.call_rpc :list_resource_enrollment_statuses, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @audit_manager_stub, :list_resource_enrollment_statuses, request, response, 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 controls needed to be implemented to be compliant to a standard. + # + # @overload list_controls(request, options = nil) + # Pass arguments to `list_controls` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::ListControlsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::ListControlsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_controls(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_controls` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Format + # projects/\\{project}/locations/\\{location}/standards/\\{standard}, + # folders/\\{folder}/locations/\\{location}/standards/\\{standard} + # @param page_size [::Integer] + # Optional. The maximum number of resources to return. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::Control>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::Control>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::ListControlsRequest.new + # + # # Call the list_controls method. + # result = client.list_controls request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AuditManager::V1::Control. + # p item + # end + # + def list_controls request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListControlsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_controls.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_controls.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_controls.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.call_rpc :list_controls, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @audit_manager_stub, :list_controls, request, response, 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 AuditManager API. + # + # This class represents the configuration for AuditManager, + # providing control 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::AuditManager::V1::AuditManager::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # enroll_resource to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AuditManager::V1::AuditManager::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.enroll_resource.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.enroll_resource.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::AuditManager::V1::AuditManager::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 = "auditmanager.googleapis.com" + + config_attr :endpoint, nil, ::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 AuditManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `enroll_resource` + # @return [::Gapic::Config::Method] + # + attr_reader :enroll_resource + ## + # RPC-specific configuration for `generate_audit_scope_report` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_audit_scope_report + ## + # RPC-specific configuration for `generate_audit_report` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_audit_report + ## + # RPC-specific configuration for `list_audit_reports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_audit_reports + ## + # RPC-specific configuration for `get_audit_report` + # @return [::Gapic::Config::Method] + # + attr_reader :get_audit_report + ## + # RPC-specific configuration for `get_resource_enrollment_status` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_enrollment_status + ## + # RPC-specific configuration for `list_resource_enrollment_statuses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_enrollment_statuses + ## + # RPC-specific configuration for `list_controls` + # @return [::Gapic::Config::Method] + # + attr_reader :list_controls + + # @private + def initialize parent_rpcs = nil + enroll_resource_config = parent_rpcs.enroll_resource if parent_rpcs.respond_to? :enroll_resource + @enroll_resource = ::Gapic::Config::Method.new enroll_resource_config + generate_audit_scope_report_config = parent_rpcs.generate_audit_scope_report if parent_rpcs.respond_to? :generate_audit_scope_report + @generate_audit_scope_report = ::Gapic::Config::Method.new generate_audit_scope_report_config + generate_audit_report_config = parent_rpcs.generate_audit_report if parent_rpcs.respond_to? :generate_audit_report + @generate_audit_report = ::Gapic::Config::Method.new generate_audit_report_config + list_audit_reports_config = parent_rpcs.list_audit_reports if parent_rpcs.respond_to? :list_audit_reports + @list_audit_reports = ::Gapic::Config::Method.new list_audit_reports_config + get_audit_report_config = parent_rpcs.get_audit_report if parent_rpcs.respond_to? :get_audit_report + @get_audit_report = ::Gapic::Config::Method.new get_audit_report_config + get_resource_enrollment_status_config = parent_rpcs.get_resource_enrollment_status if parent_rpcs.respond_to? :get_resource_enrollment_status + @get_resource_enrollment_status = ::Gapic::Config::Method.new get_resource_enrollment_status_config + list_resource_enrollment_statuses_config = parent_rpcs.list_resource_enrollment_statuses if parent_rpcs.respond_to? :list_resource_enrollment_statuses + @list_resource_enrollment_statuses = ::Gapic::Config::Method.new list_resource_enrollment_statuses_config + list_controls_config = parent_rpcs.list_controls if parent_rpcs.respond_to? :list_controls + @list_controls = ::Gapic::Config::Method.new list_controls_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/credentials.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/credentials.rb new file mode 100644 index 000000000000..9551642692e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_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 AuditManager + module V1 + module AuditManager + # Credentials for the AuditManager 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-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/operations.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/operations.rb new file mode 100644 index 000000000000..704f717f2bb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_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 AuditManager + module V1 + module AuditManager + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "auditmanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AuditManager 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 AuditManager 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::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AuditManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AuditManager::V1::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 = "auditmanager.googleapis.com" + + config_attr :endpoint, nil, ::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-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/paths.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/paths.rb new file mode 100644 index 000000000000..76a8d180931b --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/paths.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 AuditManager + module V1 + module AuditManager + # Path helper methods for the AuditManager API. + module Paths + ## + # Create a fully-qualified AuditReport resource string. + # + # @overload audit_report_path(project:, location:, audit_report:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/auditReports/{audit_report}` + # + # @param project [String] + # @param location [String] + # @param audit_report [String] + # + # @overload audit_report_path(folder:, location:, audit_report:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/auditReports/{audit_report}` + # + # @param folder [String] + # @param location [String] + # @param audit_report [String] + # + # @return [::String] + def audit_report_path **args + resources = { + "audit_report:location:project" => (proc do |project:, location:, audit_report:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/auditReports/#{audit_report}" + end), + "audit_report:folder:location" => (proc do |folder:, location:, audit_report:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/auditReports/#{audit_report}" + 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 EnrollmentStatusScope resource string. + # + # @overload enrollment_status_scope_path(folder:, location:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @overload enrollment_status_scope_path(organization:, location:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def enrollment_status_scope_path **args + resources = { + "folder:location" => (proc do |folder:, location:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + end), + "location:organization" => (proc do |organization:, location:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + 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 ResourceEnrollmentStatus resource string. + # + # @overload resource_enrollment_status_path(folder:, location:, resource_enrollment_status:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + # + # @param folder [String] + # @param location [String] + # @param resource_enrollment_status [String] + # + # @overload resource_enrollment_status_path(project:, location:, resource_enrollment_status:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + # + # @param project [String] + # @param location [String] + # @param resource_enrollment_status [String] + # + # @overload resource_enrollment_status_path(organization:, location:, resource_enrollment_status:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + # + # @param organization [String] + # @param location [String] + # @param resource_enrollment_status [String] + # + # @return [::String] + def resource_enrollment_status_path **args + resources = { + "folder:location:resource_enrollment_status" => (proc do |folder:, location:, resource_enrollment_status:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/resourceEnrollmentStatuses/#{resource_enrollment_status}" + end), + "location:project:resource_enrollment_status" => (proc do |project:, location:, resource_enrollment_status:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/resourceEnrollmentStatuses/#{resource_enrollment_status}" + end), + "location:organization:resource_enrollment_status" => (proc do |organization:, location:, resource_enrollment_status:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/resourceEnrollmentStatuses/#{resource_enrollment_status}" + 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 Standard resource string. + # + # @overload standard_path(project:, location:, standard:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/standards/{standard}` + # + # @param project [String] + # @param location [String] + # @param standard [String] + # + # @overload standard_path(folder:, location:, standard:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/standards/{standard}` + # + # @param folder [String] + # @param location [String] + # @param standard [String] + # + # @overload standard_path(organization:, location:, standard:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/standards/{standard}` + # + # @param organization [String] + # @param location [String] + # @param standard [String] + # + # @return [::String] + def standard_path **args + resources = { + "location:project:standard" => (proc do |project:, location:, standard:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/standards/#{standard}" + end), + "folder:location:standard" => (proc do |folder:, location:, standard:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/standards/#{standard}" + end), + "location:organization:standard" => (proc do |organization:, location:, standard:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/standards/#{standard}" + 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-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest.rb new file mode 100644 index 000000000000..264bb06fe47e --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_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/audit_manager/v1/version" +require "google/cloud/audit_manager/v1/bindings_override" + +require "google/cloud/audit_manager/v1/audit_manager/credentials" +require "google/cloud/audit_manager/v1/audit_manager/paths" +require "google/cloud/audit_manager/v1/audit_manager/rest/operations" +require "google/cloud/audit_manager/v1/audit_manager/rest/client" + +module Google + module Cloud + module AuditManager + module V1 + ## + # Service describing handlers for resources + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/audit_manager/v1/audit_manager/rest" + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + module AuditManager + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/audit_manager/v1/audit_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/client.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/client.rb new file mode 100644 index 000000000000..50460b66f329 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/client.rb @@ -0,0 +1,1184 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/auditmanager/v1/auditmanager_pb" +require "google/cloud/audit_manager/v1/audit_manager/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module AuditManager + module V1 + module AuditManager + module Rest + ## + # REST client for the AuditManager service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "auditmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :audit_manager_stub + + ## + # Configure the AuditManager Client class. + # + # See {::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AuditManager clients + # ::Google::Cloud::AuditManager::V1::AuditManager::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", "AuditManager", "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.enroll_resource.timeout = 60.0 + + default_config.rpcs.generate_audit_scope_report.timeout = 60.0 + + default_config.rpcs.generate_audit_report.timeout = 60.0 + + default_config.rpcs.list_audit_reports.timeout = 60.0 + default_config.rpcs.list_audit_reports.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_audit_report.timeout = 60.0 + default_config.rpcs.get_audit_report.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_resource_enrollment_status.timeout = 60.0 + default_config.rpcs.get_resource_enrollment_status.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_resource_enrollment_statuses.timeout = 60.0 + default_config.rpcs.list_resource_enrollment_statuses.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_controls.timeout = 60.0 + default_config.rpcs.list_controls.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AuditManager 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::AuditManager::V1::AuditManager::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 + @audit_manager_stub.universe_domain + end + + ## + # Create a new AuditManager REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AuditManager 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::AuditManager::V1::AuditManager::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 + + @audit_manager_stub = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @audit_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 = @audit_manager_stub.endpoint + config.universe_domain = @audit_manager_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @audit_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AuditManager::V1::AuditManager::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @audit_manager_stub.logger + end + + # Service calls + + ## + # Enrolls the customer resource(folder/project/organization) to the audit + # manager service by creating the audit managers Service Agent in customers + # workload and granting required permissions to the Service Agent. Please + # note that if enrollment request is made on the already enrolled workload + # then enrollment is executed overriding the existing set of destinations. + # + # @overload enroll_resource(request, options = nil) + # Pass arguments to `enroll_resource` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::EnrollResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::EnrollResourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enroll_resource(scope: nil, destinations: nil) + # Pass arguments to `enroll_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 scope [::String] + # Required. The resource to be enrolled to the audit manager. Scope format + # should be resource_type/resource_identifier Eg: + # projects/\\{project}/locations/\\{location}, + # folders/\\{folder}/locations/\\{location} + # organizations/\\{organization}/locations/\\{location} + # @param destinations [::Array<::Google::Cloud::AuditManager::V1::EnrollResourceRequest::EligibleDestination, ::Hash>] + # Required. List of destination among which customer can choose to upload + # their reports during the audit process. While enrolling at a + # organization/folder level, customer can choose Cloud storage bucket in any + # project. If the audit is triggered at project level using the service agent + # at organization/folder level, all the destination options associated with + # respective organization/folder level service agent will be available to + # auditing projects. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::Enrollment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::Enrollment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::EnrollResourceRequest.new + # + # # Call the enroll_resource method. + # result = client.enroll_resource request + # + # # The returned object is of type Google::Cloud::AuditManager::V1::Enrollment. + # p result + # + def enroll_resource request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::EnrollResourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enroll_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::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enroll_resource.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enroll_resource.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.enroll_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 + + ## + # Generates a demo report highlighting different responsibilities + # (Google/Customer/ shared) required to be fulfilled for the customer's + # workload to be compliant with the given standard. + # + # @overload generate_audit_scope_report(request, options = nil) + # Pass arguments to `generate_audit_scope_report` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_audit_scope_report(scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil) + # Pass arguments to `generate_audit_scope_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 scope [::String] + # Required. Scope for which the AuditScopeReport is required. Must be of + # format resource_type/resource_identifier Eg: + # projects/\\{project}/locations/\\{location}, + # folders/\\{folder}/locations/\\{location} + # @param compliance_standard [::String] + # Required. Compliance Standard against which the Scope Report must be + # generated. Eg: FEDRAMP_MODERATE + # @param report_format [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest::AuditScopeReportFormat] + # Required. The format in which the Scope report bytes should be returned. + # @param compliance_framework [::String] + # Required. Compliance framework against which the Scope Report must be + # generated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::AuditScopeReport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::AuditScopeReport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new + # + # # Call the generate_audit_scope_report method. + # result = client.generate_audit_scope_report request + # + # # The returned object is of type Google::Cloud::AuditManager::V1::AuditScopeReport. + # p result + # + def generate_audit_scope_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest + + # Converts hash and nil to an 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_audit_scope_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::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_audit_scope_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_audit_scope_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.generate_audit_scope_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 + + ## + # Register the Audit Report generation requests and returns the OperationId + # using which the customer can track the report generation progress. + # + # @overload generate_audit_report(request, options = nil) + # Pass arguments to `generate_audit_report` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_audit_report(gcs_uri: nil, scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil) + # Pass arguments to `generate_audit_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 gcs_uri [::String] + # Destination Cloud storage bucket where report and evidence must be + # uploaded. The Cloud storage bucket provided here must be selected among + # the buckets entered during the enrollment process. + # @param scope [::String] + # Required. Scope for which the AuditScopeReport is required. Must be of + # format resource_type/resource_identifier Eg: + # projects/\\{project}/locations/\\{location}, + # folders/\\{folder}/locations/\\{location} + # @param compliance_standard [::String] + # Required. Compliance Standard against which the Scope Report must be + # generated. Eg: FEDRAMP_MODERATE + # @param report_format [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest::AuditReportFormat] + # Required. The format in which the audit report should be created. + # @param compliance_framework [::String] + # Required. Compliance framework against which the Report must be generated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new + # + # # Call the generate_audit_report method. + # result = client.generate_audit_report request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def generate_audit_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest + + # Converts hash and nil to an 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_audit_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::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_audit_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_audit_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.generate_audit_report request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 audit reports in the selected parent scope + # + # @overload list_audit_reports(request, options = nil) + # Pass arguments to `list_audit_reports` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::ListAuditReportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::ListAuditReportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_audit_reports(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_audit_reports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent scope for which to list the reports. + # @param page_size [::Integer] + # Optional. The maximum number of resources to return. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditReport>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditReport>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::ListAuditReportsRequest.new + # + # # Call the list_audit_reports method. + # result = client.list_audit_reports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AuditManager::V1::AuditReport. + # p item + # end + # + def list_audit_reports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListAuditReportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_audit_reports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_audit_reports.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_audit_reports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.list_audit_reports request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @audit_manager_stub, :list_audit_reports, "audit_reports", request, result, 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 the overall audit report + # + # @overload get_audit_report(request, options = nil) + # Pass arguments to `get_audit_report` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::GetAuditReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::GetAuditReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_audit_report(name: nil) + # Pass arguments to `get_audit_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 name [::String] + # Required. Format + # projects/\\{project}/locations/\\{location}/auditReports/\\{audit_report}, + # folders/\\{folder}/locations/\\{location}/auditReports/\\{audit_report} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::AuditReport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::AuditReport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::GetAuditReportRequest.new + # + # # Call the get_audit_report method. + # result = client.get_audit_report request + # + # # The returned object is of type Google::Cloud::AuditManager::V1::AuditReport. + # p result + # + def get_audit_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GetAuditReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_audit_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::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_audit_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_audit_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.get_audit_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 + + ## + # Get a resource along with its enrollment status. + # + # @overload get_resource_enrollment_status(request, options = nil) + # Pass arguments to `get_resource_enrollment_status` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_enrollment_status(name: nil) + # Pass arguments to `get_resource_enrollment_status` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Format + # folders/\\{folder}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, + # projects/\\{project}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, + # organizations/\\{organization}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new + # + # # Call the get_resource_enrollment_status method. + # result = client.get_resource_enrollment_status request + # + # # The returned object is of type Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. + # p result + # + def get_resource_enrollment_status request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest + + # Converts hash and nil to an options 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_enrollment_status.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_enrollment_status.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_resource_enrollment_status.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.get_resource_enrollment_status request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches all resources under the parent along with their enrollment. + # + # @overload list_resource_enrollment_statuses(request, options = nil) + # Pass arguments to `list_resource_enrollment_statuses` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_enrollment_statuses(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_resource_enrollment_statuses` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent scope for which the list of resources with enrollments + # are required. + # @param page_size [::Integer] + # Optional. The maximum number of resources to return. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.new + # + # # Call the list_resource_enrollment_statuses method. + # result = client.list_resource_enrollment_statuses request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. + # p item + # end + # + def list_resource_enrollment_statuses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest + + # Converts hash and nil to an options 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_enrollment_statuses.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_enrollment_statuses.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_enrollment_statuses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.list_resource_enrollment_statuses request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @audit_manager_stub, :list_resource_enrollment_statuses, "resource_enrollment_statuses", request, result, 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 controls needed to be implemented to be compliant to a standard. + # + # @overload list_controls(request, options = nil) + # Pass arguments to `list_controls` via a request object, either of type + # {::Google::Cloud::AuditManager::V1::ListControlsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AuditManager::V1::ListControlsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_controls(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_controls` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Format + # projects/\\{project}/locations/\\{location}/standards/\\{standard}, + # folders/\\{folder}/locations/\\{location}/standards/\\{standard} + # @param page_size [::Integer] + # Optional. The maximum number of resources to return. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::Control>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::Control>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/audit_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AuditManager::V1::ListControlsRequest.new + # + # # Call the list_controls method. + # result = client.list_controls request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AuditManager::V1::Control. + # p item + # end + # + def list_controls request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListControlsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_controls.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_controls.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_controls.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_manager_stub.list_controls request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @audit_manager_stub, :list_controls, "controls", request, result, 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 AuditManager REST API. + # + # This class represents the configuration for AuditManager 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::AuditManager::V1::AuditManager::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 + # # enroll_resource to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.enroll_resource.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.enroll_resource.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "auditmanager.googleapis.com" + + config_attr :endpoint, nil, ::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 AuditManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `enroll_resource` + # @return [::Gapic::Config::Method] + # + attr_reader :enroll_resource + ## + # RPC-specific configuration for `generate_audit_scope_report` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_audit_scope_report + ## + # RPC-specific configuration for `generate_audit_report` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_audit_report + ## + # RPC-specific configuration for `list_audit_reports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_audit_reports + ## + # RPC-specific configuration for `get_audit_report` + # @return [::Gapic::Config::Method] + # + attr_reader :get_audit_report + ## + # RPC-specific configuration for `get_resource_enrollment_status` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_enrollment_status + ## + # RPC-specific configuration for `list_resource_enrollment_statuses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_enrollment_statuses + ## + # RPC-specific configuration for `list_controls` + # @return [::Gapic::Config::Method] + # + attr_reader :list_controls + + # @private + def initialize parent_rpcs = nil + enroll_resource_config = parent_rpcs.enroll_resource if parent_rpcs.respond_to? :enroll_resource + @enroll_resource = ::Gapic::Config::Method.new enroll_resource_config + generate_audit_scope_report_config = parent_rpcs.generate_audit_scope_report if parent_rpcs.respond_to? :generate_audit_scope_report + @generate_audit_scope_report = ::Gapic::Config::Method.new generate_audit_scope_report_config + generate_audit_report_config = parent_rpcs.generate_audit_report if parent_rpcs.respond_to? :generate_audit_report + @generate_audit_report = ::Gapic::Config::Method.new generate_audit_report_config + list_audit_reports_config = parent_rpcs.list_audit_reports if parent_rpcs.respond_to? :list_audit_reports + @list_audit_reports = ::Gapic::Config::Method.new list_audit_reports_config + get_audit_report_config = parent_rpcs.get_audit_report if parent_rpcs.respond_to? :get_audit_report + @get_audit_report = ::Gapic::Config::Method.new get_audit_report_config + get_resource_enrollment_status_config = parent_rpcs.get_resource_enrollment_status if parent_rpcs.respond_to? :get_resource_enrollment_status + @get_resource_enrollment_status = ::Gapic::Config::Method.new get_resource_enrollment_status_config + list_resource_enrollment_statuses_config = parent_rpcs.list_resource_enrollment_statuses if parent_rpcs.respond_to? :list_resource_enrollment_statuses + @list_resource_enrollment_statuses = ::Gapic::Config::Method.new list_resource_enrollment_statuses_config + list_controls_config = parent_rpcs.list_controls if parent_rpcs.respond_to? :list_controls + @list_controls = ::Gapic::Config::Method.new list_controls_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/operations.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/operations.rb new file mode 100644 index 000000000000..6744afa311af --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/operations.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 "gapic/operation" + +module Google + module Cloud + module AuditManager + module V1 + module AuditManager + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "auditmanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AuditManager 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 AuditManager 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::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::AuditManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "auditmanager.googleapis.com" + + config_attr :endpoint, nil, ::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] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^organizations/[^/]+/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] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/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] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/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] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/service_stub.rb new file mode 100644 index 000000000000..7bc0b7637823 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/service_stub.rb @@ -0,0 +1,660 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/auditmanager/v1/auditmanager_pb" + +module Google + module Cloud + module AuditManager + module V1 + module AuditManager + module Rest + ## + # REST service stub for the AuditManager 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 enroll_resource REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::EnrollResourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::Enrollment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::Enrollment] + # A result object deserialized from the server's reply + def enroll_resource request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enroll_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: "enroll_resource", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AuditManager::V1::Enrollment.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_audit_scope_report REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::AuditScopeReport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::AuditScopeReport] + # A result object deserialized from the server's reply + def generate_audit_scope_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_audit_scope_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_audit_scope_report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AuditManager::V1::AuditScopeReport.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_audit_report REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def generate_audit_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_audit_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_audit_report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_audit_reports REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::ListAuditReportsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::ListAuditReportsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::ListAuditReportsResponse] + # A result object deserialized from the server's reply + def list_audit_reports request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_audit_reports_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_audit_reports", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AuditManager::V1::ListAuditReportsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_audit_report REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::GetAuditReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::AuditReport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::AuditReport] + # A result object deserialized from the server's reply + def get_audit_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_audit_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: "get_audit_report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AuditManager::V1::AuditReport.decode_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_enrollment_status REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] + # A result object deserialized from the server's reply + def get_resource_enrollment_status request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_enrollment_status_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_enrollment_status", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus.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_enrollment_statuses REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse] + # A result object deserialized from the server's reply + def list_resource_enrollment_statuses request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_enrollment_statuses_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_enrollment_statuses", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse.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_controls REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::ListControlsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AuditManager::V1::ListControlsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AuditManager::V1::ListControlsResponse] + # A result object deserialized from the server's reply + def list_controls request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_controls_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_controls", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AuditManager::V1::ListControlsResponse.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 enroll_resource REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::EnrollResourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enroll_resource_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{scope}:enrollResource", + body: "*", + matches: [ + ["scope", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{scope}:enrollResource", + body: "*", + matches: [ + ["scope", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{scope}:enrollResource", + body: "*", + matches: [ + ["scope", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_audit_scope_report REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest] + # 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_audit_scope_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{scope}/auditScopeReports:generate", + body: "*", + matches: [ + ["scope", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{scope}/auditScopeReports:generate", + body: "*", + matches: [ + ["scope", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_audit_report REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest] + # 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_audit_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{scope}/auditReports:generate", + body: "*", + matches: [ + ["scope", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{scope}/auditReports:generate", + body: "*", + matches: [ + ["scope", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_audit_reports REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::ListAuditReportsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_audit_reports_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/auditReports", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/auditReports", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/auditReports", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_audit_report REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::GetAuditReportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_audit_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/auditReports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/auditReports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_resource_enrollment_status REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest] + # A 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_enrollment_status_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/resourceEnrollmentStatuses/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/resourceEnrollmentStatuses/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/resourceEnrollmentStatuses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_resource_enrollment_statuses REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest] + # A 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_enrollment_statuses_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/resourceEnrollmentStatuses", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/resourceEnrollmentStatuses", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_controls REST call + # + # @param request_pb [::Google::Cloud::AuditManager::V1::ListControlsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_controls_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/controls", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/standards/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/controls", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/standards/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/controls", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/standards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/bindings_override.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/bindings_override.rb new file mode 100644 index 000000000000..b5176b1cd8ed --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module AuditManager + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/audit_manager/v1/rest" + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AuditManager"] + 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-audit_manager-v1/lib/google/cloud/audit_manager/v1/rest.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/rest.rb new file mode 100644 index 000000000000..38bac9cedcb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_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/audit_manager/v1/audit_manager/rest" +require "google/cloud/audit_manager/v1/bindings_override" +require "google/cloud/audit_manager/v1/version" + +module Google + module Cloud + module AuditManager + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/audit_manager/v1/rest" + # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/version.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/version.rb new file mode 100644 index 000000000000..535462f00857 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_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 AuditManager + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/auditmanager/v1/auditmanager_pb.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/auditmanager/v1/auditmanager_pb.rb new file mode 100644 index 000000000000..6f949db9ad30 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/auditmanager/v1/auditmanager_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/auditmanager/v1/auditmanager.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/auditmanager/v1/auditmanager.proto\x12\x1cgoogle.cloud.auditmanager.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\"\xde\x01\n\x15\x45nrollResourceRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x62\n\x0c\x64\x65stinations\x18\x02 \x03(\x0b\x32G.google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestinationB\x03\xe0\x41\x02\x1aM\n\x13\x45ligibleDestination\x12\x1d\n\x13\x65ligible_gcs_bucket\x18\x03 \x01(\tH\x00\x42\x17\n\x15\x65ligible_destinations\"\xd4\x02\n\x1fGenerateAuditScopeReportRequest\x12\x12\n\x05scope\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x63ompliance_standard\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12p\n\rreport_format\x18\x04 \x01(\x0e\x32T.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormatB\x03\xe0\x41\x02\x12!\n\x14\x63ompliance_framework\x18\x05 \x01(\tB\x03\xe0\x41\x02\"f\n\x16\x41uditScopeReportFormat\x12)\n%AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12!\n\x1d\x41UDIT_SCOPE_REPORT_FORMAT_ODF\x10\x01\"\xd6\x02\n\x1aGenerateAuditReportRequest\x12\x11\n\x07gcs_uri\x18\x02 \x01(\tH\x00\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x63ompliance_standard\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x66\n\rreport_format\x18\x04 \x01(\x0e\x32J.google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormatB\x03\xe0\x41\x02\x12!\n\x14\x63ompliance_framework\x18\x05 \x01(\tB\x03\xe0\x41\x02\"U\n\x11\x41uditReportFormat\x12#\n\x1f\x41UDIT_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x41UDIT_REPORT_FORMAT_ODF\x10\x01\x42\r\n\x0b\x64\x65stination\"p\n\"GetResourceEnrollmentStatusRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4auditmanager.googleapis.com/ResourceEnrollmentStatus\"\xa3\x01\n%ListResourceEnrollmentStatusesRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1auditmanager.googleapis.com/EnrollmentStatusScope\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\"\xa4\x01\n&ListResourceEnrollmentStatusesResponse\x12\\\n\x1cresource_enrollment_statuses\x18\x01 \x03(\x0b\x32\x36.google.cloud.auditmanager.v1.ResourceEnrollmentStatus\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x8b\x01\n\x17ListAuditReportsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'auditmanager.googleapis.com/AuditReport\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\x18ListAuditReportsResponse\x12\x45\n\raudit_reports\x18\x01 \x03(\x0b\x32).google.cloud.auditmanager.v1.AuditReportB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"V\n\x15GetAuditReportRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'auditmanager.googleapis.com/AuditReport\"\x84\x01\n\x13ListControlsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$auditmanager.googleapis.com/Standard\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\"r\n\x14ListControlsResponse\x12<\n\x08\x63ontrols\x18\x01 \x03(\x0b\x32%.google.cloud.auditmanager.v1.ControlB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xe1\x02\n\x18ReportGenerationProgress\x12@\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.auditmanager.v1.OperationStateB\x03\xe0\x41\x03\x12\x1b\n\x0e\x66\x61ilure_reason\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x1b\x65valuation_percent_complete\x18\x14 \x01(\x01\x12*\n\"report_generation_percent_complete\x18\x1e \x01(\x01\x12)\n!report_uploading_percent_complete\x18( \x01(\x01\x12#\n\x16\x64\x65stination_gcs_bucket\x18\x32 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x0c\x61udit_report\x18\x33 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'auditmanager.googleapis.com/AuditReport\"\x89\x03\n\nEnrollment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12R\n\x13\x64\x65stination_details\x18\x03 \x03(\x0b\x32\x30.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xe0\x41\x03:\x93\x02\xea\x41\x8f\x02\n&auditmanager.googleapis.com/Enrollment\x12@projects/{project}/locations/{location}/enrollments/{enrollment}\x12>folders/{folder}/locations/{location}/enrollments/{enrollment}\x12Jorganizations/{organization}/locations/{location}/enrollments/{enrollment}*\x0b\x65nrollments2\nenrollment\"\xce\x02\n\x10\x41uditScopeReport\x12\x1f\n\x15scope_report_contents\x18\x01 \x01(\x0cH\x00\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x08:\xf5\x01\xea\x41\xf1\x01\n,auditmanager.googleapis.com/AuditScopeReport\x12Nprojects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Lfolders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}*\x11\x61uditScopeReports2\x10\x61uditScopeReportB\x0e\n\x0c\x61udit_report\"\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\"\xa6\x06\n\x18ResourceEnrollmentStatus\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x41\n\nenrollment\x18\x02 \x01(\x0b\x32(.google.cloud.auditmanager.v1.EnrollmentB\x03\xe0\x41\x03\x12\x17\n\x08\x65nrolled\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12m\n\x10\x65nrollment_state\x18\x05 \x01(\x0e\x32N.google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentStateB\x03\xe0\x41\x03\"s\n\x17ResourceEnrollmentState\x12)\n%RESOURCE_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_ENROLLED\x10\x01\x12\r\n\tINHERITED\x10\x02\x12\x0c\n\x08\x45NROLLED\x10\x03:\x9b\x03\xea\x41\x97\x03\n4auditmanager.googleapis.com/ResourceEnrollmentStatus\x12]folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12_projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12iorganizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}*\x1aresourceEnrollmentStatuses2\x18resourceEnrollmentStatus\"\x89\x07\n\x0b\x41uditReport\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x0ereport_summary\x18\x02 \x01(\x0b\x32+.google.cloud.auditmanager.v1.ReportSummaryB\x03\xe0\x41\x03\x12\x19\n\x0coperation_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12R\n\x13\x64\x65stination_details\x18\x04 \x01(\x0b\x32\x30.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xe0\x41\x03\x12 \n\x13\x63ompliance_standard\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05scope\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x0f\x63ontrol_details\x18\x08 \x03(\x0b\x32,.google.cloud.auditmanager.v1.ControlDetailsB\x03\xe0\x41\x03\x12\x65\n\x17report_generation_state\x18\t \x01(\x0e\x32?.google.cloud.auditmanager.v1.AuditReport.ReportGenerationStateB\x03\xe0\x41\x03\x12!\n\x14\x63ompliance_framework\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08scope_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\"\x81\x01\n\x15ReportGenerationState\x12\'\n#REPORT_GENERATION_STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x13\n\x0fSUMMARY_UNKNOWN\x10\x04:\xd0\x01\xea\x41\xcc\x01\n\'auditmanager.googleapis.com/AuditReport\x12\x43projects/{project}/locations/{location}/auditReports/{audit_report}\x12\x41\x66olders/{folder}/locations/{location}/auditReports/{audit_report}*\x0c\x61uditReports2\x0b\x61uditReport\"8\n\rControlFamily\x12\x11\n\tfamily_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xfb\x04\n\x07\x43ontrol\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x06\x66\x61mily\x18\x03 \x01(\x0e\x32,.google.cloud.auditmanager.v1.Control.FamilyB\x03\xe0\x41\x03\x12H\n\x0e\x63ontrol_family\x18\n \x01(\x0b\x32+.google.cloud.auditmanager.v1.ControlFamilyB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13responsibility_type\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12.\n!google_responsibility_description\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x31\n$google_responsibility_implementation\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x30\n#customer_responsibility_description\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x33\n&customer_responsibility_implementation\x18\t \x01(\tB\x03\xe0\x41\x03\"\xb0\x01\n\x06\x46\x61mily\x12\x16\n\x12\x46\x41MILY_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41\x43\x10\x01\x12\x06\n\x02\x41T\x10\x02\x12\x06\n\x02\x41U\x10\x03\x12\x06\n\x02\x43\x41\x10\x04\x12\x06\n\x02\x43M\x10\x05\x12\x06\n\x02\x43P\x10\x06\x12\x06\n\x02IA\x10\x07\x12\x06\n\x02IR\x10\x08\x12\x06\n\x02MA\x10\t\x12\x06\n\x02MP\x10\n\x12\x06\n\x02PE\x10\x0b\x12\x06\n\x02PL\x10\x0c\x12\x06\n\x02PS\x10\r\x12\x06\n\x02RA\x10\x0e\x12\x06\n\x02SA\x10\x0f\x12\x06\n\x02SC\x10\x10\x12\x06\n\x02SI\x10\x11\x12\x06\n\x02SR\x10\x12\"=\n\x12\x44\x65stinationDetails\x12\x18\n\x0egcs_bucket_uri\x18\x01 \x01(\tH\x00\x42\r\n\x0b\x64\x65stination\"\x8f\x01\n\rReportSummary\x12\x13\n\x0btotal_count\x18\x01 \x01(\x05\x12\x17\n\x0f\x63ompliant_count\x18\x02 \x01(\x05\x12\x17\n\x0fviolation_count\x18\x03 \x01(\x05\x12\"\n\x1amanual_review_needed_count\x18\x04 \x01(\x05\x12\x13\n\x0b\x65rror_count\x18\x05 \x01(\x05\"\xe3\x01\n\x0e\x43ontrolDetails\x12\x36\n\x07\x63ontrol\x18\x01 \x01(\x0b\x32%.google.cloud.auditmanager.v1.Control\x12L\n\x10\x63ompliance_state\x18\x02 \x01(\x0e\x32-.google.cloud.auditmanager.v1.ComplianceStateB\x03\xe0\x41\x03\x12K\n\x16\x63ontrol_report_summary\x18\x03 \x01(\x0b\x32+.google.cloud.auditmanager.v1.ReportSummary*\xfb\x02\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bOPERATION_STATE_NOT_STARTED\x10\n\x12*\n&OPERATION_STATE_EVALUATION_IN_PROGRESS\x10\x14\x12#\n\x1fOPERATION_STATE_EVALUATION_DONE\x10\x15\x12:\n6OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS\x10\x1e\x12\x33\n/OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE\x10\x1f\x12/\n+OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS\x10(\x12\x18\n\x14OPERATION_STATE_DONE\x10\x32\x12\x1a\n\x16OPERATION_STATE_FAILED\x10<*\x8f\x01\n\x0f\x43omplianceState\x12 \n\x1c\x43OMPLIANCE_STATE_UNSPECIFIED\x10\x00\x12\r\n\tCOMPLIANT\x10\x01\x12\r\n\tVIOLATION\x10\x02\x12\x18\n\x14MANUAL_REVIEW_NEEDED\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x17\n\x13\x41UDIT_NOT_SUPPORTED\x10\x05\x32\xc0\x14\n\x0c\x41uditManager\x12\xb8\x02\n\x0e\x45nrollResource\x12\x33.google.cloud.auditmanager.v1.EnrollResourceRequest\x1a(.google.cloud.auditmanager.v1.Enrollment\"\xc6\x01\xda\x41\x12scope,destinations\x82\xd3\xe4\x93\x02\xaa\x01\"0/v1/{scope=folders/*/locations/*}:enrollResource:\x01*Z6\"1/v1/{scope=projects/*/locations/*}:enrollResource:\x01*Z;\"6/v1/{scope=organizations/*/locations/*}:enrollResource:\x01*\x12\xc2\x02\n\x18GenerateAuditScopeReport\x12=.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest\x1a..google.cloud.auditmanager.v1.AuditScopeReport\"\xb6\x01\xda\x41\'scope,compliance_standard,report_format\x82\xd3\xe4\x93\x02\x85\x01\"/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}Z?\x12=/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}ZE\x12\x43/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}\x12\xc4\x02\n\x1eListResourceEnrollmentStatuses\x12\x43.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest\x1a\x44.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse\"\x96\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x86\x01\x12\x43/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatusesZ?\x12=/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses\x12\xbe\x02\n\x0cListControls\x12\x31.google.cloud.auditmanager.v1.ListControlsRequest\x1a\x32.google.cloud.auditmanager.v1.ListControlsResponse\"\xc6\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb6\x01\x12=/v1/{parent=organizations/*/locations/*/standards/*}/controlsZ9\x12\x37/v1/{parent=folders/*/locations/*/standards/*}/controlsZ:\x12\x38/v1/{parent=projects/*/locations/*/standards/*}/controls\x1aO\xca\x41\x1b\x61uditmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x92\x06\n com.google.cloud.auditmanager.v1B\x0bV1mainProtoP\x01ZDcloud.google.com/go/auditmanager/apiv1/auditmanagerpb;auditmanagerpb\xaa\x02\x1cGoogle.Cloud.AuditManager.V1\xca\x02\x1cGoogle\\Cloud\\AuditManager\\V1\xea\x02\x1fGoogle::Cloud::AuditManager::V1\xea\x41S\n*auditmanager.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41\x65\n0auditmanager.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41\xe8\x01\n$auditmanager.googleapis.com/Standard\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-audit_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/cloud/auditmanager/v1/auditmanager.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/cloud/auditmanager/v1/auditmanager.rb new file mode 100644 index 000000000000..66b9516a2b9a --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/cloud/auditmanager/v1/auditmanager.rb @@ -0,0 +1,648 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AuditManager + module V1 + # Request message to subscribe the Audit Manager service for given resource. + # @!attribute [rw] scope + # @return [::String] + # Required. The resource to be enrolled to the audit manager. Scope format + # should be resource_type/resource_identifier Eg: + # projects/\\{project}/locations/\\{location}, + # folders/\\{folder}/locations/\\{location} + # organizations/\\{organization}/locations/\\{location} + # @!attribute [rw] destinations + # @return [::Array<::Google::Cloud::AuditManager::V1::EnrollResourceRequest::EligibleDestination>] + # Required. List of destination among which customer can choose to upload + # their reports during the audit process. While enrolling at a + # organization/folder level, customer can choose Cloud storage bucket in any + # project. If the audit is triggered at project level using the service agent + # at organization/folder level, all the destination options associated with + # respective organization/folder level service agent will be available to + # auditing projects. + class EnrollResourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The destination details where the audit report must be uploaded. + # @!attribute [rw] eligible_gcs_bucket + # @return [::String] + # The Cloud Storage bucket location where the audit report and evidences + # can be uploaded during the `GenerateAuditReport` API call. + class EligibleDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Message for requesting audit scope report. + # @!attribute [rw] scope + # @return [::String] + # Required. Scope for which the AuditScopeReport is required. Must be of + # format resource_type/resource_identifier Eg: + # projects/\\{project}/locations/\\{location}, + # folders/\\{folder}/locations/\\{location} + # @!attribute [rw] compliance_standard + # @return [::String] + # Required. Compliance Standard against which the Scope Report must be + # generated. Eg: FEDRAMP_MODERATE + # @!attribute [rw] report_format + # @return [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest::AuditScopeReportFormat] + # Required. The format in which the Scope report bytes should be returned. + # @!attribute [rw] compliance_framework + # @return [::String] + # Required. Compliance framework against which the Scope Report must be + # generated. + class GenerateAuditScopeReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The options for the audit scope report format. + module AuditScopeReportFormat + # Unspecified. Invalid format. + AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0 + + # Audit Scope Report creation format is Open Document. + AUDIT_SCOPE_REPORT_FORMAT_ODF = 1 + end + end + + # Message for requesting the Audit Report. + # @!attribute [rw] gcs_uri + # @return [::String] + # Destination Cloud storage bucket where report and evidence must be + # uploaded. The Cloud storage bucket provided here must be selected among + # the buckets entered during the enrollment process. + # @!attribute [rw] scope + # @return [::String] + # Required. Scope for which the AuditScopeReport is required. Must be of + # format resource_type/resource_identifier Eg: + # projects/\\{project}/locations/\\{location}, + # folders/\\{folder}/locations/\\{location} + # @!attribute [rw] compliance_standard + # @return [::String] + # Required. Compliance Standard against which the Scope Report must be + # generated. Eg: FEDRAMP_MODERATE + # @!attribute [rw] report_format + # @return [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest::AuditReportFormat] + # Required. The format in which the audit report should be created. + # @!attribute [rw] compliance_framework + # @return [::String] + # Required. Compliance framework against which the Report must be generated. + class GenerateAuditReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The options for the audit report format. + module AuditReportFormat + # Unspecified. Invalid state. + AUDIT_REPORT_FORMAT_UNSPECIFIED = 0 + + # Audit Report creation format is Open Document. + AUDIT_REPORT_FORMAT_ODF = 1 + end + end + + # Message for getting the enrollment status of a resource. + # @!attribute [rw] name + # @return [::String] + # Required. Format + # folders/\\{folder}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, + # projects/\\{project}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, + # organizations/\\{organization}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status} + class GetResourceEnrollmentStatusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for listing all the descendent resources under parent with + # enrollment. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent scope for which the list of resources with enrollments + # are required. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of resources to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + class ListResourceEnrollmentStatusesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with all the descendent resources with enrollment. + # @!attribute [rw] resource_enrollment_statuses + # @return [::Array<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>] + # The resources with their enrollment status. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The token to retrieve the next page of results. + class ListResourceEnrollmentStatusesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting to list the audit reports. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent scope for which to list the reports. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of resources to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + class ListAuditReportsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with all the audit reports. + # @!attribute [r] audit_reports + # @return [::Array<::Google::Cloud::AuditManager::V1::AuditReport>] + # Output only. The audit reports. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The token to retrieve the next page of results. + class ListAuditReportsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the overall audit report for an audit report name. + # @!attribute [rw] name + # @return [::String] + # Required. Format + # projects/\\{project}/locations/\\{location}/auditReports/\\{audit_report}, + # folders/\\{folder}/locations/\\{location}/auditReports/\\{audit_report} + class GetAuditReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting all the controls for a compliance standard. + # @!attribute [rw] parent + # @return [::String] + # Required. Format + # projects/\\{project}/locations/\\{location}/standards/\\{standard}, + # folders/\\{folder}/locations/\\{location}/standards/\\{standard} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of resources to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + class ListControlsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with all the controls for a compliance standard. + # @!attribute [r] controls + # @return [::Array<::Google::Cloud::AuditManager::V1::Control>] + # Output only. The controls for the compliance standard. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The token to retrieve the next page of results. + class ListControlsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ReportGenerationProgress` is part of + # {::Google::Longrunning::Operation google.longrunning.Operation} returned to the + # client for every `GetOperation` request. + # @!attribute [r] state + # @return [::Google::Cloud::AuditManager::V1::OperationState] + # Output only. The current state of execution for report generation. + # @!attribute [r] failure_reason + # @return [::String] + # Output only. States the reason of failure during the audit report + # generation process. This field is set only if the state attribute is + # OPERATION_STATE_FAILED. + # @!attribute [rw] evaluation_percent_complete + # @return [::Float] + # Shows the progress of the CESS service evaluation process. The progress is + # defined in terms of percentage complete and is being fetched from the CESS + # service. + # @!attribute [rw] report_generation_percent_complete + # @return [::Float] + # Shows the report generation progress of the CESS Result Processor Service. + # The // progress is defined in terms of percentage complete and is being + # fetched from the CESS service. If report_generation_in_progress is non zero + # then evaluation_percent_complete will be 100%. + # @!attribute [rw] report_uploading_percent_complete + # @return [::Float] + # Shows the report uploading progress of the CESS Result Processor Service. + # The progress is defined in terms of percentage complete and is being + # fetched from the CESS service. If report_uploading_in_progress is non zero + # then evaluation_percent_complete and report_generation_percent_complete + # will be 100%. + # @!attribute [r] destination_gcs_bucket + # @return [::String] + # Output only. The Cloud Storage bucket where the audit report will be + # uploaded once the evaluation process is completed. + # @!attribute [r] audit_report + # @return [::String] + # Output only. The name of the audit report. + class ReportGenerationProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The enrollment resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of this Enrollment, in the format of scope given in + # request. + # @!attribute [r] destination_details + # @return [::Array<::Google::Cloud::AuditManager::V1::DestinationDetails>] + # Output only. The locations where the generated reports can be uploaded. + class Enrollment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The audit scope report. + # @!attribute [rw] scope_report_contents + # @return [::String] + # The audit scope report content in byte format. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of this Audit Report, in the format of scope given in + # request. + class AuditScopeReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have been cancelled successfully + # have [Operation.error][] 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 + + # A resource with its enrollment status. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of this resource. + # @!attribute [r] enrollment + # @return [::Google::Cloud::AuditManager::V1::Enrollment] + # Output only. Enrollment which contains enrolled destination details for a + # resource + # @!attribute [r] enrolled + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Output only. Is resource enrolled. + # @!attribute [r] display_name + # @return [::String] + # Output only. Display name of the project/folder/organization. + # @!attribute [r] enrollment_state + # @return [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus::ResourceEnrollmentState] + # Output only. Enrollment state of the resource. + class ResourceEnrollmentStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The different enrollment states of a resource. + module ResourceEnrollmentState + # Unspecified. Invalid state. + RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Not enrolled. + NOT_ENROLLED = 1 + + # Resource is not enrolled but the parent is enrolled. + INHERITED = 2 + + # Enrolled. + ENROLLED = 3 + end + end + + # An audit report. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of this Audit Report, in the format of scope given in + # request. + # @!attribute [r] report_summary + # @return [::Google::Cloud::AuditManager::V1::ReportSummary] + # Output only. Report summary with compliance, violation counts etc. + # @!attribute [r] operation_id + # @return [::String] + # Output only. ClientOperationId + # @!attribute [r] destination_details + # @return [::Google::Cloud::AuditManager::V1::DestinationDetails] + # Output only. The location where the generated report will be uploaded. + # @!attribute [r] compliance_standard + # @return [::String] + # Output only. Compliance Standard. + # @!attribute [r] scope + # @return [::String] + # Output only. The parent scope on which the report was generated. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation time of the audit report. + # @!attribute [r] control_details + # @return [::Array<::Google::Cloud::AuditManager::V1::ControlDetails>] + # Output only. The overall status of controls + # @!attribute [r] report_generation_state + # @return [::Google::Cloud::AuditManager::V1::AuditReport::ReportGenerationState] + # Output only. The state of Audit Report Generation. + # @!attribute [r] compliance_framework + # @return [::String] + # Output only. Compliance Framework of Audit Report + # @!attribute [r] scope_id + # @return [::String] + # Output only. The ID/ Number for the scope on which the audit report was + # generated. + class AuditReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The different states of the Audit Manager report generation. + module ReportGenerationState + # Unspecified. Invalid state. + REPORT_GENERATION_STATE_UNSPECIFIED = 0 + + # Audit report generation process is in progress, ie. operation state is + # neither OPERATION_STATE_DONE nor OPERATION_STATE_FAILED. + IN_PROGRESS = 1 + + # Audit report generation process is completed. Operation state is + # OPERATION_STATE_DONE. + COMPLETED = 2 + + # Audit report generation process has failed. Operation state is + # OPERATION_STATE_FAILED. + FAILED = 3 + + # Audit report generation process has completed. But report summary is + # unknown. This is valid for older reports. + SUMMARY_UNKNOWN = 4 + end + end + + # The regulatory family of the control. + # @!attribute [rw] family_id + # @return [::String] + # The ID of the regulatory control family. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the regulatory control family. + class ControlFamily + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A control. + # @!attribute [r] id + # @return [::String] + # Output only. The control identifier used to fetch the findings. This is + # same as the control report name. + # @!attribute [r] display_name + # @return [::String] + # Output only. Display name of the control. + # @!attribute [r] family + # @return [::Google::Cloud::AuditManager::V1::Control::Family] + # Output only. Group where the control belongs. E.g. Access Control. + # @!attribute [r] control_family + # @return [::Google::Cloud::AuditManager::V1::ControlFamily] + # Output only. Regulatory Family of the control E.g. Access Control + # @!attribute [r] description + # @return [::String] + # Output only. Regulatory control ask of the control + # @!attribute [r] responsibility_type + # @return [::String] + # Output only. The type of responsibility for implementing this control. It + # can be google, customer or shared. + # @!attribute [r] google_responsibility_description + # @return [::String] + # Output only. Description of the google responsibility for implementing this + # control. + # @!attribute [r] google_responsibility_implementation + # @return [::String] + # Output only. Implementation of the google responsibility for implementing + # this control. + # @!attribute [r] customer_responsibility_description + # @return [::String] + # Output only. Description of the customer responsibility for implementing + # this control. + # @!attribute [r] customer_responsibility_implementation + # @return [::String] + # Output only. Implementation of the customer responsibility for implementing + # this control. + class Control + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The family of the control. For example, Access Control. + module Family + # Unspecified. Invalid state. + FAMILY_UNSPECIFIED = 0 + + # Access Control + AC = 1 + + # Awareness and Training + AT = 2 + + # Audit and Accountability + AU = 3 + + # Certification, Accreditation and Security Assessments + CA = 4 + + # Configuration Management + CM = 5 + + # Contingency Planning + CP = 6 + + # Identification and Authentication + IA = 7 + + # Incident Response + IR = 8 + + # Maintenance + MA = 9 + + # Media Protection + MP = 10 + + # Physical and Environmental Protection + PE = 11 + + # Security Planning + PL = 12 + + # Personnel Security + PS = 13 + + # Risk Assessment + RA = 14 + + # System Services and Acquisition + SA = 15 + + # System and Communications Protection + SC = 16 + + # System and Information Integrity + SI = 17 + + # Supply Chain Risk Management + SR = 18 + end + end + + # The locations where the generated reports are saved. + # @!attribute [rw] gcs_bucket_uri + # @return [::String] + # The Cloud Storage bucket where the audit report is/will be uploaded. + class DestinationDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The additional information for an audit operation. + # @!attribute [rw] total_count + # @return [::Integer] + # Total number of checks. + # @!attribute [rw] compliant_count + # @return [::Integer] + # Number of compliant checks. + # @!attribute [rw] violation_count + # @return [::Integer] + # Number of checks with violations. + # @!attribute [rw] manual_review_needed_count + # @return [::Integer] + # Number of checks with "manual review needed" status. + # @!attribute [rw] error_count + # @return [::Integer] + # Number of checks that could not be performed due to errors. + class ReportSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The evaluation details for a control. + # @!attribute [rw] control + # @return [::Google::Cloud::AuditManager::V1::Control] + # The control for which the findings are being reported. + # @!attribute [r] compliance_state + # @return [::Google::Cloud::AuditManager::V1::ComplianceState] + # Output only. Overall status of the findings for the control. + # @!attribute [rw] control_report_summary + # @return [::Google::Cloud::AuditManager::V1::ReportSummary] + # Report summary with compliance, violation counts etc. + class ControlDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The different execution states of the Audit Manager service. + module OperationState + # Unspecified. Invalid state. + OPERATION_STATE_UNSPECIFIED = 0 + + # Audit report generation process has not started. + OPERATION_STATE_NOT_STARTED = 10 + + # Audit Manager is currently evaluating the workloads against specific + # standard. + OPERATION_STATE_EVALUATION_IN_PROGRESS = 20 + + # Audit Manager has completed Evaluation for the workload. + OPERATION_STATE_EVALUATION_DONE = 21 + + # Audit Manager is creating audit report from the evaluated data. + OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30 + + # Audit Manager has completed generation of the audit report. + OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31 + + # Audit Manager is uploading the audit report and evidences to the customer + # provided destination. + OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40 + + # Audit report generation process is completed. + OPERATION_STATE_DONE = 50 + + # Audit report generation process has failed. + OPERATION_STATE_FAILED = 60 + end + + # The compliance state after evaluation. + module ComplianceState + # Unspecified. Invalid state. + COMPLIANCE_STATE_UNSPECIFIED = 0 + + # Compliant. + COMPLIANT = 1 + + # Violation. + VIOLATION = 2 + + # MANUAL_REVIEW_NEEDED, requires manual review + MANUAL_REVIEW_NEEDED = 3 + + # Error while computing status. + ERROR = 4 + + # Cannot be audited + AUDIT_NOT_SUPPORTED = 5 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/Gemfile new file mode 100644 index 000000000000..6a593b3a1f71 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-audit_manager-v1", path: "../" +else + gem "google-cloud-audit_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-audit_manager-v1/snippets/audit_manager/enroll_resource.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/enroll_resource.rb new file mode 100644 index 000000000000..f4e27d4d6644 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/enroll_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 auditmanager_v1_generated_AuditManager_EnrollResource_sync] +require "google/cloud/audit_manager/v1" + +## +# Snippet for the enroll_resource call in the AuditManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AuditManager::V1::AuditManager::Client#enroll_resource. +# +def enroll_resource + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AuditManager::V1::EnrollResourceRequest.new + + # Call the enroll_resource method. + result = client.enroll_resource request + + # The returned object is of type Google::Cloud::AuditManager::V1::Enrollment. + p result +end +# [END auditmanager_v1_generated_AuditManager_EnrollResource_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_report.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_report.rb new file mode 100644 index 000000000000..a66bbafb9561 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_report.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 auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] +require "google/cloud/audit_manager/v1" + +## +# Snippet for the generate_audit_report call in the AuditManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_report. +# +def generate_audit_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new + + # Call the generate_audit_report method. + result = client.generate_audit_report request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_scope_report.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_scope_report.rb new file mode 100644 index 000000000000..d672331d624b --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_scope_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 auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] +require "google/cloud/audit_manager/v1" + +## +# Snippet for the generate_audit_scope_report call in the AuditManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_scope_report. +# +def generate_audit_scope_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new + + # Call the generate_audit_scope_report method. + result = client.generate_audit_scope_report request + + # The returned object is of type Google::Cloud::AuditManager::V1::AuditScopeReport. + p result +end +# [END auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_audit_report.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_audit_report.rb new file mode 100644 index 000000000000..4ae57d254882 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_audit_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 auditmanager_v1_generated_AuditManager_GetAuditReport_sync] +require "google/cloud/audit_manager/v1" + +## +# Snippet for the get_audit_report call in the AuditManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AuditManager::V1::AuditManager::Client#get_audit_report. +# +def get_audit_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AuditManager::V1::GetAuditReportRequest.new + + # Call the get_audit_report method. + result = client.get_audit_report request + + # The returned object is of type Google::Cloud::AuditManager::V1::AuditReport. + p result +end +# [END auditmanager_v1_generated_AuditManager_GetAuditReport_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_resource_enrollment_status.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_resource_enrollment_status.rb new file mode 100644 index 000000000000..cfffa28a2c18 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_resource_enrollment_status.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync] +require "google/cloud/audit_manager/v1" + +## +# Snippet for the get_resource_enrollment_status call in the AuditManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AuditManager::V1::AuditManager::Client#get_resource_enrollment_status. +# +def get_resource_enrollment_status + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new + + # Call the get_resource_enrollment_status method. + result = client.get_resource_enrollment_status request + + # The returned object is of type Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. + p result +end +# [END auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_audit_reports.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_audit_reports.rb new file mode 100644 index 000000000000..bdb156045e4a --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_audit_reports.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 auditmanager_v1_generated_AuditManager_ListAuditReports_sync] +require "google/cloud/audit_manager/v1" + +## +# Snippet for the list_audit_reports call in the AuditManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AuditManager::V1::AuditManager::Client#list_audit_reports. +# +def list_audit_reports + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AuditManager::V1::ListAuditReportsRequest.new + + # Call the list_audit_reports method. + result = client.list_audit_reports request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AuditManager::V1::AuditReport. + p item + end +end +# [END auditmanager_v1_generated_AuditManager_ListAuditReports_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_controls.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_controls.rb new file mode 100644 index 000000000000..59e1306d9b01 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_controls.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 auditmanager_v1_generated_AuditManager_ListControls_sync] +require "google/cloud/audit_manager/v1" + +## +# Snippet for the list_controls call in the AuditManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AuditManager::V1::AuditManager::Client#list_controls. +# +def list_controls + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AuditManager::V1::ListControlsRequest.new + + # Call the list_controls method. + result = client.list_controls request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AuditManager::V1::Control. + p item + end +end +# [END auditmanager_v1_generated_AuditManager_ListControls_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_resource_enrollment_statuses.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_resource_enrollment_statuses.rb new file mode 100644 index 000000000000..592849c1dbf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_resource_enrollment_statuses.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 auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync] +require "google/cloud/audit_manager/v1" + +## +# Snippet for the list_resource_enrollment_statuses call in the AuditManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AuditManager::V1::AuditManager::Client#list_resource_enrollment_statuses. +# +def list_resource_enrollment_statuses + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AuditManager::V1::AuditManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.new + + # Call the list_resource_enrollment_statuses method. + result = client.list_resource_enrollment_statuses request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. + p item + end +end +# [END auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/snippet_metadata_google.cloud.auditmanager.v1.json b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/snippet_metadata_google.cloud.auditmanager.v1.json new file mode 100644 index 000000000000..bf885f16543b --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/snippet_metadata_google.cloud.auditmanager.v1.json @@ -0,0 +1,335 @@ +{ + "client_library": { + "name": "google-cloud-audit_manager-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.auditmanager.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "auditmanager_v1_generated_AuditManager_EnrollResource_sync", + "title": "Snippet for the enroll_resource call in the AuditManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#enroll_resource.", + "file": "audit_manager/enroll_resource.rb", + "language": "RUBY", + "client_method": { + "short_name": "enroll_resource", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#enroll_resource", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AuditManager::V1::EnrollResourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AuditManager::V1::Enrollment", + "client": { + "short_name": "AuditManager::Client", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" + }, + "method": { + "short_name": "EnrollResource", + "full_name": "google.cloud.auditmanager.v1.AuditManager.EnrollResource", + "service": { + "short_name": "AuditManager", + "full_name": "google.cloud.auditmanager.v1.AuditManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync", + "title": "Snippet for the generate_audit_scope_report call in the AuditManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_scope_report.", + "file": "audit_manager/generate_audit_scope_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_audit_scope_report", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_scope_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AuditManager::V1::AuditScopeReport", + "client": { + "short_name": "AuditManager::Client", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" + }, + "method": { + "short_name": "GenerateAuditScopeReport", + "full_name": "google.cloud.auditmanager.v1.AuditManager.GenerateAuditScopeReport", + "service": { + "short_name": "AuditManager", + "full_name": "google.cloud.auditmanager.v1.AuditManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync", + "title": "Snippet for the generate_audit_report call in the AuditManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_report.", + "file": "audit_manager/generate_audit_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_audit_report", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AuditManager::Client", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" + }, + "method": { + "short_name": "GenerateAuditReport", + "full_name": "google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport", + "service": { + "short_name": "AuditManager", + "full_name": "google.cloud.auditmanager.v1.AuditManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "auditmanager_v1_generated_AuditManager_ListAuditReports_sync", + "title": "Snippet for the list_audit_reports call in the AuditManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#list_audit_reports.", + "file": "audit_manager/list_audit_reports.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_audit_reports", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#list_audit_reports", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AuditManager::V1::ListAuditReportsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AuditManager::V1::ListAuditReportsResponse", + "client": { + "short_name": "AuditManager::Client", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" + }, + "method": { + "short_name": "ListAuditReports", + "full_name": "google.cloud.auditmanager.v1.AuditManager.ListAuditReports", + "service": { + "short_name": "AuditManager", + "full_name": "google.cloud.auditmanager.v1.AuditManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "auditmanager_v1_generated_AuditManager_GetAuditReport_sync", + "title": "Snippet for the get_audit_report call in the AuditManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#get_audit_report.", + "file": "audit_manager/get_audit_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_audit_report", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#get_audit_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AuditManager::V1::GetAuditReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AuditManager::V1::AuditReport", + "client": { + "short_name": "AuditManager::Client", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" + }, + "method": { + "short_name": "GetAuditReport", + "full_name": "google.cloud.auditmanager.v1.AuditManager.GetAuditReport", + "service": { + "short_name": "AuditManager", + "full_name": "google.cloud.auditmanager.v1.AuditManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync", + "title": "Snippet for the get_resource_enrollment_status call in the AuditManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#get_resource_enrollment_status.", + "file": "audit_manager/get_resource_enrollment_status.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_resource_enrollment_status", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#get_resource_enrollment_status", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus", + "client": { + "short_name": "AuditManager::Client", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" + }, + "method": { + "short_name": "GetResourceEnrollmentStatus", + "full_name": "google.cloud.auditmanager.v1.AuditManager.GetResourceEnrollmentStatus", + "service": { + "short_name": "AuditManager", + "full_name": "google.cloud.auditmanager.v1.AuditManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync", + "title": "Snippet for the list_resource_enrollment_statuses call in the AuditManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#list_resource_enrollment_statuses.", + "file": "audit_manager/list_resource_enrollment_statuses.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_enrollment_statuses", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#list_resource_enrollment_statuses", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse", + "client": { + "short_name": "AuditManager::Client", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" + }, + "method": { + "short_name": "ListResourceEnrollmentStatuses", + "full_name": "google.cloud.auditmanager.v1.AuditManager.ListResourceEnrollmentStatuses", + "service": { + "short_name": "AuditManager", + "full_name": "google.cloud.auditmanager.v1.AuditManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "auditmanager_v1_generated_AuditManager_ListControls_sync", + "title": "Snippet for the list_controls call in the AuditManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#list_controls.", + "file": "audit_manager/list_controls.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_controls", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#list_controls", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AuditManager::V1::ListControlsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AuditManager::V1::ListControlsResponse", + "client": { + "short_name": "AuditManager::Client", + "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" + }, + "method": { + "short_name": "ListControls", + "full_name": "google.cloud.auditmanager.v1.AuditManager.ListControls", + "service": { + "short_name": "AuditManager", + "full_name": "google.cloud.auditmanager.v1.AuditManager" + } + } + }, + "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-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_operations_test.rb b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_operations_test.rb new file mode 100644 index 000000000000..4a92e1e7ce47 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_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/auditmanager/v1/auditmanager_pb" +require "google/cloud/auditmanager/v1/auditmanager_services_pb" +require "google/cloud/audit_manager/v1/audit_manager" + +class ::Google::Cloud::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_paths_test.rb b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_paths_test.rb new file mode 100644 index 000000000000..d24e37ce9a27 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_paths_test.rb @@ -0,0 +1,133 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/audit_manager/v1/audit_manager" + +class ::Google::Cloud::AuditManager::V1::AuditManager::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_audit_report_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.audit_report_path project: "value0", location: "value1", audit_report: "value2" + assert_equal "projects/value0/locations/value1/auditReports/value2", path + + path = client.audit_report_path folder: "value0", location: "value1", audit_report: "value2" + assert_equal "folders/value0/locations/value1/auditReports/value2", path + end + end + + def test_enrollment_status_scope_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.enrollment_status_scope_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", path + + path = client.enrollment_status_scope_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", 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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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_resource_enrollment_status_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.resource_enrollment_status_path folder: "value0", location: "value1", resource_enrollment_status: "value2" + assert_equal "folders/value0/locations/value1/resourceEnrollmentStatuses/value2", path + + path = client.resource_enrollment_status_path project: "value0", location: "value1", resource_enrollment_status: "value2" + assert_equal "projects/value0/locations/value1/resourceEnrollmentStatuses/value2", path + + path = client.resource_enrollment_status_path organization: "value0", location: "value1", resource_enrollment_status: "value2" + assert_equal "organizations/value0/locations/value1/resourceEnrollmentStatuses/value2", path + end + end + + def test_standard_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.standard_path project: "value0", location: "value1", standard: "value2" + assert_equal "projects/value0/locations/value1/standards/value2", path + + path = client.standard_path folder: "value0", location: "value1", standard: "value2" + assert_equal "folders/value0/locations/value1/standards/value2", path + + path = client.standard_path organization: "value0", location: "value1", standard: "value2" + assert_equal "organizations/value0/locations/value1/standards/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_rest_test.rb b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_rest_test.rb new file mode 100644 index 000000000000..8441d2f424b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_rest_test.rb @@ -0,0 +1,545 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/auditmanager/v1/auditmanager_pb" +require "google/cloud/audit_manager/v1/audit_manager/rest" + + +class ::Google::Cloud::AuditManager::V1::AuditManager::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_enroll_resource + # Create test objects. + client_result = ::Google::Cloud::AuditManager::V1::Enrollment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + destinations = [{}] + + enroll_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::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_enroll_resource_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enroll_resource_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.enroll_resource({ scope: scope, destinations: destinations }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.enroll_resource scope: scope, destinations: destinations do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.enroll_resource ::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new(scope: scope, destinations: destinations) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.enroll_resource({ scope: scope, destinations: destinations }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.enroll_resource(::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new(scope: scope, destinations: destinations), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enroll_resource_client_stub.call_count + end + end + end + + def test_generate_audit_scope_report + # Create test objects. + client_result = ::Google::Cloud::AuditManager::V1::AuditScopeReport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + compliance_standard = "hello world" + report_format = :AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED + compliance_framework = "hello world" + + generate_audit_scope_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::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_generate_audit_scope_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_audit_scope_report_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.generate_audit_scope_report({ scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.generate_audit_scope_report scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.generate_audit_scope_report ::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new(scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.generate_audit_scope_report({ scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.generate_audit_scope_report(::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new(scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_audit_scope_report_client_stub.call_count + end + end + end + + def test_generate_audit_report + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_uri = "hello world" + scope = "hello world" + compliance_standard = "hello world" + report_format = :AUDIT_REPORT_FORMAT_UNSPECIFIED + compliance_framework = "hello world" + + generate_audit_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::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_generate_audit_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_audit_report_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.generate_audit_report({ gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.generate_audit_report gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.generate_audit_report ::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new(gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.generate_audit_report({ gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.generate_audit_report(::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new(gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_audit_report_client_stub.call_count + end + end + end + + def test_list_audit_reports + # Create test objects. + client_result = ::Google::Cloud::AuditManager::V1::ListAuditReportsResponse.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_audit_reports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_list_audit_reports_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_audit_reports_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_audit_reports({ 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_audit_reports 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_audit_reports ::Google::Cloud::AuditManager::V1::ListAuditReportsRequest.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_audit_reports({ 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_audit_reports(::Google::Cloud::AuditManager::V1::ListAuditReportsRequest.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_audit_reports_client_stub.call_count + end + end + end + + def test_get_audit_report + # Create test objects. + client_result = ::Google::Cloud::AuditManager::V1::AuditReport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_audit_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::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_get_audit_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_audit_report_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_audit_report({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_audit_report name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_audit_report ::Google::Cloud::AuditManager::V1::GetAuditReportRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_audit_report({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_audit_report(::Google::Cloud::AuditManager::V1::GetAuditReportRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_audit_report_client_stub.call_count + end + end + end + + def test_get_resource_enrollment_status + # Create test objects. + client_result = ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_enrollment_status_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_get_resource_enrollment_status_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_resource_enrollment_status_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_resource_enrollment_status({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_resource_enrollment_status name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_resource_enrollment_status ::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_resource_enrollment_status({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_resource_enrollment_status(::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_resource_enrollment_status_client_stub.call_count + end + end + end + + def test_list_resource_enrollment_statuses + # Create test objects. + client_result = ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse.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_enrollment_statuses_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_list_resource_enrollment_statuses_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_enrollment_statuses_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_resource_enrollment_statuses({ 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_enrollment_statuses 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_enrollment_statuses ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.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_enrollment_statuses({ 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_enrollment_statuses(::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.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_enrollment_statuses_client_stub.call_count + end + end + end + + def test_list_controls + # Create test objects. + client_result = ::Google::Cloud::AuditManager::V1::ListControlsResponse.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_controls_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_list_controls_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_controls_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_controls({ 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_controls 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_controls ::Google::Cloud::AuditManager::V1::ListControlsRequest.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_controls({ 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_controls(::Google::Cloud::AuditManager::V1::ListControlsRequest.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_controls_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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_test.rb b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_test.rb new file mode 100644 index 000000000000..324684babba4 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_test.rb @@ -0,0 +1,631 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/auditmanager/v1/auditmanager_pb" +require "google/cloud/audit_manager/v1/audit_manager" + +class ::Google::Cloud::AuditManager::V1::AuditManager::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_enroll_resource + # Create GRPC objects. + grpc_response = ::Google::Cloud::AuditManager::V1::Enrollment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + destinations = [{}] + + enroll_resource_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enroll_resource, name + assert_kind_of ::Google::Cloud::AuditManager::V1::EnrollResourceRequest, request + assert_equal "hello world", request["scope"] + assert_kind_of ::Google::Cloud::AuditManager::V1::EnrollResourceRequest::EligibleDestination, request["destinations"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, enroll_resource_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.enroll_resource({ scope: scope, destinations: destinations }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.enroll_resource scope: scope, destinations: destinations do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.enroll_resource ::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new(scope: scope, destinations: destinations) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.enroll_resource({ scope: scope, destinations: destinations }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.enroll_resource(::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new(scope: scope, destinations: destinations), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enroll_resource_client_stub.call_rpc_count + end + end + + def test_generate_audit_scope_report + # Create GRPC objects. + grpc_response = ::Google::Cloud::AuditManager::V1::AuditScopeReport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + compliance_standard = "hello world" + report_format = :AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED + compliance_framework = "hello world" + + generate_audit_scope_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_audit_scope_report, name + assert_kind_of ::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest, request + assert_equal "hello world", request["scope"] + assert_equal "hello world", request["compliance_standard"] + assert_equal :AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED, request["report_format"] + assert_equal "hello world", request["compliance_framework"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_audit_scope_report_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.generate_audit_scope_report({ scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.generate_audit_scope_report scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.generate_audit_scope_report ::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new(scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.generate_audit_scope_report({ scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.generate_audit_scope_report(::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new(scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_audit_scope_report_client_stub.call_rpc_count + end + end + + def test_generate_audit_report + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_uri = "hello world" + scope = "hello world" + compliance_standard = "hello world" + report_format = :AUDIT_REPORT_FORMAT_UNSPECIFIED + compliance_framework = "hello world" + + generate_audit_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_audit_report, name + assert_kind_of ::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest, request + assert_equal "hello world", request["gcs_uri"] + assert_equal :gcs_uri, request.destination + assert_equal "hello world", request["scope"] + assert_equal "hello world", request["compliance_standard"] + assert_equal :AUDIT_REPORT_FORMAT_UNSPECIFIED, request["report_format"] + assert_equal "hello world", request["compliance_framework"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_audit_report_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.generate_audit_report({ gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }) do |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.generate_audit_report gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework do |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.generate_audit_report ::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new(gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework) do |response, operation| + 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.generate_audit_report({ gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }, grpc_options) do |response, operation| + 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.generate_audit_report(::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new(gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_audit_report_client_stub.call_rpc_count + end + end + + def test_list_audit_reports + # Create GRPC objects. + grpc_response = ::Google::Cloud::AuditManager::V1::ListAuditReportsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_audit_reports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_audit_reports, name + assert_kind_of ::Google::Cloud::AuditManager::V1::ListAuditReportsRequest, 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_audit_reports_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_audit_reports({ parent: parent, page_size: page_size, page_token: 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_audit_reports parent: parent, page_size: page_size, page_token: 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_audit_reports ::Google::Cloud::AuditManager::V1::ListAuditReportsRequest.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_audit_reports({ 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_audit_reports(::Google::Cloud::AuditManager::V1::ListAuditReportsRequest.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_audit_reports_client_stub.call_rpc_count + end + end + + def test_get_audit_report + # Create GRPC objects. + grpc_response = ::Google::Cloud::AuditManager::V1::AuditReport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_audit_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_audit_report, name + assert_kind_of ::Google::Cloud::AuditManager::V1::GetAuditReportRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_audit_report_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_audit_report({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_audit_report name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_audit_report ::Google::Cloud::AuditManager::V1::GetAuditReportRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_audit_report({ 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_audit_report(::Google::Cloud::AuditManager::V1::GetAuditReportRequest.new(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_audit_report_client_stub.call_rpc_count + end + end + + def test_get_resource_enrollment_status + # Create GRPC objects. + grpc_response = ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_enrollment_status_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_resource_enrollment_status, name + assert_kind_of ::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_resource_enrollment_status_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_resource_enrollment_status({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_resource_enrollment_status name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_resource_enrollment_status ::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.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_enrollment_status({ 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_enrollment_status(::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new(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_enrollment_status_client_stub.call_rpc_count + end + end + + def test_list_resource_enrollment_statuses + # Create GRPC objects. + grpc_response = ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_enrollment_statuses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_enrollment_statuses, name + assert_kind_of ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest, 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_enrollment_statuses_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_resource_enrollment_statuses({ parent: parent, page_size: page_size, page_token: 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_enrollment_statuses parent: parent, page_size: page_size, page_token: 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_enrollment_statuses ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.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_enrollment_statuses({ 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_enrollment_statuses(::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.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_enrollment_statuses_client_stub.call_rpc_count + end + end + + def test_list_controls + # Create GRPC objects. + grpc_response = ::Google::Cloud::AuditManager::V1::ListControlsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_controls_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_controls, name + assert_kind_of ::Google::Cloud::AuditManager::V1::ListControlsRequest, 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_controls_client_stub do + # Create client + c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_controls({ parent: parent, page_size: page_size, page_token: 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_controls parent: parent, page_size: page_size, page_token: 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_controls ::Google::Cloud::AuditManager::V1::ListControlsRequest.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_controls({ 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_controls(::Google::Cloud::AuditManager::V1::ListControlsRequest.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_controls_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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AuditManager::V1::AuditManager::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/test/helper.rb b/owl-bot-staging/google-cloud-audit_manager-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-audit_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-automl-v1/.gitignore b/owl-bot-staging/google-cloud-automl-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json new file mode 100644 index 000000000000..d22539d020e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json @@ -0,0 +1,20 @@ +{ + "api_id": "automl.googleapis.com", + "api_shortname": "automl", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest", + "distribution_name": "google-cloud-automl-v1", + "is_cloud": true, + "language": "ruby", + "name": "automl", + "name_pretty": "Cloud AutoML V1 API", + "product_documentation": "https://cloud.google.com/automl", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details.", + "ruby-cloud-env-prefix": "AUTOML", + "ruby-cloud-product-url": "https://cloud.google.com/automl", + "ruby-cloud-path-override": "auto_ml=automl", + "ruby-cloud-namespace-override": "AutoMl=AutoML;Automl=AutoML", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml b/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml new file mode 100644 index 000000000000..622056ff5619 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-automl-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-automl-v1.rb" diff --git a/owl-bot-staging/google-cloud-automl-v1/.toys.rb b/owl-bot-staging/google-cloud-automl-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/.yardopts b/owl-bot-staging/google-cloud-automl-v1/.yardopts new file mode 100644 index 000000000000..cecfd779ab86 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud AutoML 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-automl-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..5381a147f986 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-automl-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-automl-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/automl/v1" + +client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/automl/v1" + +::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AutoML::V1::PredictionService::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-automl-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/automl/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AutoML::V1::PredictionService::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-automl-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-automl-v1/Gemfile b/owl-bot-staging/google-cloud-automl-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/LICENSE.md b/owl-bot-staging/google-cloud-automl-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/README.md b/owl-bot-staging/google-cloud-automl-v1/README.md new file mode 100644 index 000000000000..d0ac6cd9516e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud AutoML V1 API + +Train high-quality custom machine learning models with minimum effort and machine learning expertise. + +AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. + +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 AutoML V1 API. Most users should consider using +the main client gem, +[google-cloud-automl](https://rubygems.org/gems/google-cloud-automl). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-automl-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/automl.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/automl/v1" + +client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new +request = ::Google::Cloud::AutoML::V1::PredictRequest.new # (request fields as keyword arguments...) +response = client.predict request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/automl) +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/automl/v1" +require "logger" + +client = ::Google::Cloud::AutoML::V1::PredictionService::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-automl`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-automl-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-automl`. +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-automl-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-automl-v1/Rakefile b/owl-bot-staging/google-cloud-automl-v1/Rakefile new file mode 100644 index 000000000000..9dd468f3830e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/Rakefile @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-automl-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["AUTOML_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["AUTOML_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["AUTOML_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 AUTOML_TEST_PROJECT=test123 AUTOML_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/automl/v1/prediction_service/credentials" + ::Google::Cloud::AutoML::V1::PredictionService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["AUTOML_PROJECT"] = project + ENV["AUTOML_TEST_PROJECT"] = project + ENV["AUTOML_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-automl-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-automl-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-automl-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-automl-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-automl-v1" + header "google-cloud-automl-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-automl-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-automl-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-automl-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-automl-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-automl-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json new file mode 100644 index 000000000000..e3b4d840f3ac --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json @@ -0,0 +1,127 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.automl.v1", + "libraryPackage": "::Google::Cloud::AutoML::V1", + "services": { + "PredictionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AutoML::V1::PredictionService::Client", + "rpcs": { + "Predict": { + "methods": [ + "predict" + ] + }, + "BatchPredict": { + "methods": [ + "batch_predict" + ] + } + } + } + } + }, + "AutoMl": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AutoML::V1::AutoML::Client", + "rpcs": { + "CreateDataset": { + "methods": [ + "create_dataset" + ] + }, + "GetDataset": { + "methods": [ + "get_dataset" + ] + }, + "ListDatasets": { + "methods": [ + "list_datasets" + ] + }, + "UpdateDataset": { + "methods": [ + "update_dataset" + ] + }, + "DeleteDataset": { + "methods": [ + "delete_dataset" + ] + }, + "ImportData": { + "methods": [ + "import_data" + ] + }, + "ExportData": { + "methods": [ + "export_data" + ] + }, + "GetAnnotationSpec": { + "methods": [ + "get_annotation_spec" + ] + }, + "CreateModel": { + "methods": [ + "create_model" + ] + }, + "GetModel": { + "methods": [ + "get_model" + ] + }, + "ListModels": { + "methods": [ + "list_models" + ] + }, + "DeleteModel": { + "methods": [ + "delete_model" + ] + }, + "UpdateModel": { + "methods": [ + "update_model" + ] + }, + "DeployModel": { + "methods": [ + "deploy_model" + ] + }, + "UndeployModel": { + "methods": [ + "undeploy_model" + ] + }, + "ExportModel": { + "methods": [ + "export_model" + ] + }, + "GetModelEvaluation": { + "methods": [ + "get_model_evaluation" + ] + }, + "ListModelEvaluations": { + "methods": [ + "list_model_evaluations" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec b/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec new file mode 100644 index 000000000000..d2f57a57231e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/automl/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-automl-v1" + gem.version = Google::Cloud::AutoML::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details." + gem.summary = "Train high-quality custom machine learning models with minimum effort and machine learning expertise." + 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-automl-v1/lib/google-cloud-automl-v1.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb new file mode 100644 index 000000000000..0639f3bfe935 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-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/automl/v1" diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb new file mode 100644 index 000000000000..70b770d6ce68 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/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/automl/v1/prediction_service" +require "google/cloud/automl/v1/automl" +require "google/cloud/automl/v1/version" + +module Google + module Cloud + module AutoML + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/automl/v1" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/automl/v1" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/automl/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb new file mode 100644 index 000000000000..5429cd0a0e66 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/annotation_payload.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/classification_pb' +require 'google/cloud/automl/v1/detection_pb' +require 'google/cloud/automl/v1/text_extraction_pb' +require 'google/cloud/automl/v1/text_sentiment_pb' +require 'google/cloud/automl/v1/translation_pb' + + +descriptor_data = "\n/google/cloud/automl/v1/annotation_payload.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\x1a&google/cloud/automl/v1/detection.proto\x1a,google/cloud/automl/v1/text_extraction.proto\x1a+google/cloud/automl/v1/text_sentiment.proto\x1a(google/cloud/automl/v1/translation.proto\"\xd3\x03\n\x11\x41nnotationPayload\x12\x44\n\x0btranslation\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1.TranslationAnnotationH\x00\x12J\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x30.google.cloud.automl.v1.ClassificationAnnotationH\x00\x12X\n\x16image_object_detection\x18\x04 \x01(\x0b\x32\x36.google.cloud.automl.v1.ImageObjectDetectionAnnotationH\x00\x12K\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x30.google.cloud.automl.v1.TextExtractionAnnotationH\x00\x12I\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32/.google.cloud.automl.v1.TextSentimentAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + AnnotationPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.AnnotationPayload").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb new file mode 100644 index 000000000000..1570c5e4ceeb --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/annotation_spec.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n,google/cloud/automl/v1/annotation_spec.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + AnnotationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.AnnotationSpec").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb new file mode 100644 index 000000000000..62e9c8a5a030 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.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/automl/v1/version" + +require "google/cloud/automl/v1/automl/credentials" +require "google/cloud/automl/v1/automl/paths" +require "google/cloud/automl/v1/automl/operations" +require "google/cloud/automl/v1/automl/client" +require "google/cloud/automl/v1/automl/rest" + +module Google + module Cloud + module AutoML + module V1 + ## + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/automl/v1/automl" + # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/automl/v1/automl/rest" + # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + module AutoML + end + end + end + end +end + +helper_path = ::File.join __dir__, "automl", "helpers.rb" +require "google/cloud/automl/v1/automl/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb new file mode 100644 index 000000000000..7ecc77f69219 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb @@ -0,0 +1,2351 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/automl/v1/service_pb" + +module Google + module Cloud + module AutoML + module V1 + module AutoML + ## + # Client for the AutoMl service. + # + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :auto_ml_stub + + ## + # Configure the AutoMl Client class. + # + # See {::Google::Cloud::AutoML::V1::AutoML::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutoMl clients + # ::Google::Cloud::AutoML::V1::AutoML::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", "AutoML", "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_dataset.timeout = 5.0 + + default_config.rpcs.get_dataset.timeout = 5.0 + default_config.rpcs.get_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_datasets.timeout = 5.0 + default_config.rpcs.list_datasets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_dataset.timeout = 5.0 + + default_config.rpcs.delete_dataset.timeout = 5.0 + default_config.rpcs.delete_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.import_data.timeout = 5.0 + + default_config.rpcs.export_data.timeout = 5.0 + + default_config.rpcs.get_annotation_spec.timeout = 5.0 + default_config.rpcs.get_annotation_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_model.timeout = 5.0 + + default_config.rpcs.get_model.timeout = 5.0 + default_config.rpcs.get_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_models.timeout = 5.0 + default_config.rpcs.list_models.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_model.timeout = 5.0 + default_config.rpcs.delete_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_model.timeout = 5.0 + + default_config.rpcs.deploy_model.timeout = 5.0 + + default_config.rpcs.undeploy_model.timeout = 5.0 + + default_config.rpcs.export_model.timeout = 5.0 + + default_config.rpcs.get_model_evaluation.timeout = 5.0 + default_config.rpcs.get_model_evaluation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_model_evaluations.timeout = 5.0 + default_config.rpcs.list_model_evaluations.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 AutoMl 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::AutoML::V1::AutoML::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 + @auto_ml_stub.universe_domain + end + + ## + # Create a new AutoMl client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutoMl 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/automl/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 + + @auto_ml_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AutoML::V1::AutoMl::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 + ) + + @auto_ml_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::AutoML::V1::AutoML::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @auto_ml_stub.logger + end + + # Service calls + + ## + # Creates a dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_dataset(parent: nil, dataset: nil) + # Pass arguments to `create_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 create the dataset for. + # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] + # Required. The dataset 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/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new + # + # # Call the create_dataset method. + # result = client.create_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateDatasetRequest + + # Converts hash and nil to 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :create_dataset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_dataset(name: nil) + # Pass arguments to `get_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + # p result + # + def get_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_dataset, request, 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 datasets in a project. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 from which to list datasets. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new + # + # # Call the list_datasets method. + # result = client.list_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. + # p item + # end + # + def list_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListDatasetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_datasets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_datasets, request, response, 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 dataset. + # + # @overload update_dataset(request, options = nil) + # Pass arguments to `update_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UpdateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_dataset(dataset: nil, update_mask: nil) + # Pass arguments to `update_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] + # Required. The dataset which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new + # + # # Call the update_dataset method. + # result = client.update_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + # p result + # + def update_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateDatasetRequest + + # Converts hash and nil to 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.dataset&.name + header_params["dataset.name"] = request.dataset.name + end + + request_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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :update_dataset, request, 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 dataset and all of its contents. + # Returns empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_dataset(name: nil) + # Pass arguments to `delete_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new + # + # # Call the delete_dataset method. + # result = client.delete_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteDatasetRequest + + # Converts hash and nil to 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :delete_dataset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # {::Google::Cloud::AutoML::V1::InputConfig#params schema_inference_version} + # parameter must be explicitly set. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload import_data(request, options = nil) + # Pass arguments to `import_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ImportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ImportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_data(name: nil, input_config: nil) + # Pass arguments to `import_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @param input_config [::Google::Cloud::AutoML::V1::InputConfig, ::Hash] + # Required. The desired input location and its domain specific semantics, + # if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ImportDataRequest.new + # + # # Call the import_data method. + # result = client.import_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ImportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :import_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_data(request, options = nil) + # Pass arguments to `export_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ExportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ExportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_data(name: nil, output_config: nil) + # Pass arguments to `export_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset. + # @param output_config [::Google::Cloud::AutoML::V1::OutputConfig, ::Hash] + # Required. The desired output location. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ExportDataRequest.new + # + # # Call the export_data method. + # result = client.export_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :export_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 annotation spec. + # + # @overload get_annotation_spec(request, options = nil) + # Pass arguments to `get_annotation_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_annotation_spec(name: nil) + # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 annotation spec to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::AnnotationSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new + # + # # Call the get_annotation_spec method. + # result = client.get_annotation_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. + # p result + # + def get_annotation_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_annotation_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_annotation_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_annotation_spec, request, 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 model. + # Returns a Model in the {::Google::Longrunning::Operation#response response} + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::CreateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_model(parent: nil, model: nil) + # Pass arguments to `create_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 project where the model is being created. + # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] + # Required. The model 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/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::CreateModelRequest.new + # + # # Call the create_model method. + # result = client.create_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateModelRequest + + # Converts hash and nil to 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :create_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 model. + # + # @overload get_model(request, options = nil) + # Pass arguments to `get_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_model(name: nil) + # Pass arguments to `get_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Model. + # p result + # + def get_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_model, request, 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 models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project, from which to list the models. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListModelsRequest.new + # + # # Call the list_models method. + # result = client.list_models request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::Model. + # p item + # end + # + def list_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_models.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_models, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_models, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a model. + # Returns `google.protobuf.Empty` in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_model(name: nil) + # Pass arguments to `delete_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model being deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeleteModelRequest.new + # + # # Call the delete_model method. + # result = client.delete_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteModelRequest + + # Converts hash and nil to 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :delete_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 model. + # + # @overload update_model(request, options = nil) + # Pass arguments to `update_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UpdateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_model(model: nil, update_mask: nil) + # Pass arguments to `update_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] + # Required. The model which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UpdateModelRequest.new + # + # # Call the update_model method. + # result = client.update_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Model. + # p result + # + def update_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateModelRequest + + # Converts hash and nil to 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.model&.name + header_params["model.name"] = request.model.name + end + + request_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_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :update_model, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload deploy_model(request, options = nil) + # Pass arguments to `deploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) + # Pass arguments to `deploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. 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 image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Classification. + # + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. 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 name [::String] + # Required. Resource name of the model to deploy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeployModelRequest.new + # + # # Call the deploy_model method. + # result = client.deploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.deploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.deploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :deploy_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload undeploy_model(request, options = nil) + # Pass arguments to `undeploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UndeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undeploy_model(name: nil) + # Pass arguments to `undeploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model to undeploy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UndeployModelRequest.new + # + # # Call the undeploy_model method. + # result = client.undeploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undeploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UndeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undeploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undeploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :undeploy_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_model(request, options = nil) + # Pass arguments to `export_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ExportModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ExportModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_model(name: nil, output_config: nil) + # Pass arguments to `export_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 model to export. + # @param output_config [::Google::Cloud::AutoML::V1::ModelExportOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ExportModelRequest.new + # + # # Call the export_model method. + # result = client.export_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :export_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 model evaluation. + # + # @overload get_model_evaluation(request, options = nil) + # Pass arguments to `get_model_evaluation` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetModelEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_model_evaluation(name: nil) + # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the model evaluation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::ModelEvaluation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new + # + # # Call the get_model_evaluation method. + # result = client.get_model_evaluation request + # + # # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. + # p result + # + def get_model_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_model_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_model_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_model_evaluation, request, 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 model evaluations. + # + # @overload list_model_evaluations(request, options = nil) + # Pass arguments to `list_model_evaluations` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @param filter [::String] + # Required. An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new + # + # # Call the list_model_evaluations method. + # result = client.list_model_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. + # p item + # end + # + def list_model_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_model_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_model_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, request, response, 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 AutoMl API. + # + # This class represents the configuration for AutoMl, + # providing control 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::AutoML::V1::AutoML::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_dataset to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1::AutoML::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::AutoML::V1::AutoML::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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 AutoMl API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `update_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dataset + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `import_data` + # @return [::Gapic::Config::Method] + # + attr_reader :import_data + ## + # RPC-specific configuration for `export_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_data + ## + # RPC-specific configuration for `get_annotation_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_annotation_spec + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # RPC-specific configuration for `get_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model + ## + # RPC-specific configuration for `list_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_models + ## + # RPC-specific configuration for `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + ## + # RPC-specific configuration for `update_model` + # @return [::Gapic::Config::Method] + # + attr_reader :update_model + ## + # RPC-specific configuration for `deploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy_model + ## + # RPC-specific configuration for `undeploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :undeploy_model + ## + # RPC-specific configuration for `export_model` + # @return [::Gapic::Config::Method] + # + attr_reader :export_model + ## + # RPC-specific configuration for `get_model_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model_evaluation + ## + # RPC-specific configuration for `list_model_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_model_evaluations + + # @private + def initialize parent_rpcs = nil + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset + @update_dataset = ::Gapic::Config::Method.new update_dataset_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data + @import_data = ::Gapic::Config::Method.new import_data_config + export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data + @export_data = ::Gapic::Config::Method.new export_data_config + get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec + @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_config + get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model + @get_model = ::Gapic::Config::Method.new get_model_config + list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models + @list_models = ::Gapic::Config::Method.new list_models_config + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model + @update_model = ::Gapic::Config::Method.new update_model_config + deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model + @deploy_model = ::Gapic::Config::Method.new deploy_model_config + undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model + @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config + export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model + @export_model = ::Gapic::Config::Method.new export_model_config + get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation + @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config + list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations + @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb new file mode 100644 index 000000000000..bafb75c5f4ab --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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 AutoML + module V1 + module AutoML + # Credentials for the AutoMl API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "AUTOML_CREDENTIALS", + "AUTOML_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "AUTOML_CREDENTIALS_JSON", + "AUTOML_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-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb new file mode 100644 index 000000000000..ec9bb5dce369 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb @@ -0,0 +1,851 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 AutoML + module V1 + module AutoML + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AutoMl 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 AutoMl 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::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + 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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb new file mode 100644 index 000000000000..7cfa7f1b018d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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 AutoML + module V1 + module AutoML + # Path helper methods for the AutoMl API. + module Paths + ## + # Create a fully-qualified AnnotationSpec resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # @param annotation_spec [String] + # + # @return [::String] + def annotation_spec_path project:, location:, dataset:, annotation_spec: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project:, location:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}" + 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 Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + ## + # Create a fully-qualified ModelEvaluation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # @param model_evaluation [String] + # + # @return [::String] + def model_evaluation_path project:, location:, model:, model_evaluation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}/modelEvaluations/#{model_evaluation}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb new file mode 100644 index 000000000000..fe9133837455 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/automl/v1/version" + +require "google/cloud/automl/v1/automl/credentials" +require "google/cloud/automl/v1/automl/paths" +require "google/cloud/automl/v1/automl/rest/operations" +require "google/cloud/automl/v1/automl/rest/client" + +module Google + module Cloud + module AutoML + module V1 + ## + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/automl/v1/automl/rest" + # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + module AutoML + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/automl/v1/automl/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb new file mode 100644 index 000000000000..7198b59b74d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb @@ -0,0 +1,2182 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/automl/v1/service_pb" +require "google/cloud/automl/v1/automl/rest/service_stub" + +module Google + module Cloud + module AutoML + module V1 + module AutoML + module Rest + ## + # REST client for the AutoMl service. + # + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :auto_ml_stub + + ## + # Configure the AutoMl Client class. + # + # See {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutoMl clients + # ::Google::Cloud::AutoML::V1::AutoML::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", "AutoML", "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_dataset.timeout = 5.0 + + default_config.rpcs.get_dataset.timeout = 5.0 + default_config.rpcs.get_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_datasets.timeout = 5.0 + default_config.rpcs.list_datasets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_dataset.timeout = 5.0 + + default_config.rpcs.delete_dataset.timeout = 5.0 + default_config.rpcs.delete_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.import_data.timeout = 5.0 + + default_config.rpcs.export_data.timeout = 5.0 + + default_config.rpcs.get_annotation_spec.timeout = 5.0 + default_config.rpcs.get_annotation_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_model.timeout = 5.0 + + default_config.rpcs.get_model.timeout = 5.0 + default_config.rpcs.get_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_models.timeout = 5.0 + default_config.rpcs.list_models.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_model.timeout = 5.0 + default_config.rpcs.delete_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_model.timeout = 5.0 + + default_config.rpcs.deploy_model.timeout = 5.0 + + default_config.rpcs.undeploy_model.timeout = 5.0 + + default_config.rpcs.export_model.timeout = 5.0 + + default_config.rpcs.get_model_evaluation.timeout = 5.0 + default_config.rpcs.get_model_evaluation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_model_evaluations.timeout = 5.0 + default_config.rpcs.list_model_evaluations.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 AutoMl 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::AutoML::V1::AutoML::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 + @auto_ml_stub.universe_domain + end + + ## + # Create a new AutoMl REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutoMl 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::AutoML::V1::AutoML::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 + + @auto_ml_stub = ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @auto_ml_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::AutoML::V1::AutoML::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @auto_ml_stub.logger + end + + # Service calls + + ## + # Creates a dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_dataset(parent: nil, dataset: nil) + # Pass arguments to `create_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 create the dataset for. + # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] + # Required. The dataset 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/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new + # + # # Call the create_dataset method. + # result = client.create_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateDatasetRequest + + # Converts hash and nil to an 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.create_dataset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_dataset(name: nil) + # Pass arguments to `get_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + # p result + # + def get_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_dataset request, 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 datasets in a project. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 from which to list datasets. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new + # + # # Call the list_datasets method. + # result = client.list_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. + # p item + # end + # + def list_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListDatasetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_datasets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, 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 dataset. + # + # @overload update_dataset(request, options = nil) + # Pass arguments to `update_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UpdateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_dataset(dataset: nil, update_mask: nil) + # Pass arguments to `update_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] + # Required. The dataset which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new + # + # # Call the update_dataset method. + # result = client.update_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + # p result + # + def update_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateDatasetRequest + + # Converts hash and nil to an 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.update_dataset request, 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 dataset and all of its contents. + # Returns empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_dataset(name: nil) + # Pass arguments to `delete_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new + # + # # Call the delete_dataset method. + # result = client.delete_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteDatasetRequest + + # Converts hash and nil to an 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.delete_dataset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # {::Google::Cloud::AutoML::V1::InputConfig#params schema_inference_version} + # parameter must be explicitly set. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload import_data(request, options = nil) + # Pass arguments to `import_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ImportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ImportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_data(name: nil, input_config: nil) + # Pass arguments to `import_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @param input_config [::Google::Cloud::AutoML::V1::InputConfig, ::Hash] + # Required. The desired input location and its domain specific semantics, + # if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ImportDataRequest.new + # + # # Call the import_data method. + # result = client.import_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ImportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.import_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_data(request, options = nil) + # Pass arguments to `export_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ExportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ExportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_data(name: nil, output_config: nil) + # Pass arguments to `export_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset. + # @param output_config [::Google::Cloud::AutoML::V1::OutputConfig, ::Hash] + # Required. The desired output location. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ExportDataRequest.new + # + # # Call the export_data method. + # result = client.export_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.export_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 annotation spec. + # + # @overload get_annotation_spec(request, options = nil) + # Pass arguments to `get_annotation_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_annotation_spec(name: nil) + # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 annotation spec to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::AnnotationSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new + # + # # Call the get_annotation_spec method. + # result = client.get_annotation_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. + # p result + # + def get_annotation_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_annotation_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_annotation_spec request, 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 model. + # Returns a Model in the {::Google::Longrunning::Operation#response response} + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::CreateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_model(parent: nil, model: nil) + # Pass arguments to `create_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 project where the model is being created. + # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] + # Required. The model 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/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::CreateModelRequest.new + # + # # Call the create_model method. + # result = client.create_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateModelRequest + + # Converts hash and nil to an 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.create_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 model. + # + # @overload get_model(request, options = nil) + # Pass arguments to `get_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_model(name: nil) + # Pass arguments to `get_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Model. + # p result + # + def get_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_model request, 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 models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project, from which to list the models. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_models AutoMl.ListModels} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListModelsRequest.new + # + # # Call the list_models method. + # result = client.list_models request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::Model. + # p item + # end + # + def list_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_models.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_models request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, 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 model. + # Returns `google.protobuf.Empty` in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_model(name: nil) + # Pass arguments to `delete_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model being deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeleteModelRequest.new + # + # # Call the delete_model method. + # result = client.delete_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteModelRequest + + # Converts hash and nil to an 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.delete_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 model. + # + # @overload update_model(request, options = nil) + # Pass arguments to `update_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UpdateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_model(model: nil, update_mask: nil) + # Pass arguments to `update_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] + # Required. The model which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UpdateModelRequest.new + # + # # Call the update_model method. + # result = client.update_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Model. + # p result + # + def update_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateModelRequest + + # Converts hash and nil to an 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.update_model request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload deploy_model(request, options = nil) + # Pass arguments to `deploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) + # Pass arguments to `deploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. 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 image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Classification. + # + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. 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 name [::String] + # Required. Resource name of the model to deploy. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeployModelRequest.new + # + # # Call the deploy_model method. + # result = client.deploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.deploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.deploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.deploy_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload undeploy_model(request, options = nil) + # Pass arguments to `undeploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UndeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undeploy_model(name: nil) + # Pass arguments to `undeploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model to undeploy. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UndeployModelRequest.new + # + # # Call the undeploy_model method. + # result = client.undeploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undeploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UndeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undeploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undeploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.undeploy_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_model(request, options = nil) + # Pass arguments to `export_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ExportModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ExportModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_model(name: nil, output_config: nil) + # Pass arguments to `export_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 model to export. + # @param output_config [::Google::Cloud::AutoML::V1::ModelExportOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ExportModelRequest.new + # + # # Call the export_model method. + # result = client.export_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.export_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 model evaluation. + # + # @overload get_model_evaluation(request, options = nil) + # Pass arguments to `get_model_evaluation` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetModelEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_model_evaluation(name: nil) + # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the model evaluation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::ModelEvaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new + # + # # Call the get_model_evaluation method. + # result = client.get_model_evaluation request + # + # # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. + # p result + # + def get_model_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_model_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_model_evaluation request, 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 model evaluations. + # + # @overload list_model_evaluations(request, options = nil) + # Pass arguments to `list_model_evaluations` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @param filter [::String] + # Required. An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new + # + # # Call the list_model_evaluations method. + # result = client.list_model_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. + # p item + # end + # + def list_model_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_model_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_model_evaluations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, 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 AutoMl REST API. + # + # This class represents the configuration for AutoMl 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::AutoML::V1::AutoML::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_dataset to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 AutoMl API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `update_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dataset + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `import_data` + # @return [::Gapic::Config::Method] + # + attr_reader :import_data + ## + # RPC-specific configuration for `export_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_data + ## + # RPC-specific configuration for `get_annotation_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_annotation_spec + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # RPC-specific configuration for `get_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model + ## + # RPC-specific configuration for `list_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_models + ## + # RPC-specific configuration for `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + ## + # RPC-specific configuration for `update_model` + # @return [::Gapic::Config::Method] + # + attr_reader :update_model + ## + # RPC-specific configuration for `deploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy_model + ## + # RPC-specific configuration for `undeploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :undeploy_model + ## + # RPC-specific configuration for `export_model` + # @return [::Gapic::Config::Method] + # + attr_reader :export_model + ## + # RPC-specific configuration for `get_model_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model_evaluation + ## + # RPC-specific configuration for `list_model_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_model_evaluations + + # @private + def initialize parent_rpcs = nil + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset + @update_dataset = ::Gapic::Config::Method.new update_dataset_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data + @import_data = ::Gapic::Config::Method.new import_data_config + export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data + @export_data = ::Gapic::Config::Method.new export_data_config + get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec + @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_config + get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model + @get_model = ::Gapic::Config::Method.new get_model_config + list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models + @list_models = ::Gapic::Config::Method.new list_models_config + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model + @update_model = ::Gapic::Config::Method.new update_model_config + deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model + @deploy_model = ::Gapic::Config::Method.new deploy_model_config + undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model + @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config + export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model + @export_model = ::Gapic::Config::Method.new export_model_config + get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation + @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config + list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations + @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb new file mode 100644 index 000000000000..bbabcd436e9d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb @@ -0,0 +1,1095 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 AutoML + module V1 + module AutoML + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AutoMl 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 AutoMl 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::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + ## + # 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 [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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::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 + call_metadata = @config.rpcs.wait_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::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: call_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.wait_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 + + ## + # 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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 + ## + # 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 + + ## + # @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 + + ## + # Baseline implementation for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_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: "wait_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 + + ## + # @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 + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + 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-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb new file mode 100644 index 000000000000..55b031b23a36 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb @@ -0,0 +1,1188 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/automl/v1/service_pb" + +module Google + module Cloud + module AutoML + module V1 + module AutoML + module Rest + ## + # REST service stub for the AutoMl 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_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::CreateDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # A result object deserialized from the server's reply + def get_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::Dataset.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_datasets REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListDatasetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::ListDatasetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::ListDatasetsResponse] + # A result object deserialized from the server's reply + def list_datasets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_datasets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.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_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UpdateDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # A result object deserialized from the server's reply + def update_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::Dataset.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_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeleteDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ImportDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ExportDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_annotation_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::AnnotationSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] + # A result object deserialized from the server's reply + def get_annotation_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_annotation_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::AnnotationSpec.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_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::CreateModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # A result object deserialized from the server's reply + def get_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::Model.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_models REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListModelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::ListModelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::ListModelsResponse] + # A result object deserialized from the server's reply + def list_models request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_models", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::ListModelsResponse.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_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeleteModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UpdateModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # A result object deserialized from the server's reply + def update_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::Model.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the deploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeployModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def deploy_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "deploy_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the undeploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UndeployModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def undeploy_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "undeploy_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ExportModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_model_evaluation REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::ModelEvaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] + # A result object deserialized from the server's reply + def get_model_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_model_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::ModelEvaluation.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_model_evaluations REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse] + # A result object deserialized from the server's reply + def list_model_evaluations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_model_evaluations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.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_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::CreateDatasetRequest] + # 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_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/datasets", + body: "dataset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_datasets REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListDatasetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_datasets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/datasets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UpdateDatasetRequest] + # 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_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{dataset.name}", + body: "dataset", + matches: [ + ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeleteDatasetRequest] + # 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_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ImportDataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:importData", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ExportDataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:exportData", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_annotation_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_annotation_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::CreateModelRequest] + # 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_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/models", + body: "model", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_models REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListModelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_models_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/models", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeleteModelRequest] + # 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_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UpdateModelRequest] + # 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_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{model.name}", + body: "model", + matches: [ + ["model.name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the deploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeployModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_deploy_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:deploy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undeploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UndeployModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undeploy_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:undeploy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ExportModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:export", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_model_evaluation REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_model_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/modelEvaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_model_evaluations REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_model_evaluations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/modelEvaluations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb new file mode 100644 index 000000000000..333190be5c39 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/classification.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/automl/v1/classification.proto\x12\x16google.cloud.automl.v1\")\n\x18\x43lassificationAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\"\x81\x07\n\x1f\x43lassificationEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12\x0e\n\x06\x61u_roc\x18\x06 \x01(\x02\x12\x10\n\x08log_loss\x18\x07 \x01(\x02\x12p\n\x18\x63onfidence_metrics_entry\x18\x03 \x03(\x0b\x32N.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry\x12\x61\n\x10\x63onfusion_matrix\x18\x04 \x01(\x0b\x32G.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x05 \x03(\t\x1a\xfc\x02\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x1a\n\x12position_threshold\x18\x0e \x01(\x05\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x1b\n\x13\x66\x61lse_positive_rate\x18\x08 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\x12\x12\n\nrecall_at1\x18\x05 \x01(\x02\x12\x15\n\rprecision_at1\x18\x06 \x01(\x02\x12\x1f\n\x17\x66\x61lse_positive_rate_at1\x18\t \x01(\x02\x12\x14\n\x0c\x66\x31_score_at1\x18\x07 \x01(\x02\x12\x1b\n\x13true_positive_count\x18\n \x01(\x03\x12\x1c\n\x14\x66\x61lse_positive_count\x18\x0b \x01(\x03\x12\x1c\n\x14\x66\x61lse_negative_count\x18\x0c \x01(\x03\x12\x1b\n\x13true_negative_count\x18\r \x01(\x03\x1a\xbb\x01\n\x0f\x43onfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x03(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x03(\t\x12X\n\x03row\x18\x02 \x03(\x0b\x32K.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row\x1a\x1c\n\x03Row\x12\x15\n\rexample_count\x18\x01 \x03(\x05*Y\n\x12\x43lassificationType\x12#\n\x1f\x43LASSIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTICLASS\x10\x01\x12\x0e\n\nMULTILABEL\x10\x02\x42\xb5\x01\n\x1a\x63om.google.cloud.automl.v1B\x13\x43lassificationProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + ClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationAnnotation").msgclass + ClassificationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics").msgclass + ClassificationEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry").msgclass + ClassificationEvaluationMetrics::ConfusionMatrix = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix").msgclass + ClassificationEvaluationMetrics::ConfusionMatrix::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row").msgclass + ClassificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb new file mode 100644 index 000000000000..06071be6eda6 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/data_items.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/geometry_pb' +require 'google/cloud/automl/v1/io_pb' +require 'google/cloud/automl/v1/text_segment_pb' + + +descriptor_data = "\n\'google/cloud/automl/v1/data_items.proto\x12\x16google.cloud.automl.v1\x1a%google/cloud/automl/v1/geometry.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a)google/cloud/automl/v1/text_segment.proto\"=\n\x05Image\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\x0cH\x00\x12\x15\n\rthumbnail_uri\x18\x04 \x01(\tB\x06\n\x04\x64\x61ta\"F\n\x0bTextSnippet\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x13\n\x0b\x63ontent_uri\x18\x04 \x01(\t\"\xea\x01\n\x12\x44ocumentDimensions\x12N\n\x04unit\x18\x01 \x01(\x0e\x32@.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit\x12\r\n\x05width\x18\x02 \x01(\x02\x12\x0e\n\x06height\x18\x03 \x01(\x02\"e\n\x15\x44ocumentDimensionUnit\x12\'\n#DOCUMENT_DIMENSION_UNIT_UNSPECIFIED\x10\x00\x12\x08\n\x04INCH\x10\x01\x12\x0e\n\nCENTIMETER\x10\x02\x12\t\n\x05POINT\x10\x03\"\xd6\x05\n\x08\x44ocument\x12\x41\n\x0cinput_config\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1.DocumentInputConfig\x12:\n\rdocument_text\x18\x02 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippet\x12\x37\n\x06layout\x18\x03 \x03(\x0b\x32\'.google.cloud.automl.v1.Document.Layout\x12G\n\x13\x64ocument_dimensions\x18\x04 \x01(\x0b\x32*.google.cloud.automl.v1.DocumentDimensions\x12\x12\n\npage_count\x18\x05 \x01(\x05\x1a\xb4\x03\n\x06Layout\x12\x39\n\x0ctext_segment\x18\x01 \x01(\x0b\x32#.google.cloud.automl.v1.TextSegment\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\x12;\n\rbounding_poly\x18\x03 \x01(\x0b\x32$.google.cloud.automl.v1.BoundingPoly\x12R\n\x11text_segment_type\x18\x04 \x01(\x0e\x32\x37.google.cloud.automl.v1.Document.Layout.TextSegmentType\"\xc8\x01\n\x0fTextSegmentType\x12!\n\x1dTEXT_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOKEN\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x0e\n\nFORM_FIELD\x10\x03\x12\x13\n\x0f\x46ORM_FIELD_NAME\x10\x04\x12\x17\n\x13\x46ORM_FIELD_CONTENTS\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x10\n\x0cTABLE_HEADER\x10\x07\x12\r\n\tTABLE_ROW\x10\x08\x12\x0e\n\nTABLE_CELL\x10\t\"\xbe\x01\n\x0e\x45xamplePayload\x12.\n\x05image\x18\x01 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ImageH\x00\x12;\n\x0ctext_snippet\x18\x02 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippetH\x00\x12\x34\n\x08\x64ocument\x18\x04 \x01(\x0b\x32 .google.cloud.automl.v1.DocumentH\x00\x42\t\n\x07payloadB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Image").msgclass + TextSnippet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSnippet").msgclass + DocumentDimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentDimensions").msgclass + DocumentDimensions::DocumentDimensionUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit").enummodule + Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document").msgclass + Document::Layout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document.Layout").msgclass + Document::Layout::TextSegmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document.Layout.TextSegmentType").enummodule + ExamplePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExamplePayload").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb new file mode 100644 index 000000000000..af1155523150 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/dataset.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1/image_pb' +require 'google/cloud/automl/v1/text_pb' +require 'google/cloud/automl/v1/translation_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n$google/cloud/automl/v1/dataset.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a\"google/cloud/automl/v1/image.proto\x1a!google/cloud/automl/v1/text.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x07\n\x07\x44\x61taset\x12Z\n\x1ctranslation_dataset_metadata\x18\x17 \x01(\x0b\x32\x32.google.cloud.automl.v1.TranslationDatasetMetadataH\x00\x12k\n%image_classification_dataset_metadata\x18\x18 \x01(\x0b\x32:.google.cloud.automl.v1.ImageClassificationDatasetMetadataH\x00\x12i\n$text_classification_dataset_metadata\x18\x19 \x01(\x0b\x32\x39.google.cloud.automl.v1.TextClassificationDatasetMetadataH\x00\x12n\n\'image_object_detection_dataset_metadata\x18\x1a \x01(\x0b\x32;.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadataH\x00\x12\x61\n text_extraction_dataset_metadata\x18\x1c \x01(\x0b\x32\x35.google.cloud.automl.v1.TextExtractionDatasetMetadataH\x00\x12_\n\x1ftext_sentiment_dataset_metadata\x18\x1e \x01(\x0b\x32\x34.google.cloud.automl.v1.TextSentimentDatasetMetadataH\x00\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\x15\n\rexample_count\x18\x15 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12;\n\x06labels\x18\' \x03(\x0b\x32+.google.cloud.automl.v1.Dataset.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:^\xea\x41[\n\x1d\x61utoml.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}B\x12\n\x10\x64\x61taset_metadataB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Dataset").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb new file mode 100644 index 000000000000..644c36eb549f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/detection.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/geometry_pb' + + +descriptor_data = "\n&google/cloud/automl/v1/detection.proto\x12\x16google.cloud.automl.v1\x1a%google/cloud/automl/v1/geometry.proto\"k\n\x1eImageObjectDetectionAnnotation\x12:\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32$.google.cloud.automl.v1.BoundingPoly\x12\r\n\x05score\x18\x02 \x01(\x02\"\xa9\x02\n\x17\x42oundingBoxMetricsEntry\x12\x15\n\riou_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16mean_average_precision\x18\x02 \x01(\x02\x12j\n\x1a\x63onfidence_metrics_entries\x18\x03 \x03(\x0b\x32\x46.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\"\xd1\x01\n%ImageObjectDetectionEvaluationMetrics\x12$\n\x1c\x65valuated_bounding_box_count\x18\x01 \x01(\x05\x12U\n\x1c\x62ounding_box_metrics_entries\x18\x02 \x03(\x0b\x32/.google.cloud.automl.v1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x03 \x01(\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + ImageObjectDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionAnnotation").msgclass + BoundingBoxMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingBoxMetricsEntry").msgclass + BoundingBoxMetricsEntry::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry").msgclass + ImageObjectDetectionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb new file mode 100644 index 000000000000..7d463bb0a1e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/geometry.proto + +require 'google/protobuf' + + +descriptor_data = "\n%google/cloud/automl/v1/geometry.proto\x12\x16google.cloud.automl.v1\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"U\n\x0c\x42oundingPoly\x12\x45\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32(.google.cloud.automl.v1.NormalizedVertexB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.NormalizedVertex").msgclass + BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingPoly").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb new file mode 100644 index 000000000000..537e7a464184 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/image.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/automl/v1/classification_pb' + + +descriptor_data = "\n\"google/cloud/automl/v1/image.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a+google/cloud/automl/v1/classification.proto\"r\n\"ImageClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationTypeB\x03\xe0\x41\x02\"%\n#ImageObjectDetectionDatasetMetadata\"\xf7\x01\n ImageClassificationModelMetadata\x12\x1a\n\rbase_model_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12*\n\x1dtrain_budget_milli_node_hours\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12(\n\x1btrain_cost_milli_node_hours\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bstop_reason\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nmodel_type\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08node_qps\x18\r \x01(\x01\x42\x03\xe0\x41\x03\x12\x17\n\nnode_count\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03\"\xdc\x01\n!ImageObjectDetectionModelMetadata\x12\x17\n\nmodel_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nnode_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08node_qps\x18\x04 \x01(\x01\x42\x03\xe0\x41\x03\x12\x18\n\x0bstop_reason\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12*\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01\x12(\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\"E\n*ImageClassificationModelDeploymentMetadata\x12\x17\n\nnode_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x04\"F\n+ImageObjectDetectionModelDeploymentMetadata\x12\x17\n\nnode_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x04\x42\xac\x01\n\x1a\x63om.google.cloud.automl.v1B\nImageProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + ImageClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationDatasetMetadata").msgclass + ImageObjectDetectionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata").msgclass + ImageClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationModelMetadata").msgclass + ImageObjectDetectionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionModelMetadata").msgclass + ImageClassificationModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata").msgclass + ImageObjectDetectionModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb new file mode 100644 index 000000000000..3eabed59230d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/io.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\x1fgoogle/cloud/automl/v1/io.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xc0\x01\n\x0bInputConfig\x12\x37\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSourceH\x00\x12?\n\x06params\x18\x02 \x03(\x0b\x32/.google.cloud.automl.v1.InputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"a\n\x17\x42\x61tchPredictInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSourceB\x03\xe0\x41\x02H\x00\x42\x08\n\x06source\"L\n\x13\x44ocumentInputConfig\x12\x35\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSource\"e\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"q\n\x18\x42\x61tchPredictOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"\x82\x02\n\x17ModelExportOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x12\x14\n\x0cmodel_format\x18\x04 \x01(\t\x12K\n\x06params\x18\x02 \x03(\x0b\x32;.google.cloud.automl.v1.ModelExportOutputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x64\x65stination\"$\n\tGcsSource\x12\x17\n\ninput_uris\x18\x01 \x03(\tB\x03\xe0\x41\x02\"0\n\x0eGcsDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.InputConfig").msgclass + BatchPredictInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictInputConfig").msgclass + DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentInputConfig").msgclass + OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.OutputConfig").msgclass + BatchPredictOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOutputConfig").msgclass + ModelExportOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ModelExportOutputConfig").msgclass + GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GcsSource").msgclass + GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GcsDestination").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb new file mode 100644 index 000000000000..7a64d0c09e95 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/model_evaluation.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1/classification_pb' +require 'google/cloud/automl/v1/detection_pb' +require 'google/cloud/automl/v1/text_extraction_pb' +require 'google/cloud/automl/v1/text_sentiment_pb' +require 'google/cloud/automl/v1/translation_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/automl/v1/model_evaluation.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a+google/cloud/automl/v1/classification.proto\x1a&google/cloud/automl/v1/detection.proto\x1a,google/cloud/automl/v1/text_extraction.proto\x1a+google/cloud/automl/v1/text_sentiment.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x06\n\x0fModelEvaluation\x12\x64\n!classification_evaluation_metrics\x18\x08 \x01(\x0b\x32\x37.google.cloud.automl.v1.ClassificationEvaluationMetricsH\x00\x12^\n\x1etranslation_evaluation_metrics\x18\t \x01(\x0b\x32\x34.google.cloud.automl.v1.TranslationEvaluationMetricsH\x00\x12r\n)image_object_detection_evaluation_metrics\x18\x0c \x01(\x0b\x32=.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsH\x00\x12\x63\n!text_sentiment_evaluation_metrics\x18\x0b \x01(\x0b\x32\x36.google.cloud.automl.v1.TextSentimentEvaluationMetricsH\x00\x12\x65\n\"text_extraction_evaluation_metrics\x18\r \x01(\x0b\x32\x37.google.cloud.automl.v1.TextExtractionEvaluationMetricsH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x61nnotation_spec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0f \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x17\x65valuated_example_count\x18\x06 \x01(\x05:\x87\x01\xea\x41\x83\x01\n%automl.googleapis.com/ModelEvaluation\x12Zprojects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}B\t\n\x07metricsB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + ModelEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ModelEvaluation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb new file mode 100644 index 000000000000..813290824876 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/model.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1/image_pb' +require 'google/cloud/automl/v1/text_pb' +require 'google/cloud/automl/v1/translation_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\"google/cloud/automl/v1/model.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a\"google/cloud/automl/v1/image.proto\x1a!google/cloud/automl/v1/text.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf1\x08\n\x05Model\x12V\n\x1atranslation_model_metadata\x18\x0f \x01(\x0b\x32\x30.google.cloud.automl.v1.TranslationModelMetadataH\x00\x12g\n#image_classification_model_metadata\x18\r \x01(\x0b\x32\x38.google.cloud.automl.v1.ImageClassificationModelMetadataH\x00\x12\x65\n\"text_classification_model_metadata\x18\x0e \x01(\x0b\x32\x37.google.cloud.automl.v1.TextClassificationModelMetadataH\x00\x12j\n%image_object_detection_model_metadata\x18\x14 \x01(\x0b\x32\x39.google.cloud.automl.v1.ImageObjectDetectionModelMetadataH\x00\x12]\n\x1etext_extraction_model_metadata\x18\x13 \x01(\x0b\x32\x33.google.cloud.automl.v1.TextExtractionModelMetadataH\x00\x12[\n\x1dtext_sentiment_model_metadata\x18\x16 \x01(\x0b\x32\x32.google.cloud.automl.v1.TextSentimentModelMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12G\n\x10\x64\x65ployment_state\x18\x08 \x01(\x0e\x32-.google.cloud.automl.v1.Model.DeploymentState\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12\x39\n\x06labels\x18\" \x03(\x0b\x32).google.cloud.automl.v1.Model.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0e\n\nUNDEPLOYED\x10\x02:X\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\x10\n\x0emodel_metadataB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Model").msgclass + Model::DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Model.DeploymentState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb new file mode 100644 index 000000000000..f253d09dfae0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/operations.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/io_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n\'google/cloud/automl/v1/operations.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xc9\x07\n\x11OperationMetadata\x12I\n\x0e\x64\x65lete_details\x18\x08 \x01(\x0b\x32/.google.cloud.automl.v1.DeleteOperationMetadataH\x00\x12T\n\x14\x64\x65ploy_model_details\x18\x18 \x01(\x0b\x32\x34.google.cloud.automl.v1.DeployModelOperationMetadataH\x00\x12X\n\x16undeploy_model_details\x18\x19 \x01(\x0b\x32\x36.google.cloud.automl.v1.UndeployModelOperationMetadataH\x00\x12T\n\x14\x63reate_model_details\x18\n \x01(\x0b\x32\x34.google.cloud.automl.v1.CreateModelOperationMetadataH\x00\x12X\n\x16\x63reate_dataset_details\x18\x1e \x01(\x0b\x32\x36.google.cloud.automl.v1.CreateDatasetOperationMetadataH\x00\x12R\n\x13import_data_details\x18\x0f \x01(\x0b\x32\x33.google.cloud.automl.v1.ImportDataOperationMetadataH\x00\x12V\n\x15\x62\x61tch_predict_details\x18\x10 \x01(\x0b\x32\x35.google.cloud.automl.v1.BatchPredictOperationMetadataH\x00\x12R\n\x13\x65xport_data_details\x18\x15 \x01(\x0b\x32\x33.google.cloud.automl.v1.ExportDataOperationMetadataH\x00\x12T\n\x14\x65xport_model_details\x18\x16 \x01(\x0b\x32\x34.google.cloud.automl.v1.ExportModelOperationMetadataH\x00\x12\x18\n\x10progress_percent\x18\r \x01(\x05\x12,\n\x10partial_failures\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x64\x65tails\"\x19\n\x17\x44\x65leteOperationMetadata\"\x1e\n\x1c\x44\x65ployModelOperationMetadata\" \n\x1eUndeployModelOperationMetadata\" \n\x1e\x43reateDatasetOperationMetadata\"\x1e\n\x1c\x43reateModelOperationMetadata\"\x1d\n\x1bImportDataOperationMetadata\"\xc7\x01\n\x1b\x45xportDataOperationMetadata\x12]\n\x0boutput_info\x18\x01 \x01(\x0b\x32H.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo\x1aI\n\x14\x45xportDataOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\x96\x02\n\x1d\x42\x61tchPredictOperationMetadata\x12\x45\n\x0cinput_config\x18\x01 \x01(\x0b\x32/.google.cloud.automl.v1.BatchPredictInputConfig\x12\x61\n\x0boutput_info\x18\x02 \x01(\x0b\x32L.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo\x1aK\n\x16\x42\x61tchPredictOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xb6\x01\n\x1c\x45xportModelOperationMetadata\x12_\n\x0boutput_info\x18\x02 \x01(\x0b\x32J.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo\x1a\x35\n\x15\x45xportModelOutputInfo\x12\x1c\n\x14gcs_output_directory\x18\x01 \x01(\tB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.OperationMetadata").msgclass + DeleteOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteOperationMetadata").msgclass + DeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeployModelOperationMetadata").msgclass + UndeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UndeployModelOperationMetadata").msgclass + CreateDatasetOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateDatasetOperationMetadata").msgclass + CreateModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateModelOperationMetadata").msgclass + ImportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImportDataOperationMetadata").msgclass + ExportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataOperationMetadata").msgclass + ExportDataOperationMetadata::ExportDataOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo").msgclass + BatchPredictOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOperationMetadata").msgclass + BatchPredictOperationMetadata::BatchPredictOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo").msgclass + ExportModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelOperationMetadata").msgclass + ExportModelOperationMetadata::ExportModelOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb new file mode 100644 index 000000000000..6c5045916cb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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/automl/v1/version" + +require "google/cloud/automl/v1/prediction_service/credentials" +require "google/cloud/automl/v1/prediction_service/paths" +require "google/cloud/automl/v1/prediction_service/operations" +require "google/cloud/automl/v1/prediction_service/client" +require "google/cloud/automl/v1/prediction_service/rest" + +module Google + module Cloud + module AutoML + module V1 + ## + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/automl/v1/prediction_service" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/automl/v1/prediction_service/rest" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + module PredictionService + end + end + end + end +end + +helper_path = ::File.join __dir__, "prediction_service", "helpers.rb" +require "google/cloud/automl/v1/prediction_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb new file mode 100644 index 000000000000..6b3f20499814 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb @@ -0,0 +1,770 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/automl/v1/prediction_service_pb" + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + ## + # Client for the PredictionService service. + # + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :prediction_service_stub + + ## + # Configure the PredictionService Client class. + # + # See {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PredictionService clients + # ::Google::Cloud::AutoML::V1::PredictionService::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", "AutoML", "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.predict.timeout = 60.0 + + default_config.rpcs.batch_predict.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService 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::AutoML::V1::PredictionService::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 + @prediction_service_stub.universe_domain + end + + ## + # Create a new PredictionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PredictionService 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/automl/v1/prediction_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 + + @prediction_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AutoML::V1::PredictionService::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 + ) + + @prediction_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::AutoML::V1::PredictionService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @prediction_service_stub.logger + end + + # Service calls + + ## + # Perform an online prediction. The prediction result is directly + # returned in the response. + # Available for following ML scenarios, and their expected request payloads: + # + # AutoML Vision Classification + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Vision Object Detection + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Natural Language Classification + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Natural Language Entity Extraction + # + # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document + # in .PDF, .TIF or .TIFF format with size upto 20MB. + # + # AutoML Natural Language Sentiment Analysis + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Translation + # + # * A TextSnippet up to 25,000 characters, UTF-8 encoded. + # + # AutoML Tables + # + # * A row with column values matching + # the columns of the model, up to 5MB. Not available for FORECASTING + # `prediction_type`. + # + # @overload predict(request, options = nil) + # Pass arguments to `predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1::PredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::PredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload predict(name: nil, payload: nil, params: nil) + # Pass arguments to `predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model requested to serve the prediction. + # @param payload [::Google::Cloud::AutoML::V1::ExamplePayload, ::Hash] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned. The default is 100. The + # number of returned bounding boxes might be limited by the server. + # + # AutoML Tables + # + # `feature_importance` + # : (boolean) Whether + # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] + # is populated in the returned list of + # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] + # objects. The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::PredictResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::PredictResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::PredictionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::PredictRequest.new + # + # # Call the predict method. + # result = client.predict request + # + # # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. + # p result + # + def predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::PredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.predict.timeout, + metadata: metadata, + retry_policy: @config.rpcs.predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.call_rpc :predict, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1::PredictionService::Client#predict Predict}, batch + # prediction result won't be immediately available in the response. Instead, + # a long running operation object is returned. User can poll the operation + # result via GetOperation + # method. Once the operation is done, {::Google::Cloud::AutoML::V1::BatchPredictResult BatchPredictResult} is returned in + # the {::Google::Longrunning::Operation#response response} field. + # Available for following ML scenarios: + # + # * AutoML Vision Classification + # * AutoML Vision Object Detection + # * AutoML Video Intelligence Classification + # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification + # * AutoML Natural Language Entity Extraction + # * AutoML Natural Language Sentiment Analysis + # * AutoML Tables + # + # @overload batch_predict(request, options = nil) + # Pass arguments to `batch_predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1::BatchPredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_predict(name: nil, input_config: nil, output_config: nil, params: nil) + # Pass arguments to `batch_predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model requested to serve the batch prediction. + # @param input_config [::Google::Cloud::AutoML::V1::BatchPredictInputConfig, ::Hash] + # Required. The input configuration for batch prediction. + # @param output_config [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig, ::Hash] + # Required. The Configuration specifying where output predictions should + # be written. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # AutoML Natural Language Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # AutoML Video Intelligence Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # `segment_classification` + # : (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is true. + # + # `shot_classification` + # : (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # The default is false. + # + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. + # + # `1s_interval_classification` + # : (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. The default is false. + # + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. + # + # AutoML Video Intelligence Object Tracking + # + # `score_threshold` + # : (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # + # `min_bounding_box_size` + # : (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size are + # returned. Value in 0 to 1 range. Default is 0. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::PredictionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::BatchPredictRequest.new + # + # # Call the batch_predict method. + # result = client.batch_predict request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::BatchPredictRequest + + # Converts hash and nil to 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_predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_predict.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.call_rpc :batch_predict, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 PredictionService API. + # + # This class represents the configuration for PredictionService, + # providing control 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::AutoML::V1::PredictionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # predict to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::AutoML::V1::PredictionService::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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 PredictionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `predict` + # @return [::Gapic::Config::Method] + # + attr_reader :predict + ## + # RPC-specific configuration for `batch_predict` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_predict + + # @private + def initialize parent_rpcs = nil + predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict + @predict = ::Gapic::Config::Method.new predict_config + batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict + @batch_predict = ::Gapic::Config::Method.new batch_predict_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb new file mode 100644 index 000000000000..4fe31b05d81c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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 AutoML + module V1 + module PredictionService + # Credentials for the PredictionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "AUTOML_CREDENTIALS", + "AUTOML_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "AUTOML_CREDENTIALS_JSON", + "AUTOML_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-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb new file mode 100644 index 000000000000..d1c4f5788ef3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb @@ -0,0 +1,851 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 AutoML + module V1 + module PredictionService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PredictionService 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 PredictionService 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::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + 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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb new file mode 100644 index 000000000000..b529a1fcf51f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + # Path helper methods for the PredictionService API. + module Paths + ## + # Create a fully-qualified Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb new file mode 100644 index 000000000000..566a8b946d44 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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/automl/v1/version" + +require "google/cloud/automl/v1/prediction_service/credentials" +require "google/cloud/automl/v1/prediction_service/paths" +require "google/cloud/automl/v1/prediction_service/rest/operations" +require "google/cloud/automl/v1/prediction_service/rest/client" + +module Google + module Cloud + module AutoML + module V1 + ## + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/automl/v1/prediction_service/rest" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + module PredictionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/automl/v1/prediction_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb new file mode 100644 index 000000000000..e9f9264051f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb @@ -0,0 +1,713 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/automl/v1/prediction_service_pb" +require "google/cloud/automl/v1/prediction_service/rest/service_stub" + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + module Rest + ## + # REST client for the PredictionService service. + # + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :prediction_service_stub + + ## + # Configure the PredictionService Client class. + # + # See {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PredictionService clients + # ::Google::Cloud::AutoML::V1::PredictionService::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", "AutoML", "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.predict.timeout = 60.0 + + default_config.rpcs.batch_predict.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService 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::AutoML::V1::PredictionService::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 + @prediction_service_stub.universe_domain + end + + ## + # Create a new PredictionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PredictionService 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::AutoML::V1::PredictionService::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 + + @prediction_service_stub = ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @prediction_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::AutoML::V1::PredictionService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @prediction_service_stub.logger + end + + # Service calls + + ## + # Perform an online prediction. The prediction result is directly + # returned in the response. + # Available for following ML scenarios, and their expected request payloads: + # + # AutoML Vision Classification + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Vision Object Detection + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Natural Language Classification + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Natural Language Entity Extraction + # + # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document + # in .PDF, .TIF or .TIFF format with size upto 20MB. + # + # AutoML Natural Language Sentiment Analysis + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Translation + # + # * A TextSnippet up to 25,000 characters, UTF-8 encoded. + # + # AutoML Tables + # + # * A row with column values matching + # the columns of the model, up to 5MB. Not available for FORECASTING + # `prediction_type`. + # + # @overload predict(request, options = nil) + # Pass arguments to `predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1::PredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::PredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload predict(name: nil, payload: nil, params: nil) + # Pass arguments to `predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model requested to serve the prediction. + # @param payload [::Google::Cloud::AutoML::V1::ExamplePayload, ::Hash] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned. The default is 100. The + # number of returned bounding boxes might be limited by the server. + # + # AutoML Tables + # + # `feature_importance` + # : (boolean) Whether + # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] + # is populated in the returned list of + # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] + # objects. The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::PredictResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::PredictResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::PredictRequest.new + # + # # Call the predict method. + # result = client.predict request + # + # # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. + # p result + # + def predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::PredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.predict.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.predict request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client#predict Predict}, batch + # prediction result won't be immediately available in the response. Instead, + # a long running operation object is returned. User can poll the operation + # result via GetOperation + # method. Once the operation is done, {::Google::Cloud::AutoML::V1::BatchPredictResult BatchPredictResult} is returned in + # the {::Google::Longrunning::Operation#response response} field. + # Available for following ML scenarios: + # + # * AutoML Vision Classification + # * AutoML Vision Object Detection + # * AutoML Video Intelligence Classification + # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification + # * AutoML Natural Language Entity Extraction + # * AutoML Natural Language Sentiment Analysis + # * AutoML Tables + # + # @overload batch_predict(request, options = nil) + # Pass arguments to `batch_predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1::BatchPredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_predict(name: nil, input_config: nil, output_config: nil, params: nil) + # Pass arguments to `batch_predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model requested to serve the batch prediction. + # @param input_config [::Google::Cloud::AutoML::V1::BatchPredictInputConfig, ::Hash] + # Required. The input configuration for batch prediction. + # @param output_config [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig, ::Hash] + # Required. The Configuration specifying where output predictions should + # be written. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # AutoML Natural Language Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # AutoML Video Intelligence Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # `segment_classification` + # : (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is true. + # + # `shot_classification` + # : (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # The default is false. + # + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. + # + # `1s_interval_classification` + # : (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. The default is false. + # + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. + # + # AutoML Video Intelligence Object Tracking + # + # `score_threshold` + # : (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # + # `min_bounding_box_size` + # : (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size are + # returned. Value in 0 to 1 range. Default is 0. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::BatchPredictRequest.new + # + # # Call the batch_predict method. + # result = client.batch_predict request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::BatchPredictRequest + + # Converts hash and nil to an 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_predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_predict.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.batch_predict request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 PredictionService REST API. + # + # This class represents the configuration for PredictionService 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::AutoML::V1::PredictionService::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 + # # predict to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 PredictionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `predict` + # @return [::Gapic::Config::Method] + # + attr_reader :predict + ## + # RPC-specific configuration for `batch_predict` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_predict + + # @private + def initialize parent_rpcs = nil + predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict + @predict = ::Gapic::Config::Method.new predict_config + batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict + @batch_predict = ::Gapic::Config::Method.new batch_predict_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb new file mode 100644 index 000000000000..9d66ea3048ba --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb @@ -0,0 +1,1095 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 AutoML + module V1 + module PredictionService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PredictionService 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 PredictionService 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::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + ## + # 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 [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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::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 + call_metadata = @config.rpcs.wait_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::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: call_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.wait_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 + + ## + # 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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 + ## + # 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 + + ## + # @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 + + ## + # Baseline implementation for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_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: "wait_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 + + ## + # @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 + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + 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-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb new file mode 100644 index 000000000000..ed831fb87e44 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/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/cloud/automl/v1/prediction_service_pb" + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + module Rest + ## + # REST service stub for the PredictionService 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 predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::PredictRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::PredictResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::PredictResponse] + # A result object deserialized from the server's reply + def predict request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_predict_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "predict", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::PredictResponse.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_predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::BatchPredictRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_predict request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_predict_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_predict", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::PredictRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_predict_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:predict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::BatchPredictRequest] + # 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_predict_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:batchPredict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb new file mode 100644 index 000000000000..bd25b445ea06 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/prediction_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/automl/v1/annotation_payload_pb' +require 'google/cloud/automl/v1/data_items_pb' +require 'google/cloud/automl/v1/io_pb' +require 'google/longrunning/operations_pb' + + +descriptor_data = "\n/google/cloud/automl/v1/prediction_service.proto\x12\x16google.cloud.automl.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/automl/v1/annotation_payload.proto\x1a\'google/cloud/automl/v1/data_items.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a#google/longrunning/operations.proto\"\xf4\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12<\n\x07payload\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1.ExamplePayloadB\x03\xe0\x41\x02\x12\x42\n\x06params\x18\x03 \x03(\x0b\x32\x32.google.cloud.automl.v1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8b\x02\n\x0fPredictResponse\x12:\n\x07payload\x18\x01 \x03(\x0b\x32).google.cloud.automl.v1.AnnotationPayload\x12\x42\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32&.google.cloud.automl.v1.ExamplePayload\x12G\n\x08metadata\x18\x02 \x03(\x0b\x32\x35.google.cloud.automl.v1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xda\x02\n\x13\x42\x61tchPredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12J\n\x0cinput_config\x18\x03 \x01(\x0b\x32/.google.cloud.automl.v1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12L\n\routput_config\x18\x04 \x01(\x0b\x32\x30.google.cloud.automl.v1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12G\n\x06params\x18\x05 \x03(\x0b\x32\x37.google.cloud.automl.v1.BatchPredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x12\x42\x61tchPredictResult\x12J\n\x08metadata\x18\x01 \x03(\x0b\x32\x38.google.cloud.automl.v1.BatchPredictResult.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\x85\x04\n\x11PredictionService\x12\xaf\x01\n\x07Predict\x12&.google.cloud.automl.v1.PredictRequest\x1a\'.google.cloud.automl.v1.PredictResponse\"S\xda\x41\x13name,payload,params\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/models/*}:predict:\x01*\x12\xf2\x01\n\x0c\x42\x61tchPredict\x12+.google.cloud.automl.v1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41\'\n\x12\x42\x61tchPredictResult\x12\x11OperationMetadata\xda\x41&name,input_config,output_config,params\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/models/*}:batchPredict:\x01*\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x01\n\x1a\x63om.google.cloud.automl.v1B\x16PredictionServiceProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + PredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.PredictRequest").msgclass + PredictResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.PredictResponse").msgclass + BatchPredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictRequest").msgclass + BatchPredictResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictResult").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb new file mode 100644 index 000000000000..fa9f4cd6c333 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb @@ -0,0 +1,99 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/automl/v1/prediction_service.proto for package 'Google.Cloud.AutoML.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/automl/v1/prediction_service_pb' + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.automl.v1.PredictionService' + + # Perform an online prediction. The prediction result is directly + # returned in the response. + # Available for following ML scenarios, and their expected request payloads: + # + # AutoML Vision Classification + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Vision Object Detection + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Natural Language Classification + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Natural Language Entity Extraction + # + # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document + # in .PDF, .TIF or .TIFF format with size upto 20MB. + # + # AutoML Natural Language Sentiment Analysis + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Translation + # + # * A TextSnippet up to 25,000 characters, UTF-8 encoded. + # + # AutoML Tables + # + # * A row with column values matching + # the columns of the model, up to 5MB. Not available for FORECASTING + # `prediction_type`. + rpc :Predict, ::Google::Cloud::AutoML::V1::PredictRequest, ::Google::Cloud::AutoML::V1::PredictResponse + # Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1.PredictionService.Predict], batch + # prediction result won't be immediately available in the response. Instead, + # a long running operation object is returned. User can poll the operation + # result via [GetOperation][google.longrunning.Operations.GetOperation] + # method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1.BatchPredictResult] is returned in + # the [response][google.longrunning.Operation.response] field. + # Available for following ML scenarios: + # + # * AutoML Vision Classification + # * AutoML Vision Object Detection + # * AutoML Video Intelligence Classification + # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification + # * AutoML Natural Language Entity Extraction + # * AutoML Natural Language Sentiment Analysis + # * AutoML Tables + rpc :BatchPredict, ::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb new file mode 100644 index 000000000000..e7f6441bacb9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/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/automl/v1/prediction_service/rest" +require "google/cloud/automl/v1/automl/rest" +require "google/cloud/automl/v1/version" + +module Google + module Cloud + module AutoML + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/automl/v1/rest" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb new file mode 100644 index 000000000000..965c37c6de4c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/automl/v1/annotation_payload_pb' +require 'google/cloud/automl/v1/annotation_spec_pb' +require 'google/cloud/automl/v1/dataset_pb' +require 'google/cloud/automl/v1/image_pb' +require 'google/cloud/automl/v1/io_pb' +require 'google/cloud/automl/v1/model_pb' +require 'google/cloud/automl/v1/model_evaluation_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n$google/cloud/automl/v1/service.proto\x12\x16google.cloud.automl.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/automl/v1/annotation_payload.proto\x1a,google/cloud/automl/v1/annotation_spec.proto\x1a$google/cloud/automl/v1/dataset.proto\x1a\"google/cloud/automl/v1/image.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a\"google/cloud/automl/v1/model.proto\x1a-google/cloud/automl/v1/model_evaluation.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x88\x01\n\x14\x43reateDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x35\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32\x1f.google.cloud.automl.v1.DatasetB\x03\xe0\x41\x02\"H\n\x11GetDatasetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\"\x87\x01\n\x13ListDatasetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"b\n\x14ListDatasetsResponse\x12\x31\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x1f.google.cloud.automl.v1.Dataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x14UpdateDatasetRequest\x12\x35\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x1f.google.cloud.automl.v1.DatasetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"K\n\x14\x44\x65leteDatasetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\"\x88\x01\n\x11ImportDataRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\x12>\n\x0cinput_config\x18\x03 \x01(\x0b\x32#.google.cloud.automl.v1.InputConfigB\x03\xe0\x41\x02\"\x8a\x01\n\x11\x45xportDataRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\x12@\n\routput_config\x18\x03 \x01(\x0b\x32$.google.cloud.automl.v1.OutputConfigB\x03\xe0\x41\x02\"V\n\x18GetAnnotationSpecRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$automl.googleapis.com/AnnotationSpec\"\x82\x01\n\x12\x43reateModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x31\n\x05model\x18\x04 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ModelB\x03\xe0\x41\x02\"D\n\x0fGetModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"\x85\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"[\n\x12ListModelsResponse\x12,\n\x05model\x18\x01 \x03(\x0b\x32\x1d.google.cloud.automl.v1.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x12\x44\x65leteModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"}\n\x12UpdateModelRequest\x12\x31\n\x05model\x18\x01 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ModelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe3\x02\n\x12\x44\x65ployModelRequest\x12\x7f\n0image_object_detection_model_deployment_metadata\x18\x02 \x01(\x0b\x32\x43.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataH\x00\x12|\n.image_classification_model_deployment_metadata\x18\x04 \x01(\x0b\x32\x42.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataH\x00\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/ModelB\x1b\n\x19model_deployment_metadata\"I\n\x14UndeployModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"\x94\x01\n\x12\x45xportModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12K\n\routput_config\x18\x03 \x01(\x0b\x32/.google.cloud.automl.v1.ModelExportOutputConfigB\x03\xe0\x41\x02\"X\n\x19GetModelEvaluationRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%automl.googleapis.com/ModelEvaluation\"\x8e\x01\n\x1bListModelEvaluationsRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"z\n\x1cListModelEvaluationsResponse\x12\x41\n\x10model_evaluation\x18\x01 \x03(\x0b\x32\'.google.cloud.automl.v1.ModelEvaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe8\x1b\n\x06\x41utoMl\x12\xcb\x01\n\rCreateDataset\x12,.google.cloud.automl.v1.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41\x1c\n\x07\x44\x61taset\x12\x11OperationMetadata\xda\x41\x0eparent,dataset\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/datasets:\x07\x64\x61taset\x12\x95\x01\n\nGetDataset\x12).google.cloud.automl.v1.GetDatasetRequest\x1a\x1f.google.cloud.automl.v1.Dataset\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/datasets/*}\x12\xa8\x01\n\x0cListDatasets\x12+.google.cloud.automl.v1.ListDatasetsRequest\x1a,.google.cloud.automl.v1.ListDatasetsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/datasets\x12\xbb\x01\n\rUpdateDataset\x12,.google.cloud.automl.v1.UpdateDatasetRequest\x1a\x1f.google.cloud.automl.v1.Dataset\"[\xda\x41\x13\x64\x61taset,update_mask\x82\xd3\xe4\x93\x02?24/v1/{dataset.name=projects/*/locations/*/datasets/*}:\x07\x64\x61taset\x12\xc6\x01\n\rDeleteDataset\x12,.google.cloud.automl.v1.DeleteDatasetRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/datasets/*}\x12\xdc\x01\n\nImportData\x12).google.cloud.automl.v1.ImportDataRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x11name,input_config\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/datasets/*}:importData:\x01*\x12\xdd\x01\n\nExportData\x12).google.cloud.automl.v1.ExportDataRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/datasets/*}:exportData:\x01*\x12\xbc\x01\n\x11GetAnnotationSpec\x12\x30.google.cloud.automl.v1.GetAnnotationSpecRequest\x1a&.google.cloud.automl.v1.AnnotationSpec\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}\x12\xbf\x01\n\x0b\x43reateModel\x12*.google.cloud.automl.v1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/models:\x05model\x12\x8d\x01\n\x08GetModel\x12\'.google.cloud.automl.v1.GetModelRequest\x1a\x1d.google.cloud.automl.v1.Model\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/models/*}\x12\xa0\x01\n\nListModels\x12).google.cloud.automl.v1.ListModelsRequest\x1a*.google.cloud.automl.v1.ListModelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/models\x12\xc0\x01\n\x0b\x44\x65leteModel\x12*.google.cloud.automl.v1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/models/*}\x12\xad\x01\n\x0bUpdateModel\x12*.google.cloud.automl.v1.UpdateModelRequest\x1a\x1d.google.cloud.automl.v1.Model\"S\xda\x41\x11model,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{model.name=projects/*/locations/*/models/*}:\x05model\x12\xca\x01\n\x0b\x44\x65ployModel\x12*.google.cloud.automl.v1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:deploy:\x01*\x12\xd0\x01\n\rUndeployModel\x12,.google.cloud.automl.v1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/locations/*/models/*}:undeploy:\x01*\x12\xd8\x01\n\x0b\x45xportModel\x12*.google.cloud.automl.v1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\xbe\x01\n\x12GetModelEvaluation\x12\x31.google.cloud.automl.v1.GetModelEvaluationRequest\x1a\'.google.cloud.automl.v1.ModelEvaluation\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/models/*/modelEvaluations/*}\x12\xd8\x01\n\x14ListModelEvaluations\x12\x33.google.cloud.automl.v1.ListModelEvaluationsRequest\x1a\x34.google.cloud.automl.v1.ListModelEvaluationsResponse\"U\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/models/*}/modelEvaluations\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xad\x01\n\x1a\x63om.google.cloud.automl.v1B\x0b\x41utoMlProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateDatasetRequest").msgclass + GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetDatasetRequest").msgclass + ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListDatasetsRequest").msgclass + ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListDatasetsResponse").msgclass + UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UpdateDatasetRequest").msgclass + DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteDatasetRequest").msgclass + ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImportDataRequest").msgclass + ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataRequest").msgclass + GetAnnotationSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetAnnotationSpecRequest").msgclass + CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateModelRequest").msgclass + GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetModelRequest").msgclass + ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelsRequest").msgclass + ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelsResponse").msgclass + DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteModelRequest").msgclass + UpdateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UpdateModelRequest").msgclass + DeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeployModelRequest").msgclass + UndeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UndeployModelRequest").msgclass + ExportModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelRequest").msgclass + GetModelEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetModelEvaluationRequest").msgclass + ListModelEvaluationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelEvaluationsRequest").msgclass + ListModelEvaluationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelEvaluationsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb new file mode 100644 index 000000000000..da906eec628a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb @@ -0,0 +1,136 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/automl/v1/service.proto for package 'Google.Cloud.AutoML.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/automl/v1/service_pb' + +module Google + module Cloud + module AutoML + module V1 + module AutoMl + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.automl.v1.AutoMl' + + # Creates a dataset. + rpc :CreateDataset, ::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Google::Longrunning::Operation + # Gets a dataset. + rpc :GetDataset, ::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Google::Cloud::AutoML::V1::Dataset + # Lists datasets in a project. + rpc :ListDatasets, ::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Google::Cloud::AutoML::V1::ListDatasetsResponse + # Updates a dataset. + rpc :UpdateDataset, ::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Google::Cloud::AutoML::V1::Dataset + # Deletes a dataset and all of its contents. + # Returns empty response in the + # [response][google.longrunning.Operation.response] field when it completes, + # and `delete_details` in the + # [metadata][google.longrunning.Operation.metadata] field. + rpc :DeleteDataset, ::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Google::Longrunning::Operation + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # [schema_inference_version][google.cloud.automl.v1.InputConfig.params] + # parameter must be explicitly set. + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ImportData, ::Google::Cloud::AutoML::V1::ImportDataRequest, ::Google::Longrunning::Operation + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ExportData, ::Google::Cloud::AutoML::V1::ExportDataRequest, ::Google::Longrunning::Operation + # Gets an annotation spec. + rpc :GetAnnotationSpec, ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Google::Cloud::AutoML::V1::AnnotationSpec + # Creates a model. + # Returns a Model in the [response][google.longrunning.Operation.response] + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + rpc :CreateModel, ::Google::Cloud::AutoML::V1::CreateModelRequest, ::Google::Longrunning::Operation + # Gets a model. + rpc :GetModel, ::Google::Cloud::AutoML::V1::GetModelRequest, ::Google::Cloud::AutoML::V1::Model + # Lists models. + rpc :ListModels, ::Google::Cloud::AutoML::V1::ListModelsRequest, ::Google::Cloud::AutoML::V1::ListModelsResponse + # Deletes a model. + # Returns `google.protobuf.Empty` in the + # [response][google.longrunning.Operation.response] field when it completes, + # and `delete_details` in the + # [metadata][google.longrunning.Operation.metadata] field. + rpc :DeleteModel, ::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Google::Longrunning::Operation + # Updates a model. + rpc :UpdateModel, ::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Google::Cloud::AutoML::V1::Model + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :DeployModel, ::Google::Cloud::AutoML::V1::DeployModelRequest, ::Google::Longrunning::Operation + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :UndeployModel, ::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Google::Longrunning::Operation + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig]. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ExportModel, ::Google::Cloud::AutoML::V1::ExportModelRequest, ::Google::Longrunning::Operation + # Gets a model evaluation. + rpc :GetModelEvaluation, ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Google::Cloud::AutoML::V1::ModelEvaluation + # Lists model evaluations. + rpc :ListModelEvaluations, ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb new file mode 100644 index 000000000000..97da0ef8bb22 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/text_extraction.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/text_segment_pb' + + +descriptor_data = "\n,google/cloud/automl/v1/text_extraction.proto\x12\x16google.cloud.automl.v1\x1a)google/cloud/automl/v1/text_segment.proto\"t\n\x18TextExtractionAnnotation\x12;\n\x0ctext_segment\x18\x03 \x01(\x0b\x32#.google.cloud.automl.v1.TextSegmentH\x00\x12\r\n\x05score\x18\x01 \x01(\x02\x42\x0c\n\nannotation\"\x92\x02\n\x1fTextExtractionEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12r\n\x1a\x63onfidence_metrics_entries\x18\x02 \x03(\x0b\x32N.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x03 \x01(\x02\x12\x11\n\tprecision\x18\x04 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x05 \x01(\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + TextExtractionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionAnnotation").msgclass + TextExtractionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionEvaluationMetrics").msgclass + TextExtractionEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb new file mode 100644 index 000000000000..92ccffaa6e09 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/text.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/classification_pb' + + +descriptor_data = "\n!google/cloud/automl/v1/text.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\"l\n!TextClassificationDatasetMetadata\x12G\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationType\"j\n\x1fTextClassificationModelMetadata\x12G\n\x13\x63lassification_type\x18\x03 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationType\"\x1f\n\x1dTextExtractionDatasetMetadata\"\x1d\n\x1bTextExtractionModelMetadata\"5\n\x1cTextSentimentDatasetMetadata\x12\x15\n\rsentiment_max\x18\x01 \x01(\x05\"\x1c\n\x1aTextSentimentModelMetadataB\xab\x01\n\x1a\x63om.google.cloud.automl.v1B\tTextProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + TextClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextClassificationDatasetMetadata").msgclass + TextClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextClassificationModelMetadata").msgclass + TextExtractionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionDatasetMetadata").msgclass + TextExtractionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionModelMetadata").msgclass + TextSentimentDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentDatasetMetadata").msgclass + TextSentimentModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentModelMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb new file mode 100644 index 000000000000..f8ac0e311fe0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/text_segment.proto + +require 'google/protobuf' + + +descriptor_data = "\n)google/cloud/automl/v1/text_segment.proto\x12\x16google.cloud.automl.v1\"H\n\x0bTextSegment\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x14\n\x0cstart_offset\x18\x01 \x01(\x03\x12\x12\n\nend_offset\x18\x02 \x01(\x03\x42\xb2\x01\n\x1a\x63om.google.cloud.automl.v1B\x10TextSegmentProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSegment").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb new file mode 100644 index 000000000000..4f4061a1a5e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/text_sentiment.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/classification_pb' + + +descriptor_data = "\n+google/cloud/automl/v1/text_sentiment.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\",\n\x17TextSentimentAnnotation\x12\x11\n\tsentiment\x18\x01 \x01(\x05\"\xa0\x02\n\x1eTextSentimentEvaluationMetrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12\x1b\n\x13mean_absolute_error\x18\x04 \x01(\x02\x12\x1a\n\x12mean_squared_error\x18\x05 \x01(\x02\x12\x14\n\x0clinear_kappa\x18\x06 \x01(\x02\x12\x17\n\x0fquadratic_kappa\x18\x07 \x01(\x02\x12\x61\n\x10\x63onfusion_matrix\x18\x08 \x01(\x0b\x32G.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrixB\xb4\x01\n\x1a\x63om.google.cloud.automl.v1B\x12TextSentimentProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + TextSentimentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentAnnotation").msgclass + TextSentimentEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentEvaluationMetrics").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb new file mode 100644 index 000000000000..728635fe1c9a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/translation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/automl/v1/data_items_pb' + + +descriptor_data = "\n(google/cloud/automl/v1/translation.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\'google/cloud/automl/v1/data_items.proto\"b\n\x1aTranslationDatasetMetadata\x12!\n\x14source_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14target_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"K\n\x1cTranslationEvaluationMetrics\x12\x12\n\nbleu_score\x18\x01 \x01(\x01\x12\x17\n\x0f\x62\x61se_bleu_score\x18\x02 \x01(\x01\"j\n\x18TranslationModelMetadata\x12\x12\n\nbase_model\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\"X\n\x15TranslationAnnotation\x12?\n\x12translated_content\x18\x01 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippetB\xb2\x01\n\x1a\x63om.google.cloud.automl.v1B\x10TranslationProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + TranslationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationDatasetMetadata").msgclass + TranslationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationEvaluationMetrics").msgclass + TranslationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationModelMetadata").msgclass + TranslationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationAnnotation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb new file mode 100644 index 000000000000..33b9ec43d3df --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/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 AutoML + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md new file mode 100644 index 000000000000..fcbf60ce5647 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud AutoML 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-automl-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb new file mode 100644 index 000000000000..9bd24ebc2a4b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.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 AutoML + module V1 + # Contains annotation information that is relevant to AutoML. + # @!attribute [rw] translation + # @return [::Google::Cloud::AutoML::V1::TranslationAnnotation] + # Annotation details for translation. + # + # Note: The following fields are mutually exclusive: `translation`, `classification`, `image_object_detection`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] classification + # @return [::Google::Cloud::AutoML::V1::ClassificationAnnotation] + # Annotation details for content or image classification. + # + # Note: The following fields are mutually exclusive: `classification`, `translation`, `image_object_detection`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection + # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionAnnotation] + # Annotation details for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection`, `translation`, `classification`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction + # @return [::Google::Cloud::AutoML::V1::TextExtractionAnnotation] + # Annotation details for text extraction. + # + # Note: The following fields are mutually exclusive: `text_extraction`, `translation`, `classification`, `image_object_detection`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment + # @return [::Google::Cloud::AutoML::V1::TextSentimentAnnotation] + # Annotation details for text sentiment. + # + # Note: The following fields are mutually exclusive: `text_sentiment`, `translation`, `classification`, `image_object_detection`, `text_extraction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] annotation_spec_id + # @return [::String] + # Output only . The resource ID of the annotation spec that + # this annotation pertains to. The annotation spec comes from either an + # ancestor dataset, or the dataset that was used to train the model in use. + # @!attribute [rw] display_name + # @return [::String] + # Output only. The value of + # {::Google::Cloud::AutoML::V1::AnnotationSpec#display_name display_name} + # when the model was trained. Because this field returns a value at model + # training time, for different models trained using the same dataset, the + # returned value could be different as model owner could update the + # `display_name` between any two model training. + class AnnotationPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb new file mode 100644 index 000000000000..942cbd6b09ad --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.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 AutoML + module V1 + # A definition of an annotation spec. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the annotation spec. + # Form: + # 'projects/\\{project_id}/locations/\\{location_id}/datasets/\\{dataset_id}/annotationSpecs/\\{annotation_spec_id}' + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the annotation spec to show in the interface. The name can be + # up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. + # @!attribute [rw] example_count + # @return [::Integer] + # Output only. The number of examples in the parent dataset + # labeled by the annotation spec. + class AnnotationSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb new file mode 100644 index 000000000000..9044a0c41bef --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.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 AutoML + module V1 + # Contains annotation details specific to classification. + # @!attribute [rw] score + # @return [::Float] + # Output only. A confidence estimate between 0.0 and 1.0. A higher value + # means greater confidence that the annotation is positive. If a user + # approves an annotation as negative or positive, the score value remains + # unchanged. If a user creates an annotation, the score is 0 for negative or + # 1 for positive. + class ClassificationAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for classification problems. + # Note: For Video Classification this metrics only describe quality of the + # Video Classification predictions of "segment_classification" type. + # @!attribute [rw] au_prc + # @return [::Float] + # Output only. The Area Under Precision-Recall Curve metric. Micro-averaged + # for the overall evaluation. + # @!attribute [rw] au_roc + # @return [::Float] + # Output only. The Area Under Receiver Operating Characteristic curve metric. + # Micro-averaged for the overall evaluation. + # @!attribute [rw] log_loss + # @return [::Float] + # Output only. The Log Loss metric. + # @!attribute [rw] confidence_metrics_entry + # @return [::Array<::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>] + # Output only. Metrics for each confidence_threshold in + # 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and + # position_threshold = INT32_MAX_VALUE. + # ROC and precision-recall curves, and other aggregated metrics are derived + # from them. The confidence metrics entries may also be supplied for + # additional values of position_threshold, but from these no aggregated + # metrics are computed. + # @!attribute [rw] confusion_matrix + # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix] + # Output only. Confusion matrix of the evaluation. + # Only set for MULTICLASS classification problems where number + # of labels is no more than 10. + # Only set for model level evaluation, not for evaluation per label. + # @!attribute [rw] annotation_spec_id + # @return [::Array<::String>] + # Output only. The annotation spec ids used for this evaluation. + class ClassificationEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. Metrics are computed with an assumption that the model + # never returns predictions with score lower than this value. + # @!attribute [rw] position_threshold + # @return [::Integer] + # Output only. Metrics are computed with an assumption that the model + # always returns at most this many predictions (ordered by their score, + # descendingly), but they all still need to meet the confidence_threshold. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall (True Positive Rate) for the given confidence + # threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision for the given confidence threshold. + # @!attribute [rw] false_positive_rate + # @return [::Float] + # Output only. False Positive Rate for the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + # @!attribute [rw] recall_at1 + # @return [::Float] + # Output only. The Recall (True Positive Rate) when only considering the + # label that has the highest prediction score and not below the confidence + # threshold for each example. + # @!attribute [rw] precision_at1 + # @return [::Float] + # Output only. The precision when only considering the label that has the + # highest prediction score and not below the confidence threshold for each + # example. + # @!attribute [rw] false_positive_rate_at1 + # @return [::Float] + # Output only. The False Positive Rate when only considering the label that + # has the highest prediction score and not below the confidence threshold + # for each example. + # @!attribute [rw] f1_score_at1 + # @return [::Float] + # Output only. The harmonic mean of {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}. + # @!attribute [rw] true_positive_count + # @return [::Integer] + # Output only. The number of model created labels that match a ground truth + # label. + # @!attribute [rw] false_positive_count + # @return [::Integer] + # Output only. The number of model created labels that do not match a + # ground truth label. + # @!attribute [rw] false_negative_count + # @return [::Integer] + # Output only. The number of ground truth labels that are not matched + # by a model created label. + # @!attribute [rw] true_negative_count + # @return [::Integer] + # Output only. The number of labels that were not created by the model, + # but if they would, they would not match a ground truth label. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Confusion matrix of the model running the classification. + # @!attribute [rw] annotation_spec_id + # @return [::Array<::String>] + # Output only. IDs of the annotation specs used in the confusion matrix. + # For Tables CLASSIFICATION + # [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type] + # only list of [annotation_spec_display_name-s][] is populated. + # @!attribute [rw] display_name + # @return [::Array<::String>] + # Output only. Display name of the annotation specs used in the confusion + # matrix, as they were at the moment of the evaluation. For Tables + # CLASSIFICATION + # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type], + # distinct values of the target column at the moment of the model + # evaluation are populated here. + # @!attribute [rw] row + # @return [::Array<::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>] + # Output only. Rows in the confusion matrix. The number of rows is equal to + # the size of `annotation_spec_id`. + # `row[i].example_count[j]` is the number of examples that have ground + # truth of the `annotation_spec_id[i]` and are predicted as + # `annotation_spec_id[j]` by the model being evaluated. + class ConfusionMatrix + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Output only. A row in the confusion matrix. + # @!attribute [rw] example_count + # @return [::Array<::Integer>] + # Output only. Value of the specific cell in the confusion matrix. + # The number of values each row has (i.e. the length of the row) is equal + # to the length of the `annotation_spec_id` field or, if that one is not + # populated, length of the {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Type of the classification problem. + module ClassificationType + # An un-set value of this enum. + CLASSIFICATION_TYPE_UNSPECIFIED = 0 + + # At most one label is allowed per example. + MULTICLASS = 1 + + # Multiple labels are allowed for one example. + MULTILABEL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb new file mode 100644 index 000000000000..27054977211d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb @@ -0,0 +1,202 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # A representation of an image. + # Only images up to 30MB in size are supported. + # @!attribute [rw] image_bytes + # @return [::String] + # Image content represented as a stream of bytes. + # Note: As with all `bytes` fields, protobuffers use a pure binary + # representation, whereas JSON representations use base64. + # @!attribute [rw] thumbnail_uri + # @return [::String] + # Output only. HTTP URI to the thumbnail image. + class Image + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A representation of a text snippet. + # @!attribute [rw] content + # @return [::String] + # Required. The content of the text snippet as a string. Up to 250000 + # characters long. + # @!attribute [rw] mime_type + # @return [::String] + # Optional. The format of {::Google::Cloud::AutoML::V1::TextSnippet#content content}. Currently the only two allowed + # values are "text/html" and "text/plain". If left blank, the format is + # automatically determined from the type of the uploaded {::Google::Cloud::AutoML::V1::TextSnippet#content content}. + # @!attribute [rw] content_uri + # @return [::String] + # Output only. HTTP URI where you can download the content. + class TextSnippet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message that describes dimension of a document. + # @!attribute [rw] unit + # @return [::Google::Cloud::AutoML::V1::DocumentDimensions::DocumentDimensionUnit] + # Unit of the dimension. + # @!attribute [rw] width + # @return [::Float] + # Width value of the document, works together with the unit. + # @!attribute [rw] height + # @return [::Float] + # Height value of the document, works together with the unit. + class DocumentDimensions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Unit of the document dimension. + module DocumentDimensionUnit + # Should not be used. + DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0 + + # Document dimension is measured in inches. + INCH = 1 + + # Document dimension is measured in centimeters. + CENTIMETER = 2 + + # Document dimension is measured in points. 72 points = 1 inch. + POINT = 3 + end + end + + # A structured text document e.g. a PDF. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1::DocumentInputConfig] + # An input config specifying the content of the document. + # @!attribute [rw] document_text + # @return [::Google::Cloud::AutoML::V1::TextSnippet] + # The plain text version of this document. + # @!attribute [rw] layout + # @return [::Array<::Google::Cloud::AutoML::V1::Document::Layout>] + # Describes the layout of the document. + # Sorted by [page_number][]. + # @!attribute [rw] document_dimensions + # @return [::Google::Cloud::AutoML::V1::DocumentDimensions] + # The dimensions of the page in the document. + # @!attribute [rw] page_count + # @return [::Integer] + # Number of pages in the document. + class Document + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the layout information of a {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the document. + # @!attribute [rw] text_segment + # @return [::Google::Cloud::AutoML::V1::TextSegment] + # Text Segment that represents a segment in + # [document_text][google.cloud.automl.v1p1beta.Document.document_text]. + # @!attribute [rw] page_number + # @return [::Integer] + # Page number of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the original document, starts + # from 1. + # @!attribute [rw] bounding_poly + # @return [::Google::Cloud::AutoML::V1::BoundingPoly] + # The position of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the page. + # Contains exactly 4 + # [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] + # and they are connected by edges in the order provided, which will + # represent a rectangle parallel to the frame. The + # [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are + # relative to the page. + # Coordinates are based on top-left as point (0,0). + # @!attribute [rw] text_segment_type + # @return [::Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType] + # The type of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in document. + class Layout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of TextSegment in the context of the original document. + module TextSegmentType + # Should not be used. + TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 + + # The text segment is a token. e.g. word. + TOKEN = 1 + + # The text segment is a paragraph. + PARAGRAPH = 2 + + # The text segment is a form field. + FORM_FIELD = 3 + + # The text segment is the name part of a form field. It will be treated + # as child of another FORM_FIELD TextSegment if its span is subspan of + # another TextSegment with type FORM_FIELD. + FORM_FIELD_NAME = 4 + + # The text segment is the text content part of a form field. It will be + # treated as child of another FORM_FIELD TextSegment if its span is + # subspan of another TextSegment with type FORM_FIELD. + FORM_FIELD_CONTENTS = 5 + + # The text segment is a whole table, including headers, and all rows. + TABLE = 6 + + # The text segment is a table's headers. It will be treated as child of + # another TABLE TextSegment if its span is subspan of another TextSegment + # with type TABLE. + TABLE_HEADER = 7 + + # The text segment is a row in table. It will be treated as child of + # another TABLE TextSegment if its span is subspan of another TextSegment + # with type TABLE. + TABLE_ROW = 8 + + # The text segment is a cell in table. It will be treated as child of + # another TABLE_ROW TextSegment if its span is subspan of another + # TextSegment with type TABLE_ROW. + TABLE_CELL = 9 + end + end + end + + # Example data used for training or prediction. + # @!attribute [rw] image + # @return [::Google::Cloud::AutoML::V1::Image] + # Example image. + # + # Note: The following fields are mutually exclusive: `image`, `text_snippet`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_snippet + # @return [::Google::Cloud::AutoML::V1::TextSnippet] + # Example text. + # + # Note: The following fields are mutually exclusive: `text_snippet`, `image`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] document + # @return [::Google::Cloud::AutoML::V1::Document] + # Example document. + # + # Note: The following fields are mutually exclusive: `document`, `image`, `text_snippet`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExamplePayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb new file mode 100644 index 000000000000..afaccfc1a7d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.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 AutoML + module V1 + # A workspace for solving a single, particular machine learning (ML) problem. + # A workspace contains examples that may be annotated. + # @!attribute [rw] translation_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::TranslationDatasetMetadata] + # Metadata for a dataset used for translation. + # + # Note: The following fields are mutually exclusive: `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::ImageClassificationDatasetMetadata] + # Metadata for a dataset used for image classification. + # + # Note: The following fields are mutually exclusive: `image_classification_dataset_metadata`, `translation_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_classification_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::TextClassificationDatasetMetadata] + # Metadata for a dataset used for text classification. + # + # Note: The following fields are mutually exclusive: `text_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionDatasetMetadata] + # Metadata for a dataset used for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::TextExtractionDatasetMetadata] + # Metadata for a dataset used for text extraction. + # + # Note: The following fields are mutually exclusive: `text_extraction_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::TextSentimentDatasetMetadata] + # Metadata for a dataset used for text sentiment. + # + # Note: The following fields are mutually exclusive: `text_sentiment_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. The resource name of the dataset. + # Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the dataset to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores + # (_), and ASCII digits 0-9. + # @!attribute [rw] description + # @return [::String] + # User-provided description of the dataset. The description can be up to + # 25000 characters long. + # @!attribute [rw] example_count + # @return [::Integer] + # Output only. The number of examples in the dataset. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this dataset was created. + # @!attribute [rw] etag + # @return [::String] + # Used to perform consistent read-modify-write updates. If not set, a blind + # "overwrite" update happens. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata to organize your dataset. + # + # Label keys and values can be no longer than 64 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://goo.gl/xmQnxf for more information on and examples of labels. + class Dataset + 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-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb new file mode 100644 index 000000000000..3a1323a1c88d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Annotation details for image object detection. + # @!attribute [rw] bounding_box + # @return [::Google::Cloud::AutoML::V1::BoundingPoly] + # Output only. The rectangle representing the object location. + # @!attribute [rw] score + # @return [::Float] + # Output only. The confidence that this annotation is positive for the parent example, + # value in [0, 1], higher means higher positivity confidence. + class ImageObjectDetectionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bounding box matching model metrics for a single intersection-over-union + # threshold and multiple label match confidence thresholds. + # @!attribute [rw] iou_threshold + # @return [::Float] + # Output only. The intersection-over-union threshold value used to compute + # this metrics entry. + # @!attribute [rw] mean_average_precision + # @return [::Float] + # Output only. The mean average precision, most often close to au_prc. + # @!attribute [rw] confidence_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1::BoundingBoxMetricsEntry::ConfidenceMetricsEntry>] + # Output only. Metrics for each label-match confidence_threshold from + # 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is + # derived from them. + class BoundingBoxMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. The confidence threshold value used to compute the metrics. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall under the given confidence threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision under the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Model evaluation metrics for image object detection problems. + # Evaluates prediction quality of labeled bounding boxes. + # @!attribute [rw] evaluated_bounding_box_count + # @return [::Integer] + # Output only. The total number of bounding boxes (i.e. summed over all + # images) the ground truth used to create this evaluation had. + # @!attribute [rw] bounding_box_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1::BoundingBoxMetricsEntry>] + # Output only. The bounding boxes match metrics for each + # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # pair. + # @!attribute [rw] bounding_box_mean_average_precision + # @return [::Float] + # Output only. The single metric for bounding boxes evaluation: + # the mean_average_precision averaged over all bounding_box_metrics_entries. + class ImageObjectDetectionEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb new file mode 100644 index 000000000000..74a562769bfa --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.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 AutoML + module V1 + # A vertex represents a 2D point in the image. + # The normalized vertex coordinates are between 0 to 1 fractions relative to + # the original plane (image, video). E.g. if the plane (e.g. whole image) would + # have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would + # be at the position (1, 6) on that plane. + # @!attribute [rw] x + # @return [::Float] + # Required. Horizontal coordinate. + # @!attribute [rw] y + # @return [::Float] + # Required. Vertical coordinate. + class NormalizedVertex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A bounding polygon of a detected object on a plane. + # On output both vertices and normalized_vertices are provided. + # The polygon is formed by connecting vertices in the order they are listed. + # @!attribute [rw] normalized_vertices + # @return [::Array<::Google::Cloud::AutoML::V1::NormalizedVertex>] + # Output only . The bounding polygon normalized vertices. + class BoundingPoly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb new file mode 100644 index 000000000000..4e520cdd2e8b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb @@ -0,0 +1,215 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Dataset metadata that is specific to image classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1::ClassificationType] + # Required. Type of the classification problem. + class ImageClassificationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata specific to image object detection. + class ImageObjectDetectionDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata for image classification. + # @!attribute [rw] base_model_id + # @return [::String] + # Optional. The ID of the `base` model. If it is specified, the new model + # will be created based on the `base` model. Otherwise, the new model will be + # created from scratch. The `base` model must be in the same + # `project` and `location` as the new model to create, and have the same + # `model_type`. + # @!attribute [rw] train_budget_milli_node_hours + # @return [::Integer] + # Optional. The train budget of creating this model, expressed in milli node + # hours i.e. 1,000 value in this field means 1 node hour. The actual + # `train_cost` will be equal or less than this value. If further model + # training ceases to provide any improvements, it will stop without using + # full budget and the stop_reason will be `MODEL_CONVERGED`. + # Note, node_hour = actual_hour * number_of_nodes_invovled. + # For model type `cloud`(default), the train budget must be between 8,000 + # and 800,000 milli node hours, inclusive. The default value is 192, 000 + # which represents one day in wall time. For model type + # `mobile-low-latency-1`, `mobile-versatile-1`, `mobile-high-accuracy-1`, + # `mobile-core-ml-low-latency-1`, `mobile-core-ml-versatile-1`, + # `mobile-core-ml-high-accuracy-1`, the train budget must be between 1,000 + # and 100,000 milli node hours, inclusive. The default value is 24, 000 which + # represents one day in wall time. + # @!attribute [r] train_cost_milli_node_hours + # @return [::Integer] + # Output only. The actual train cost of creating this model, expressed in + # milli node hours, i.e. 1,000 value in this field means 1 node hour. + # Guaranteed to not exceed the train budget. + # @!attribute [r] stop_reason + # @return [::String] + # Output only. The reason that this create model operation stopped, + # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + # @!attribute [rw] model_type + # @return [::String] + # Optional. Type of the model. The available values are: + # * `cloud` - Model to be used via prediction calls to AutoML API. + # This is the default value. + # * `mobile-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have low latency, but + # may have lower prediction quality than other models. + # * `mobile-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. + # * `mobile-high-accuracy-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have a higher + # latency, but should also have a higher prediction quality + # than other models. + # * `mobile-core-ml-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core + # ML afterwards. Expected to have low latency, but may have + # lower prediction quality than other models. + # * `mobile-core-ml-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core + # ML afterwards. + # * `mobile-core-ml-high-accuracy-1` - A model that, in addition to + # providing prediction via AutoML API, can also be exported + # (see {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with + # Core ML afterwards. Expected to have a higher latency, but + # should also have a higher prediction quality than other + # models. + # @!attribute [r] node_qps + # @return [::Float] + # Output only. An approximate number of online prediction QPS that can + # be supported by this model per each node on which it is deployed. + # @!attribute [r] node_count + # @return [::Integer] + # Output only. The number of nodes this model is deployed on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the node_qps field. + class ImageClassificationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata specific to image object detection. + # @!attribute [rw] model_type + # @return [::String] + # Optional. Type of the model. The available values are: + # * `cloud-high-accuracy-1` - (default) A model to be used via prediction + # calls to AutoML API. Expected to have a higher latency, but + # should also have a higher prediction quality than other + # models. + # * `cloud-low-latency-1` - A model to be used via prediction + # calls to AutoML API. Expected to have low latency, but may + # have lower prediction quality than other models. + # * `mobile-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have low latency, but + # may have lower prediction quality than other models. + # * `mobile-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. + # * `mobile-high-accuracy-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have a higher + # latency, but should also have a higher prediction quality + # than other models. + # @!attribute [r] node_count + # @return [::Integer] + # Output only. The number of nodes this model is deployed on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the qps_per_node field. + # @!attribute [r] node_qps + # @return [::Float] + # Output only. An approximate number of online prediction QPS that can + # be supported by this model per each node on which it is deployed. + # @!attribute [r] stop_reason + # @return [::String] + # Output only. The reason that this create model operation stopped, + # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + # @!attribute [rw] train_budget_milli_node_hours + # @return [::Integer] + # Optional. The train budget of creating this model, expressed in milli node + # hours i.e. 1,000 value in this field means 1 node hour. The actual + # `train_cost` will be equal or less than this value. If further model + # training ceases to provide any improvements, it will stop without using + # full budget and the stop_reason will be `MODEL_CONVERGED`. + # Note, node_hour = actual_hour * number_of_nodes_invovled. + # For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, + # the train budget must be between 20,000 and 900,000 milli node hours, + # inclusive. The default value is 216, 000 which represents one day in + # wall time. + # For model type `mobile-low-latency-1`, `mobile-versatile-1`, + # `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, + # `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train + # budget must be between 1,000 and 100,000 milli node hours, inclusive. + # The default value is 24, 000 which represents one day in wall time. + # @!attribute [r] train_cost_milli_node_hours + # @return [::Integer] + # Output only. The actual train cost of creating this model, expressed in + # milli node hours, i.e. 1,000 value in this field means 1 node hour. + # Guaranteed to not exceed the train budget. + class ImageObjectDetectionModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model deployment metadata specific to Image Classification. + # @!attribute [rw] node_count + # @return [::Integer] + # Input only. The number of nodes to deploy the model on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the model's + # {::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata#node_qps node_qps}. + # Must be between 1 and 100, inclusive on both ends. + class ImageClassificationModelDeploymentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model deployment metadata specific to Image Object Detection. + # @!attribute [rw] node_count + # @return [::Integer] + # Input only. The number of nodes to deploy the model on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the model's + # [qps_per_node][google.cloud.automl.v1.ImageObjectDetectionModelMetadata.qps_per_node]. + # Must be between 1 and 100, inclusive on both ends. + class ImageObjectDetectionModelDeploymentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb new file mode 100644 index 000000000000..07e37b650808 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb @@ -0,0 +1,1345 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Input configuration for + # {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData} action. + # + # The format of input depends on dataset_metadata the Dataset into which + # the import is happening has. As input source the + # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} + # is expected, unless specified otherwise. Additionally any input .CSV file + # by itself must be 100MB or smaller, unless specified otherwise. + # If an "example" file (that is, image, video etc.) with identical content + # (even if it had different `GCS_FILE_PATH`) is mentioned multiple times, then + # its label, bounding boxes etc. are appended. The same file should be always + # provided with the same `ML_USE` and `GCS_FILE_PATH`, if it is not, then + # these values are nondeterministically selected from the given ones. + # + # The formats are represented in EBNF with commas being literal and with + # non-terminal symbols defined near the end of this comment. The formats are: + # + # #### AutoML Vision + # + # + # ##### Classification + # + # See [Preparing your training + # data](https://cloud.google.com/vision/automl/docs/prepare) for more + # information. + # + # CSV file(s) with each line in format: + # + # ML_USE,GCS_FILE_PATH,LABEL,LABEL,... + # + # * `ML_USE` - Identifies the data set that the current row (file) applies + # to. + # This value can be one of the following: + # * `TRAIN` - Rows in this file are used to train the model. + # * `TEST` - Rows in this file are used to test the model during training. + # * `UNASSIGNED` - Rows in this file are not categorized. They are + # Automatically divided into train and test data. 80% for training and + # 20% for testing. + # + # * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to + # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, + # .TIFF, .ICO. + # + # * `LABEL` - A label that identifies the object in the image. + # + # For the `MULTICLASS` classification type, at most one `LABEL` is allowed + # per image. If an image has not yet been labeled, then it should be + # mentioned just once with no `LABEL`. + # + # Some sample rows: + # + # TRAIN,gs://folder/image1.jpg,daisy + # TEST,gs://folder/image2.jpg,dandelion,tulip,rose + # UNASSIGNED,gs://folder/image3.jpg,daisy + # UNASSIGNED,gs://folder/image4.jpg + # + # + # ##### Object Detection + # See [Preparing your training + # data](https://cloud.google.com/vision/automl/object-detection/docs/prepare) + # for more information. + # + # A CSV file(s) with each line in format: + # + # ML_USE,GCS_FILE_PATH,[LABEL],(BOUNDING_BOX | ,,,,,,,) + # + # * `ML_USE` - Identifies the data set that the current row (file) applies + # to. + # This value can be one of the following: + # * `TRAIN` - Rows in this file are used to train the model. + # * `TEST` - Rows in this file are used to test the model during training. + # * `UNASSIGNED` - Rows in this file are not categorized. They are + # Automatically divided into train and test data. 80% for training and + # 20% for testing. + # + # * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to + # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. Each image + # is assumed to be exhaustively labeled. + # + # * `LABEL` - A label that identifies the object in the image specified by the + # `BOUNDING_BOX`. + # + # * `BOUNDING BOX` - The vertices of an object in the example image. + # The minimum allowed `BOUNDING_BOX` edge length is 0.01, and no more than + # 500 `BOUNDING_BOX` instances per image are allowed (one `BOUNDING_BOX` + # per line). If an image has no looked for objects then it should be + # mentioned just once with no LABEL and the ",,,,,,," in place of the + # `BOUNDING_BOX`. + # + # **Four sample rows:** + # + # TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, + # TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, + # UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 + # TEST,gs://folder/im3.png,,,,,,,,, + # + # + # + # + # #### AutoML Video Intelligence + # + # + # ##### Classification + # + # See [Preparing your training + # data](https://cloud.google.com/video-intelligence/automl/docs/prepare) for + # more information. + # + # CSV file(s) with each line in format: + # + # ML_USE,GCS_FILE_PATH + # + # For `ML_USE`, do not use `VALIDATE`. + # + # `GCS_FILE_PATH` is the path to another .csv file that describes training + # example for a given `ML_USE`, using the following row format: + # + # GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) + # + # Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up + # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # + # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the + # length of the video, and the end time must be after the start time. Any + # segment of a video which has one or more labels on it, is considered a + # hard negative for all other labels. Any segment with no labels on + # it is considered to be unknown. If a whole video is unknown, then + # it should be mentioned just once with ",," in place of `LABEL, + # TIME_SEGMENT_START,TIME_SEGMENT_END`. + # + # Sample top level CSV file: + # + # TRAIN,gs://folder/train_videos.csv + # TEST,gs://folder/test_videos.csv + # UNASSIGNED,gs://folder/other_videos.csv + # + # Sample rows of a CSV file for a particular ML_USE: + # + # gs://folder/video1.avi,car,120,180.000021 + # gs://folder/video1.avi,bike,150,180.000021 + # gs://folder/vid2.avi,car,0,60.5 + # gs://folder/vid3.avi,,, + # + # + # + # ##### Object Tracking + # + # See [Preparing your training + # data](/video-intelligence/automl/object-tracking/docs/prepare) for more + # information. + # + # CSV file(s) with each line in format: + # + # ML_USE,GCS_FILE_PATH + # + # For `ML_USE`, do not use `VALIDATE`. + # + # `GCS_FILE_PATH` is the path to another .csv file that describes training + # example for a given `ML_USE`, using the following row format: + # + # GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX + # + # or + # + # GCS_FILE_PATH,,,,,,,,,, + # + # Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up + # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # Providing `INSTANCE_ID`s can help to obtain a better model. When + # a specific labeled entity leaves the video frame, and shows up + # afterwards it is not required, albeit preferable, that the same + # `INSTANCE_ID` is given to it. + # + # `TIMESTAMP` must be within the length of the video, the + # `BOUNDING_BOX` is assumed to be drawn on the closest video's frame + # to the `TIMESTAMP`. Any mentioned by the `TIMESTAMP` frame is expected + # to be exhaustively labeled and no more than 500 `BOUNDING_BOX`-es per + # frame are allowed. If a whole video is unknown, then it should be + # mentioned just once with ",,,,,,,,,," in place of `LABEL, + # [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX`. + # + # Sample top level CSV file: + # + # TRAIN,gs://folder/train_videos.csv + # TEST,gs://folder/test_videos.csv + # UNASSIGNED,gs://folder/other_videos.csv + # + # Seven sample rows of a CSV file for a particular ML_USE: + # + # gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 + # gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 + # gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 + # gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, + # gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, + # gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, + # gs://folder/video2.avi,,,,,,,,,,, + # + # + # #### AutoML Natural Language + # + # + # ##### Entity Extraction + # + # See [Preparing your training + # data](/natural-language/automl/entity-analysis/docs/prepare) for more + # information. + # + # One or more CSV file(s) with each line in the following format: + # + # ML_USE,GCS_FILE_PATH + # + # * `ML_USE` - Identifies the data set that the current row (file) applies + # to. + # This value can be one of the following: + # * `TRAIN` - Rows in this file are used to train the model. + # * `TEST` - Rows in this file are used to test the model during training. + # * `UNASSIGNED` - Rows in this file are not categorized. They are + # Automatically divided into train and test data. 80% for training and + # 20% for testing.. + # + # * `GCS_FILE_PATH` - a Identifies JSON Lines (.JSONL) file stored in + # Google Cloud Storage that contains in-line text in-line as documents + # for model training. + # + # After the training data set has been determined from the `TRAIN` and + # `UNASSIGNED` CSV files, the training data is divided into train and + # validation data sets. 70% for training and 30% for validation. + # + # For example: + # + # TRAIN,gs://folder/file1.jsonl + # VALIDATE,gs://folder/file2.jsonl + # TEST,gs://folder/file3.jsonl + # + # **In-line JSONL files** + # + # In-line .JSONL files contain, per line, a JSON document that wraps a + # {::Google::Cloud::AutoML::V1::TextSnippet `text_snippet`} field followed by + # one or more {::Google::Cloud::AutoML::V1::AnnotationPayload `annotations`} + # fields, which have `display_name` and `text_extraction` fields to describe + # the entity from the text snippet. Multiple JSON documents can be separated + # using line breaks (\n). + # + # The supplied text must be annotated exhaustively. For example, if you + # include the text "horse", but do not label it as "animal", + # then "horse" is assumed to not be an "animal". + # + # Any given text snippet content must have 30,000 characters or + # less, and also be UTF-8 NFC encoded. ASCII is accepted as it is + # UTF-8 NFC encoded. + # + # For example: + # + # { + # "text_snippet": { + # "content": "dog car cat" + # }, + # "annotations": [ + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": {"start_offset": 0, "end_offset": 2} + # } + # }, + # { + # "display_name": "vehicle", + # "text_extraction": { + # "text_segment": {"start_offset": 4, "end_offset": 6} + # } + # }, + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": {"start_offset": 8, "end_offset": 10} + # } + # } + # ] + # }\n + # { + # "text_snippet": { + # "content": "This dog is good." + # }, + # "annotations": [ + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": {"start_offset": 5, "end_offset": 7} + # } + # } + # ] + # } + # + # **JSONL files that reference documents** + # + # .JSONL files contain, per line, a JSON document that wraps a + # `input_config` that contains the path to a source document. + # Multiple JSON documents can be separated using line breaks (\n). + # + # Supported document extensions: .PDF, .TIF, .TIFF + # + # For example: + # + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] + # } + # } + # } + # }\n + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] + # } + # } + # } + # } + # + # **In-line JSONL files with document layout information** + # + # **Note:** You can only annotate documents using the UI. The format described + # below applies to annotated documents exported using the UI or `exportData`. + # + # In-line .JSONL files for documents contain, per line, a JSON document + # that wraps a `document` field that provides the textual content of the + # document and the layout information. + # + # For example: + # + # { + # "document": { + # "document_text": { + # "content": "dog car cat" + # } + # "layout": [ + # { + # "text_segment": { + # "start_offset": 0, + # "end_offset": 11, + # }, + # "page_number": 1, + # "bounding_poly": { + # "normalized_vertices": [ + # {"x": 0.1, "y": 0.1}, + # {"x": 0.1, "y": 0.3}, + # {"x": 0.3, "y": 0.3}, + # {"x": 0.3, "y": 0.1}, + # ], + # }, + # "text_segment_type": TOKEN, + # } + # ], + # "document_dimensions": { + # "width": 8.27, + # "height": 11.69, + # "unit": INCH, + # } + # "page_count": 3, + # }, + # "annotations": [ + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": {"start_offset": 0, "end_offset": 3} + # } + # }, + # { + # "display_name": "vehicle", + # "text_extraction": { + # "text_segment": {"start_offset": 4, "end_offset": 7} + # } + # }, + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": {"start_offset": 8, "end_offset": 11} + # } + # }, + # ], + # + # + # + # + # ##### Classification + # + # See [Preparing your training + # data](https://cloud.google.com/natural-language/automl/docs/prepare) for more + # information. + # + # One or more CSV file(s) with each line in the following format: + # + # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... + # + # * `ML_USE` - Identifies the data set that the current row (file) applies + # to. + # This value can be one of the following: + # * `TRAIN` - Rows in this file are used to train the model. + # * `TEST` - Rows in this file are used to test the model during training. + # * `UNASSIGNED` - Rows in this file are not categorized. They are + # Automatically divided into train and test data. 80% for training and + # 20% for testing. + # + # * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If + # the column content is a valid Google Cloud Storage file path, that is, + # prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if + # the content is enclosed in double quotes (""), it is treated as a + # `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a + # file with supported extension and UTF-8 encoding, for example, + # "gs://folder/content.txt" AutoML imports the file content + # as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content + # excluding quotes. In both cases, size of the content must be 10MB or + # less in size. For zip files, the size of each file inside the zip must be + # 10MB or less in size. + # + # For the `MULTICLASS` classification type, at most one `LABEL` is allowed. + # + # The `ML_USE` and `LABEL` columns are optional. + # Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP + # + # A maximum of 100 unique labels are allowed per CSV row. + # + # Sample rows: + # + # TRAIN,"They have bad food and very rude",RudeService,BadFood + # gs://folder/content.txt,SlowService + # TEST,gs://folder/document.pdf + # VALIDATE,gs://folder/text_files.zip,BadFood + # + # + # + # ##### Sentiment Analysis + # + # See [Preparing your training + # data](https://cloud.google.com/natural-language/automl/docs/prepare) for more + # information. + # + # CSV file(s) with each line in format: + # + # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT + # + # * `ML_USE` - Identifies the data set that the current row (file) applies + # to. + # This value can be one of the following: + # * `TRAIN` - Rows in this file are used to train the model. + # * `TEST` - Rows in this file are used to test the model during training. + # * `UNASSIGNED` - Rows in this file are not categorized. They are + # Automatically divided into train and test data. 80% for training and + # 20% for testing. + # + # * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If + # the column content is a valid Google Cloud Storage file path, that is, + # prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if + # the content is enclosed in double quotes (""), it is treated as a + # `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a + # file with supported extension and UTF-8 encoding, for example, + # "gs://folder/content.txt" AutoML imports the file content + # as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content + # excluding quotes. In both cases, size of the content must be 128kB or + # less in size. For zip files, the size of each file inside the zip must be + # 128kB or less in size. + # + # The `ML_USE` and `SENTIMENT` columns are optional. + # Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP + # + # * `SENTIMENT` - An integer between 0 and + # Dataset.text_sentiment_dataset_metadata.sentiment_max + # (inclusive). Describes the ordinal of the sentiment - higher + # value means a more positive sentiment. All the values are + # completely relative, i.e. neither 0 needs to mean a negative or + # neutral sentiment nor sentiment_max needs to mean a positive one - + # it is just required that 0 is the least positive sentiment + # in the data, and sentiment_max is the most positive one. + # The SENTIMENT shouldn't be confused with "score" or "magnitude" + # from the previous Natural Language Sentiment Analysis API. + # All SENTIMENT values between 0 and sentiment_max must be + # represented in the imported data. On prediction the same 0 to + # sentiment_max range will be used. The difference between + # neighboring sentiment values needs not to be uniform, e.g. 1 and + # 2 may be similar whereas the difference between 2 and 3 may be + # large. + # + # Sample rows: + # + # TRAIN,"@freewrytin this is way too good for your product",2 + # gs://folder/content.txt,3 + # TEST,gs://folder/document.pdf + # VALIDATE,gs://folder/text_files.zip,2 + # + # + # + # #### AutoML Tables + # + # See [Preparing your training + # data](https://cloud.google.com/automl-tables/docs/prepare) for more + # information. + # + # You can use either + # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} or + # [bigquery_source][google.cloud.automl.v1.InputConfig.bigquery_source]. + # All input is concatenated into a + # single + # [primary_table_spec_id][google.cloud.automl.v1.TablesDatasetMetadata.primary_table_spec_id] + # + # **For gcs_source:** + # + # CSV file(s), where the first row of the first file is the header, + # containing unique column names. If the first row of a subsequent + # file is the same as the header, then it is also treated as a + # header. All other rows contain values for the corresponding + # columns. + # + # Each .CSV file by itself must be 10GB or smaller, and their total + # size must be 100GB or smaller. + # + # First three sample rows of a CSV file: + #
+        # "Id","First Name","Last Name","Dob","Addresses"
+        # "1","John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
+        # "2","Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
+        # 
+ # **For bigquery_source:** + # + # An URI of a BigQuery table. The user data size of the BigQuery + # table must be 100GB or smaller. + # + # An imported table must have between 2 and 1,000 columns, inclusive, + # and between 1000 and 100,000,000 rows, inclusive. There are at most 5 + # import data running in parallel. + # + # + # + # **Input field definitions:** + # + # `ML_USE` + # : ("TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED") + # Describes how the given example (file) should be used for model + # training. "UNASSIGNED" can be used when user has no preference. + # + # `GCS_FILE_PATH` + # : The path to a file on Google Cloud Storage. For example, + # "gs://folder/image1.png". + # + # `LABEL` + # : A display name of an object on an image, video etc., e.g. "dog". + # Must be up to 32 characters long and can consist only of ASCII + # Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. + # For each label an AnnotationSpec is created which display_name + # becomes the label; AnnotationSpecs are given back in predictions. + # + # `INSTANCE_ID` + # : A positive integer that identifies a specific instance of a + # labeled entity on an example. Used e.g. to track two cars on + # a video while being able to tell apart which one is which. + # + # `BOUNDING_BOX` + # : (`VERTEX,VERTEX,VERTEX,VERTEX` | `VERTEX,,,VERTEX,,`) + # A rectangle parallel to the frame of the example (image, + # video). If 4 vertices are given they are connected by edges + # in the order provided, if 2 are given they are recognized + # as diagonally opposite vertices of the rectangle. + # + # `VERTEX` + # : (`COORDINATE,COORDINATE`) + # First coordinate is horizontal (x), the second is vertical (y). + # + # `COORDINATE` + # : A float in 0 to 1 range, relative to total length of + # image or video in given dimension. For fractions the + # leading non-decimal 0 can be omitted (i.e. 0.3 = .3). + # Point 0,0 is in top left. + # + # `TIME_SEGMENT_START` + # : (`TIME_OFFSET`) + # Expresses a beginning, inclusive, of a time segment + # within an example that has a time dimension + # (e.g. video). + # + # `TIME_SEGMENT_END` + # : (`TIME_OFFSET`) + # Expresses an end, exclusive, of a time segment within + # n example that has a time dimension (e.g. video). + # + # `TIME_OFFSET` + # : A number of seconds as measured from the start of an + # example (e.g. video). Fractions are allowed, up to a + # microsecond precision. "inf" is allowed, and it means the end + # of the example. + # + # `TEXT_SNIPPET` + # : The content of a text snippet, UTF-8 encoded, enclosed within + # double quotes (""). + # + # `DOCUMENT` + # : A field that provides the textual content with document and the layout + # information. + # + # + # **Errors:** + # + # If any of the provided CSV files can't be parsed or if more than certain + # percent of CSV rows cannot be processed then the operation fails and + # nothing is imported. Regardless of overall success or failure the per-row + # failures, up to a certain count cap, is listed in + # Operation.metadata.partial_failures. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1::GcsSource] + # The Google Cloud Storage location for the input content. + # For {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData}, + # `gcs_source` points to a CSV file with a structure described in + # {::Google::Cloud::AutoML::V1::InputConfig InputConfig}. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific parameters describing the semantic of the + # imported data, any string must be up to 25000 + # characters long. + # + # #### AutoML Tables + # + # `schema_inference_version` + # : (integer) This value must be supplied. + # The version of the + # algorithm to use for the initial inference of the + # column data types of the imported table. Allowed values: "1". + class InputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Input configuration for BatchPredict Action. + # + # The format of input depends on the ML problem of the model used for + # prediction. As input source the + # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} + # is expected, unless specified otherwise. + # + # The formats are represented in EBNF with commas being literal and with + # non-terminal symbols defined near the end of this comment. The formats + # are: + # + # #### AutoML Vision + # ##### Classification + # + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH + # + # The Google Cloud Storage location of an image of up to + # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. + # This path is treated as the ID in the batch predict output. + # + # Sample rows: + # + # gs://folder/image1.jpeg + # gs://folder/image2.gif + # gs://folder/image3.png + # + # ##### Object Detection + # + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH + # + # The Google Cloud Storage location of an image of up to + # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. + # This path is treated as the ID in the batch predict output. + # + # Sample rows: + # + # gs://folder/image1.jpeg + # gs://folder/image2.gif + # gs://folder/image3.png + # + # #### AutoML Video Intelligence + # ##### Classification + # + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END + # + # `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in + # size and up to 3h in duration duration. + # Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # + # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the + # length of the video, and the end time must be after the start time. + # + # Sample rows: + # + # gs://folder/video1.mp4,10,40 + # gs://folder/video1.mp4,20,60 + # gs://folder/vid2.mov,0,inf + # + # ##### Object Tracking + # + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END + # + # `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in + # size and up to 3h in duration duration. + # Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # + # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the + # length of the video, and the end time must be after the start time. + # + # Sample rows: + # + # gs://folder/video1.mp4,10,40 + # gs://folder/video1.mp4,20,60 + # gs://folder/vid2.mov,0,inf + # + # #### AutoML Natural Language + # ##### Classification + # + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH + # + # `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. + # Supported file extensions: .TXT, .PDF, .TIF, .TIFF + # + # Text files can be no larger than 10MB in size. + # + # Sample rows: + # + # gs://folder/text1.txt + # gs://folder/text2.pdf + # gs://folder/text3.tif + # + # ##### Sentiment Analysis + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH + # + # `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. + # Supported file extensions: .TXT, .PDF, .TIF, .TIFF + # + # Text files can be no larger than 128kB in size. + # + # Sample rows: + # + # gs://folder/text1.txt + # gs://folder/text2.pdf + # gs://folder/text3.tif + # + # ##### Entity Extraction + # + # One or more JSONL (JSON Lines) files that either provide inline text or + # documents. You can only use one format, either inline text or documents, + # for a single call to [AutoMl.BatchPredict]. + # + # Each JSONL file contains a per line a proto that + # wraps a temporary user-assigned TextSnippet ID (string up to 2000 + # characters long) called "id", a TextSnippet proto (in + # JSON representation) and zero or more TextFeature protos. Any given + # text snippet content must have 30,000 characters or less, and also + # be UTF-8 NFC encoded (ASCII already is). The IDs provided should be + # unique. + # + # Each document JSONL file contains, per line, a proto that wraps a Document + # proto with `input_config` set. Each document cannot exceed 2MB in size. + # + # Supported document extensions: .PDF, .TIF, .TIFF + # + # Each JSONL file must not exceed 100MB in size, and no more than 20 + # JSONL files may be passed. + # + # Sample inline JSONL file (Shown with artificial line + # breaks. Actual line breaks are denoted by "\n".): + # + # { + # "id": "my_first_id", + # "text_snippet": { "content": "dog car cat"}, + # "text_features": [ + # { + # "text_segment": \\{"start_offset": 4, "end_offset": 6}, + # "structural_type": PARAGRAPH, + # "bounding_poly": { + # "normalized_vertices": [ + # \\{"x": 0.1, "y": 0.1}, + # \\{"x": 0.1, "y": 0.3}, + # \\{"x": 0.3, "y": 0.3}, + # \\{"x": 0.3, "y": 0.1}, + # ] + # }, + # } + # ], + # }\n + # { + # "id": "2", + # "text_snippet": { + # "content": "Extended sample content", + # "mime_type": "text/plain" + # } + # } + # + # Sample document JSONL file (Shown with artificial line + # breaks. Actual line breaks are denoted by "\n".): + # + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] + # } + # } + # } + # }\n + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] + # } + # } + # } + # } + # + # #### AutoML Tables + # + # See [Preparing your training + # data](https://cloud.google.com/automl-tables/docs/predict-batch) for more + # information. + # + # You can use either + # {::Google::Cloud::AutoML::V1::BatchPredictInputConfig#gcs_source gcs_source} + # or + # [bigquery_source][BatchPredictInputConfig.bigquery_source]. + # + # **For gcs_source:** + # + # CSV file(s), each by itself 10GB or smaller and total size must be + # 100GB or smaller, where first file must have a header containing + # column names. If the first row of a subsequent file is the same as + # the header, then it is also treated as a header. All other rows + # contain values for the corresponding columns. + # + # The column names must contain the model's + # [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs] + # [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name] + # (order doesn't matter). The columns corresponding to the model's + # input feature column specs must contain values compatible with the + # column spec's data types. Prediction on all the rows, i.e. the CSV + # lines, will be attempted. + # + # + # Sample rows from a CSV file: + #
+        # "First Name","Last Name","Dob","Addresses"
+        # "John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
+        # "Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
+        # 
+ # **For bigquery_source:** + # + # The URI of a BigQuery table. The user data size of the BigQuery + # table must be 100GB or smaller. + # + # The column names must contain the model's + # [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs] + # [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name] + # (order doesn't matter). The columns corresponding to the model's + # input feature column specs must contain values compatible with the + # column spec's data types. Prediction on all the rows of the table + # will be attempted. + # + # **Input field definitions:** + # + # `GCS_FILE_PATH` + # : The path to a file on Google Cloud Storage. For example, + # "gs://folder/video.avi". + # + # `TIME_SEGMENT_START` + # : (`TIME_OFFSET`) + # Expresses a beginning, inclusive, of a time segment + # within an example that has a time dimension + # (e.g. video). + # + # `TIME_SEGMENT_END` + # : (`TIME_OFFSET`) + # Expresses an end, exclusive, of a time segment within + # n example that has a time dimension (e.g. video). + # + # `TIME_OFFSET` + # : A number of seconds as measured from the start of an + # example (e.g. video). Fractions are allowed, up to a + # microsecond precision. "inf" is allowed, and it means the end + # of the example. + # + # **Errors:** + # + # If any of the provided CSV files can't be parsed or if more than certain + # percent of CSV rows cannot be processed then the operation fails and + # prediction does not happen. Regardless of overall success or failure the + # per-row failures, up to a certain count cap, will be listed in + # Operation.metadata.partial_failures. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1::GcsSource] + # Required. The Google Cloud Storage location for the input content. + class BatchPredictInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input configuration of a {::Google::Cloud::AutoML::V1::Document Document}. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1::GcsSource] + # The Google Cloud Storage location of the document file. Only a single path + # should be given. + # + # Max supported size: 512MB. + # + # Supported extensions: .PDF. + class DocumentInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # * For Translation: + # CSV file `translation.csv`, with each line in format: + # ML_USE,GCS_FILE_PATH + # GCS_FILE_PATH leads to a .TSV file which describes examples that have + # given ML_USE, using the following row format per line: + # TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target + # language) + # + # * For Tables: + # Output depends on whether the dataset was imported from Google Cloud + # Storage or BigQuery. + # Google Cloud Storage case: + # [gcs_destination][google.cloud.automl.v1p1beta.OutputConfig.gcs_destination] + # must be set. Exported are CSV file(s) `tables_1.csv`, + # `tables_2.csv`,...,`tables_N.csv` with each having as header line + # the table's column names, and all other lines contain values for + # the header columns. + # BigQuery case: + # [bigquery_destination][google.cloud.automl.v1p1beta.OutputConfig.bigquery_destination] + # pointing to a BigQuery project must be set. In the given project a + # new dataset will be created with name + # `export_data__` + # where will be made + # BigQuery-dataset-name compatible (e.g. most special characters will + # become underscores), and timestamp will be in + # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that + # dataset a new table called `primary_table` will be created, and + # filled with precisely the same data as this obtained on import. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1::GcsDestination] + # Required. The Google Cloud Storage location where the output is to be + # written to. For Image Object Detection, Text Extraction, Video + # Classification and Tables, in the given directory a new directory will be + # created with name: + # export_data-- where + # timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export + # output will be written into that directory. + class OutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for BatchPredict Action. + # + # As destination the + # {::Google::Cloud::AutoML::V1::BatchPredictOutputConfig#gcs_destination gcs_destination} + # must be set unless specified otherwise for a domain. If gcs_destination is + # set then in the given directory a new directory is created. Its name + # will be + # "prediction--", + # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents + # of it depends on the ML problem the predictions are made for. + # + # * For Image Classification: + # In the created directory files `image_classification_1.jsonl`, + # `image_classification_2.jsonl`,...,`image_classification_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of the successfully predicted images and annotations. + # A single image will be listed only once with all its annotations, + # and its annotations will never be split across files. + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps image's "ID" : "" followed by a list of + # zero or more AnnotationPayload protos (called annotations), which + # have classification detail populated. + # If prediction for any image failed (partially or completely), then an + # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` + # files will be created (N depends on total number of failed + # predictions). These files will have a JSON representation of a proto + # that wraps the same "ID" : "" but here followed by + # exactly one + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`fields. + # + # * For Image Object Detection: + # In the created directory files `image_object_detection_1.jsonl`, + # `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of the successfully predicted images and annotations. + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps image's "ID" : "" followed by a list of + # zero or more AnnotationPayload protos (called annotations), which + # have image_object_detection detail populated. A single image will + # be listed only once with all its annotations, and its annotations + # will never be split across files. + # If prediction for any image failed (partially or completely), then + # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` + # files will be created (N depends on total number of failed + # predictions). These files will have a JSON representation of a proto + # that wraps the same "ID" : "" but here followed by + # exactly one + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`fields. + # * For Video Classification: + # In the created directory a video_classification.csv file, and a .JSON + # file per each video classification requested in the input (i.e. each + # line in given CSV(s)), will be created. + # + # The format of video_classification.csv is: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS + # where: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 + # the prediction input lines (i.e. video_classification.csv has + # precisely the same number of lines as the prediction input had.) + # JSON_FILE_NAME = Name of .JSON file in the output directory, which + # contains prediction responses for the video time segment. + # STATUS = "OK" if prediction completed successfully, or an error code + # with message otherwise. If STATUS is not "OK" then the .JSON file + # for that line may not exist or be empty. + # + # Each .JSON file, assuming STATUS is "OK", will contain a list of + # AnnotationPayload protos in JSON format, which are the predictions + # for the video time segment the file is assigned to in the + # video_classification.csv. All AnnotationPayload protos will have + # video_classification field set, and will be sorted by + # video_classification.type field (note that the returned types are + # governed by `classifaction_types` parameter in + # [PredictService.BatchPredictRequest.params][]). + # + # * For Video Object Tracking: + # In the created directory a video_object_tracking.csv file will be + # created, and multiple files video_object_trackinng_1.json, + # video_object_trackinng_2.json,..., video_object_trackinng_N.json, + # where N is the number of requests in the input (i.e. the number of + # lines in given CSV(s)). + # + # The format of video_object_tracking.csv is: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS + # where: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 + # the prediction input lines (i.e. video_object_tracking.csv has + # precisely the same number of lines as the prediction input had.) + # JSON_FILE_NAME = Name of .JSON file in the output directory, which + # contains prediction responses for the video time segment. + # STATUS = "OK" if prediction completed successfully, or an error + # code with message otherwise. If STATUS is not "OK" then the .JSON + # file for that line may not exist or be empty. + # + # Each .JSON file, assuming STATUS is "OK", will contain a list of + # AnnotationPayload protos in JSON format, which are the predictions + # for each frame of the video time segment the file is assigned to in + # video_object_tracking.csv. All AnnotationPayload protos will have + # video_object_tracking field set. + # * For Text Classification: + # In the created directory files `text_classification_1.jsonl`, + # `text_classification_2.jsonl`,...,`text_classification_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps input text file (or document) in + # the text snippet (or document) proto and a list of + # zero or more AnnotationPayload protos (called annotations), which + # have classification detail populated. A single text file (or + # document) will be listed only once with all its annotations, and its + # annotations will never be split across files. + # + # If prediction for any input file (or document) failed (partially or + # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps input file followed by exactly one + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Text Sentiment: + # In the created directory files `text_sentiment_1.jsonl`, + # `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps input text file (or document) in + # the text snippet (or document) proto and a list of + # zero or more AnnotationPayload protos (called annotations), which + # have text_sentiment detail populated. A single text file (or + # document) will be listed only once with all its annotations, and its + # annotations will never be split across files. + # + # If prediction for any input file (or document) failed (partially or + # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps input file followed by exactly one + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Text Extraction: + # In the created directory files `text_extraction_1.jsonl`, + # `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # The contents of these .JSONL file(s) depend on whether the input + # used inline text, or documents. + # If input was inline, then each .JSONL file will contain, per line, + # a JSON representation of a proto that wraps given in request text + # snippet's "id" (if specified), followed by input text snippet, + # and a list of zero or more + # AnnotationPayload protos (called annotations), which have + # text_extraction detail populated. A single text snippet will be + # listed only once with all its annotations, and its annotations will + # never be split across files. + # If input used documents, then each .JSONL file will contain, per + # line, a JSON representation of a proto that wraps given in request + # document proto, followed by its OCR-ed representation in the form + # of a text snippet, finally followed by a list of zero or more + # AnnotationPayload protos (called annotations), which have + # text_extraction detail populated and refer, via their indices, to + # the OCR-ed text snippet. A single document (and its text snippet) + # will be listed only once with all its annotations, and its + # annotations will never be split across files. + # If prediction for any text snippet failed (partially or completely), + # then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps either the "id" : "" (in case of inline) + # or the document proto (in case of document) but here followed by + # exactly one + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Tables: + # Output depends on whether + # [gcs_destination][google.cloud.automl.v1p1beta.BatchPredictOutputConfig.gcs_destination] + # or + # [bigquery_destination][google.cloud.automl.v1p1beta.BatchPredictOutputConfig.bigquery_destination] + # is set (either is allowed). + # Google Cloud Storage case: + # In the created directory files `tables_1.csv`, `tables_2.csv`,..., + # `tables_N.csv` will be created, where N may be 1, and depends on + # the total number of the successfully predicted rows. + # For all CLASSIFICATION + # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]: + # Each .csv file will contain a header, listing all columns' + # [display_name-s][google.cloud.automl.v1p1beta.ColumnSpec.display_name] + # given on input followed by M target column names in the format of + # "<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] + # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>__score" where M is the number of distinct target values, + # i.e. number of distinct values in the target column of the table + # used to train the model. Subsequent lines will contain the + # respective values of successfully predicted rows, with the last, + # i.e. the target, columns having the corresponding prediction + # [scores][google.cloud.automl.v1p1beta.TablesAnnotation.score]. + # For REGRESSION and FORECASTING + # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]: + # Each .csv file will contain a header, listing all columns' + # [display_name-s][google.cloud.automl.v1p1beta.display_name] + # given on input followed by the predicted target column with name + # in the format of + # "predicted_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] + # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>" + # Subsequent lines will contain the respective values of + # successfully predicted rows, with the last, i.e. the target, + # column having the predicted target value. + # If prediction for any rows failed, then an additional + # `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be + # created (N depends on total number of failed rows). These files + # will have analogous format as `tables_*.csv`, but always with a + # single target column having + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # represented as a JSON string, and containing only `code` and + # `message`. + # BigQuery case: + # [bigquery_destination][google.cloud.automl.v1p1beta.OutputConfig.bigquery_destination] + # pointing to a BigQuery project must be set. In the given project a + # new dataset will be created with name + # `prediction__` + # where will be made + # BigQuery-dataset-name compatible (e.g. most special characters will + # become underscores), and timestamp will be in + # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset + # two tables will be created, `predictions`, and `errors`. + # The `predictions` table's column names will be the input columns' + # [display_name-s][google.cloud.automl.v1p1beta.ColumnSpec.display_name] + # followed by the target column with name in the format of + # "predicted_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] + # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>" + # The input feature columns will contain the respective values of + # successfully predicted rows, with the target column having an + # ARRAY of + # [AnnotationPayloads][google.cloud.automl.v1p1beta.AnnotationPayload], + # represented as STRUCT-s, containing + # [TablesAnnotation][google.cloud.automl.v1p1beta.TablesAnnotation]. + # The `errors` table contains rows for which the prediction has + # failed, it has analogous input columns while the target column name + # is in the format of + # "errors_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] + # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>", + # and as a value has + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # represented as a STRUCT, and containing only `code` and `message`. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1::GcsDestination] + # Required. The Google Cloud Storage location of the directory where the + # output is to be written to. + class BatchPredictOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for ModelExport Action. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1::GcsDestination] + # Required. The Google Cloud Storage location where the model is to be + # written to. This location may only be set for the following model + # formats: + # "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". + # + # Under the directory given as the destination a new one with name + # "model-export--", + # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, + # will be created. Inside the model and any of its supporting files + # will be written. + # @!attribute [rw] model_format + # @return [::String] + # The format in which the model must be exported. The available, and default, + # formats depend on the problem and model type (if given problem and type + # combination doesn't have a format listed, it means its models are not + # exportable): + # + # * For Image Classification mobile-low-latency-1, mobile-versatile-1, + # mobile-high-accuracy-1: + # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", + # "docker". + # + # * For Image Classification mobile-core-ml-low-latency-1, + # mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: + # "core_ml" (default). + # + # * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, + # mobile-high-accuracy-1: + # "tflite", "tf_saved_model", "tf_js". + # Formats description: + # + # * tflite - Used for Android mobile devices. + # * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) + # devices. + # * tf_saved_model - A tensorflow model in SavedModel format. + # * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can + # be used in the browser and in Node.js using JavaScript. + # * docker - Used for Docker containers. Use the params field to customize + # the container. The container is verified to work correctly on + # ubuntu 16.04 operating system. See more at + # [containers + # quickstart](https://cloud.google.com/vision/automl/docs/containers-gcs-quickstart) + # * core_ml - Used for iOS mobile devices. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional model-type and format specific parameters describing the + # requirements for the to be exported model files, any string must be up to + # 25000 characters long. + # + # * For `docker` format: + # `cpu_architecture` - (string) "x86_64" (default). + # `gpu_architecture` - (string) "none" (default), "nvidia". + class ModelExportOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The Google Cloud Storage location for the input content. + # @!attribute [rw] input_uris + # @return [::Array<::String>] + # Required. Google Cloud Storage URIs to input files, up to 2000 + # characters long. Accepted forms: + # * Full object path, e.g. gs://bucket/directory/object.csv + class GcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location where the output is to be written to. + # @!attribute [rw] output_uri_prefix + # @return [::String] + # Required. Google Cloud Storage URI to output directory, up to 2000 + # characters long. + # Accepted forms: + # * Prefix path: gs://bucket/directory + # The requesting user must have write permission to the bucket. + # The directory is created if it doesn't exist. + class GcsDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb new file mode 100644 index 000000000000..37165c8fbf69 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # API proto representing a trained machine learning model. + # @!attribute [rw] translation_model_metadata + # @return [::Google::Cloud::AutoML::V1::TranslationModelMetadata] + # Metadata for translation models. + # + # Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_model_metadata + # @return [::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata] + # Metadata for image classification models. + # + # Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_classification_model_metadata + # @return [::Google::Cloud::AutoML::V1::TextClassificationModelMetadata] + # Metadata for text classification models. + # + # Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_model_metadata + # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelMetadata] + # Metadata for image object detection models. + # + # Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_model_metadata + # @return [::Google::Cloud::AutoML::V1::TextExtractionModelMetadata] + # Metadata for text extraction models. + # + # Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_model_metadata + # @return [::Google::Cloud::AutoML::V1::TextSentimentModelMetadata] + # Metadata for text sentiment models. + # + # Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the model. + # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the model to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores + # (_), and ASCII digits 0-9. It must start with a letter. + # @!attribute [rw] dataset_id + # @return [::String] + # Required. The resource ID of the dataset used to create the model. The dataset must + # come from the same ancestor project and location. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the model training finished and can be used for prediction. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this model was last updated. + # @!attribute [rw] deployment_state + # @return [::Google::Cloud::AutoML::V1::Model::DeploymentState] + # Output only. Deployment state of the model. A model can only serve + # prediction requests after it gets deployed. + # @!attribute [rw] etag + # @return [::String] + # Used to perform a consistent read-modify-write updates. If not set, a blind + # "overwrite" update happens. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata to organize your model. + # + # Label keys and values can be no longer than 64 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://goo.gl/xmQnxf for more information on and examples of labels. + class Model + 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 + + # Deployment state of the model. + module DeploymentState + # Should not be used, an un-set enum has this value by default. + DEPLOYMENT_STATE_UNSPECIFIED = 0 + + # Model is deployed. + DEPLOYED = 1 + + # Model is not deployed. + UNDEPLOYED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb new file mode 100644 index 000000000000..729817ff4233 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb @@ -0,0 +1,100 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Evaluation results of a model. + # @!attribute [rw] classification_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics] + # Model evaluation metrics for image, text, video and tables + # classification. + # Tables problem is considered a classification when the target column + # is CATEGORY DataType. + # + # Note: The following fields are mutually exclusive: `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] translation_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1::TranslationEvaluationMetrics] + # Model evaluation metrics for translation. + # + # Note: The following fields are mutually exclusive: `translation_evaluation_metrics`, `classification_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionEvaluationMetrics] + # Model evaluation metrics for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1::TextSentimentEvaluationMetrics] + # Evaluation metrics for text sentiment models. + # + # Note: The following fields are mutually exclusive: `text_sentiment_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1::TextExtractionEvaluationMetrics] + # Evaluation metrics for text extraction models. + # + # Note: The following fields are mutually exclusive: `text_extraction_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the model evaluation. + # Format: + # `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` + # @!attribute [rw] annotation_spec_id + # @return [::String] + # Output only. The ID of the annotation spec that the model evaluation applies to. The + # The ID is empty for the overall model evaluation. + # For Tables annotation specs in the dataset do not exist and this ID is + # always not set, but for CLASSIFICATION + # [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] + # the + # {::Google::Cloud::AutoML::V1::ModelEvaluation#display_name display_name} + # field is used. + # @!attribute [rw] display_name + # @return [::String] + # Output only. The value of + # {::Google::Cloud::AutoML::V1::AnnotationSpec#display_name display_name} + # at the moment when the model was trained. Because this field returns a + # value at model training time, for different models trained from the same + # dataset, the values may differ, since display names could had been changed + # between the two model's trainings. For Tables CLASSIFICATION + # [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] + # distinct values of the target column at the moment of the model evaluation + # are populated here. + # The display_name is empty for the overall model evaluation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this model evaluation was created. + # @!attribute [rw] evaluated_example_count + # @return [::Integer] + # Output only. The number of examples used for model evaluation, i.e. for + # which ground truth from time of model creation is compared against the + # predicted annotations created by the model. + # For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is + # the total number of all examples used for evaluation. + # Otherwise, this is the count of examples that according to the ground + # truth were annotated by the + # {::Google::Cloud::AutoML::V1::ModelEvaluation#annotation_spec_id annotation_spec_id}. + class ModelEvaluation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb new file mode 100644 index 000000000000..78d79e45a942 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb @@ -0,0 +1,197 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Metadata used across all long running operations returned by AutoML API. + # @!attribute [rw] delete_details + # @return [::Google::Cloud::AutoML::V1::DeleteOperationMetadata] + # Details of a Delete operation. + # + # Note: The following fields are mutually exclusive: `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] deploy_model_details + # @return [::Google::Cloud::AutoML::V1::DeployModelOperationMetadata] + # Details of a DeployModel operation. + # + # Note: The following fields are mutually exclusive: `deploy_model_details`, `delete_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] undeploy_model_details + # @return [::Google::Cloud::AutoML::V1::UndeployModelOperationMetadata] + # Details of an UndeployModel operation. + # + # Note: The following fields are mutually exclusive: `undeploy_model_details`, `delete_details`, `deploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] create_model_details + # @return [::Google::Cloud::AutoML::V1::CreateModelOperationMetadata] + # Details of CreateModel operation. + # + # Note: The following fields are mutually exclusive: `create_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] create_dataset_details + # @return [::Google::Cloud::AutoML::V1::CreateDatasetOperationMetadata] + # Details of CreateDataset operation. + # + # Note: The following fields are mutually exclusive: `create_dataset_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] import_data_details + # @return [::Google::Cloud::AutoML::V1::ImportDataOperationMetadata] + # Details of ImportData operation. + # + # Note: The following fields are mutually exclusive: `import_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] batch_predict_details + # @return [::Google::Cloud::AutoML::V1::BatchPredictOperationMetadata] + # Details of BatchPredict operation. + # + # Note: The following fields are mutually exclusive: `batch_predict_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_data_details + # @return [::Google::Cloud::AutoML::V1::ExportDataOperationMetadata] + # Details of ExportData operation. + # + # Note: The following fields are mutually exclusive: `export_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_model_details + # @return [::Google::Cloud::AutoML::V1::ExportModelOperationMetadata] + # Details of ExportModel operation. + # + # Note: The following fields are mutually exclusive: `export_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] progress_percent + # @return [::Integer] + # Output only. Progress of operation. Range: [0, 100]. + # Not used currently. + # @!attribute [rw] partial_failures + # @return [::Array<::Google::Rpc::Status>] + # Output only. Partial failures encountered. + # E.g. single files that couldn't be read. + # This field should never exceed 20 entries. + # Status details field will contain standard GCP error details. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the operation was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the operation was updated for the last time. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of operations that perform deletes of any entities. + class DeleteOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of DeployModel operation. + class DeployModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of UndeployModel operation. + class UndeployModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of CreateDataset operation. + class CreateDatasetOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of CreateModel operation. + class CreateModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of ImportData operation. + class ImportDataOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of ExportData operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1::ExportDataOperationMetadata::ExportDataOutputInfo] + # Output only. Information further describing this export data's output. + class ExportDataOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes this export data's output. + # Supplements + # {::Google::Cloud::AutoML::V1::OutputConfig OutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the exported data is written. + class ExportDataOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details of BatchPredict operation. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1::BatchPredictInputConfig] + # Output only. The input config that was given upon starting this + # batch predict operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1::BatchPredictOperationMetadata::BatchPredictOutputInfo] + # Output only. Information further describing this batch predict's output. + class BatchPredictOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes this batch predict's output. + # Supplements + # {::Google::Cloud::AutoML::V1::BatchPredictOutputConfig BatchPredictOutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the prediction output is written. + class BatchPredictOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details of ExportModel operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1::ExportModelOperationMetadata::ExportModelOutputInfo] + # Output only. Information further describing the output of this model + # export. + class ExportModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes the output of model export. + # Supplements + # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the model will be exported. + class ExportModelOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb new file mode 100644 index 000000000000..0811f3318b09 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.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 AutoML + module V1 + # Request message for {::Google::Cloud::AutoML::V1::PredictionService::Client#predict PredictionService.Predict}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the model requested to serve the prediction. + # @!attribute [rw] payload + # @return [::Google::Cloud::AutoML::V1::ExamplePayload] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned. The default is 100. The + # number of returned bounding boxes might be limited by the server. + # + # AutoML Tables + # + # `feature_importance` + # : (boolean) Whether + # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] + # is populated in the returned list of + # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] + # objects. The default is false. + class PredictRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for {::Google::Cloud::AutoML::V1::PredictionService::Client#predict PredictionService.Predict}. + # @!attribute [rw] payload + # @return [::Array<::Google::Cloud::AutoML::V1::AnnotationPayload>] + # Prediction result. + # AutoML Translation and AutoML Natural Language Sentiment Analysis + # return precisely one payload. + # @!attribute [rw] preprocessed_input + # @return [::Google::Cloud::AutoML::V1::ExamplePayload] + # The preprocessed example that AutoML actually makes prediction on. + # Empty if AutoML does not preprocess the input example. + # + # For AutoML Natural Language (Classification, Entity Extraction, and + # Sentiment Analysis), if the input is a document, the recognized text is + # returned in the + # {::Google::Cloud::AutoML::V1::Document#document_text document_text} + # property. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific prediction response metadata. + # + # AutoML Vision Object Detection + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding boxes to return per image. + # + # AutoML Natural Language Sentiment Analysis + # + # `sentiment_score` + # : (float, deprecated) A value between -1 and 1, + # -1 maps to least positive sentiment, while 1 maps to the most positive + # one and the higher the score, the more positive the sentiment in the + # document is. Yet these values are relative to the training data, so + # e.g. if all data was positive then -1 is also positive (though + # the least). + # `sentiment_score` is not the same as "score" and "magnitude" + # from Sentiment Analysis in the Natural Language API. + class PredictResponse + 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 + + # Request message for {::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the model requested to serve the batch prediction. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1::BatchPredictInputConfig] + # Required. The input configuration for batch prediction. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig] + # Required. The Configuration specifying where output predictions should + # be written. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # AutoML Natural Language Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # AutoML Video Intelligence Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # `segment_classification` + # : (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is true. + # + # `shot_classification` + # : (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # The default is false. + # + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. + # + # `1s_interval_classification` + # : (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. The default is false. + # + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. + # + # AutoML Video Intelligence Object Tracking + # + # `score_threshold` + # : (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # + # `min_bounding_box_size` + # : (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size are + # returned. Value in 0 to 1 range. Default is 0. + class BatchPredictRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Result of the Batch Predict. This message is returned in + # {::Google::Longrunning::Operation#response response} of the operation returned + # by the {::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific prediction response metadata. + # + # AutoML Vision Object Detection + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding boxes returned per image. + # + # AutoML Video Intelligence Object Tracking + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding boxes returned per frame. + class BatchPredictResult + 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-automl-v1/proto_docs/google/cloud/automl/v1/service.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb new file mode 100644 index 000000000000..3185ecd7a149 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb @@ -0,0 +1,326 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#create_dataset AutoMl.CreateDataset}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project to create the dataset for. + # @!attribute [rw] dataset + # @return [::Google::Cloud::AutoML::V1::Dataset] + # Required. The dataset to create. + class CreateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_dataset AutoMl.GetDataset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset to retrieve. + class GetDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project from which to list datasets. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. + class ListDatasetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets}. + # @!attribute [rw] datasets + # @return [::Array<::Google::Cloud::AutoML::V1::Dataset>] + # The datasets read. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1::ListDatasetsRequest#page_token ListDatasetsRequest.page_token} to obtain that page. + class ListDatasetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#update_dataset AutoMl.UpdateDataset} + # @!attribute [rw] dataset + # @return [::Google::Cloud::AutoML::V1::Dataset] + # Required. The dataset which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. + class UpdateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset AutoMl.DeleteDataset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset to delete. + class DeleteDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData}. + # @!attribute [rw] name + # @return [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1::InputConfig] + # Required. The desired input location and its domain specific semantics, + # if any. + class ImportDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#export_data AutoMl.ExportData}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1::OutputConfig] + # Required. The desired output location. + class ExportDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec AutoMl.GetAnnotationSpec}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the annotation spec to retrieve. + class GetAnnotationSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#create_model AutoMl.CreateModel}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent project where the model is being created. + # @!attribute [rw] model + # @return [::Google::Cloud::AutoML::V1::Model] + # Required. The model to create. + class CreateModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_model AutoMl.GetModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model. + class GetModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the project, from which to list the models. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels} call. + class ListModelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels}. + # @!attribute [rw] model + # @return [::Array<::Google::Cloud::AutoML::V1::Model>] + # List of models in the requested page. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1::ListModelsRequest#page_token ListModelsRequest.page_token} to obtain that page. + class ListModelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#delete_model AutoMl.DeleteModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model being deleted. + class DeleteModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#update_model AutoMl.UpdateModel} + # @!attribute [rw] model + # @return [::Google::Cloud::AutoML::V1::Model] + # Required. The model which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. + class UpdateModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#deploy_model AutoMl.DeployModel}. + # @!attribute [rw] image_object_detection_model_deployment_metadata + # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_model_deployment_metadata + # @return [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata] + # Model deployment metadata specific to Image Classification. + # + # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model to deploy. + class DeployModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model AutoMl.UndeployModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model to undeploy. + class UndeployModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}. + # Models need to be enabled for exporting, otherwise an error code will be + # returned. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the model to export. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1::ModelExportOutputConfig] + # Required. The desired output location and configuration. + class ExportModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation AutoMl.GetModelEvaluation}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the model evaluation. + class GetModelEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @!attribute [rw] filter + # @return [::String] + # Required. An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + class ListModelEvaluationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. + # @!attribute [rw] model_evaluation + # @return [::Array<::Google::Cloud::AutoML::V1::ModelEvaluation>] + # List of model evaluations in the requested page. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to the {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest#page_token ListModelEvaluationsRequest.page_token} field of a new + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} request to obtain that page. + class ListModelEvaluationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb new file mode 100644 index 000000000000..aa705d31cb5d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Dataset metadata for classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1::ClassificationType] + # Required. Type of the classification problem. + class TextClassificationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1::ClassificationType] + # Output only. Classification type of the dataset used to train this model. + class TextClassificationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata that is specific to text extraction + class TextExtractionDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text extraction. + class TextExtractionModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata for text sentiment. + # @!attribute [rw] sentiment_max + # @return [::Integer] + # Required. A sentiment is expressed as an integer ordinal, where higher value + # means a more positive sentiment. The range of sentiments that will be used + # is between 0 and sentiment_max (inclusive on both ends), and all the values + # in the range must be represented in the dataset before a model can be + # created. + # sentiment_max value must be between 1 and 10 (inclusive). + class TextSentimentDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text sentiment. + class TextSentimentModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb new file mode 100644 index 000000000000..817c0921c657 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.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 AutoML + module V1 + # Annotation for identifying spans of text. + # @!attribute [rw] text_segment + # @return [::Google::Cloud::AutoML::V1::TextSegment] + # An entity annotation will set this, which is the part of the original + # text to which the annotation pertains. + # @!attribute [rw] score + # @return [::Float] + # Output only. A confidence estimate between 0.0 and 1.0. A higher value + # means greater confidence in correctness of the annotation. + class TextExtractionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for text extraction problems. + # @!attribute [rw] au_prc + # @return [::Float] + # Output only. The Area under precision recall curve metric. + # @!attribute [rw] confidence_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1::TextExtractionEvaluationMetrics::ConfidenceMetricsEntry>] + # Output only. Metrics that have confidence thresholds. + # Precision-recall curve can be derived from it. + class TextExtractionEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. The confidence threshold value used to compute the metrics. + # Only annotations with score of at least this threshold are considered to + # be ones the model would return. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall under the given confidence threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision under the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb new file mode 100644 index 000000000000..93eddac0a79f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.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 AutoML + module V1 + # A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. + # @!attribute [rw] content + # @return [::String] + # Output only. The content of the TextSegment. + # @!attribute [rw] start_offset + # @return [::Integer] + # Required. Zero-based character index of the first character of the text + # segment (counting characters from the beginning of the text). + # @!attribute [rw] end_offset + # @return [::Integer] + # Required. Zero-based character index of the first character past the end of + # the text segment (counting character from the beginning of the text). + # The character at the end_offset is NOT included in the text segment. + class TextSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb new file mode 100644 index 000000000000..1c4bc080ceb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.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 Cloud + module AutoML + module V1 + # Contains annotation details specific to text sentiment. + # @!attribute [rw] sentiment + # @return [::Integer] + # Output only. The sentiment with the semantic, as given to the + # {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData} when populating the dataset from which the model used + # for the prediction had been trained. + # The sentiment values are between 0 and + # Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), + # with higher value meaning more positive sentiment. They are completely + # relative, i.e. 0 means least positive sentiment and sentiment_max means + # the most positive from the sentiments present in the train data. Therefore + # e.g. if train data had only negative sentiment, then sentiment_max, would + # be still negative (although least negative). + # The sentiment shouldn't be confused with "score" or "magnitude" + # from the previous Natural Language Sentiment Analysis API. + class TextSentimentAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for text sentiment problems. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + # @!attribute [rw] mean_absolute_error + # @return [::Float] + # Output only. Mean absolute error. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] mean_squared_error + # @return [::Float] + # Output only. Mean squared error. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] linear_kappa + # @return [::Float] + # Output only. Linear weighted kappa. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] quadratic_kappa + # @return [::Float] + # Output only. Quadratic weighted kappa. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] confusion_matrix + # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix] + # Output only. Confusion matrix of the evaluation. + # Only set for the overall model evaluation, not for evaluation of a single + # annotation spec. + class TextSentimentEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb new file mode 100644 index 000000000000..b41617bc0ea1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.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 AutoML + module V1 + # Dataset metadata that is specific to translation. + # @!attribute [rw] source_language_code + # @return [::String] + # Required. The BCP-47 language code of the source language. + # @!attribute [rw] target_language_code + # @return [::String] + # Required. The BCP-47 language code of the target language. + class TranslationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluation metrics for the dataset. + # @!attribute [rw] bleu_score + # @return [::Float] + # Output only. BLEU score. + # @!attribute [rw] base_bleu_score + # @return [::Float] + # Output only. BLEU score for base model. + class TranslationEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to translation. + # @!attribute [rw] base_model + # @return [::String] + # The resource name of the model to use as a baseline to train the custom + # model. If unset, we use the default base model provided by Google + # Translate. Format: + # `projects/{project_id}/locations/{location_id}/models/{model_id}` + # @!attribute [rw] source_language_code + # @return [::String] + # Output only. Inferred from the dataset. + # The source language (The BCP-47 language code) that is used for training. + # @!attribute [rw] target_language_code + # @return [::String] + # Output only. The target language (The BCP-47 language code) that is used + # for training. + class TranslationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation details specific to translation. + # @!attribute [rw] translated_content + # @return [::Google::Cloud::AutoML::V1::TextSnippet] + # Output only . The translated content. + class TranslationAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile new file mode 100644 index 000000000000..a30bcdf1095a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1", path: "../" +else + gem "google-cloud-automl-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-automl-v1/snippets/automl/create_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb new file mode 100644 index 000000000000..b5039ab44d72 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.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 automl_v1_generated_AutoML_CreateDataset_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the create_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#create_dataset. +# +def create_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new + + # Call the create_dataset method. + result = client.create_dataset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb new file mode 100644 index 000000000000..5d3c31c2a84e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.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 automl_v1_generated_AutoML_CreateModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the create_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#create_model. +# +def create_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::CreateModelRequest.new + + # Call the create_model method. + result = client.create_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb new file mode 100644 index 000000000000..5d9f3bddfa4c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.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 automl_v1_generated_AutoML_DeleteDataset_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the delete_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset. +# +def delete_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new + + # Call the delete_dataset method. + result = client.delete_dataset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb new file mode 100644 index 000000000000..31d572dc4ae4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.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 automl_v1_generated_AutoML_DeleteModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the delete_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#delete_model. +# +def delete_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::DeleteModelRequest.new + + # Call the delete_model method. + result = client.delete_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb new file mode 100644 index 000000000000..6bf6b9d1894a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.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 automl_v1_generated_AutoML_DeployModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the deploy_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#deploy_model. +# +def deploy_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::DeployModelRequest.new + + # Call the deploy_model method. + result = client.deploy_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_DeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb new file mode 100644 index 000000000000..0c6ccde37676 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.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 automl_v1_generated_AutoML_ExportData_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the export_data call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#export_data. +# +def export_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ExportDataRequest.new + + # Call the export_data method. + result = client.export_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_ExportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb new file mode 100644 index 000000000000..a8d8b903e76d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.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 automl_v1_generated_AutoML_ExportModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the export_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#export_model. +# +def export_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ExportModelRequest.new + + # Call the export_model method. + result = client.export_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_ExportModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb new file mode 100644 index 000000000000..1370dd7f6de2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_GetAnnotationSpec_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the get_annotation_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec. +# +def get_annotation_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new + + # Call the get_annotation_spec method. + result = client.get_annotation_spec request + + # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. + p result +end +# [END automl_v1_generated_AutoML_GetAnnotationSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb new file mode 100644 index 000000000000..653b941b6763 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_GetDataset_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the get_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#get_dataset. +# +def get_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::GetDatasetRequest.new + + # Call the get_dataset method. + result = client.get_dataset request + + # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + p result +end +# [END automl_v1_generated_AutoML_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb new file mode 100644 index 000000000000..3cfec8bd9f5b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_GetModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the get_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#get_model. +# +def get_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::GetModelRequest.new + + # Call the get_model method. + result = client.get_model request + + # The returned object is of type Google::Cloud::AutoML::V1::Model. + p result +end +# [END automl_v1_generated_AutoML_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb new file mode 100644 index 000000000000..66b9f5107d85 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_GetModelEvaluation_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the get_model_evaluation call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation. +# +def get_model_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new + + # Call the get_model_evaluation method. + result = client.get_model_evaluation request + + # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. + p result +end +# [END automl_v1_generated_AutoML_GetModelEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb new file mode 100644 index 000000000000..69bb6c83c5dc --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.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 automl_v1_generated_AutoML_ImportData_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the import_data call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#import_data. +# +def import_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ImportDataRequest.new + + # Call the import_data method. + result = client.import_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_ImportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb new file mode 100644 index 000000000000..c5a76dbcd997 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.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 automl_v1_generated_AutoML_ListDatasets_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the list_datasets call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#list_datasets. +# +def list_datasets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new + + # Call the list_datasets method. + result = client.list_datasets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. + p item + end +end +# [END automl_v1_generated_AutoML_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb new file mode 100644 index 000000000000..c9798178e36c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.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 automl_v1_generated_AutoML_ListModelEvaluations_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the list_model_evaluations call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations. +# +def list_model_evaluations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new + + # Call the list_model_evaluations method. + result = client.list_model_evaluations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. + p item + end +end +# [END automl_v1_generated_AutoML_ListModelEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb new file mode 100644 index 000000000000..9b3102e77406 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.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 automl_v1_generated_AutoML_ListModels_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the list_models call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#list_models. +# +def list_models + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ListModelsRequest.new + + # Call the list_models method. + result = client.list_models request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1::Model. + p item + end +end +# [END automl_v1_generated_AutoML_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb new file mode 100644 index 000000000000..9044e6b31e6d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.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 automl_v1_generated_AutoML_UndeployModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the undeploy_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model. +# +def undeploy_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::UndeployModelRequest.new + + # Call the undeploy_model method. + result = client.undeploy_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_UndeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb new file mode 100644 index 000000000000..097b11573307 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_UpdateDataset_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the update_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#update_dataset. +# +def update_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new + + # Call the update_dataset method. + result = client.update_dataset request + + # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + p result +end +# [END automl_v1_generated_AutoML_UpdateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb new file mode 100644 index 000000000000..8b945e7f28c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_UpdateModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the update_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#update_model. +# +def update_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::UpdateModelRequest.new + + # Call the update_model method. + result = client.update_model request + + # The returned object is of type Google::Cloud::AutoML::V1::Model. + p result +end +# [END automl_v1_generated_AutoML_UpdateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb new file mode 100644 index 000000000000..97f5c94f0b1a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.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 automl_v1_generated_PredictionService_BatchPredict_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the batch_predict call in the PredictionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict. +# +def batch_predict + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::PredictionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::BatchPredictRequest.new + + # Call the batch_predict method. + result = client.batch_predict request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_PredictionService_BatchPredict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb new file mode 100644 index 000000000000..bc742b1e85e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_PredictionService_Predict_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the predict call in the PredictionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::PredictionService::Client#predict. +# +def predict + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::PredictionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::PredictRequest.new + + # Call the predict method. + result = client.predict request + + # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. + p result +end +# [END automl_v1_generated_PredictionService_Predict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json b/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json new file mode 100644 index 000000000000..96e1da944c03 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json @@ -0,0 +1,815 @@ +{ + "client_library": { + "name": "google-cloud-automl-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.automl.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "automl_v1_generated_PredictionService_Predict_sync", + "title": "Snippet for the predict call in the PredictionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::PredictionService::Client#predict.", + "file": "prediction_service/predict.rb", + "language": "RUBY", + "client_method": { + "short_name": "predict", + "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client#predict", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::PredictRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::PredictResponse", + "client": { + "short_name": "PredictionService::Client", + "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client" + }, + "method": { + "short_name": "Predict", + "full_name": "google.cloud.automl.v1.PredictionService.Predict", + "service": { + "short_name": "PredictionService", + "full_name": "google.cloud.automl.v1.PredictionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_PredictionService_BatchPredict_sync", + "title": "Snippet for the batch_predict call in the PredictionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict.", + "file": "prediction_service/batch_predict.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_predict", + "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::BatchPredictRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PredictionService::Client", + "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client" + }, + "method": { + "short_name": "BatchPredict", + "full_name": "google.cloud.automl.v1.PredictionService.BatchPredict", + "service": { + "short_name": "PredictionService", + "full_name": "google.cloud.automl.v1.PredictionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_CreateDataset_sync", + "title": "Snippet for the create_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#create_dataset.", + "file": "automl/create_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_dataset", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#create_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::CreateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "CreateDataset", + "full_name": "google.cloud.automl.v1.AutoMl.CreateDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_GetDataset_sync", + "title": "Snippet for the get_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_dataset.", + "file": "automl/get_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dataset", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::GetDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::Dataset", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "GetDataset", + "full_name": "google.cloud.automl.v1.AutoMl.GetDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ListDatasets_sync", + "title": "Snippet for the list_datasets call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_datasets.", + "file": "automl/list_datasets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_datasets", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ListDatasetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::ListDatasetsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ListDatasets", + "full_name": "google.cloud.automl.v1.AutoMl.ListDatasets", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_UpdateDataset_sync", + "title": "Snippet for the update_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#update_dataset.", + "file": "automl/update_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_dataset", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#update_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::UpdateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::Dataset", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "UpdateDataset", + "full_name": "google.cloud.automl.v1.AutoMl.UpdateDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_DeleteDataset_sync", + "title": "Snippet for the delete_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset.", + "file": "automl/delete_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_dataset", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::DeleteDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "DeleteDataset", + "full_name": "google.cloud.automl.v1.AutoMl.DeleteDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ImportData_sync", + "title": "Snippet for the import_data call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#import_data.", + "file": "automl/import_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_data", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#import_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ImportDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ImportData", + "full_name": "google.cloud.automl.v1.AutoMl.ImportData", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ExportData_sync", + "title": "Snippet for the export_data call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#export_data.", + "file": "automl/export_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_data", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#export_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ExportDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ExportData", + "full_name": "google.cloud.automl.v1.AutoMl.ExportData", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_GetAnnotationSpec_sync", + "title": "Snippet for the get_annotation_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec.", + "file": "automl/get_annotation_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_annotation_spec", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::AnnotationSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "GetAnnotationSpec", + "full_name": "google.cloud.automl.v1.AutoMl.GetAnnotationSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_CreateModel_sync", + "title": "Snippet for the create_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#create_model.", + "file": "automl/create_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#create_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::CreateModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "CreateModel", + "full_name": "google.cloud.automl.v1.AutoMl.CreateModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_GetModel_sync", + "title": "Snippet for the get_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_model.", + "file": "automl/get_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::GetModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::Model", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "GetModel", + "full_name": "google.cloud.automl.v1.AutoMl.GetModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ListModels_sync", + "title": "Snippet for the list_models call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_models.", + "file": "automl/list_models.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_models", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_models", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ListModelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::ListModelsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ListModels", + "full_name": "google.cloud.automl.v1.AutoMl.ListModels", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_DeleteModel_sync", + "title": "Snippet for the delete_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#delete_model.", + "file": "automl/delete_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#delete_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::DeleteModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "DeleteModel", + "full_name": "google.cloud.automl.v1.AutoMl.DeleteModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_UpdateModel_sync", + "title": "Snippet for the update_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#update_model.", + "file": "automl/update_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#update_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::UpdateModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::Model", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "UpdateModel", + "full_name": "google.cloud.automl.v1.AutoMl.UpdateModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_DeployModel_sync", + "title": "Snippet for the deploy_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#deploy_model.", + "file": "automl/deploy_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "deploy_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#deploy_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::DeployModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "DeployModel", + "full_name": "google.cloud.automl.v1.AutoMl.DeployModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_UndeployModel_sync", + "title": "Snippet for the undeploy_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model.", + "file": "automl/undeploy_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "undeploy_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::UndeployModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "UndeployModel", + "full_name": "google.cloud.automl.v1.AutoMl.UndeployModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ExportModel_sync", + "title": "Snippet for the export_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#export_model.", + "file": "automl/export_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#export_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ExportModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ExportModel", + "full_name": "google.cloud.automl.v1.AutoMl.ExportModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_GetModelEvaluation_sync", + "title": "Snippet for the get_model_evaluation call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation.", + "file": "automl/get_model_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_model_evaluation", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::GetModelEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::ModelEvaluation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "GetModelEvaluation", + "full_name": "google.cloud.automl.v1.AutoMl.GetModelEvaluation", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ListModelEvaluations_sync", + "title": "Snippet for the list_model_evaluations call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations.", + "file": "automl/list_model_evaluations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_model_evaluations", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ListModelEvaluations", + "full_name": "google.cloud.automl.v1.AutoMl.ListModelEvaluations", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "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-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb new file mode 100644 index 000000000000..856cda1fb3b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_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/automl/v1/service_pb" +require "google/cloud/automl/v1/service_services_pb" +require "google/cloud/automl/v1/automl" + +class ::Google::Cloud::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb new file mode 100644 index 000000000000..be60ed069bd5 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_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/automl/v1/automl" + +class ::Google::Cloud::AutoML::V1::AutoML::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_annotation_spec_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.annotation_spec_path project: "value0", location: "value1", dataset: "value2", annotation_spec: "value3" + assert_equal "projects/value0/locations/value1/datasets/value2/annotationSpecs/value3", path + end + end + + def test_dataset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project: "value0", location: "value1", dataset: "value2" + assert_equal "projects/value0/locations/value1/datasets/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::AutoML::V1::AutoML::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_model_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end + + def test_model_evaluation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_evaluation_path project: "value0", location: "value1", model: "value2", model_evaluation: "value3" + assert_equal "projects/value0/locations/value1/models/value2/modelEvaluations/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb new file mode 100644 index 000000000000..433cd2fb25dd --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb @@ -0,0 +1,1088 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/automl/v1/service_pb" +require "google/cloud/automl/v1/automl/rest" + + +class ::Google::Cloud::AutoML::V1::AutoML::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_dataset + # Create test objects. + 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" + dataset = {} + + create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_dataset parent: parent, dataset: dataset do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_dataset ::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_dataset(::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_dataset_client_stub.call_count + end + end + end + + def test_get_dataset + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_dataset ::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_dataset(::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dataset_client_stub.call_count + end + end + end + + def test_list_datasets + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.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_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_datasets({ 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_datasets 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_datasets ::Google::Cloud::AutoML::V1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::AutoML::V1::ListDatasetsRequest.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_datasets_client_stub.call_count + end + end + end + + def test_update_dataset + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + dataset = {} + update_mask = {} + + update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_dataset({ dataset: dataset, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_dataset dataset: dataset, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_dataset ::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_dataset({ dataset: dataset, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_dataset(::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_dataset_client_stub.call_count + end + end + end + + def test_delete_dataset + # Create test objects. + 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_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_dataset ::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_dataset(::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_dataset_client_stub.call_count + end + end + end + + def test_import_data + # Create test objects. + 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" + input_config = {} + + import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_data_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.import_data({ name: name, input_config: input_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.import_data name: name, input_config: input_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.import_data ::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.import_data({ name: name, input_config: input_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.import_data(::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_data_client_stub.call_count + end + end + end + + def test_export_data + # Create test objects. + 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" + output_config = {} + + export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_data_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.export_data({ name: name, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.export_data name: name, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.export_data ::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.export_data({ name: name, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.export_data(::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_data_client_stub.call_count + end + end + end + + def test_get_annotation_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::AnnotationSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_annotation_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_annotation_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_annotation_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_annotation_spec({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_annotation_spec name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_annotation_spec ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_annotation_spec({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_annotation_spec(::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_annotation_spec_client_stub.call_count + end + end + end + + def test_create_model + # Create test objects. + 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" + model = {} + + create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_model({ parent: parent, model: model }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_model parent: parent, model: model do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_model ::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_model({ parent: parent, model: model }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_model(::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_model_client_stub.call_count + end + end + end + + def test_get_model + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::Model.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_model ::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_model(::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_model_client_stub.call_count + end + end + end + + def test_list_models + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::ListModelsResponse.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_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_models_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_models({ 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_models 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_models ::Google::Cloud::AutoML::V1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::AutoML::V1::ListModelsRequest.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_models_client_stub.call_count + end + end + end + + def test_delete_model + # Create test objects. + 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_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_model ::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_model(::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_model_client_stub.call_count + end + end + end + + def test_update_model + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::Model.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + model = {} + update_mask = {} + + update_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_update_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_model({ model: model, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_model model: model, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_model ::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_model({ model: model, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_model(::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_model_client_stub.call_count + end + end + end + + def test_deploy_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + image_object_detection_model_deployment_metadata = {} + name = "hello world" + + deploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_deploy_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, deploy_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.deploy_model ::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.deploy_model(::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, deploy_model_client_stub.call_count + end + end + end + + def test_undeploy_model + # Create test objects. + 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" + + undeploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_undeploy_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undeploy_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.undeploy_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.undeploy_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.undeploy_model ::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.undeploy_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.undeploy_model(::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undeploy_model_client_stub.call_count + end + end + end + + def test_export_model + # Create test objects. + 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" + output_config = {} + + export_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_export_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.export_model({ name: name, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.export_model name: name, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.export_model ::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.export_model({ name: name, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.export_model(::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_model_client_stub.call_count + end + end + end + + def test_get_model_evaluation + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::ModelEvaluation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_model_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_model_evaluation_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_model_evaluation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_model_evaluation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_model_evaluation ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_model_evaluation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_model_evaluation(::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_model_evaluation_client_stub.call_count + end + end + end + + def test_list_model_evaluations + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.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_model_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_model_evaluations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_model_evaluations_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_model_evaluations({ 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_model_evaluations 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_model_evaluations ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.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_model_evaluations({ 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_model_evaluations(::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.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_model_evaluations_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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb new file mode 100644 index 000000000000..a8f7d67c1702 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb @@ -0,0 +1,1257 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/automl/v1/service_pb" +require "google/cloud/automl/v1/automl" + +class ::Google::Cloud::AutoML::V1::AutoML::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_dataset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + dataset = {} + + create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1::CreateDatasetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Dataset), request["dataset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_dataset({ parent: parent, dataset: dataset }) do |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_dataset parent: parent, dataset: dataset do |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_dataset ::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| + 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_dataset({ parent: parent, dataset: dataset }, grpc_options) do |response, operation| + 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_dataset(::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| + assert_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_dataset_client_stub.call_rpc_count + end + end + + def test_get_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1::GetDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_dataset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_dataset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_dataset ::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_dataset({ 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_dataset(::Google::Cloud::AutoML::V1::GetDatasetRequest.new(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_dataset_client_stub.call_rpc_count + end + end + + def test_list_datasets + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_datasets, name + assert_kind_of ::Google::Cloud::AutoML::V1::ListDatasetsRequest, 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_datasets_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_datasets({ 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_datasets 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_datasets ::Google::Cloud::AutoML::V1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::AutoML::V1::ListDatasetsRequest.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_datasets_client_stub.call_rpc_count + end + end + + def test_update_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + dataset = {} + update_mask = {} + + update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1::UpdateDatasetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Dataset), request["dataset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_dataset({ dataset: dataset, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_dataset dataset: dataset, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_dataset ::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, 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_dataset({ dataset: dataset, 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_dataset(::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, 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_dataset_client_stub.call_rpc_count + end + end + + def test_delete_dataset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1::DeleteDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_dataset({ 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_dataset 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_dataset ::Google::Cloud::AutoML::V1::DeleteDatasetRequest.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_dataset({ 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_dataset(::Google::Cloud::AutoML::V1::DeleteDatasetRequest.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_dataset_client_stub.call_rpc_count + end + end + + def test_import_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + + import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_data, name + assert_kind_of ::Google::Cloud::AutoML::V1::ImportDataRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::InputConfig), request["input_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_data_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.import_data({ name: name, input_config: input_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.import_data name: name, input_config: input_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.import_data ::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_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.import_data({ name: name, input_config: input_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.import_data(::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_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, import_data_client_stub.call_rpc_count + end + end + + def test_export_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_data, name + assert_kind_of ::Google::Cloud::AutoML::V1::ExportDataRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::OutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_data_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.export_data({ name: name, 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.export_data name: name, 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.export_data ::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, 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.export_data({ name: name, 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.export_data(::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_data_client_stub.call_rpc_count + end + end + + def test_get_annotation_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::AnnotationSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_annotation_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_annotation_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_annotation_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_annotation_spec({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_annotation_spec name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_annotation_spec ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_annotation_spec({ 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_annotation_spec(::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(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_annotation_spec_client_stub.call_rpc_count + end + end + + def test_create_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + model = {} + + create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::CreateModelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Model), request["model"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_model({ parent: parent, model: model }) do |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_model parent: parent, model: model do |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_model ::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model) do |response, operation| + 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_model({ parent: parent, model: model }, grpc_options) do |response, operation| + 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_model(::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| + assert_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_model_client_stub.call_rpc_count + end + end + + def test_get_model + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::Model.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::GetModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_model({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_model name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_model ::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_model({ 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_model(::Google::Cloud::AutoML::V1::GetModelRequest.new(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_model_client_stub.call_rpc_count + end + end + + def test_list_models + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::ListModelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_models, name + assert_kind_of ::Google::Cloud::AutoML::V1::ListModelsRequest, 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_models_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_models({ 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_models 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_models ::Google::Cloud::AutoML::V1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::AutoML::V1::ListModelsRequest.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_models_client_stub.call_rpc_count + end + end + + def test_delete_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::DeleteModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_model({ 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_model 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_model ::Google::Cloud::AutoML::V1::DeleteModelRequest.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_model({ 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_model(::Google::Cloud::AutoML::V1::DeleteModelRequest.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_model_client_stub.call_rpc_count + end + end + + def test_update_model + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::Model.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + model = {} + update_mask = {} + + update_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::UpdateModelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Model), request["model"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_model({ model: model, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_model model: model, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_model ::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, 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_model({ model: model, 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_model(::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, 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_model_client_stub.call_rpc_count + end + end + + def test_deploy_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + image_object_detection_model_deployment_metadata = {} + name = "hello world" + + deploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :deploy_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::DeployModelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata), request["image_object_detection_model_deployment_metadata"] + assert_equal :image_object_detection_model_deployment_metadata, request.model_deployment_metadata + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, deploy_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model ::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model(::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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, deploy_model_client_stub.call_rpc_count + end + end + + def test_undeploy_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undeploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undeploy_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::UndeployModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undeploy_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.undeploy_model({ 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.undeploy_model 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.undeploy_model ::Google::Cloud::AutoML::V1::UndeployModelRequest.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.undeploy_model({ 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.undeploy_model(::Google::Cloud::AutoML::V1::UndeployModelRequest.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, undeploy_model_client_stub.call_rpc_count + end + end + + def test_export_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::ExportModelRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ModelExportOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.export_model({ name: name, 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.export_model name: name, 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.export_model ::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, 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.export_model({ name: name, 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.export_model(::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_model_client_stub.call_rpc_count + end + end + + def test_get_model_evaluation + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::ModelEvaluation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_model_evaluation, name + assert_kind_of ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_model_evaluation_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_model_evaluation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_model_evaluation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_model_evaluation ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_model_evaluation({ 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_model_evaluation(::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(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_model_evaluation_client_stub.call_rpc_count + end + end + + def test_list_model_evaluations + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_model_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_model_evaluations, name + assert_kind_of ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, 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_model_evaluations_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_model_evaluations({ 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_model_evaluations 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_model_evaluations ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.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_model_evaluations({ 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_model_evaluations(::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.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_model_evaluations_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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::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::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb new file mode 100644 index 000000000000..7cc57a046005 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_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/automl/v1/prediction_service_pb" +require "google/cloud/automl/v1/prediction_service_services_pb" +require "google/cloud/automl/v1/prediction_service" + +class ::Google::Cloud::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb new file mode 100644 index 000000000000..f5f666866b67 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_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/automl/v1/prediction_service" + +class ::Google::Cloud::AutoML::V1::PredictionService::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_model_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb new file mode 100644 index 000000000000..5a2ef57b39ce --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/automl/v1/prediction_service_pb" +require "google/cloud/automl/v1/prediction_service/rest" + + +class ::Google::Cloud::AutoML::V1::PredictionService::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_predict + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::PredictResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + params = {} + + predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.stub :transcode_predict_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, predict_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.predict({ name: name, payload: payload, params: params }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.predict name: name, payload: payload, params: params do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.predict ::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.predict({ name: name, payload: payload, params: params }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.predict(::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, predict_client_stub.call_count + end + end + end + + def test_batch_predict + # Create test objects. + 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" + input_config = {} + output_config = {} + params = {} + + batch_predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.stub :transcode_batch_predict_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_predict_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_predict ::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_predict(::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_predict_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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb new file mode 100644 index 000000000000..74ff6f3b9cb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb @@ -0,0 +1,249 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/automl/v1/prediction_service_pb" +require "google/cloud/automl/v1/prediction_service" + +class ::Google::Cloud::AutoML::V1::PredictionService::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_predict + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::PredictResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + params = {} + + predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :predict, name + assert_kind_of ::Google::Cloud::AutoML::V1::PredictRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ExamplePayload), request["payload"] + assert_equal({}, request["params"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, predict_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.predict({ name: name, payload: payload, params: params }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.predict name: name, payload: payload, params: params do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.predict ::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.predict({ name: name, payload: payload, params: params }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.predict(::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, predict_client_stub.call_rpc_count + end + end + + def test_batch_predict + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + output_config = {} + params = {} + + batch_predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_predict, name + assert_kind_of ::Google::Cloud::AutoML::V1::BatchPredictRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::BatchPredictInputConfig), request["input_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::BatchPredictOutputConfig), request["output_config"] + assert_equal({}, request["params"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_predict_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |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_predict name: name, input_config: input_config, output_config: output_config, params: params do |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_predict ::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |response, operation| + 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_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, grpc_options) do |response, operation| + 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_predict(::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), grpc_options) do |response, operation| + assert_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_predict_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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/helper.rb b/owl-bot-staging/google-cloud-automl-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/.gitignore b/owl-bot-staging/google-cloud-automl-v1beta1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..4b715a4588d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json @@ -0,0 +1,20 @@ +{ + "api_id": "automl.googleapis.com", + "api_shortname": "automl", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest", + "distribution_name": "google-cloud-automl-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "automl", + "name_pretty": "Cloud AutoML V1beta1 API", + "product_documentation": "https://cloud.google.com/automl", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details.", + "ruby-cloud-env-prefix": "AUTOML", + "ruby-cloud-product-url": "https://cloud.google.com/automl", + "ruby-cloud-path-override": "auto_ml=automl", + "ruby-cloud-namespace-override": "AutoMl=AutoML;Automl=AutoML", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..bf48a3e31581 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-automl-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-automl-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/.yardopts b/owl-bot-staging/google-cloud-automl-v1beta1/.yardopts new file mode 100644 index 000000000000..0e8b7f5e7acd --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud AutoML 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-automl-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..038f994f5360 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-automl-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-automl-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/automl/v1beta1" + +client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/automl/v1beta1" + +::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AutoML::V1beta1::PredictionService::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-automl-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/automl/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AutoML::V1beta1::PredictionService::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-automl-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/Gemfile b/owl-bot-staging/google-cloud-automl-v1beta1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/README.md b/owl-bot-staging/google-cloud-automl-v1beta1/README.md new file mode 100644 index 000000000000..4ef8c795fee3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud AutoML V1beta1 API + +Train high-quality custom machine learning models with minimum effort and machine learning expertise. + +AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. + +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 AutoML V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-automl](https://rubygems.org/gems/google-cloud-automl). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-automl-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/automl.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/automl/v1beta1" + +client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new +request = ::Google::Cloud::AutoML::V1beta1::PredictRequest.new # (request fields as keyword arguments...) +response = client.predict request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/automl) +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/automl/v1beta1" +require "logger" + +client = ::Google::Cloud::AutoML::V1beta1::PredictionService::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-automl`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-automl-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-automl`. +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-automl-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-automl-v1beta1/Rakefile b/owl-bot-staging/google-cloud-automl-v1beta1/Rakefile new file mode 100644 index 000000000000..0809ccb14b35 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["AUTOML_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["AUTOML_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["AUTOML_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 AUTOML_TEST_PROJECT=test123 AUTOML_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/automl/v1beta1/prediction_service/credentials" + ::Google::Cloud::AutoML::V1beta1::PredictionService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["AUTOML_PROJECT"] = project + ENV["AUTOML_TEST_PROJECT"] = project + ENV["AUTOML_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-automl-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-automl-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-automl-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-automl-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-automl-v1beta1" + header "google-cloud-automl-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-automl-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-automl-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-automl-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-automl-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-automl-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..ebf069d33f8d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json @@ -0,0 +1,157 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.automl.v1beta1", + "libraryPackage": "::Google::Cloud::AutoML::V1beta1", + "services": { + "PredictionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client", + "rpcs": { + "Predict": { + "methods": [ + "predict" + ] + }, + "BatchPredict": { + "methods": [ + "batch_predict" + ] + } + } + } + } + }, + "AutoMl": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AutoML::V1beta1::AutoML::Client", + "rpcs": { + "CreateDataset": { + "methods": [ + "create_dataset" + ] + }, + "GetDataset": { + "methods": [ + "get_dataset" + ] + }, + "ListDatasets": { + "methods": [ + "list_datasets" + ] + }, + "UpdateDataset": { + "methods": [ + "update_dataset" + ] + }, + "DeleteDataset": { + "methods": [ + "delete_dataset" + ] + }, + "ImportData": { + "methods": [ + "import_data" + ] + }, + "ExportData": { + "methods": [ + "export_data" + ] + }, + "GetAnnotationSpec": { + "methods": [ + "get_annotation_spec" + ] + }, + "GetTableSpec": { + "methods": [ + "get_table_spec" + ] + }, + "ListTableSpecs": { + "methods": [ + "list_table_specs" + ] + }, + "UpdateTableSpec": { + "methods": [ + "update_table_spec" + ] + }, + "GetColumnSpec": { + "methods": [ + "get_column_spec" + ] + }, + "ListColumnSpecs": { + "methods": [ + "list_column_specs" + ] + }, + "UpdateColumnSpec": { + "methods": [ + "update_column_spec" + ] + }, + "CreateModel": { + "methods": [ + "create_model" + ] + }, + "GetModel": { + "methods": [ + "get_model" + ] + }, + "ListModels": { + "methods": [ + "list_models" + ] + }, + "DeleteModel": { + "methods": [ + "delete_model" + ] + }, + "DeployModel": { + "methods": [ + "deploy_model" + ] + }, + "UndeployModel": { + "methods": [ + "undeploy_model" + ] + }, + "ExportModel": { + "methods": [ + "export_model" + ] + }, + "ExportEvaluatedExamples": { + "methods": [ + "export_evaluated_examples" + ] + }, + "GetModelEvaluation": { + "methods": [ + "get_model_evaluation" + ] + }, + "ListModelEvaluations": { + "methods": [ + "list_model_evaluations" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec b/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec new file mode 100644 index 000000000000..eddcd83e44d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/automl/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-automl-v1beta1" + gem.version = Google::Cloud::AutoML::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details." + gem.summary = "Train high-quality custom machine learning models with minimum effort and machine learning expertise." + 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-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb new file mode 100644 index 000000000000..ac7d092bf31e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-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/automl/v1beta1" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb new file mode 100644 index 000000000000..78a600ce0c87 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/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/automl/v1beta1/prediction_service" +require "google/cloud/automl/v1beta1/automl" +require "google/cloud/automl/v1beta1/version" + +module Google + module Cloud + module AutoML + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/automl/v1beta1" + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/automl/v1beta1" + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + module V1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/automl/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb new file mode 100644 index 000000000000..c031b6200be1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/annotation_payload.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/classification_pb' +require 'google/cloud/automl/v1beta1/detection_pb' +require 'google/cloud/automl/v1beta1/tables_pb' +require 'google/cloud/automl/v1beta1/text_extraction_pb' +require 'google/cloud/automl/v1beta1/text_sentiment_pb' +require 'google/cloud/automl/v1beta1/translation_pb' + + +descriptor_data = "\n4google/cloud/automl/v1beta1/annotation_payload.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\"\xe6\x05\n\x11\x41nnotationPayload\x12I\n\x0btranslation\x18\x02 \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TranslationAnnotationH\x00\x12O\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotationH\x00\x12]\n\x16image_object_detection\x18\x04 \x01(\x0b\x32;.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationH\x00\x12Z\n\x14video_classification\x18\t \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoClassificationAnnotationH\x00\x12[\n\x15video_object_tracking\x18\x08 \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationH\x00\x12P\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TextExtractionAnnotationH\x00\x12N\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.TextSentimentAnnotationH\x00\x12?\n\x06tables\x18\n \x01(\x0b\x32-.google.cloud.automl.v1beta1.TablesAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + AnnotationPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.AnnotationPayload").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb new file mode 100644 index 000000000000..85b08ebdfc7b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/annotation_spec.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n1google/cloud/automl/v1beta1/annotation_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + AnnotationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.AnnotationSpec").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb new file mode 100644 index 000000000000..3e41d90e7a98 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.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/automl/v1beta1/version" + +require "google/cloud/automl/v1beta1/automl/credentials" +require "google/cloud/automl/v1beta1/automl/paths" +require "google/cloud/automl/v1beta1/automl/operations" +require "google/cloud/automl/v1beta1/automl/client" +require "google/cloud/automl/v1beta1/automl/rest" + +module Google + module Cloud + module AutoML + module V1beta1 + ## + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/automl/v1beta1/automl" + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/automl/v1beta1/automl/rest" + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + module AutoML + end + end + end + end +end + +helper_path = ::File.join __dir__, "automl", "helpers.rb" +require "google/cloud/automl/v1beta1/automl/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb new file mode 100644 index 000000000000..9c7504318c76 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb @@ -0,0 +1,2985 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/automl/v1beta1/service_pb" + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + ## + # Client for the AutoMl service. + # + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :auto_ml_stub + + ## + # Configure the AutoMl Client class. + # + # See {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutoMl clients + # ::Google::Cloud::AutoML::V1beta1::AutoML::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", "AutoML", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_dataset.timeout = 5.0 + + default_config.rpcs.get_dataset.timeout = 5.0 + default_config.rpcs.get_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_datasets.timeout = 5.0 + default_config.rpcs.list_datasets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_dataset.timeout = 5.0 + + default_config.rpcs.delete_dataset.timeout = 5.0 + default_config.rpcs.delete_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.import_data.timeout = 5.0 + + default_config.rpcs.export_data.timeout = 5.0 + + default_config.rpcs.get_annotation_spec.timeout = 5.0 + default_config.rpcs.get_annotation_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_table_spec.timeout = 5.0 + default_config.rpcs.get_table_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_table_specs.timeout = 5.0 + default_config.rpcs.list_table_specs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_table_spec.timeout = 5.0 + + default_config.rpcs.get_column_spec.timeout = 5.0 + default_config.rpcs.get_column_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_column_specs.timeout = 5.0 + default_config.rpcs.list_column_specs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_column_spec.timeout = 5.0 + + default_config.rpcs.create_model.timeout = 5.0 + + default_config.rpcs.get_model.timeout = 5.0 + default_config.rpcs.get_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_models.timeout = 5.0 + default_config.rpcs.list_models.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_model.timeout = 5.0 + default_config.rpcs.delete_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.deploy_model.timeout = 5.0 + + default_config.rpcs.undeploy_model.timeout = 5.0 + + default_config.rpcs.export_model.timeout = 5.0 + + default_config.rpcs.export_evaluated_examples.timeout = 5.0 + + default_config.rpcs.get_model_evaluation.timeout = 5.0 + default_config.rpcs.get_model_evaluation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_model_evaluations.timeout = 5.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutoMl 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::AutoML::V1beta1::AutoML::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 + @auto_ml_stub.universe_domain + end + + ## + # Create a new AutoMl client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutoMl 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/automl/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 + + @auto_ml_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AutoML::V1beta1::AutoMl::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 + ) + + @auto_ml_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::AutoML::V1beta1::AutoML::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @auto_ml_stub.logger + end + + # Service calls + + ## + # Creates a dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_dataset(parent: nil, dataset: nil) + # Pass arguments to `create_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 create the dataset for. + # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] + # Required. The dataset to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new + # + # # Call the create_dataset method. + # result = client.create_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def create_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest + + # Converts hash and nil to 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :create_dataset, request, 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 dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_dataset(name: nil) + # Pass arguments to `get_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def get_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_dataset, request, 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 datasets in a project. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 from which to list datasets. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of + # using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new + # + # # Call the list_datasets method. + # result = client.list_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. + # p item + # end + # + def list_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_datasets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_datasets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_datasets, request, response, 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 dataset. + # + # @overload update_dataset(request, options = nil) + # Pass arguments to `update_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_dataset(dataset: nil, update_mask: nil) + # Pass arguments to `update_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] + # Required. The dataset which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new + # + # # Call the update_dataset method. + # result = client.update_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def update_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest + + # Converts hash and nil to 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.dataset&.name + header_params["dataset.name"] = request.dataset.name + end + + request_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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :update_dataset, request, 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 dataset and all of its contents. + # Returns empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_dataset(name: nil) + # Pass arguments to `delete_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new + # + # # Call the delete_dataset method. + # result = client.delete_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest + + # Converts hash and nil to 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :delete_dataset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version} + # parameter must be explicitly set. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload import_data(request, options = nil) + # Pass arguments to `import_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_data(name: nil, input_config: nil) + # Pass arguments to `import_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash] + # Required. The desired input location and its domain specific semantics, + # if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new + # + # # Call the import_data method. + # result = client.import_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.import_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :import_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_data(request, options = nil) + # Pass arguments to `export_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_data(name: nil, output_config: nil) + # Pass arguments to `export_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset. + # @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash] + # Required. The desired output location. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new + # + # # Call the export_data method. + # result = client.export_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.export_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :export_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 annotation spec. + # + # @overload get_annotation_spec(request, options = nil) + # Pass arguments to `get_annotation_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_annotation_spec(name: nil) + # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 annotation spec to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new + # + # # Call the get_annotation_spec method. + # result = client.get_annotation_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. + # p result + # + def get_annotation_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_annotation_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_annotation_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_annotation_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_annotation_spec, request, 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 table spec. + # + # @overload get_table_spec(request, options = nil) + # Pass arguments to `get_table_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_table_spec(name: nil, field_mask: nil) + # Pass arguments to `get_table_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 table spec to retrieve. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new + # + # # Call the get_table_spec method. + # result = client.get_table_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + # p result + # + def get_table_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_table_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_table_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_table_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_table_spec, request, 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 table specs in a dataset. + # + # @overload list_table_specs(request, options = nil) + # Pass arguments to `list_table_specs` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_table_specs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset to list table specs from. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @param filter [::String] + # Filter expression, see go/filtering. + # @param page_size [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new + # + # # Call the list_table_specs method. + # result = client.list_table_specs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. + # p item + # end + # + def list_table_specs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_table_specs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_table_specs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_table_specs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_table_specs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_table_specs, request, response, 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 table spec. + # + # @overload update_table_spec(request, options = nil) + # Pass arguments to `update_table_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_table_spec(table_spec: nil, update_mask: nil) + # Pass arguments to `update_table_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash] + # Required. The table spec which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new + # + # # Call the update_table_spec method. + # result = client.update_table_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + # p result + # + def update_table_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest + + # Converts hash and nil to 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_table_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.table_spec&.name + header_params["table_spec.name"] = request.table_spec.name + end + + request_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_table_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_table_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :update_table_spec, request, 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 column spec. + # + # @overload get_column_spec(request, options = nil) + # Pass arguments to `get_column_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_column_spec(name: nil, field_mask: nil) + # Pass arguments to `get_column_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 column spec to retrieve. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new + # + # # Call the get_column_spec method. + # result = client.get_column_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p result + # + def get_column_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_column_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_column_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_column_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_column_spec, request, 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 column specs in a table spec. + # + # @overload list_column_specs(request, options = nil) + # Pass arguments to `list_column_specs` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_column_specs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 table spec to list column specs from. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @param filter [::String] + # Filter expression, see go/filtering. + # @param page_size [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new + # + # # Call the list_column_specs method. + # result = client.list_column_specs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p item + # end + # + def list_column_specs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_column_specs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_column_specs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_column_specs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_column_specs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_column_specs, request, response, 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 column spec. + # + # @overload update_column_spec(request, options = nil) + # Pass arguments to `update_column_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_column_spec(column_spec: nil, update_mask: nil) + # Pass arguments to `update_column_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash] + # Required. The column spec which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new + # + # # Call the update_column_spec method. + # result = client.update_column_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p result + # + def update_column_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest + + # Converts hash and nil to 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_column_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.column_spec&.name + header_params["column_spec.name"] = request.column_spec.name + end + + request_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_column_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_column_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :update_column_spec, request, 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 model. + # Returns a Model in the {::Google::Longrunning::Operation#response response} + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_model(parent: nil, model: nil) + # Pass arguments to `create_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 project where the model is being created. + # @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash] + # Required. The model 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/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new + # + # # Call the create_model method. + # result = client.create_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest + + # Converts hash and nil to 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :create_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 model. + # + # @overload get_model(request, options = nil) + # Pass arguments to `get_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_model(name: nil) + # Pass arguments to `get_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Model] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Model] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. + # p result + # + def get_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_model, request, 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 models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project, from which to list the models. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new + # + # # Call the list_models method. + # result = client.list_models request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. + # p item + # end + # + def list_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_models.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_models, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_models, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a model. + # Returns `google.protobuf.Empty` in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_model(name: nil) + # Pass arguments to `delete_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model being deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new + # + # # Call the delete_model method. + # result = client.delete_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest + + # Converts hash and nil to 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :delete_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # + # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload deploy_model(request, options = nil) + # Pass arguments to `deploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) + # Pass arguments to `deploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. 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 image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Classification. + # + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. 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 name [::String] + # Required. Resource name of the model to deploy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new + # + # # Call the deploy_model method. + # result = client.deploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.deploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.deploy_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.deploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :deploy_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload undeploy_model(request, options = nil) + # Pass arguments to `undeploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undeploy_model(name: nil) + # Pass arguments to `undeploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model to undeploy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new + # + # # Call the undeploy_model method. + # result = client.undeploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undeploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undeploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.undeploy_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undeploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :undeploy_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # + # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_model(request, options = nil) + # Pass arguments to `export_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_model(name: nil, output_config: nil) + # Pass arguments to `export_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 model to export. + # @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new + # + # # Call the export_model method. + # result = client.export_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.export_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :export_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports examples on which the model was evaluated (i.e. which were in the + # TEST set of the dataset the model was created from), together with their + # ground truth annotations and the annotations created (predicted) by the + # model. + # The examples, ground truth and predictions are exported in the state + # they were at the moment the model was evaluated. + # + # This export is available only for 30 days since the model evaluation is + # created. + # + # Currently only available for Tables. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_evaluated_examples(request, options = nil) + # Pass arguments to `export_evaluated_examples` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_evaluated_examples(name: nil, output_config: nil) + # Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 model whose evaluated examples are to + # be exported. + # @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new + # + # # Call the export_evaluated_examples method. + # result = client.export_evaluated_examples request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluated_examples request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_evaluated_examples.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.export_evaluated_examples.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_evaluated_examples.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :export_evaluated_examples, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 model evaluation. + # + # @overload get_model_evaluation(request, options = nil) + # Pass arguments to `get_model_evaluation` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_model_evaluation(name: nil) + # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the model evaluation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new + # + # # Call the get_model_evaluation method. + # result = client.get_model_evaluation request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. + # p result + # + def get_model_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_model_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_model_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_model_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_model_evaluation, request, 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 model evaluations. + # + # @overload list_model_evaluations(request, options = nil) + # Pass arguments to `list_model_evaluations` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new + # + # # Call the list_model_evaluations method. + # result = client.list_model_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. + # p item + # end + # + def list_model_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_model_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_model_evaluations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_model_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, request, response, 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 AutoMl API. + # + # This class represents the configuration for AutoMl, + # providing control 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::AutoML::V1beta1::AutoML::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_dataset to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1beta1::AutoML::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::AutoML::V1beta1::AutoML::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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 AutoMl API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `update_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dataset + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `import_data` + # @return [::Gapic::Config::Method] + # + attr_reader :import_data + ## + # RPC-specific configuration for `export_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_data + ## + # RPC-specific configuration for `get_annotation_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_annotation_spec + ## + # RPC-specific configuration for `get_table_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_table_spec + ## + # RPC-specific configuration for `list_table_specs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_table_specs + ## + # RPC-specific configuration for `update_table_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :update_table_spec + ## + # RPC-specific configuration for `get_column_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_column_spec + ## + # RPC-specific configuration for `list_column_specs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_column_specs + ## + # RPC-specific configuration for `update_column_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :update_column_spec + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # RPC-specific configuration for `get_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model + ## + # RPC-specific configuration for `list_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_models + ## + # RPC-specific configuration for `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + ## + # RPC-specific configuration for `deploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy_model + ## + # RPC-specific configuration for `undeploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :undeploy_model + ## + # RPC-specific configuration for `export_model` + # @return [::Gapic::Config::Method] + # + attr_reader :export_model + ## + # RPC-specific configuration for `export_evaluated_examples` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluated_examples + ## + # RPC-specific configuration for `get_model_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model_evaluation + ## + # RPC-specific configuration for `list_model_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_model_evaluations + + # @private + def initialize parent_rpcs = nil + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset + @update_dataset = ::Gapic::Config::Method.new update_dataset_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data + @import_data = ::Gapic::Config::Method.new import_data_config + export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data + @export_data = ::Gapic::Config::Method.new export_data_config + get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec + @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config + get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec + @get_table_spec = ::Gapic::Config::Method.new get_table_spec_config + list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs + @list_table_specs = ::Gapic::Config::Method.new list_table_specs_config + update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec + @update_table_spec = ::Gapic::Config::Method.new update_table_spec_config + get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec + @get_column_spec = ::Gapic::Config::Method.new get_column_spec_config + list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs + @list_column_specs = ::Gapic::Config::Method.new list_column_specs_config + update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec + @update_column_spec = ::Gapic::Config::Method.new update_column_spec_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_config + get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model + @get_model = ::Gapic::Config::Method.new get_model_config + list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models + @list_models = ::Gapic::Config::Method.new list_models_config + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model + @deploy_model = ::Gapic::Config::Method.new deploy_model_config + undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model + @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config + export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model + @export_model = ::Gapic::Config::Method.new export_model_config + export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples + @export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config + get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation + @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config + list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations + @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb new file mode 100644 index 000000000000..59c4eb1fb2be --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/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 AutoML + module V1beta1 + module AutoML + # Credentials for the AutoMl API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "AUTOML_CREDENTIALS", + "AUTOML_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "AUTOML_CREDENTIALS_JSON", + "AUTOML_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb new file mode 100644 index 000000000000..b166dda91efe --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb @@ -0,0 +1,851 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 AutoML + module V1beta1 + module AutoML + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AutoMl 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 AutoMl 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::AutoML::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::AutoML::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::AutoML::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::AutoML::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::AutoML::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.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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb new file mode 100644 index 000000000000..f9a7d5efd31e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb @@ -0,0 +1,174 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + # Path helper methods for the AutoMl API. + module Paths + ## + # Create a fully-qualified AnnotationSpec resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # @param annotation_spec [String] + # + # @return [::String] + def annotation_spec_path project:, location:, dataset:, annotation_spec: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}" + end + + ## + # Create a fully-qualified ColumnSpec resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # @param table_spec [String] + # @param column_spec [String] + # + # @return [::String] + def column_spec_path project:, location:, dataset:, table_spec:, column_spec: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + raise ::ArgumentError, "table_spec cannot contain /" if table_spec.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}/tableSpecs/#{table_spec}/columnSpecs/#{column_spec}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project:, location:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}" + 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 Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + ## + # Create a fully-qualified ModelEvaluation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # @param model_evaluation [String] + # + # @return [::String] + def model_evaluation_path project:, location:, model:, model_evaluation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}/modelEvaluations/#{model_evaluation}" + end + + ## + # Create a fully-qualified TableSpec resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # @param table_spec [String] + # + # @return [::String] + def table_spec_path project:, location:, dataset:, table_spec: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}/tableSpecs/#{table_spec}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb new file mode 100644 index 000000000000..da55991d354b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/automl/v1beta1/version" + +require "google/cloud/automl/v1beta1/automl/credentials" +require "google/cloud/automl/v1beta1/automl/paths" +require "google/cloud/automl/v1beta1/automl/rest/operations" +require "google/cloud/automl/v1beta1/automl/rest/client" + +module Google + module Cloud + module AutoML + module V1beta1 + ## + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/automl/v1beta1/automl/rest" + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + module AutoML + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/automl/v1beta1/automl/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb new file mode 100644 index 000000000000..2d1ec590f207 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb @@ -0,0 +1,2774 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/automl/v1beta1/service_pb" +require "google/cloud/automl/v1beta1/automl/rest/service_stub" + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + module Rest + ## + # REST client for the AutoMl service. + # + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :auto_ml_stub + + ## + # Configure the AutoMl Client class. + # + # See {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutoMl clients + # ::Google::Cloud::AutoML::V1beta1::AutoML::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", "AutoML", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_dataset.timeout = 5.0 + + default_config.rpcs.get_dataset.timeout = 5.0 + default_config.rpcs.get_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_datasets.timeout = 5.0 + default_config.rpcs.list_datasets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_dataset.timeout = 5.0 + + default_config.rpcs.delete_dataset.timeout = 5.0 + default_config.rpcs.delete_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.import_data.timeout = 5.0 + + default_config.rpcs.export_data.timeout = 5.0 + + default_config.rpcs.get_annotation_spec.timeout = 5.0 + default_config.rpcs.get_annotation_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_table_spec.timeout = 5.0 + default_config.rpcs.get_table_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_table_specs.timeout = 5.0 + default_config.rpcs.list_table_specs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_table_spec.timeout = 5.0 + + default_config.rpcs.get_column_spec.timeout = 5.0 + default_config.rpcs.get_column_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_column_specs.timeout = 5.0 + default_config.rpcs.list_column_specs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_column_spec.timeout = 5.0 + + default_config.rpcs.create_model.timeout = 5.0 + + default_config.rpcs.get_model.timeout = 5.0 + default_config.rpcs.get_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_models.timeout = 5.0 + default_config.rpcs.list_models.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_model.timeout = 5.0 + default_config.rpcs.delete_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.deploy_model.timeout = 5.0 + + default_config.rpcs.undeploy_model.timeout = 5.0 + + default_config.rpcs.export_model.timeout = 5.0 + + default_config.rpcs.export_evaluated_examples.timeout = 5.0 + + default_config.rpcs.get_model_evaluation.timeout = 5.0 + default_config.rpcs.get_model_evaluation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_model_evaluations.timeout = 5.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutoMl 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::AutoML::V1beta1::AutoML::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 + @auto_ml_stub.universe_domain + end + + ## + # Create a new AutoMl REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutoMl 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::AutoML::V1beta1::AutoML::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 + + @auto_ml_stub = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @auto_ml_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::AutoML::V1beta1::AutoML::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @auto_ml_stub.logger + end + + # Service calls + + ## + # Creates a dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_dataset(parent: nil, dataset: nil) + # Pass arguments to `create_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 create the dataset for. + # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] + # Required. The dataset to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new + # + # # Call the create_dataset method. + # result = client.create_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def create_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest + + # Converts hash and nil to an 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.create_dataset request, 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 dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_dataset(name: nil) + # Pass arguments to `get_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def get_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_dataset request, 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 datasets in a project. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 from which to list datasets. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of + # using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new + # + # # Call the list_datasets method. + # result = client.list_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. + # p item + # end + # + def list_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_datasets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_datasets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, 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 dataset. + # + # @overload update_dataset(request, options = nil) + # Pass arguments to `update_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_dataset(dataset: nil, update_mask: nil) + # Pass arguments to `update_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] + # Required. The dataset which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new + # + # # Call the update_dataset method. + # result = client.update_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def update_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest + + # Converts hash and nil to an 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.update_dataset request, 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 dataset and all of its contents. + # Returns empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_dataset(name: nil) + # Pass arguments to `delete_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new + # + # # Call the delete_dataset method. + # result = client.delete_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest + + # Converts hash and nil to an 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.delete_dataset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version} + # parameter must be explicitly set. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload import_data(request, options = nil) + # Pass arguments to `import_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_data(name: nil, input_config: nil) + # Pass arguments to `import_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash] + # Required. The desired input location and its domain specific semantics, + # if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new + # + # # Call the import_data method. + # result = client.import_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.import_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.import_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_data(request, options = nil) + # Pass arguments to `export_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_data(name: nil, output_config: nil) + # Pass arguments to `export_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset. + # @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash] + # Required. The desired output location. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new + # + # # Call the export_data method. + # result = client.export_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.export_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.export_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 annotation spec. + # + # @overload get_annotation_spec(request, options = nil) + # Pass arguments to `get_annotation_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_annotation_spec(name: nil) + # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 annotation spec to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new + # + # # Call the get_annotation_spec method. + # result = client.get_annotation_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. + # p result + # + def get_annotation_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_annotation_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_annotation_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_annotation_spec request, 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 table spec. + # + # @overload get_table_spec(request, options = nil) + # Pass arguments to `get_table_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_table_spec(name: nil, field_mask: nil) + # Pass arguments to `get_table_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 table spec to retrieve. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new + # + # # Call the get_table_spec method. + # result = client.get_table_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + # p result + # + def get_table_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_table_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_table_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_table_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_table_spec request, 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 table specs in a dataset. + # + # @overload list_table_specs(request, options = nil) + # Pass arguments to `list_table_specs` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_table_specs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 dataset to list table specs from. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @param filter [::String] + # Filter expression, see go/filtering. + # @param page_size [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_table_specs AutoMl.ListTableSpecs} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new + # + # # Call the list_table_specs method. + # result = client.list_table_specs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. + # p item + # end + # + def list_table_specs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_table_specs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_table_specs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_table_specs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_table_specs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_table_specs, "table_specs", request, result, 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 table spec. + # + # @overload update_table_spec(request, options = nil) + # Pass arguments to `update_table_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_table_spec(table_spec: nil, update_mask: nil) + # Pass arguments to `update_table_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash] + # Required. The table spec which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new + # + # # Call the update_table_spec method. + # result = client.update_table_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + # p result + # + def update_table_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest + + # Converts hash and nil to an 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_table_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_table_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_table_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.update_table_spec request, 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 column spec. + # + # @overload get_column_spec(request, options = nil) + # Pass arguments to `get_column_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_column_spec(name: nil, field_mask: nil) + # Pass arguments to `get_column_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 column spec to retrieve. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new + # + # # Call the get_column_spec method. + # result = client.get_column_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p result + # + def get_column_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_column_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_column_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_column_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_column_spec request, 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 column specs in a table spec. + # + # @overload list_column_specs(request, options = nil) + # Pass arguments to `list_column_specs` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_column_specs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 table spec to list column specs from. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @param filter [::String] + # Filter expression, see go/filtering. + # @param page_size [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_column_specs AutoMl.ListColumnSpecs} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new + # + # # Call the list_column_specs method. + # result = client.list_column_specs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p item + # end + # + def list_column_specs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_column_specs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_column_specs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_column_specs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_column_specs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_column_specs, "column_specs", request, result, 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 column spec. + # + # @overload update_column_spec(request, options = nil) + # Pass arguments to `update_column_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_column_spec(column_spec: nil, update_mask: nil) + # Pass arguments to `update_column_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash] + # Required. The column spec which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new + # + # # Call the update_column_spec method. + # result = client.update_column_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p result + # + def update_column_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest + + # Converts hash and nil to an 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_column_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_column_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_column_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.update_column_spec request, 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 model. + # Returns a Model in the {::Google::Longrunning::Operation#response response} + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_model(parent: nil, model: nil) + # Pass arguments to `create_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 project where the model is being created. + # @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash] + # Required. The model 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/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new + # + # # Call the create_model method. + # result = client.create_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest + + # Converts hash and nil to an 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.create_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 model. + # + # @overload get_model(request, options = nil) + # Pass arguments to `get_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_model(name: nil) + # Pass arguments to `get_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Model] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. + # p result + # + def get_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_model request, 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 models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project, from which to list the models. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_models AutoMl.ListModels} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new + # + # # Call the list_models method. + # result = client.list_models request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. + # p item + # end + # + def list_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_models.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_models request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, 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 model. + # Returns `google.protobuf.Empty` in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_model(name: nil) + # Pass arguments to `delete_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model being deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new + # + # # Call the delete_model method. + # result = client.delete_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest + + # Converts hash and nil to an 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.delete_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # + # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload deploy_model(request, options = nil) + # Pass arguments to `deploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) + # Pass arguments to `deploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. 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 image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Classification. + # + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. 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 name [::String] + # Required. Resource name of the model to deploy. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new + # + # # Call the deploy_model method. + # result = client.deploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.deploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.deploy_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.deploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.deploy_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload undeploy_model(request, options = nil) + # Pass arguments to `undeploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undeploy_model(name: nil) + # Pass arguments to `undeploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model to undeploy. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new + # + # # Call the undeploy_model method. + # result = client.undeploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undeploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undeploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.undeploy_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undeploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.undeploy_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # + # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_model(request, options = nil) + # Pass arguments to `export_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_model(name: nil, output_config: nil) + # Pass arguments to `export_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 model to export. + # @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new + # + # # Call the export_model method. + # result = client.export_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.export_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.export_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports examples on which the model was evaluated (i.e. which were in the + # TEST set of the dataset the model was created from), together with their + # ground truth annotations and the annotations created (predicted) by the + # model. + # The examples, ground truth and predictions are exported in the state + # they were at the moment the model was evaluated. + # + # This export is available only for 30 days since the model evaluation is + # created. + # + # Currently only available for Tables. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_evaluated_examples(request, options = nil) + # Pass arguments to `export_evaluated_examples` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_evaluated_examples(name: nil, output_config: nil) + # Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 model whose evaluated examples are to + # be exported. + # @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new + # + # # Call the export_evaluated_examples method. + # result = client.export_evaluated_examples request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluated_examples request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_evaluated_examples.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.export_evaluated_examples.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_evaluated_examples.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.export_evaluated_examples request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 model evaluation. + # + # @overload get_model_evaluation(request, options = nil) + # Pass arguments to `get_model_evaluation` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_model_evaluation(name: nil) + # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the model evaluation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new + # + # # Call the get_model_evaluation method. + # result = client.get_model_evaluation request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. + # p result + # + def get_model_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_model_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_model_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_model_evaluation request, 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 model evaluations. + # + # @overload list_model_evaluations(request, options = nil) + # Pass arguments to `list_model_evaluations` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new + # + # # Call the list_model_evaluations method. + # result = client.list_model_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. + # p item + # end + # + def list_model_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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_model_evaluations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_model_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_model_evaluations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, 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 AutoMl REST API. + # + # This class represents the configuration for AutoMl 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::AutoML::V1beta1::AutoML::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_dataset to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 AutoMl API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `update_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dataset + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `import_data` + # @return [::Gapic::Config::Method] + # + attr_reader :import_data + ## + # RPC-specific configuration for `export_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_data + ## + # RPC-specific configuration for `get_annotation_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_annotation_spec + ## + # RPC-specific configuration for `get_table_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_table_spec + ## + # RPC-specific configuration for `list_table_specs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_table_specs + ## + # RPC-specific configuration for `update_table_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :update_table_spec + ## + # RPC-specific configuration for `get_column_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_column_spec + ## + # RPC-specific configuration for `list_column_specs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_column_specs + ## + # RPC-specific configuration for `update_column_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :update_column_spec + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # RPC-specific configuration for `get_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model + ## + # RPC-specific configuration for `list_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_models + ## + # RPC-specific configuration for `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + ## + # RPC-specific configuration for `deploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy_model + ## + # RPC-specific configuration for `undeploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :undeploy_model + ## + # RPC-specific configuration for `export_model` + # @return [::Gapic::Config::Method] + # + attr_reader :export_model + ## + # RPC-specific configuration for `export_evaluated_examples` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluated_examples + ## + # RPC-specific configuration for `get_model_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model_evaluation + ## + # RPC-specific configuration for `list_model_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_model_evaluations + + # @private + def initialize parent_rpcs = nil + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset + @update_dataset = ::Gapic::Config::Method.new update_dataset_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data + @import_data = ::Gapic::Config::Method.new import_data_config + export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data + @export_data = ::Gapic::Config::Method.new export_data_config + get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec + @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config + get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec + @get_table_spec = ::Gapic::Config::Method.new get_table_spec_config + list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs + @list_table_specs = ::Gapic::Config::Method.new list_table_specs_config + update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec + @update_table_spec = ::Gapic::Config::Method.new update_table_spec_config + get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec + @get_column_spec = ::Gapic::Config::Method.new get_column_spec_config + list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs + @list_column_specs = ::Gapic::Config::Method.new list_column_specs_config + update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec + @update_column_spec = ::Gapic::Config::Method.new update_column_spec_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_config + get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model + @get_model = ::Gapic::Config::Method.new get_model_config + list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models + @list_models = ::Gapic::Config::Method.new list_models_config + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model + @deploy_model = ::Gapic::Config::Method.new deploy_model_config + undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model + @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config + export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model + @export_model = ::Gapic::Config::Method.new export_model_config + export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples + @export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config + get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation + @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config + list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations + @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb new file mode 100644 index 000000000000..8722d3172d66 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb @@ -0,0 +1,1095 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 AutoML + module V1beta1 + module AutoML + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AutoMl 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 AutoMl 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::AutoML::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::AutoML::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::AutoML::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::AutoML::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 + + ## + # 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 [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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::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 + call_metadata = @config.rpcs.wait_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::AutoML::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.wait_operation.timeout, + metadata: call_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.wait_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 + + ## + # 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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 + ## + # 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 + + ## + # @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 + + ## + # Baseline implementation for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_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: "wait_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 + + ## + # @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 + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:wait", + 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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb new file mode 100644 index 000000000000..774d061a2484 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb @@ -0,0 +1,1556 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/automl/v1beta1/service_pb" + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + module Rest + ## + # REST service stub for the AutoMl 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_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # A result object deserialized from the server's reply + def create_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # A result object deserialized from the server's reply + def get_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::Dataset.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_datasets REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse] + # A result object deserialized from the server's reply + def list_datasets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_datasets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.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_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # A result object deserialized from the server's reply + def update_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::Dataset.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_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ImportDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_annotation_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # A result object deserialized from the server's reply + def get_annotation_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_annotation_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_table_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # A result object deserialized from the server's reply + def get_table_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_table_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_table_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::TableSpec.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_table_specs REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse] + # A result object deserialized from the server's reply + def list_table_specs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_table_specs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_table_specs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.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_table_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # A result object deserialized from the server's reply + def update_table_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_table_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_table_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::TableSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_column_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # A result object deserialized from the server's reply + def get_column_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_column_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_column_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.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_column_specs REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse] + # A result object deserialized from the server's reply + def list_column_specs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_column_specs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_column_specs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.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_column_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # A result object deserialized from the server's reply + def update_column_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_column_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_column_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.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_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Model] + # A result object deserialized from the server's reply + def get_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::Model.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_models REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListModelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ListModelsResponse] + # A result object deserialized from the server's reply + def list_models request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_models", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.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_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the deploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeployModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def deploy_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "deploy_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the undeploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def undeploy_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "undeploy_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_evaluated_examples REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_evaluated_examples request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluated_examples_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_evaluated_examples", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_model_evaluation REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # A result object deserialized from the server's reply + def get_model_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_model_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.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_model_evaluations REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse] + # A result object deserialized from the server's reply + def list_model_evaluations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_model_evaluations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.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_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest] + # 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_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/datasets", + body: "dataset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_datasets REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_datasets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/datasets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest] + # 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_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{dataset.name}", + body: "dataset", + matches: [ + ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest] + # 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_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ImportDataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:importData", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportDataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:exportData", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_annotation_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_annotation_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_table_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_table_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_table_specs REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_table_specs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/tableSpecs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_table_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest] + # 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_table_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{table_spec.name}", + body: "table_spec", + matches: [ + ["table_spec.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_column_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_column_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/columnSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_column_specs REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_column_specs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/columnSpecs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_column_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest] + # 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_column_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{column_spec.name}", + body: "column_spec", + matches: [ + ["column_spec.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/columnSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateModelRequest] + # 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_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/models", + body: "model", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_models REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_models_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/models", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest] + # 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_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the deploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeployModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_deploy_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:deploy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undeploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undeploy_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:undeploy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:export", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_evaluated_examples REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_evaluated_examples_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:exportEvaluatedExamples", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_model_evaluation REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_model_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/modelEvaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_model_evaluations REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_model_evaluations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/modelEvaluations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb new file mode 100644 index 000000000000..e1ade31b5e08 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/classification.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/temporal_pb' + + +descriptor_data = "\n0google/cloud/automl/v1beta1/classification.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/temporal.proto\")\n\x18\x43lassificationAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\"\xc7\x01\n\x1dVideoClassificationAnnotation\x12\x0c\n\x04type\x18\x01 \x01(\t\x12X\n\x19\x63lassification_annotation\x18\x02 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotation\x12>\n\x0ctime_segment\x18\x03 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TimeSegment\"\xa9\x07\n\x1f\x43lassificationEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12\x17\n\x0b\x62\x61se_au_prc\x18\x02 \x01(\x02\x42\x02\x18\x01\x12\x0e\n\x06\x61u_roc\x18\x06 \x01(\x02\x12\x10\n\x08log_loss\x18\x07 \x01(\x02\x12u\n\x18\x63onfidence_metrics_entry\x18\x03 \x03(\x0b\x32S.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry\x12\x66\n\x10\x63onfusion_matrix\x18\x04 \x01(\x0b\x32L.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x05 \x03(\t\x1a\xfc\x02\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x1a\n\x12position_threshold\x18\x0e \x01(\x05\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x1b\n\x13\x66\x61lse_positive_rate\x18\x08 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\x12\x12\n\nrecall_at1\x18\x05 \x01(\x02\x12\x15\n\rprecision_at1\x18\x06 \x01(\x02\x12\x1f\n\x17\x66\x61lse_positive_rate_at1\x18\t \x01(\x02\x12\x14\n\x0c\x66\x31_score_at1\x18\x07 \x01(\x02\x12\x1b\n\x13true_positive_count\x18\n \x01(\x03\x12\x1c\n\x14\x66\x61lse_positive_count\x18\x0b \x01(\x03\x12\x1c\n\x14\x66\x61lse_negative_count\x18\x0c \x01(\x03\x12\x1b\n\x13true_negative_count\x18\r \x01(\x03\x1a\xc0\x01\n\x0f\x43onfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x03(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x03(\t\x12]\n\x03row\x18\x02 \x03(\x0b\x32P.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row\x1a\x1c\n\x03Row\x12\x15\n\rexample_count\x18\x01 \x03(\x05*Y\n\x12\x43lassificationType\x12#\n\x1f\x43LASSIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTICLASS\x10\x01\x12\x0e\n\nMULTILABEL\x10\x02\x42\xae\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x13\x43lassificationProtoZ7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + ClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationAnnotation").msgclass + VideoClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationAnnotation").msgclass + ClassificationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics").msgclass + ClassificationEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry").msgclass + ClassificationEvaluationMetrics::ConfusionMatrix = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix").msgclass + ClassificationEvaluationMetrics::ConfusionMatrix::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row").msgclass + ClassificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb new file mode 100644 index 000000000000..631c71630e0e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/column_spec.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/data_stats_pb' +require 'google/cloud/automl/v1beta1/data_types_pb' + + +descriptor_data = "\n-google/cloud/automl/v1beta1/column_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a,google/cloud/automl/v1beta1/data_stats.proto\x1a,google/cloud/automl/v1beta1/data_types.proto\"\x9b\x04\n\nColumnSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\tdata_type\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12:\n\ndata_stats\x18\x04 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats\x12X\n\x16top_correlated_columns\x18\x05 \x03(\x0b\x32\x38.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x1at\n\x10\x43orrelatedColumn\x12\x16\n\x0e\x63olumn_spec_id\x18\x01 \x01(\t\x12H\n\x11\x63orrelation_stats\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1beta1.CorrelationStats:\x94\x01\xea\x41\x90\x01\n automl.googleapis.com/ColumnSpec\x12lprojects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + ColumnSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ColumnSpec").msgclass + ColumnSpec::CorrelatedColumn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb new file mode 100644 index 000000000000..1a0c06144eb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/data_items.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/geometry_pb' +require 'google/cloud/automl/v1beta1/io_pb' +require 'google/cloud/automl/v1beta1/temporal_pb' +require 'google/cloud/automl/v1beta1/text_segment_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\n,google/cloud/automl/v1beta1/data_items.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/geometry.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a*google/cloud/automl/v1beta1/temporal.proto\x1a.google/cloud/automl/v1beta1/text_segment.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x7f\n\x05Image\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\x0cH\x00\x12@\n\x0cinput_config\x18\x06 \x01(\x0b\x32(.google.cloud.automl.v1beta1.InputConfigH\x00\x12\x15\n\rthumbnail_uri\x18\x04 \x01(\tB\x06\n\x04\x64\x61ta\"F\n\x0bTextSnippet\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x13\n\x0b\x63ontent_uri\x18\x04 \x01(\t\"\xef\x01\n\x12\x44ocumentDimensions\x12S\n\x04unit\x18\x01 \x01(\x0e\x32\x45.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit\x12\r\n\x05width\x18\x02 \x01(\x02\x12\x0e\n\x06height\x18\x03 \x01(\x02\"e\n\x15\x44ocumentDimensionUnit\x12\'\n#DOCUMENT_DIMENSION_UNIT_UNSPECIFIED\x10\x00\x12\x08\n\x04INCH\x10\x01\x12\x0e\n\nCENTIMETER\x10\x02\x12\t\n\x05POINT\x10\x03\"\xf9\x05\n\x08\x44ocument\x12\x46\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.DocumentInputConfig\x12?\n\rdocument_text\x18\x02 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippet\x12<\n\x06layout\x18\x03 \x03(\x0b\x32,.google.cloud.automl.v1beta1.Document.Layout\x12L\n\x13\x64ocument_dimensions\x18\x04 \x01(\x0b\x32/.google.cloud.automl.v1beta1.DocumentDimensions\x12\x12\n\npage_count\x18\x05 \x01(\x05\x1a\xc3\x03\n\x06Layout\x12>\n\x0ctext_segment\x18\x01 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSegment\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\x12@\n\rbounding_poly\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12W\n\x11text_segment_type\x18\x04 \x01(\x0e\x32<.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType\"\xc8\x01\n\x0fTextSegmentType\x12!\n\x1dTEXT_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOKEN\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x0e\n\nFORM_FIELD\x10\x03\x12\x13\n\x0f\x46ORM_FIELD_NAME\x10\x04\x12\x17\n\x13\x46ORM_FIELD_CONTENTS\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x10\n\x0cTABLE_HEADER\x10\x07\x12\r\n\tTABLE_ROW\x10\x08\x12\x0e\n\nTABLE_CELL\x10\t\"F\n\x03Row\x12\x17\n\x0f\x63olumn_spec_ids\x18\x02 \x03(\t\x12&\n\x06values\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value\"\xfe\x01\n\x0e\x45xamplePayload\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32\".google.cloud.automl.v1beta1.ImageH\x00\x12@\n\x0ctext_snippet\x18\x02 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippetH\x00\x12\x39\n\x08\x64ocument\x18\x04 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DocumentH\x00\x12/\n\x03row\x18\x03 \x01(\x0b\x32 .google.cloud.automl.v1beta1.RowH\x00\x42\t\n\x07payloadB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Image").msgclass + TextSnippet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSnippet").msgclass + DocumentDimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentDimensions").msgclass + DocumentDimensions::DocumentDimensionUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit").enummodule + Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document").msgclass + Document::Layout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document.Layout").msgclass + Document::Layout::TextSegmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document.Layout.TextSegmentType").enummodule + Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Row").msgclass + ExamplePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExamplePayload").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb new file mode 100644 index 000000000000..becbd202cf0c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/data_stats.proto + +require 'google/protobuf' + + +descriptor_data = "\n,google/cloud/automl/v1beta1/data_stats.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\xfd\x03\n\tDataStats\x12\x42\n\rfloat64_stats\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.Float64StatsH\x00\x12@\n\x0cstring_stats\x18\x04 \x01(\x0b\x32(.google.cloud.automl.v1beta1.StringStatsH\x00\x12\x46\n\x0ftimestamp_stats\x18\x05 \x01(\x0b\x32+.google.cloud.automl.v1beta1.TimestampStatsH\x00\x12>\n\x0b\x61rray_stats\x18\x06 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.ArrayStatsH\x00\x12@\n\x0cstruct_stats\x18\x07 \x01(\x0b\x32(.google.cloud.automl.v1beta1.StructStatsH\x00\x12\x44\n\x0e\x63\x61tegory_stats\x18\x08 \x01(\x0b\x32*.google.cloud.automl.v1beta1.CategoryStatsH\x00\x12\x1c\n\x14\x64istinct_value_count\x18\x01 \x01(\x03\x12\x18\n\x10null_value_count\x18\x02 \x01(\x03\x12\x19\n\x11valid_value_count\x18\t \x01(\x03\x42\x07\n\x05stats\"\xdd\x01\n\x0c\x46loat64Stats\x12\x0c\n\x04mean\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x02 \x01(\x01\x12\x11\n\tquantiles\x18\x03 \x03(\x01\x12T\n\x11histogram_buckets\x18\x04 \x03(\x0b\x32\x39.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket\x1a:\n\x0fHistogramBucket\x12\x0b\n\x03min\x18\x01 \x01(\x01\x12\x0b\n\x03max\x18\x02 \x01(\x01\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\"\x8d\x01\n\x0bStringStats\x12P\n\x11top_unigram_stats\x18\x01 \x03(\x0b\x32\x35.google.cloud.automl.v1beta1.StringStats.UnigramStats\x1a,\n\x0cUnigramStats\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xf4\x02\n\x0eTimestampStats\x12V\n\x0egranular_stats\x18\x01 \x03(\x0b\x32>.google.cloud.automl.v1beta1.TimestampStats.GranularStatsEntry\x1a\x98\x01\n\rGranularStats\x12W\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x46.google.cloud.automl.v1beta1.TimestampStats.GranularStats.BucketsEntry\x1a.\n\x0c\x42ucketsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1ao\n\x12GranularStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TimestampStats.GranularStats:\x02\x38\x01\"J\n\nArrayStats\x12<\n\x0cmember_stats\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats\"\xb7\x01\n\x0bStructStats\x12M\n\x0b\x66ield_stats\x18\x01 \x03(\x0b\x32\x38.google.cloud.automl.v1beta1.StructStats.FieldStatsEntry\x1aY\n\x0f\x46ieldStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats:\x02\x38\x01\"\xa0\x01\n\rCategoryStats\x12Z\n\x12top_category_stats\x18\x01 \x03(\x0b\x32>.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats\x1a\x33\n\x13SingleCategoryStats\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"%\n\x10\x43orrelationStats\x12\x11\n\tcramers_v\x18\x01 \x01(\x01\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + DataStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DataStats").msgclass + Float64Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Float64Stats").msgclass + Float64Stats::HistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Float64Stats.HistogramBucket").msgclass + StringStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StringStats").msgclass + StringStats::UnigramStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StringStats.UnigramStats").msgclass + TimestampStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimestampStats").msgclass + TimestampStats::GranularStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimestampStats.GranularStats").msgclass + ArrayStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ArrayStats").msgclass + StructStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StructStats").msgclass + CategoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CategoryStats").msgclass + CategoryStats::SingleCategoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats").msgclass + CorrelationStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CorrelationStats").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb new file mode 100644 index 000000000000..e1edf66dbe0d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/data_types.proto + +require 'google/protobuf' + + +descriptor_data = "\n,google/cloud/automl/v1beta1/data_types.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\xfc\x01\n\x08\x44\x61taType\x12\x42\n\x11list_element_type\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataTypeH\x00\x12>\n\x0bstruct_type\x18\x03 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.StructTypeH\x00\x12\x15\n\x0btime_format\x18\x05 \x01(\tH\x00\x12\x38\n\ttype_code\x18\x01 \x01(\x0e\x32%.google.cloud.automl.v1beta1.TypeCode\x12\x10\n\x08nullable\x18\x04 \x01(\x08\x42\t\n\x07\x64\x65tails\"\xa7\x01\n\nStructType\x12\x43\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x33.google.cloud.automl.v1beta1.StructType.FieldsEntry\x1aT\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x34\n\x05value\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataType:\x02\x38\x01*r\n\x08TypeCode\x12\x19\n\x15TYPE_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46LOAT64\x10\x03\x12\r\n\tTIMESTAMP\x10\x04\x12\n\n\x06STRING\x10\x06\x12\t\n\x05\x41RRAY\x10\x08\x12\n\n\x06STRUCT\x10\t\x12\x0c\n\x08\x43\x41TEGORY\x10\nB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + DataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DataType").msgclass + StructType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StructType").msgclass + TypeCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TypeCode").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb new file mode 100644 index 000000000000..3135034e2cdc --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/dataset.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/image_pb' +require 'google/cloud/automl/v1beta1/tables_pb' +require 'google/cloud/automl/v1beta1/text_pb' +require 'google/cloud/automl/v1beta1/translation_pb' +require 'google/cloud/automl/v1beta1/video_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n)google/cloud/automl/v1beta1/dataset.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\t\n\x07\x44\x61taset\x12_\n\x1ctranslation_dataset_metadata\x18\x17 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TranslationDatasetMetadataH\x00\x12p\n%image_classification_dataset_metadata\x18\x18 \x01(\x0b\x32?.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataH\x00\x12n\n$text_classification_dataset_metadata\x18\x19 \x01(\x0b\x32>.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataH\x00\x12s\n\'image_object_detection_dataset_metadata\x18\x1a \x01(\x0b\x32@.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataH\x00\x12p\n%video_classification_dataset_metadata\x18\x1f \x01(\x0b\x32?.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataH\x00\x12q\n&video_object_tracking_dataset_metadata\x18\x1d \x01(\x0b\x32?.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataH\x00\x12\x66\n text_extraction_dataset_metadata\x18\x1c \x01(\x0b\x32:.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataH\x00\x12\x64\n\x1ftext_sentiment_dataset_metadata\x18\x1e \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataH\x00\x12U\n\x17tables_dataset_metadata\x18! \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesDatasetMetadataH\x00\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\x15\n\rexample_count\x18\x15 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t:^\xea\x41[\n\x1d\x61utoml.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}B\x12\n\x10\x64\x61taset_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Dataset").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb new file mode 100644 index 000000000000..2e9510dd00d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/detection.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/geometry_pb' +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n+google/cloud/automl/v1beta1/detection.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/geometry.proto\x1a\x1egoogle/protobuf/duration.proto\"p\n\x1eImageObjectDetectionAnnotation\x12?\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12\r\n\x05score\x18\x02 \x01(\x02\"\xb4\x01\n\x1dVideoObjectTrackingAnnotation\x12\x13\n\x0binstance_id\x18\x01 \x01(\t\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12?\n\x0c\x62ounding_box\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12\r\n\x05score\x18\x04 \x01(\x02\"\xae\x02\n\x17\x42oundingBoxMetricsEntry\x12\x15\n\riou_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16mean_average_precision\x18\x02 \x01(\x02\x12o\n\x1a\x63onfidence_metrics_entries\x18\x03 \x03(\x0b\x32K.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\"\xd6\x01\n%ImageObjectDetectionEvaluationMetrics\x12$\n\x1c\x65valuated_bounding_box_count\x18\x01 \x01(\x05\x12Z\n\x1c\x62ounding_box_metrics_entries\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x03 \x01(\x02\"\xf4\x01\n$VideoObjectTrackingEvaluationMetrics\x12\x1d\n\x15\x65valuated_frame_count\x18\x01 \x01(\x05\x12$\n\x1c\x65valuated_bounding_box_count\x18\x02 \x01(\x05\x12Z\n\x1c\x62ounding_box_metrics_entries\x18\x04 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x06 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + ImageObjectDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation").msgclass + VideoObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation").msgclass + BoundingBoxMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingBoxMetricsEntry").msgclass + BoundingBoxMetricsEntry::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry").msgclass + ImageObjectDetectionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics").msgclass + VideoObjectTrackingEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb new file mode 100644 index 000000000000..4a92f0a318eb --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/geometry.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/automl/v1beta1/geometry.proto\x12\x1bgoogle.cloud.automl.v1beta1\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"Z\n\x0c\x42oundingPoly\x12J\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32-.google.cloud.automl.v1beta1.NormalizedVertexB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.NormalizedVertex").msgclass + BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingPoly").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb new file mode 100644 index 000000000000..8631c4f1de2e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/image.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/annotation_spec_pb' +require 'google/cloud/automl/v1beta1/classification_pb' + + +descriptor_data = "\n\'google/cloud/automl/v1beta1/image.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x31google/cloud/automl/v1beta1/annotation_spec.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\"r\n\"ImageClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"%\n#ImageObjectDetectionDatasetMetadata\"\xb2\x01\n ImageClassificationModelMetadata\x12\x15\n\rbase_model_id\x18\x01 \x01(\t\x12\x14\n\x0ctrain_budget\x18\x02 \x01(\x03\x12\x12\n\ntrain_cost\x18\x03 \x01(\x03\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12\x12\n\nmodel_type\x18\x07 \x01(\t\x12\x10\n\x08node_qps\x18\r \x01(\x01\x12\x12\n\nnode_count\x18\x0e \x01(\x03\"\xbe\x01\n!ImageObjectDetectionModelMetadata\x12\x12\n\nmodel_type\x18\x01 \x01(\t\x12\x12\n\nnode_count\x18\x03 \x01(\x03\x12\x10\n\x08node_qps\x18\x04 \x01(\x01\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12%\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x12#\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\"@\n*ImageClassificationModelDeploymentMetadata\x12\x12\n\nnode_count\x18\x01 \x01(\x03\"A\n+ImageObjectDetectionModelDeploymentMetadata\x12\x12\n\nnode_count\x18\x01 \x01(\x03\x42\xa7\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\nImageProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + ImageClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata").msgclass + ImageObjectDetectionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata").msgclass + ImageClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationModelMetadata").msgclass + ImageObjectDetectionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata").msgclass + ImageClassificationModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata").msgclass + ImageObjectDetectionModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb new file mode 100644 index 000000000000..0ae4984c691f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/io.proto + +require 'google/protobuf' + + +descriptor_data = "\n$google/cloud/automl/v1beta1/io.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\x92\x02\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x12\x44\n\x06params\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.InputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"\xa9\x01\n\x17\x42\x61tchPredictInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x42\x08\n\x06source\"Q\n\x13\x44ocumentInputConfig\x12:\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSource\"\xb7\x01\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xc3\x01\n\x18\x42\x61tchPredictOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xcf\x02\n\x17ModelExportOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12\x46\n\x0fgcr_destination\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcrDestinationH\x00\x12\x14\n\x0cmodel_format\x18\x04 \x01(\t\x12P\n\x06params\x18\x02 \x03(\x0b\x32@.google.cloud.automl.v1beta1.ModelExportOutputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x64\x65stination\"\x86\x01\n#ExportEvaluatedExamplesOutputConfig\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x1f\n\tGcsSource\x12\x12\n\ninput_uris\x18\x01 \x03(\t\"#\n\x0e\x42igQuerySource\x12\x11\n\tinput_uri\x18\x01 \x01(\t\"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\")\n\x13\x42igQueryDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\t\"$\n\x0eGcrDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.InputConfig").msgclass + BatchPredictInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictInputConfig").msgclass + DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentInputConfig").msgclass + OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.OutputConfig").msgclass + BatchPredictOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOutputConfig").msgclass + ModelExportOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ModelExportOutputConfig").msgclass + ExportEvaluatedExamplesOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig").msgclass + GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcsSource").msgclass + BigQuerySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BigQuerySource").msgclass + GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcsDestination").msgclass + BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BigQueryDestination").msgclass + GcrDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcrDestination").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb new file mode 100644 index 000000000000..0b5f16c6bf27 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/model_evaluation.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/classification_pb' +require 'google/cloud/automl/v1beta1/detection_pb' +require 'google/cloud/automl/v1beta1/regression_pb' +require 'google/cloud/automl/v1beta1/tables_pb' +require 'google/cloud/automl/v1beta1/text_extraction_pb' +require 'google/cloud/automl/v1beta1/text_sentiment_pb' +require 'google/cloud/automl/v1beta1/translation_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/automl/v1beta1/model_evaluation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x08\n\x0fModelEvaluation\x12i\n!classification_evaluation_metrics\x18\x08 \x01(\x0b\x32<.google.cloud.automl.v1beta1.ClassificationEvaluationMetricsH\x00\x12\x61\n\x1dregression_evaluation_metrics\x18\x18 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.RegressionEvaluationMetricsH\x00\x12\x63\n\x1etranslation_evaluation_metrics\x18\t \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TranslationEvaluationMetricsH\x00\x12w\n)image_object_detection_evaluation_metrics\x18\x0c \x01(\x0b\x32\x42.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsH\x00\x12u\n(video_object_tracking_evaluation_metrics\x18\x0e \x01(\x0b\x32\x41.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsH\x00\x12h\n!text_sentiment_evaluation_metrics\x18\x0b \x01(\x0b\x32;.google.cloud.automl.v1beta1.TextSentimentEvaluationMetricsH\x00\x12j\n\"text_extraction_evaluation_metrics\x18\r \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x61nnotation_spec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0f \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x17\x65valuated_example_count\x18\x06 \x01(\x05:\x87\x01\xea\x41\x83\x01\n%automl.googleapis.com/ModelEvaluation\x12Zprojects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}B\t\n\x07metricsB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + ModelEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ModelEvaluation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb new file mode 100644 index 000000000000..5e4ceb1dd794 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/model.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/image_pb' +require 'google/cloud/automl/v1beta1/tables_pb' +require 'google/cloud/automl/v1beta1/text_pb' +require 'google/cloud/automl/v1beta1/translation_pb' +require 'google/cloud/automl/v1beta1/video_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/automl/v1beta1/model.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\n\n\x05Model\x12[\n\x1atranslation_model_metadata\x18\x0f \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TranslationModelMetadataH\x00\x12l\n#image_classification_model_metadata\x18\r \x01(\x0b\x32=.google.cloud.automl.v1beta1.ImageClassificationModelMetadataH\x00\x12j\n\"text_classification_model_metadata\x18\x0e \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextClassificationModelMetadataH\x00\x12o\n%image_object_detection_model_metadata\x18\x14 \x01(\x0b\x32>.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataH\x00\x12l\n#video_classification_model_metadata\x18\x17 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoClassificationModelMetadataH\x00\x12m\n$video_object_tracking_model_metadata\x18\x15 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataH\x00\x12\x62\n\x1etext_extraction_model_metadata\x18\x13 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.TextExtractionModelMetadataH\x00\x12Q\n\x15tables_model_metadata\x18\x18 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.TablesModelMetadataH\x00\x12`\n\x1dtext_sentiment_model_metadata\x18\x16 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TextSentimentModelMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\x10\x64\x65ployment_state\x18\x08 \x01(\x0e\x32\x32.google.cloud.automl.v1beta1.Model.DeploymentState\"Q\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0e\n\nUNDEPLOYED\x10\x02:X\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\x10\n\x0emodel_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Model").msgclass + Model::DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Model.DeploymentState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb new file mode 100644 index 000000000000..651d885fc239 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/operations.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/io_pb' +require 'google/cloud/automl/v1beta1/model_pb' +require 'google/cloud/automl/v1beta1/model_evaluation_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n,google/cloud/automl/v1beta1/operations.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a$google/cloud/automl/v1beta1/io.proto\x1a\'google/cloud/automl/v1beta1/model.proto\x1a\x32google/cloud/automl/v1beta1/model_evaluation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8b\x08\n\x11OperationMetadata\x12N\n\x0e\x64\x65lete_details\x18\x08 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.DeleteOperationMetadataH\x00\x12Y\n\x14\x64\x65ploy_model_details\x18\x18 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.DeployModelOperationMetadataH\x00\x12]\n\x16undeploy_model_details\x18\x19 \x01(\x0b\x32;.google.cloud.automl.v1beta1.UndeployModelOperationMetadataH\x00\x12Y\n\x14\x63reate_model_details\x18\n \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.CreateModelOperationMetadataH\x00\x12W\n\x13import_data_details\x18\x0f \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ImportDataOperationMetadataH\x00\x12[\n\x15\x62\x61tch_predict_details\x18\x10 \x01(\x0b\x32:.google.cloud.automl.v1beta1.BatchPredictOperationMetadataH\x00\x12W\n\x13\x65xport_data_details\x18\x15 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ExportDataOperationMetadataH\x00\x12Y\n\x14\x65xport_model_details\x18\x16 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.ExportModelOperationMetadataH\x00\x12r\n!export_evaluated_examples_details\x18\x1a \x01(\x0b\x32\x45.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataH\x00\x12\x18\n\x10progress_percent\x18\r \x01(\x05\x12,\n\x10partial_failures\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x64\x65tails\"\x19\n\x17\x44\x65leteOperationMetadata\"\x1e\n\x1c\x44\x65ployModelOperationMetadata\" \n\x1eUndeployModelOperationMetadata\"\x1e\n\x1c\x43reateModelOperationMetadata\"\x1d\n\x1bImportDataOperationMetadata\"\xef\x01\n\x1b\x45xportDataOperationMetadata\x12\x62\n\x0boutput_info\x18\x01 \x01(\x0b\x32M.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo\x1al\n\x14\x45xportDataOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xc3\x02\n\x1d\x42\x61tchPredictOperationMetadata\x12J\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfig\x12\x66\n\x0boutput_info\x18\x02 \x01(\x0b\x32Q.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo\x1an\n\x16\x42\x61tchPredictOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xbb\x01\n\x1c\x45xportModelOperationMetadata\x12\x64\n\x0boutput_info\x18\x02 \x01(\x0b\x32O.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo\x1a\x35\n\x15\x45xportModelOutputInfo\x12\x1c\n\x14gcs_output_directory\x18\x01 \x01(\t\"\xee\x01\n(ExportEvaluatedExamplesOperationMetadata\x12|\n\x0boutput_info\x18\x02 \x01(\x0b\x32g.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo\x1a\x44\n!ExportEvaluatedExamplesOutputInfo\x12\x1f\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.OperationMetadata").msgclass + DeleteOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteOperationMetadata").msgclass + DeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeployModelOperationMetadata").msgclass + UndeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UndeployModelOperationMetadata").msgclass + CreateModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateModelOperationMetadata").msgclass + ImportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImportDataOperationMetadata").msgclass + ExportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataOperationMetadata").msgclass + ExportDataOperationMetadata::ExportDataOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo").msgclass + BatchPredictOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOperationMetadata").msgclass + BatchPredictOperationMetadata::BatchPredictOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo").msgclass + ExportModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelOperationMetadata").msgclass + ExportModelOperationMetadata::ExportModelOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo").msgclass + ExportEvaluatedExamplesOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata").msgclass + ExportEvaluatedExamplesOperationMetadata::ExportEvaluatedExamplesOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb new file mode 100644 index 000000000000..3ef3fce3b376 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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/automl/v1beta1/version" + +require "google/cloud/automl/v1beta1/prediction_service/credentials" +require "google/cloud/automl/v1beta1/prediction_service/paths" +require "google/cloud/automl/v1beta1/prediction_service/operations" +require "google/cloud/automl/v1beta1/prediction_service/client" +require "google/cloud/automl/v1beta1/prediction_service/rest" + +module Google + module Cloud + module AutoML + module V1beta1 + ## + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/automl/v1beta1/prediction_service" + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/automl/v1beta1/prediction_service/rest" + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + module PredictionService + end + end + end + end +end + +helper_path = ::File.join __dir__, "prediction_service", "helpers.rb" +require "google/cloud/automl/v1beta1/prediction_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb new file mode 100644 index 000000000000..a82dd9c0abbb --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb @@ -0,0 +1,727 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/automl/v1beta1/prediction_service_pb" + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + ## + # Client for the PredictionService service. + # + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :prediction_service_stub + + ## + # Configure the PredictionService Client class. + # + # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PredictionService clients + # ::Google::Cloud::AutoML::V1beta1::PredictionService::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", "AutoML", "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.predict.timeout = 60.0 + + default_config.rpcs.batch_predict.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService 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::AutoML::V1beta1::PredictionService::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 + @prediction_service_stub.universe_domain + end + + ## + # Create a new PredictionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PredictionService 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/automl/v1beta1/prediction_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 + + @prediction_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AutoML::V1beta1::PredictionService::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 + ) + + @prediction_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::AutoML::V1beta1::PredictionService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @prediction_service_stub.logger + end + + # Service calls + + ## + # Perform an online prediction. The prediction result will be directly + # returned in the response. + # Available for following ML problems, and their expected request payloads: + # * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes + # up to 30MB. + # * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes + # up to 30MB. + # * Text Classification - TextSnippet, content up to 60,000 characters, + # UTF-8 encoded. + # * Text Extraction - TextSnippet, content up to 30,000 characters, + # UTF-8 NFC encoded. + # * Translation - TextSnippet, content up to 25,000 characters, UTF-8 + # encoded. + # * Tables - Row, with column values matching the columns of the model, + # up to 5MB. Not available for FORECASTING + # + # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. + # * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 + # encoded. + # + # @overload predict(request, options = nil) + # Pass arguments to `predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::PredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::PredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload predict(name: nil, payload: nil, params: nil) + # Pass arguments to `predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model requested to serve the prediction. + # @param payload [::Google::Cloud::AutoML::V1beta1::ExamplePayload, ::Hash] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned in the response. Default is 100, the + # requested value may be limited by server. + # * For Tables: + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotation. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::PredictRequest.new + # + # # Call the predict method. + # result = client.predict request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. + # p result + # + def predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::PredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.predict.timeout, + metadata: metadata, + retry_policy: @config.rpcs.predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.call_rpc :predict, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict Predict}, batch + # prediction result won't be immediately available in the response. Instead, + # a long running operation object is returned. User can poll the operation + # result via GetOperation + # method. Once the operation is done, {::Google::Cloud::AutoML::V1beta1::BatchPredictResult BatchPredictResult} is returned in + # the {::Google::Longrunning::Operation#response response} field. + # Available for following ML problems: + # * Image Classification + # * Image Object Detection + # * Video Classification + # * Video Object Tracking * Text Extraction + # * Tables + # + # @overload batch_predict(request, options = nil) + # Pass arguments to `batch_predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::BatchPredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_predict(name: nil, input_config: nil, output_config: nil, params: nil) + # Pass arguments to `batch_predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model requested to serve the batch prediction. + # @param input_config [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig, ::Hash] + # Required. The input configuration for batch prediction. + # @param output_config [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig, ::Hash] + # Required. The Configuration specifying where output predictions should + # be written. + # @param params [::Hash{::String => ::String}] + # Required. Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # * For Text Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be produced per image. Default is 100, the + # requested value may be limited by server. + # + # * For Video Classification : + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # `segment_classification` - (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is "true". + # `shot_classification` - (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. The default is "false". + # `1s_interval_classification` - (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. The default is + # "false". + # + # * For Tables: + # + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotations. The + # default is false. + # + # * For Video Object Tracking: + # + # `score_threshold` - (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned per frame. Default is 100, the requested + # value may be limited by server. + # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size will be + # returned. Value in 0 to 1 range. Default is 0. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new + # + # # Call the batch_predict method. + # result = client.batch_predict request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest + + # Converts hash and nil to 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_predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.batch_predict.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.call_rpc :batch_predict, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 PredictionService API. + # + # This class represents the configuration for PredictionService, + # providing control 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::AutoML::V1beta1::PredictionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # predict to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::AutoML::V1beta1::PredictionService::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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 PredictionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `predict` + # @return [::Gapic::Config::Method] + # + attr_reader :predict + ## + # RPC-specific configuration for `batch_predict` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_predict + + # @private + def initialize parent_rpcs = nil + predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict + @predict = ::Gapic::Config::Method.new predict_config + batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict + @batch_predict = ::Gapic::Config::Method.new batch_predict_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb new file mode 100644 index 000000000000..a5db32e08e4d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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 AutoML + module V1beta1 + module PredictionService + # Credentials for the PredictionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "AUTOML_CREDENTIALS", + "AUTOML_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "AUTOML_CREDENTIALS_JSON", + "AUTOML_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb new file mode 100644 index 000000000000..fc03f007a693 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb @@ -0,0 +1,851 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 AutoML + module V1beta1 + module PredictionService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PredictionService 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 PredictionService 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::AutoML::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::AutoML::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::AutoML::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::AutoML::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::AutoML::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.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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb new file mode 100644 index 000000000000..a43bf51c919f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + # Path helper methods for the PredictionService API. + module Paths + ## + # Create a fully-qualified Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb new file mode 100644 index 000000000000..7d3604f143b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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/automl/v1beta1/version" + +require "google/cloud/automl/v1beta1/prediction_service/credentials" +require "google/cloud/automl/v1beta1/prediction_service/paths" +require "google/cloud/automl/v1beta1/prediction_service/rest/operations" +require "google/cloud/automl/v1beta1/prediction_service/rest/client" + +module Google + module Cloud + module AutoML + module V1beta1 + ## + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/automl/v1beta1/prediction_service/rest" + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + module PredictionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/automl/v1beta1/prediction_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb new file mode 100644 index 000000000000..43ddbdebe172 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb @@ -0,0 +1,670 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/automl/v1beta1/prediction_service_pb" +require "google/cloud/automl/v1beta1/prediction_service/rest/service_stub" + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + module Rest + ## + # REST client for the PredictionService service. + # + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :prediction_service_stub + + ## + # Configure the PredictionService Client class. + # + # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PredictionService clients + # ::Google::Cloud::AutoML::V1beta1::PredictionService::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", "AutoML", "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.predict.timeout = 60.0 + + default_config.rpcs.batch_predict.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService 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::AutoML::V1beta1::PredictionService::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 + @prediction_service_stub.universe_domain + end + + ## + # Create a new PredictionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PredictionService 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::AutoML::V1beta1::PredictionService::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 + + @prediction_service_stub = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @prediction_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::AutoML::V1beta1::PredictionService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @prediction_service_stub.logger + end + + # Service calls + + ## + # Perform an online prediction. The prediction result will be directly + # returned in the response. + # Available for following ML problems, and their expected request payloads: + # * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes + # up to 30MB. + # * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes + # up to 30MB. + # * Text Classification - TextSnippet, content up to 60,000 characters, + # UTF-8 encoded. + # * Text Extraction - TextSnippet, content up to 30,000 characters, + # UTF-8 NFC encoded. + # * Translation - TextSnippet, content up to 25,000 characters, UTF-8 + # encoded. + # * Tables - Row, with column values matching the columns of the model, + # up to 5MB. Not available for FORECASTING + # + # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. + # * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 + # encoded. + # + # @overload predict(request, options = nil) + # Pass arguments to `predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::PredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::PredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload predict(name: nil, payload: nil, params: nil) + # Pass arguments to `predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model requested to serve the prediction. + # @param payload [::Google::Cloud::AutoML::V1beta1::ExamplePayload, ::Hash] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned in the response. Default is 100, the + # requested value may be limited by server. + # * For Tables: + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotation. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::PredictRequest.new + # + # # Call the predict method. + # result = client.predict request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. + # p result + # + def predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::PredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.predict.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.predict request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client#predict Predict}, batch + # prediction result won't be immediately available in the response. Instead, + # a long running operation object is returned. User can poll the operation + # result via GetOperation + # method. Once the operation is done, {::Google::Cloud::AutoML::V1beta1::BatchPredictResult BatchPredictResult} is returned in + # the {::Google::Longrunning::Operation#response response} field. + # Available for following ML problems: + # * Image Classification + # * Image Object Detection + # * Video Classification + # * Video Object Tracking * Text Extraction + # * Tables + # + # @overload batch_predict(request, options = nil) + # Pass arguments to `batch_predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::BatchPredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_predict(name: nil, input_config: nil, output_config: nil, params: nil) + # Pass arguments to `batch_predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 model requested to serve the batch prediction. + # @param input_config [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig, ::Hash] + # Required. The input configuration for batch prediction. + # @param output_config [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig, ::Hash] + # Required. The Configuration specifying where output predictions should + # be written. + # @param params [::Hash{::String => ::String}] + # Required. Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # * For Text Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be produced per image. Default is 100, the + # requested value may be limited by server. + # + # * For Video Classification : + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # `segment_classification` - (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is "true". + # `shot_classification` - (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. The default is "false". + # `1s_interval_classification` - (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. The default is + # "false". + # + # * For Tables: + # + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotations. The + # default is false. + # + # * For Video Object Tracking: + # + # `score_threshold` - (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned per frame. Default is 100, the requested + # value may be limited by server. + # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size will be + # returned. Value in 0 to 1 range. Default is 0. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new + # + # # Call the batch_predict method. + # result = client.batch_predict request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest + + # Converts hash and nil to an 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_predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::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.batch_predict.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.batch_predict request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 PredictionService REST API. + # + # This class represents the configuration for PredictionService 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::AutoML::V1beta1::PredictionService::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 + # # predict to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 PredictionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `predict` + # @return [::Gapic::Config::Method] + # + attr_reader :predict + ## + # RPC-specific configuration for `batch_predict` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_predict + + # @private + def initialize parent_rpcs = nil + predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict + @predict = ::Gapic::Config::Method.new predict_config + batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict + @batch_predict = ::Gapic::Config::Method.new batch_predict_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb new file mode 100644 index 000000000000..f5e618e44755 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb @@ -0,0 +1,1095 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 AutoML + module V1beta1 + module PredictionService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PredictionService 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 PredictionService 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::AutoML::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::AutoML::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::AutoML::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::AutoML::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 + + ## + # 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 [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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::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 + call_metadata = @config.rpcs.wait_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::AutoML::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.wait_operation.timeout, + metadata: call_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.wait_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 + + ## + # 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 = "automl.googleapis.com" + + config_attr :endpoint, nil, ::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 + ## + # 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 + + ## + # @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 + + ## + # Baseline implementation for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_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: "wait_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 + + ## + # @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 + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:wait", + 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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb new file mode 100644 index 000000000000..4d4927cfe5ad --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/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/cloud/automl/v1beta1/prediction_service_pb" + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + module Rest + ## + # REST service stub for the PredictionService 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 predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::PredictRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # A result object deserialized from the server's reply + def predict request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_predict_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "predict", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::PredictResponse.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_predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_predict request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_predict_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_predict", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::PredictRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_predict_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:predict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest] + # 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_predict_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:batchPredict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb new file mode 100644 index 000000000000..1d749800e047 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/prediction_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/automl/v1beta1/annotation_payload_pb' +require 'google/cloud/automl/v1beta1/data_items_pb' +require 'google/cloud/automl/v1beta1/io_pb' +require 'google/cloud/automl/v1beta1/operations_pb' +require 'google/longrunning/operations_pb' + + +descriptor_data = "\n4google/cloud/automl/v1beta1/prediction_service.proto\x12\x1bgoogle.cloud.automl.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/automl/v1beta1/annotation_payload.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a,google/cloud/automl/v1beta1/operations.proto\x1a#google/longrunning/operations.proto\"\xfe\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x41\n\x07payload\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayloadB\x03\xe0\x41\x02\x12G\n\x06params\x18\x03 \x03(\x0b\x32\x37.google.cloud.automl.v1beta1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9a\x02\n\x0fPredictResponse\x12?\n\x07payload\x18\x01 \x03(\x0b\x32..google.cloud.automl.v1beta1.AnnotationPayload\x12G\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayload\x12L\n\x08metadata\x18\x02 \x03(\x0b\x32:.google.cloud.automl.v1beta1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xee\x02\n\x13\x42\x61tchPredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12O\n\x0cinput_config\x18\x03 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12Q\n\routput_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12Q\n\x06params\x18\x05 \x03(\x0b\x32<.google.cloud.automl.v1beta1.BatchPredictRequest.ParamsEntryB\x03\xe0\x41\x02\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x96\x01\n\x12\x42\x61tchPredictResult\x12O\n\x08metadata\x18\x01 \x03(\x0b\x32=.google.cloud.automl.v1beta1.BatchPredictResult.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\x9e\x04\n\x11PredictionService\x12\xbe\x01\n\x07Predict\x12+.google.cloud.automl.v1beta1.PredictRequest\x1a,.google.cloud.automl.v1beta1.PredictResponse\"X\xda\x41\x13name,payload,params\x82\xd3\xe4\x93\x02<\"7/v1beta1/{name=projects/*/locations/*/models/*}:predict:\x01*\x12\xfc\x01\n\x0c\x42\x61tchPredict\x12\x30.google.cloud.automl.v1beta1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41\'\n\x12\x42\x61tchPredictResult\x12\x11OperationMetadata\xda\x41&name,input_config,output_config,params\x82\xd3\xe4\x93\x02\x41\"/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}\x12\xca\x01\n\x0eListTableSpecs\x12\x32.google.cloud.automl.v1beta1.ListTableSpecsRequest\x1a\x33.google.cloud.automl.v1beta1.ListTableSpecsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs\x12\xda\x01\n\x0fUpdateTableSpec\x12\x33.google.cloud.automl.v1beta1.UpdateTableSpecRequest\x1a&.google.cloud.automl.v1beta1.TableSpec\"j\xda\x41\ntable_spec\x82\xd3\xe4\x93\x02W2I/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}:\ntable_spec\x12\xc8\x01\n\rGetColumnSpec\x12\x31.google.cloud.automl.v1beta1.GetColumnSpecRequest\x1a\'.google.cloud.automl.v1beta1.ColumnSpec\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}\x12\xdb\x01\n\x0fListColumnSpecs\x12\x33.google.cloud.automl.v1beta1.ListColumnSpecsRequest\x1a\x34.google.cloud.automl.v1beta1.ListColumnSpecsResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs\x12\xee\x01\n\x10UpdateColumnSpec\x12\x34.google.cloud.automl.v1beta1.UpdateColumnSpecRequest\x1a\'.google.cloud.automl.v1beta1.ColumnSpec\"{\xda\x41\x0b\x63olumn_spec\x82\xd3\xe4\x93\x02g2X/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}:\x0b\x63olumn_spec\x12\xc9\x01\n\x0b\x43reateModel\x12/.google.cloud.automl.v1beta1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x38\"//v1beta1/{parent=projects/*/locations/*}/models:\x05model\x12\x9c\x01\n\x08GetModel\x12,.google.cloud.automl.v1beta1.GetModelRequest\x1a\".google.cloud.automl.v1beta1.Model\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{name=projects/*/locations/*/models/*}\x12\xaf\x01\n\nListModels\x12..google.cloud.automl.v1beta1.ListModelsRequest\x1a/.google.cloud.automl.v1beta1.ListModelsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{parent=projects/*/locations/*}/models\x12\xca\x01\n\x0b\x44\x65leteModel\x12/.google.cloud.automl.v1beta1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1beta1/{name=projects/*/locations/*/models/*}\x12\xd4\x01\n\x0b\x44\x65ployModel\x12/.google.cloud.automl.v1beta1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/locations/*/models/*}:deploy:\x01*\x12\xda\x01\n\rUndeployModel\x12\x31.google.cloud.automl.v1beta1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v1beta1/{name=projects/*/locations/*/models/*}:undeploy:\x01*\x12\xe3\x01\n\x0b\x45xportModel\x12/.google.cloud.automl.v1beta1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\x8c\x02\n\x17\x45xportEvaluatedExamples\x12;.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples:\x01*\x12\xcd\x01\n\x12GetModelEvaluation\x12\x36.google.cloud.automl.v1beta1.GetModelEvaluationRequest\x1a,.google.cloud.automl.v1beta1.ModelEvaluation\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}\x12\xe0\x01\n\x14ListModelEvaluations\x12\x38.google.cloud.automl.v1beta1.ListModelEvaluationsRequest\x1a\x39.google.cloud.automl.v1beta1.ListModelEvaluationsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa8\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x0b\x41utoMlProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateDatasetRequest").msgclass + GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetDatasetRequest").msgclass + ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListDatasetsRequest").msgclass + ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListDatasetsResponse").msgclass + UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateDatasetRequest").msgclass + DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteDatasetRequest").msgclass + ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImportDataRequest").msgclass + ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataRequest").msgclass + GetAnnotationSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetAnnotationSpecRequest").msgclass + GetTableSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetTableSpecRequest").msgclass + ListTableSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListTableSpecsRequest").msgclass + ListTableSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListTableSpecsResponse").msgclass + UpdateTableSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateTableSpecRequest").msgclass + GetColumnSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetColumnSpecRequest").msgclass + ListColumnSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListColumnSpecsRequest").msgclass + ListColumnSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListColumnSpecsResponse").msgclass + UpdateColumnSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateColumnSpecRequest").msgclass + CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateModelRequest").msgclass + GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetModelRequest").msgclass + ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelsRequest").msgclass + ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelsResponse").msgclass + DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteModelRequest").msgclass + DeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeployModelRequest").msgclass + UndeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UndeployModelRequest").msgclass + ExportModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelRequest").msgclass + ExportEvaluatedExamplesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest").msgclass + GetModelEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetModelEvaluationRequest").msgclass + ListModelEvaluationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelEvaluationsRequest").msgclass + ListModelEvaluationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelEvaluationsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb new file mode 100644 index 000000000000..3058d28ba237 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb @@ -0,0 +1,163 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/automl/v1beta1/service.proto for package 'Google.Cloud.AutoML.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/automl/v1beta1/service_pb' + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoMl + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.automl.v1beta1.AutoMl' + + # Creates a dataset. + rpc :CreateDataset, ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset + # Gets a dataset. + rpc :GetDataset, ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset + # Lists datasets in a project. + rpc :ListDatasets, ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse + # Updates a dataset. + rpc :UpdateDataset, ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset + # Deletes a dataset and all of its contents. + # Returns empty response in the + # [response][google.longrunning.Operation.response] field when it completes, + # and `delete_details` in the + # [metadata][google.longrunning.Operation.metadata] field. + rpc :DeleteDataset, ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Google::Longrunning::Operation + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] + # parameter must be explicitly set. + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ImportData, ::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Google::Longrunning::Operation + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ExportData, ::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Google::Longrunning::Operation + # Gets an annotation spec. + rpc :GetAnnotationSpec, ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Google::Cloud::AutoML::V1beta1::AnnotationSpec + # Gets a table spec. + rpc :GetTableSpec, ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Google::Cloud::AutoML::V1beta1::TableSpec + # Lists table specs in a dataset. + rpc :ListTableSpecs, ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse + # Updates a table spec. + rpc :UpdateTableSpec, ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Google::Cloud::AutoML::V1beta1::TableSpec + # Gets a column spec. + rpc :GetColumnSpec, ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Google::Cloud::AutoML::V1beta1::ColumnSpec + # Lists column specs in a table spec. + rpc :ListColumnSpecs, ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse + # Updates a column spec. + rpc :UpdateColumnSpec, ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Google::Cloud::AutoML::V1beta1::ColumnSpec + # Creates a model. + # Returns a Model in the [response][google.longrunning.Operation.response] + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + rpc :CreateModel, ::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Google::Longrunning::Operation + # Gets a model. + rpc :GetModel, ::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Google::Cloud::AutoML::V1beta1::Model + # Lists models. + rpc :ListModels, ::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Google::Cloud::AutoML::V1beta1::ListModelsResponse + # Deletes a model. + # Returns `google.protobuf.Empty` in the + # [response][google.longrunning.Operation.response] field when it completes, + # and `delete_details` in the + # [metadata][google.longrunning.Operation.metadata] field. + rpc :DeleteModel, ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Google::Longrunning::Operation + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # + # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :DeployModel, ::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Google::Longrunning::Operation + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :UndeployModel, ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Google::Longrunning::Operation + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # + # [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ExportModel, ::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Google::Longrunning::Operation + # Exports examples on which the model was evaluated (i.e. which were in the + # TEST set of the dataset the model was created from), together with their + # ground truth annotations and the annotations created (predicted) by the + # model. + # The examples, ground truth and predictions are exported in the state + # they were at the moment the model was evaluated. + # + # This export is available only for 30 days since the model evaluation is + # created. + # + # Currently only available for Tables. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ExportEvaluatedExamples, ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Google::Longrunning::Operation + # Gets a model evaluation. + rpc :GetModelEvaluation, ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Google::Cloud::AutoML::V1beta1::ModelEvaluation + # Lists model evaluations. + rpc :ListModelEvaluations, ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb new file mode 100644 index 000000000000..160d97c9614a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/table_spec.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/io_pb' + + +descriptor_data = "\n,google/cloud/automl/v1beta1/table_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a$google/cloud/automl/v1beta1/io.proto\"\xc1\x02\n\tTableSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x13time_column_spec_id\x18\x02 \x01(\t\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x17\n\x0fvalid_row_count\x18\x04 \x01(\x03\x12\x14\n\x0c\x63olumn_count\x18\x07 \x01(\x03\x12?\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.automl.v1beta1.InputConfig\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t:x\xea\x41u\n\x1f\x61utoml.googleapis.com/TableSpec\x12Rprojects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TableSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TableSpec").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb new file mode 100644 index 000000000000..f6d3ca925dc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/tables.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/classification_pb' +require 'google/cloud/automl/v1beta1/column_spec_pb' +require 'google/cloud/automl/v1beta1/data_items_pb' +require 'google/cloud/automl/v1beta1/data_stats_pb' +require 'google/cloud/automl/v1beta1/ranges_pb' +require 'google/cloud/automl/v1beta1/regression_pb' +require 'google/cloud/automl/v1beta1/temporal_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/cloud/automl/v1beta1/tables.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a-google/cloud/automl/v1beta1/column_spec.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a,google/cloud/automl/v1beta1/data_stats.proto\x1a(google/cloud/automl/v1beta1/ranges.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a*google/cloud/automl/v1beta1/temporal.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x03\n\x15TablesDatasetMetadata\x12\x1d\n\x15primary_table_spec_id\x18\x01 \x01(\t\x12\x1d\n\x15target_column_spec_id\x18\x02 \x01(\t\x12\x1d\n\x15weight_column_spec_id\x18\x03 \x01(\t\x12\x1d\n\x15ml_use_column_spec_id\x18\x04 \x01(\t\x12t\n\x1atarget_column_correlations\x18\x06 \x03(\x0b\x32P.google.cloud.automl.v1beta1.TablesDatasetMetadata.TargetColumnCorrelationsEntry\x12\x35\n\x11stats_update_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1an\n\x1dTargetColumnCorrelationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1beta1.CorrelationStats:\x02\x38\x01\"\x96\x04\n\x13TablesModelMetadata\x12-\n#optimization_objective_recall_value\x18\x11 \x01(\x02H\x00\x12\x30\n&optimization_objective_precision_value\x18\x12 \x01(\x02H\x00\x12\x43\n\x12target_column_spec\x18\x02 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.ColumnSpec\x12K\n\x1ainput_feature_column_specs\x18\x03 \x03(\x0b\x32\'.google.cloud.automl.v1beta1.ColumnSpec\x12\x1e\n\x16optimization_objective\x18\x04 \x01(\t\x12T\n\x18tables_model_column_info\x18\x05 \x03(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesModelColumnInfo\x12%\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x12#\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\x12\x1e\n\x16\x64isable_early_stopping\x18\x0c \x01(\x08\x42*\n(additional_optimization_objective_config\"\xfd\x01\n\x10TablesAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\x12\x45\n\x13prediction_interval\x18\x04 \x01(\x0b\x32(.google.cloud.automl.v1beta1.DoubleRange\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x12T\n\x18tables_model_column_info\x18\x03 \x03(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesModelColumnInfo\x12\x16\n\x0e\x62\x61seline_score\x18\x05 \x01(\x02\"j\n\x15TablesModelColumnInfo\x12\x18\n\x10\x63olumn_spec_name\x18\x01 \x01(\t\x12\x1b\n\x13\x63olumn_display_name\x18\x02 \x01(\t\x12\x1a\n\x12\x66\x65\x61ture_importance\x18\x03 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TablesDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesDatasetMetadata").msgclass + TablesModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesModelMetadata").msgclass + TablesAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesAnnotation").msgclass + TablesModelColumnInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesModelColumnInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb new file mode 100644 index 000000000000..396cc6fd35e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/temporal.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n*google/cloud/automl/v1beta1/temporal.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1egoogle/protobuf/duration.proto\"w\n\x0bTimeSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TimeSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimeSegment").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb new file mode 100644 index 000000000000..d6721fb18c95 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/text_extraction.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/text_segment_pb' + + +descriptor_data = "\n1google/cloud/automl/v1beta1/text_extraction.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a.google/cloud/automl/v1beta1/text_segment.proto\"y\n\x18TextExtractionAnnotation\x12@\n\x0ctext_segment\x18\x03 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSegmentH\x00\x12\r\n\x05score\x18\x01 \x01(\x02\x42\x0c\n\nannotation\"\x97\x02\n\x1fTextExtractionEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12w\n\x1a\x63onfidence_metrics_entries\x18\x02 \x03(\x0b\x32S.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x03 \x01(\x02\x12\x11\n\tprecision\x18\x04 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x05 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TextExtractionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionAnnotation").msgclass + TextExtractionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics").msgclass + TextExtractionEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb new file mode 100644 index 000000000000..ff6b1ba5b994 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/text.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/classification_pb' + + +descriptor_data = "\n&google/cloud/automl/v1beta1/text.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\"q\n!TextClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"o\n\x1fTextClassificationModelMetadata\x12L\n\x13\x63lassification_type\x18\x03 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"\x1f\n\x1dTextExtractionDatasetMetadata\"1\n\x1bTextExtractionModelMetadata\x12\x12\n\nmodel_hint\x18\x03 \x01(\t\"5\n\x1cTextSentimentDatasetMetadata\x12\x15\n\rsentiment_max\x18\x01 \x01(\x05\"\x1c\n\x1aTextSentimentModelMetadataB\xa6\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\tTextProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TextClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextClassificationDatasetMetadata").msgclass + TextClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextClassificationModelMetadata").msgclass + TextExtractionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionDatasetMetadata").msgclass + TextExtractionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionModelMetadata").msgclass + TextSentimentDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentDatasetMetadata").msgclass + TextSentimentModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentModelMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb new file mode 100644 index 000000000000..33f9468c557a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/text_segment.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/automl/v1beta1/text_segment.proto\x12\x1bgoogle.cloud.automl.v1beta1\"H\n\x0bTextSegment\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x14\n\x0cstart_offset\x18\x01 \x01(\x03\x12\x12\n\nend_offset\x18\x02 \x01(\x03\x42\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x10TextSegmentProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSegment").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb new file mode 100644 index 000000000000..0b206376a98e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/text_sentiment.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/classification_pb' + + +descriptor_data = "\n0google/cloud/automl/v1beta1/text_sentiment.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\",\n\x17TextSentimentAnnotation\x12\x11\n\tsentiment\x18\x01 \x01(\x05\"\xc5\x02\n\x1eTextSentimentEvaluationMetrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12\x1b\n\x13mean_absolute_error\x18\x04 \x01(\x02\x12\x1a\n\x12mean_squared_error\x18\x05 \x01(\x02\x12\x14\n\x0clinear_kappa\x18\x06 \x01(\x02\x12\x17\n\x0fquadratic_kappa\x18\x07 \x01(\x02\x12\x66\n\x10\x63onfusion_matrix\x18\x08 \x01(\x0b\x32L.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1e\n\x12\x61nnotation_spec_id\x18\t \x03(\tB\x02\x18\x01\x42\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x12TextSentimentProtoZ7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TextSentimentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentAnnotation").msgclass + TextSentimentEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb new file mode 100644 index 000000000000..cbd8923df2c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/translation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/automl/v1beta1/data_items_pb' + + +descriptor_data = "\n-google/cloud/automl/v1beta1/translation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\"b\n\x1aTranslationDatasetMetadata\x12!\n\x14source_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14target_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"K\n\x1cTranslationEvaluationMetrics\x12\x12\n\nbleu_score\x18\x01 \x01(\x01\x12\x17\n\x0f\x62\x61se_bleu_score\x18\x02 \x01(\x01\"j\n\x18TranslationModelMetadata\x12\x12\n\nbase_model\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\"]\n\x15TranslationAnnotation\x12\x44\n\x12translated_content\x18\x01 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippetB\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x10TranslationProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TranslationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationDatasetMetadata").msgclass + TranslationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationEvaluationMetrics").msgclass + TranslationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationModelMetadata").msgclass + TranslationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationAnnotation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb new file mode 100644 index 000000000000..339624fb94a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/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 AutoML + module V1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb new file mode 100644 index 000000000000..0cde809f1c74 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/video.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/classification_pb' + + +descriptor_data = "\n\'google/cloud/automl/v1beta1/video.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\"$\n\"VideoClassificationDatasetMetadata\"$\n\"VideoObjectTrackingDatasetMetadata\"\"\n VideoClassificationModelMetadata\"\"\n VideoObjectTrackingModelMetadataB\xa7\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\nVideoProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + VideoClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata").msgclass + VideoObjectTrackingDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata").msgclass + VideoClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationModelMetadata").msgclass + VideoObjectTrackingModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..483947fef0b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud AutoML 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-automl-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb new file mode 100644 index 000000000000..a5d64336682a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.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 AutoML + module V1beta1 + # Contains annotation information that is relevant to AutoML. + # @!attribute [rw] translation + # @return [::Google::Cloud::AutoML::V1beta1::TranslationAnnotation] + # Annotation details for translation. + # + # Note: The following fields are mutually exclusive: `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] classification + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationAnnotation] + # Annotation details for content or image classification. + # + # Note: The following fields are mutually exclusive: `classification`, `translation`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection + # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionAnnotation] + # Annotation details for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection`, `translation`, `classification`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_classification + # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationAnnotation] + # Annotation details for video classification. + # Returned for Video Classification predictions. + # + # Note: The following fields are mutually exclusive: `video_classification`, `translation`, `classification`, `image_object_detection`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_object_tracking + # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingAnnotation] + # Annotation details for video object tracking. + # + # Note: The following fields are mutually exclusive: `video_object_tracking`, `translation`, `classification`, `image_object_detection`, `video_classification`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction + # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionAnnotation] + # Annotation details for text extraction. + # + # Note: The following fields are mutually exclusive: `text_extraction`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment + # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentAnnotation] + # Annotation details for text sentiment. + # + # Note: The following fields are mutually exclusive: `text_sentiment`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tables + # @return [::Google::Cloud::AutoML::V1beta1::TablesAnnotation] + # Annotation details for Tables. + # + # Note: The following fields are mutually exclusive: `tables`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] annotation_spec_id + # @return [::String] + # Output only . The resource ID of the annotation spec that + # this annotation pertains to. The annotation spec comes from either an + # ancestor dataset, or the dataset that was used to train the model in use. + # @!attribute [rw] display_name + # @return [::String] + # Output only. The value of + # {::Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name} + # when the model was trained. Because this field returns a value at model + # training time, for different models trained using the same dataset, the + # returned value could be different as model owner could update the + # `display_name` between any two model training. + class AnnotationPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb new file mode 100644 index 000000000000..fef4ea17d2ba --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.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 AutoML + module V1beta1 + # A definition of an annotation spec. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the annotation spec. + # Form: + # + # 'projects/\\{project_id}/locations/\\{location_id}/datasets/\\{dataset_id}/annotationSpecs/\\{annotation_spec_id}' + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the annotation spec to show in the interface. The name can be + # up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. + # @!attribute [rw] example_count + # @return [::Integer] + # Output only. The number of examples in the parent dataset + # labeled by the annotation spec. + class AnnotationSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb new file mode 100644 index 000000000000..ddcb7dbb8d85 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.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 AutoML + module V1beta1 + # Contains annotation details specific to classification. + # @!attribute [rw] score + # @return [::Float] + # Output only. A confidence estimate between 0.0 and 1.0. A higher value + # means greater confidence that the annotation is positive. If a user + # approves an annotation as negative or positive, the score value remains + # unchanged. If a user creates an annotation, the score is 0 for negative or + # 1 for positive. + class ClassificationAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains annotation details specific to video classification. + # @!attribute [rw] type + # @return [::String] + # Output only. Expresses the type of video classification. Possible values: + # + # * `segment` - Classification done on a specified by user + # time segment of a video. AnnotationSpec is answered to be present + # in that time segment, if it is present in any part of it. The video + # ML model evaluations are done only for this type of classification. + # + # * `shot`- Shot-level classification. + # AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no + # metrics provided to describe that quality. + # + # * `1s_interval` - AutoML Video Intelligence returns labels and their + # confidence scores for each second of the entire segment of the video + # that user specified in the request configuration. + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no + # metrics provided to describe that quality. + # @!attribute [rw] classification_annotation + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationAnnotation] + # Output only . The classification details of this annotation. + # @!attribute [rw] time_segment + # @return [::Google::Cloud::AutoML::V1beta1::TimeSegment] + # Output only . The time segment of the video to which the + # annotation applies. + class VideoClassificationAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for classification problems. + # Note: For Video Classification this metrics only describe quality of the + # Video Classification predictions of "segment_classification" type. + # @!attribute [rw] au_prc + # @return [::Float] + # Output only. The Area Under Precision-Recall Curve metric. Micro-averaged + # for the overall evaluation. + # @!attribute [rw] base_au_prc + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Float] + # Output only. The Area Under Precision-Recall Curve metric based on priors. + # Micro-averaged for the overall evaluation. + # Deprecated. + # @!attribute [rw] au_roc + # @return [::Float] + # Output only. The Area Under Receiver Operating Characteristic curve metric. + # Micro-averaged for the overall evaluation. + # @!attribute [rw] log_loss + # @return [::Float] + # Output only. The Log Loss metric. + # @!attribute [rw] confidence_metrics_entry + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>] + # Output only. Metrics for each confidence_threshold in + # 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and + # position_threshold = INT32_MAX_VALUE. + # ROC and precision-recall curves, and other aggregated metrics are derived + # from them. The confidence metrics entries may also be supplied for + # additional values of position_threshold, but from these no aggregated + # metrics are computed. + # @!attribute [rw] confusion_matrix + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix] + # Output only. Confusion matrix of the evaluation. + # Only set for MULTICLASS classification problems where number + # of labels is no more than 10. + # Only set for model level evaluation, not for evaluation per label. + # @!attribute [rw] annotation_spec_id + # @return [::Array<::String>] + # Output only. The annotation spec ids used for this evaluation. + class ClassificationEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. Metrics are computed with an assumption that the model + # never returns predictions with score lower than this value. + # @!attribute [rw] position_threshold + # @return [::Integer] + # Output only. Metrics are computed with an assumption that the model + # always returns at most this many predictions (ordered by their score, + # descendingly), but they all still need to meet the confidence_threshold. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall (True Positive Rate) for the given confidence + # threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision for the given confidence threshold. + # @!attribute [rw] false_positive_rate + # @return [::Float] + # Output only. False Positive Rate for the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + # @!attribute [rw] recall_at1 + # @return [::Float] + # Output only. The Recall (True Positive Rate) when only considering the + # label that has the highest prediction score and not below the confidence + # threshold for each example. + # @!attribute [rw] precision_at1 + # @return [::Float] + # Output only. The precision when only considering the label that has the + # highest prediction score and not below the confidence threshold for each + # example. + # @!attribute [rw] false_positive_rate_at1 + # @return [::Float] + # Output only. The False Positive Rate when only considering the label that + # has the highest prediction score and not below the confidence threshold + # for each example. + # @!attribute [rw] f1_score_at1 + # @return [::Float] + # Output only. The harmonic mean of {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}. + # @!attribute [rw] true_positive_count + # @return [::Integer] + # Output only. The number of model created labels that match a ground truth + # label. + # @!attribute [rw] false_positive_count + # @return [::Integer] + # Output only. The number of model created labels that do not match a + # ground truth label. + # @!attribute [rw] false_negative_count + # @return [::Integer] + # Output only. The number of ground truth labels that are not matched + # by a model created label. + # @!attribute [rw] true_negative_count + # @return [::Integer] + # Output only. The number of labels that were not created by the model, + # but if they would, they would not match a ground truth label. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Confusion matrix of the model running the classification. + # @!attribute [rw] annotation_spec_id + # @return [::Array<::String>] + # Output only. IDs of the annotation specs used in the confusion matrix. + # For Tables CLASSIFICATION + # + # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] + # only list of [annotation_spec_display_name-s][] is populated. + # @!attribute [rw] display_name + # @return [::Array<::String>] + # Output only. Display name of the annotation specs used in the confusion + # matrix, as they were at the moment of the evaluation. For Tables + # CLASSIFICATION + # + # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type], + # distinct values of the target column at the moment of the model + # evaluation are populated here. + # @!attribute [rw] row + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>] + # Output only. Rows in the confusion matrix. The number of rows is equal to + # the size of `annotation_spec_id`. + # `row[i].example_count[j]` is the number of examples that have ground + # truth of the `annotation_spec_id[i]` and are predicted as + # `annotation_spec_id[j]` by the model being evaluated. + class ConfusionMatrix + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Output only. A row in the confusion matrix. + # @!attribute [rw] example_count + # @return [::Array<::Integer>] + # Output only. Value of the specific cell in the confusion matrix. + # The number of values each row has (i.e. the length of the row) is equal + # to the length of the `annotation_spec_id` field or, if that one is not + # populated, length of the {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Type of the classification problem. + module ClassificationType + # An un-set value of this enum. + CLASSIFICATION_TYPE_UNSPECIFIED = 0 + + # At most one label is allowed per example. + MULTICLASS = 1 + + # Multiple labels are allowed for one example. + MULTILABEL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb new file mode 100644 index 000000000000..5a49f3139bdf --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.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 AutoML + module V1beta1 + # A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were + # given on import . + # Used by: + # * Tables + # @!attribute [rw] name + # @return [::String] + # Output only. The resource name of the column specs. + # Form: + # + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}` + # @!attribute [rw] data_type + # @return [::Google::Cloud::AutoML::V1beta1::DataType] + # The data type of elements stored in the column. + # @!attribute [rw] display_name + # @return [::String] + # Output only. The name of the column to show in the interface. The name can + # be up to 100 characters long and can consist only of ASCII Latin letters + # A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and + # must start with a letter or a digit. + # @!attribute [rw] data_stats + # @return [::Google::Cloud::AutoML::V1beta1::DataStats] + # Output only. Stats of the series of values in the column. + # This field may be stale, see the ancestor's + # Dataset.tables_dataset_metadata.stats_update_time field + # for the timestamp at which these stats were last updated. + # @!attribute [rw] top_correlated_columns + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec::CorrelatedColumn>] + # Deprecated. + # @!attribute [rw] etag + # @return [::String] + # Used to perform consistent read-modify-write updates. If not set, a blind + # "overwrite" update happens. + class ColumnSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Identifies the table's column, and its correlation with the column this + # ColumnSpec describes. + # @!attribute [rw] column_spec_id + # @return [::String] + # The column_spec_id of the correlated column, which belongs to the same + # table as the in-context column. + # @!attribute [rw] correlation_stats + # @return [::Google::Cloud::AutoML::V1beta1::CorrelationStats] + # Correlation between this and the in-context column. + class CorrelatedColumn + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb new file mode 100644 index 000000000000..c6d3145ce607 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb @@ -0,0 +1,239 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A representation of an image. + # Only images up to 30MB in size are supported. + # @!attribute [rw] image_bytes + # @return [::String] + # Image content represented as a stream of bytes. + # Note: As with all `bytes` fields, protobuffers use a pure binary + # representation, whereas JSON representations use base64. + # + # Note: The following fields are mutually exclusive: `image_bytes`, `input_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1beta1::InputConfig] + # An input config specifying the content of the image. + # + # Note: The following fields are mutually exclusive: `input_config`, `image_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] thumbnail_uri + # @return [::String] + # Output only. HTTP URI to the thumbnail image. + class Image + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A representation of a text snippet. + # @!attribute [rw] content + # @return [::String] + # Required. The content of the text snippet as a string. Up to 250000 + # characters long. + # @!attribute [rw] mime_type + # @return [::String] + # Optional. The format of {::Google::Cloud::AutoML::V1beta1::TextSnippet#content content}. Currently the only two allowed + # values are "text/html" and "text/plain". If left blank, the format is + # automatically determined from the type of the uploaded {::Google::Cloud::AutoML::V1beta1::TextSnippet#content content}. + # @!attribute [rw] content_uri + # @return [::String] + # Output only. HTTP URI where you can download the content. + class TextSnippet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message that describes dimension of a document. + # @!attribute [rw] unit + # @return [::Google::Cloud::AutoML::V1beta1::DocumentDimensions::DocumentDimensionUnit] + # Unit of the dimension. + # @!attribute [rw] width + # @return [::Float] + # Width value of the document, works together with the unit. + # @!attribute [rw] height + # @return [::Float] + # Height value of the document, works together with the unit. + class DocumentDimensions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Unit of the document dimension. + module DocumentDimensionUnit + # Should not be used. + DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0 + + # Document dimension is measured in inches. + INCH = 1 + + # Document dimension is measured in centimeters. + CENTIMETER = 2 + + # Document dimension is measured in points. 72 points = 1 inch. + POINT = 3 + end + end + + # A structured text document e.g. a PDF. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1beta1::DocumentInputConfig] + # An input config specifying the content of the document. + # @!attribute [rw] document_text + # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] + # The plain text version of this document. + # @!attribute [rw] layout + # @return [::Array<::Google::Cloud::AutoML::V1beta1::Document::Layout>] + # Describes the layout of the document. + # Sorted by [page_number][]. + # @!attribute [rw] document_dimensions + # @return [::Google::Cloud::AutoML::V1beta1::DocumentDimensions] + # The dimensions of the page in the document. + # @!attribute [rw] page_count + # @return [::Integer] + # Number of pages in the document. + class Document + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the layout information of a {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the document. + # @!attribute [rw] text_segment + # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] + # Text Segment that represents a segment in + # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. + # @!attribute [rw] page_number + # @return [::Integer] + # Page number of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the original document, starts + # from 1. + # @!attribute [rw] bounding_poly + # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] + # The position of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the page. + # Contains exactly 4 + # + # {::Google::Cloud::AutoML::V1beta1::BoundingPoly#normalized_vertices normalized_vertices} + # and they are connected by edges in the order provided, which will + # represent a rectangle parallel to the frame. The + # {::Google::Cloud::AutoML::V1beta1::NormalizedVertex NormalizedVertex-s} are + # relative to the page. + # Coordinates are based on top-left as point (0,0). + # @!attribute [rw] text_segment_type + # @return [::Google::Cloud::AutoML::V1beta1::Document::Layout::TextSegmentType] + # The type of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in document. + class Layout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of TextSegment in the context of the original document. + module TextSegmentType + # Should not be used. + TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 + + # The text segment is a token. e.g. word. + TOKEN = 1 + + # The text segment is a paragraph. + PARAGRAPH = 2 + + # The text segment is a form field. + FORM_FIELD = 3 + + # The text segment is the name part of a form field. It will be treated + # as child of another FORM_FIELD TextSegment if its span is subspan of + # another TextSegment with type FORM_FIELD. + FORM_FIELD_NAME = 4 + + # The text segment is the text content part of a form field. It will be + # treated as child of another FORM_FIELD TextSegment if its span is + # subspan of another TextSegment with type FORM_FIELD. + FORM_FIELD_CONTENTS = 5 + + # The text segment is a whole table, including headers, and all rows. + TABLE = 6 + + # The text segment is a table's headers. It will be treated as child of + # another TABLE TextSegment if its span is subspan of another TextSegment + # with type TABLE. + TABLE_HEADER = 7 + + # The text segment is a row in table. It will be treated as child of + # another TABLE TextSegment if its span is subspan of another TextSegment + # with type TABLE. + TABLE_ROW = 8 + + # The text segment is a cell in table. It will be treated as child of + # another TABLE_ROW TextSegment if its span is subspan of another + # TextSegment with type TABLE_ROW. + TABLE_CELL = 9 + end + end + end + + # A representation of a row in a relational table. + # @!attribute [rw] column_spec_ids + # @return [::Array<::String>] + # The resource IDs of the column specs describing the columns of the row. + # If set must contain, but possibly in a different order, all input + # feature + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_spec_ids} + # of the Model this row is being passed to. + # Note: The below `values` field must match order of this field, if this + # field is set. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Required. The values of the row cells, given in the same order as the + # column_spec_ids, or, if not set, then in the same order as input + # feature + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_specs} + # of the Model this row is being passed to. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Example data used for training or prediction. + # @!attribute [rw] image + # @return [::Google::Cloud::AutoML::V1beta1::Image] + # Example image. + # + # Note: The following fields are mutually exclusive: `image`, `text_snippet`, `document`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_snippet + # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] + # Example text. + # + # Note: The following fields are mutually exclusive: `text_snippet`, `image`, `document`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] document + # @return [::Google::Cloud::AutoML::V1beta1::Document] + # Example document. + # + # Note: The following fields are mutually exclusive: `document`, `image`, `text_snippet`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] row + # @return [::Google::Cloud::AutoML::V1beta1::Row] + # Example relational table row. + # + # Note: The following fields are mutually exclusive: `row`, `image`, `text_snippet`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExamplePayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb new file mode 100644 index 000000000000..69d1de9e2ebe --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb @@ -0,0 +1,239 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # The data statistics of a series of values that share the same DataType. + # @!attribute [rw] float64_stats + # @return [::Google::Cloud::AutoML::V1beta1::Float64Stats] + # The statistics for FLOAT64 DataType. + # + # Note: The following fields are mutually exclusive: `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_stats + # @return [::Google::Cloud::AutoML::V1beta1::StringStats] + # The statistics for STRING DataType. + # + # Note: The following fields are mutually exclusive: `string_stats`, `float64_stats`, `timestamp_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] timestamp_stats + # @return [::Google::Cloud::AutoML::V1beta1::TimestampStats] + # The statistics for TIMESTAMP DataType. + # + # Note: The following fields are mutually exclusive: `timestamp_stats`, `float64_stats`, `string_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] array_stats + # @return [::Google::Cloud::AutoML::V1beta1::ArrayStats] + # The statistics for ARRAY DataType. + # + # Note: The following fields are mutually exclusive: `array_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_stats + # @return [::Google::Cloud::AutoML::V1beta1::StructStats] + # The statistics for STRUCT DataType. + # + # Note: The following fields are mutually exclusive: `struct_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] category_stats + # @return [::Google::Cloud::AutoML::V1beta1::CategoryStats] + # The statistics for CATEGORY DataType. + # + # Note: The following fields are mutually exclusive: `category_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `struct_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] distinct_value_count + # @return [::Integer] + # The number of distinct values. + # @!attribute [rw] null_value_count + # @return [::Integer] + # The number of values that are null. + # @!attribute [rw] valid_value_count + # @return [::Integer] + # The number of values that are valid. + class DataStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data statistics of a series of FLOAT64 values. + # @!attribute [rw] mean + # @return [::Float] + # The mean of the series. + # @!attribute [rw] standard_deviation + # @return [::Float] + # The standard deviation of the series. + # @!attribute [rw] quantiles + # @return [::Array<::Float>] + # Ordered from 0 to k k-quantile values of the data series of n values. + # The value at index i is, approximately, the i*n/k-th smallest value in the + # series; for i = 0 and i = k these are, respectively, the min and max + # values. + # @!attribute [rw] histogram_buckets + # @return [::Array<::Google::Cloud::AutoML::V1beta1::Float64Stats::HistogramBucket>] + # Histogram buckets of the data series. Sorted by the min value of the + # bucket, ascendingly, and the number of the buckets is dynamically + # generated. The buckets are non-overlapping and completely cover whole + # FLOAT64 range with min of first bucket being `"-Infinity"`, and max of + # the last one being `"Infinity"`. + class Float64Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A bucket of a histogram. + # @!attribute [rw] min + # @return [::Float] + # The minimum value of the bucket, inclusive. + # @!attribute [rw] max + # @return [::Float] + # The maximum value of the bucket, exclusive unless max = `"Infinity"`, in + # which case it's inclusive. + # @!attribute [rw] count + # @return [::Integer] + # The number of data values that are in the bucket, i.e. are between + # min and max values. + class HistogramBucket + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The data statistics of a series of STRING values. + # @!attribute [rw] top_unigram_stats + # @return [::Array<::Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats>] + # The statistics of the top 20 unigrams, ordered by + # {::Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats#count count}. + class StringStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The statistics of a unigram. + # @!attribute [rw] value + # @return [::String] + # The unigram. + # @!attribute [rw] count + # @return [::Integer] + # The number of occurrences of this unigram in the series. + class UnigramStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The data statistics of a series of TIMESTAMP values. + # @!attribute [rw] granular_stats + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats}] + # The string key is the pre-defined granularity. Currently supported: + # hour_of_day, day_of_week, month_of_year. + # Granularities finer that the granularity of timestamp data are not + # populated (e.g. if timestamps are at day granularity, then hour_of_day + # is not populated). + class TimestampStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Stats split by a defined in context granularity. + # @!attribute [rw] buckets + # @return [::Google::Protobuf::Map{::Integer => ::Integer}] + # A map from granularity key to example count for that key. + # E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May). + class GranularStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::Integer] + # @!attribute [rw] value + # @return [::Integer] + class BucketsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats] + class GranularStatsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The data statistics of a series of ARRAY values. + # @!attribute [rw] member_stats + # @return [::Google::Cloud::AutoML::V1beta1::DataStats] + # Stats of all the values of all arrays, as if they were a single long + # series of data. The type depends on the element type of the array. + class ArrayStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data statistics of a series of STRUCT values. + # @!attribute [rw] field_stats + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::DataStats}] + # Map from a field name of the struct to data stats aggregated over series + # of all data in that field across all the structs. + class StructStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::AutoML::V1beta1::DataStats] + class FieldStatsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The data statistics of a series of CATEGORY values. + # @!attribute [rw] top_category_stats + # @return [::Array<::Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats>] + # The statistics of the top 20 CATEGORY values, ordered by + # + # {::Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats#count count}. + class CategoryStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The statistics of a single CATEGORY value. + # @!attribute [rw] value + # @return [::String] + # The CATEGORY value. + # @!attribute [rw] count + # @return [::Integer] + # The number of occurrences of this value in the series. + class SingleCategoryStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A correlation statistics between two series of DataType values. The series + # may have differing DataType-s, but within a single series the DataType must + # be the same. + # @!attribute [rw] cramers_v + # @return [::Float] + # The correlation value using the Cramer's V measure. + class CorrelationStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb new file mode 100644 index 000000000000..487ca044c5e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.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 AutoML + module V1beta1 + # Indicated the type of data that can be stored in a structured data entity + # (e.g. a table). + # @!attribute [rw] list_element_type + # @return [::Google::Cloud::AutoML::V1beta1::DataType] + # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::ARRAY ARRAY}, + # then `list_element_type` is the type of the elements. + # + # Note: The following fields are mutually exclusive: `list_element_type`, `struct_type`, `time_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_type + # @return [::Google::Cloud::AutoML::V1beta1::StructType] + # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT}, then `struct_type` + # provides type information for the struct's fields. + # + # Note: The following fields are mutually exclusive: `struct_type`, `list_element_type`, `time_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_format + # @return [::String] + # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::TIMESTAMP TIMESTAMP} + # then `time_format` provides the format in which that time field is + # expressed. The time_format must either be one of: + # * `UNIX_SECONDS` + # * `UNIX_MILLISECONDS` + # * `UNIX_MICROSECONDS` + # * `UNIX_NANOSECONDS` + # (for respectively number of seconds, milliseconds, microseconds and + # nanoseconds since start of the Unix epoch); + # or be written in `strftime` syntax. If time_format is not set, then the + # default format as described on the type_code is used. + # + # Note: The following fields are mutually exclusive: `time_format`, `list_element_type`, `struct_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] type_code + # @return [::Google::Cloud::AutoML::V1beta1::TypeCode] + # Required. The {::Google::Cloud::AutoML::V1beta1::TypeCode TypeCode} for this type. + # @!attribute [rw] nullable + # @return [::Boolean] + # If true, this DataType can also be `NULL`. In .CSV files `NULL` value is + # expressed as an empty string. + class DataType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StructType` defines the DataType-s of a {::Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT} type. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::DataType}] + # Unordered map of struct field names to their data types. + # Fields cannot be added or removed via Update. Their names and + # data types are still mutable. + class StructType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::AutoML::V1beta1::DataType] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `TypeCode` is used as a part of + # {::Google::Cloud::AutoML::V1beta1::DataType DataType}. + module TypeCode + # Not specified. Should not be used. + TYPE_CODE_UNSPECIFIED = 0 + + # Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or + # `"-Infinity"`. + FLOAT64 = 3 + + # Must be between 0AD and 9999AD. Encoded as `string` according to + # {::Google::Cloud::AutoML::V1beta1::DataType#time_format time_format}, or, if + # that format is not set, then in RFC 3339 `date-time` format, where + # `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z). + TIMESTAMP = 4 + + # Encoded as `string`. + STRING = 6 + + # Encoded as `list`, where the list elements are represented according to + # + # {::Google::Cloud::AutoML::V1beta1::DataType#list_element_type list_element_type}. + ARRAY = 8 + + # Encoded as `struct`, where field values are represented according to + # {::Google::Cloud::AutoML::V1beta1::DataType#struct_type struct_type}. + STRUCT = 9 + + # Values of this type are not further understood by AutoML, + # e.g. AutoML is unable to tell the order of values (as it could with + # FLOAT64), or is unable to say if one value contains another (as it + # could with STRING). + # Encoded as `string` (bytes should be base64-encoded, as described in RFC + # 4648, section 4). + CATEGORY = 10 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb new file mode 100644 index 000000000000..66f98e62fd51 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A workspace for solving a single, particular machine learning (ML) problem. + # A workspace contains examples that may be annotated. + # @!attribute [rw] translation_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TranslationDatasetMetadata] + # Metadata for a dataset used for translation. + # + # Note: The following fields are mutually exclusive: `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationDatasetMetadata] + # Metadata for a dataset used for image classification. + # + # Note: The following fields are mutually exclusive: `image_classification_dataset_metadata`, `translation_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_classification_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextClassificationDatasetMetadata] + # Metadata for a dataset used for text classification. + # + # Note: The following fields are mutually exclusive: `text_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionDatasetMetadata] + # Metadata for a dataset used for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_classification_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationDatasetMetadata] + # Metadata for a dataset used for video classification. + # + # Note: The following fields are mutually exclusive: `video_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_object_tracking_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingDatasetMetadata] + # Metadata for a dataset used for video object tracking. + # + # Note: The following fields are mutually exclusive: `video_object_tracking_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionDatasetMetadata] + # Metadata for a dataset used for text extraction. + # + # Note: The following fields are mutually exclusive: `text_extraction_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentDatasetMetadata] + # Metadata for a dataset used for text sentiment. + # + # Note: The following fields are mutually exclusive: `text_sentiment_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tables_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata] + # Metadata for a dataset used for Tables. + # + # Note: The following fields are mutually exclusive: `tables_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. The resource name of the dataset. + # Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the dataset to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores + # (_), and ASCII digits 0-9. + # @!attribute [rw] description + # @return [::String] + # User-provided description of the dataset. The description can be up to + # 25000 characters long. + # @!attribute [rw] example_count + # @return [::Integer] + # Output only. The number of examples in the dataset. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this dataset was created. + # @!attribute [rw] etag + # @return [::String] + # Used to perform consistent read-modify-write updates. If not set, a blind + # "overwrite" update happens. + class Dataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb new file mode 100644 index 000000000000..6f569cb06b5e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Annotation details for image object detection. + # @!attribute [rw] bounding_box + # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] + # Output only. The rectangle representing the object location. + # @!attribute [rw] score + # @return [::Float] + # Output only. The confidence that this annotation is positive for the parent example, + # value in [0, 1], higher means higher positivity confidence. + class ImageObjectDetectionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation details for video object tracking. + # @!attribute [rw] instance_id + # @return [::String] + # Optional. The instance of the object, expressed as a positive integer. Used to tell + # apart objects of the same type (i.e. AnnotationSpec) when multiple are + # present on a single example. + # NOTE: Instance ID prediction quality is not a part of model evaluation and + # is done as best effort. Especially in cases when an entity goes + # off-screen for a longer time (minutes), when it comes back it may be given + # a new instance ID. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Required. A time (frame) of a video to which this annotation pertains. + # Represented as the duration since the video's start. + # @!attribute [rw] bounding_box + # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] + # Required. The rectangle representing the object location on the frame (i.e. + # at the time_offset of the video). + # @!attribute [rw] score + # @return [::Float] + # Output only. The confidence that this annotation is positive for the video at + # the time_offset, value in [0, 1], higher means higher positivity + # confidence. For annotations created by the user the score is 1. When + # user approves an annotation, the original float score is kept (and not + # changed to 1). + class VideoObjectTrackingAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bounding box matching model metrics for a single intersection-over-union + # threshold and multiple label match confidence thresholds. + # @!attribute [rw] iou_threshold + # @return [::Float] + # Output only. The intersection-over-union threshold value used to compute + # this metrics entry. + # @!attribute [rw] mean_average_precision + # @return [::Float] + # Output only. The mean average precision, most often close to au_prc. + # @!attribute [rw] confidence_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry::ConfidenceMetricsEntry>] + # Output only. Metrics for each label-match confidence_threshold from + # 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is + # derived from them. + class BoundingBoxMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. The confidence threshold value used to compute the metrics. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall under the given confidence threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision under the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Model evaluation metrics for image object detection problems. + # Evaluates prediction quality of labeled bounding boxes. + # @!attribute [rw] evaluated_bounding_box_count + # @return [::Integer] + # Output only. The total number of bounding boxes (i.e. summed over all + # images) the ground truth used to create this evaluation had. + # @!attribute [rw] bounding_box_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry>] + # Output only. The bounding boxes match metrics for each + # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # pair. + # @!attribute [rw] bounding_box_mean_average_precision + # @return [::Float] + # Output only. The single metric for bounding boxes evaluation: + # the mean_average_precision averaged over all bounding_box_metrics_entries. + class ImageObjectDetectionEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for video object tracking problems. + # Evaluates prediction quality of both labeled bounding boxes and labeled + # tracks (i.e. series of bounding boxes sharing same label and instance ID). + # @!attribute [rw] evaluated_frame_count + # @return [::Integer] + # Output only. The number of video frames used to create this evaluation. + # @!attribute [rw] evaluated_bounding_box_count + # @return [::Integer] + # Output only. The total number of bounding boxes (i.e. summed over all + # frames) the ground truth used to create this evaluation had. + # @!attribute [rw] bounding_box_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry>] + # Output only. The bounding boxes match metrics for each + # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # pair. + # @!attribute [rw] bounding_box_mean_average_precision + # @return [::Float] + # Output only. The single metric for bounding boxes evaluation: + # the mean_average_precision averaged over all bounding_box_metrics_entries. + class VideoObjectTrackingEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb new file mode 100644 index 000000000000..64cc3c7ae1f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.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 AutoML + module V1beta1 + # A vertex represents a 2D point in the image. + # The normalized vertex coordinates are between 0 to 1 fractions relative to + # the original plane (image, video). E.g. if the plane (e.g. whole image) would + # have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would + # be at the position (1, 6) on that plane. + # @!attribute [rw] x + # @return [::Float] + # Required. Horizontal coordinate. + # @!attribute [rw] y + # @return [::Float] + # Required. Vertical coordinate. + class NormalizedVertex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A bounding polygon of a detected object on a plane. + # On output both vertices and normalized_vertices are provided. + # The polygon is formed by connecting vertices in the order they are listed. + # @!attribute [rw] normalized_vertices + # @return [::Array<::Google::Cloud::AutoML::V1beta1::NormalizedVertex>] + # Output only . The bounding polygon normalized vertices. + class BoundingPoly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb new file mode 100644 index 000000000000..e75d8c471c72 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.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! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Dataset metadata that is specific to image classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] + # Required. Type of the classification problem. + class ImageClassificationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata specific to image object detection. + class ImageObjectDetectionDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata for image classification. + # @!attribute [rw] base_model_id + # @return [::String] + # Optional. The ID of the `base` model. If it is specified, the new model + # will be created based on the `base` model. Otherwise, the new model will be + # created from scratch. The `base` model must be in the same + # `project` and `location` as the new model to create, and have the same + # `model_type`. + # @!attribute [rw] train_budget + # @return [::Integer] + # Required. The train budget of creating this model, expressed in hours. The + # actual `train_cost` will be equal or less than this value. + # @!attribute [rw] train_cost + # @return [::Integer] + # Output only. The actual train cost of creating this model, expressed in + # hours. If this model is created from a `base` model, the train cost used + # to create the `base` model are not included. + # @!attribute [rw] stop_reason + # @return [::String] + # Output only. The reason that this create model operation stopped, + # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + # @!attribute [rw] model_type + # @return [::String] + # Optional. Type of the model. The available values are: + # * `cloud` - Model to be used via prediction calls to AutoML API. + # This is the default value. + # * `mobile-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have low latency, but + # may have lower prediction quality than other models. + # * `mobile-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. + # * `mobile-high-accuracy-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have a higher + # latency, but should also have a higher prediction quality + # than other models. + # * `mobile-core-ml-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core + # ML afterwards. Expected to have low latency, but may have + # lower prediction quality than other models. + # * `mobile-core-ml-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core + # ML afterwards. + # * `mobile-core-ml-high-accuracy-1` - A model that, in addition to + # providing prediction via AutoML API, can also be exported + # (see {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with + # Core ML afterwards. Expected to have a higher latency, but + # should also have a higher prediction quality than other + # models. + # @!attribute [rw] node_qps + # @return [::Float] + # Output only. An approximate number of online prediction QPS that can + # be supported by this model per each node on which it is deployed. + # @!attribute [rw] node_count + # @return [::Integer] + # Output only. The number of nodes this model is deployed on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the node_qps field. + class ImageClassificationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata specific to image object detection. + # @!attribute [rw] model_type + # @return [::String] + # Optional. Type of the model. The available values are: + # * `cloud-high-accuracy-1` - (default) A model to be used via prediction + # calls to AutoML API. Expected to have a higher latency, but + # should also have a higher prediction quality than other + # models. + # * `cloud-low-latency-1` - A model to be used via prediction + # calls to AutoML API. Expected to have low latency, but may + # have lower prediction quality than other models. + # * `mobile-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have low latency, but + # may have lower prediction quality than other models. + # * `mobile-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. + # * `mobile-high-accuracy-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have a higher + # latency, but should also have a higher prediction quality + # than other models. + # @!attribute [rw] node_count + # @return [::Integer] + # Output only. The number of nodes this model is deployed on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the qps_per_node field. + # @!attribute [rw] node_qps + # @return [::Float] + # Output only. An approximate number of online prediction QPS that can + # be supported by this model per each node on which it is deployed. + # @!attribute [rw] stop_reason + # @return [::String] + # Output only. The reason that this create model operation stopped, + # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + # @!attribute [rw] train_budget_milli_node_hours + # @return [::Integer] + # The train budget of creating this model, expressed in milli node + # hours i.e. 1,000 value in this field means 1 node hour. The actual + # `train_cost` will be equal or less than this value. If further model + # training ceases to provide any improvements, it will stop without using + # full budget and the stop_reason will be `MODEL_CONVERGED`. + # Note, node_hour = actual_hour * number_of_nodes_invovled. + # For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, + # the train budget must be between 20,000 and 900,000 milli node hours, + # inclusive. The default value is 216, 000 which represents one day in + # wall time. + # For model type `mobile-low-latency-1`, `mobile-versatile-1`, + # `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, + # `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train + # budget must be between 1,000 and 100,000 milli node hours, inclusive. + # The default value is 24, 000 which represents one day in wall time. + # @!attribute [rw] train_cost_milli_node_hours + # @return [::Integer] + # Output only. The actual train cost of creating this model, expressed in + # milli node hours, i.e. 1,000 value in this field means 1 node hour. + # Guaranteed to not exceed the train budget. + class ImageObjectDetectionModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model deployment metadata specific to Image Classification. + # @!attribute [rw] node_count + # @return [::Integer] + # Input only. The number of nodes to deploy the model on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the model's + # + # {::Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata#node_qps node_qps}. + # Must be between 1 and 100, inclusive on both ends. + class ImageClassificationModelDeploymentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model deployment metadata specific to Image Object Detection. + # @!attribute [rw] node_count + # @return [::Integer] + # Input only. The number of nodes to deploy the model on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the model's + # + # [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node]. + # Must be between 1 and 100, inclusive on both ends. + class ImageObjectDetectionModelDeploymentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb new file mode 100644 index 000000000000..bb6c621d86fc --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb @@ -0,0 +1,1214 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Input configuration for ImportData Action. + # + # The format of input depends on dataset_metadata the Dataset into which + # the import is happening has. As input source the + # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} + # is expected, unless specified otherwise. Additionally any input .CSV file + # by itself must be 100MB or smaller, unless specified otherwise. + # If an "example" file (that is, image, video etc.) with identical content + # (even if it had different GCS_FILE_PATH) is mentioned multiple times, then + # its label, bounding boxes etc. are appended. The same file should be always + # provided with the same ML_USE and GCS_FILE_PATH, if it is not, then + # these values are nondeterministically selected from the given ones. + # + # The formats are represented in EBNF with commas being literal and with + # non-terminal symbols defined near the end of this comment. The formats are: + # + # * For Image Classification: + # CSV file(s) with each line in format: + # ML_USE,GCS_FILE_PATH,LABEL,LABEL,... + # GCS_FILE_PATH leads to image of up to 30MB in size. Supported + # extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO + # For MULTICLASS classification type, at most one LABEL is allowed + # per image. If an image has not yet been labeled, then it should be + # mentioned just once with no LABEL. + # Some sample rows: + # TRAIN,gs://folder/image1.jpg,daisy + # TEST,gs://folder/image2.jpg,dandelion,tulip,rose + # UNASSIGNED,gs://folder/image3.jpg,daisy + # UNASSIGNED,gs://folder/image4.jpg + # + # * For Image Object Detection: + # CSV file(s) with each line in format: + # ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,) + # GCS_FILE_PATH leads to image of up to 30MB in size. Supported + # extensions: .JPEG, .GIF, .PNG. + # Each image is assumed to be exhaustively labeled. The minimum + # allowed BOUNDING_BOX edge length is 0.01, and no more than 500 + # BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined + # per line). If an image has not yet been labeled, then it should be + # mentioned just once with no LABEL and the ",,,,,,," in place of the + # BOUNDING_BOX. For images which are known to not contain any + # bounding boxes, they should be labelled explictly as + # "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the + # BOUNDING_BOX. + # Sample rows: + # TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, + # TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, + # UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 + # TEST,gs://folder/im3.png,,,,,,,,, + # TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,, + # + # * For Video Classification: + # CSV file(s) with each line in format: + # ML_USE,GCS_FILE_PATH + # where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH + # should lead to another .csv file which describes examples that have + # given ML_USE, using the following row format: + # GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) + # Here GCS_FILE_PATH leads to a video of up to 50GB in size and up + # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the + # length of the video, and end has to be after the start. Any segment + # of a video which has one or more labels on it, is considered a + # hard negative for all other labels. Any segment with no labels on + # it is considered to be unknown. If a whole video is unknown, then + # it shuold be mentioned just once with ",," in place of LABEL, + # TIME_SEGMENT_START,TIME_SEGMENT_END. + # Sample top level CSV file: + # TRAIN,gs://folder/train_videos.csv + # TEST,gs://folder/test_videos.csv + # UNASSIGNED,gs://folder/other_videos.csv + # Sample rows of a CSV file for a particular ML_USE: + # gs://folder/video1.avi,car,120,180.000021 + # gs://folder/video1.avi,bike,150,180.000021 + # gs://folder/vid2.avi,car,0,60.5 + # gs://folder/vid3.avi,,, + # + # * For Video Object Tracking: + # CSV file(s) with each line in format: + # ML_USE,GCS_FILE_PATH + # where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH + # should lead to another .csv file which describes examples that have + # given ML_USE, using one of the following row format: + # GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX + # or + # GCS_FILE_PATH,,,,,,,,,, + # Here GCS_FILE_PATH leads to a video of up to 50GB in size and up + # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # Providing INSTANCE_IDs can help to obtain a better model. When + # a specific labeled entity leaves the video frame, and shows up + # afterwards it is not required, albeit preferable, that the same + # INSTANCE_ID is given to it. + # TIMESTAMP must be within the length of the video, the + # BOUNDING_BOX is assumed to be drawn on the closest video's frame + # to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected + # to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per + # frame are allowed. If a whole video is unknown, then it should be + # mentioned just once with ",,,,,,,,,," in place of LABEL, + # [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX. + # Sample top level CSV file: + # TRAIN,gs://folder/train_videos.csv + # TEST,gs://folder/test_videos.csv + # UNASSIGNED,gs://folder/other_videos.csv + # Seven sample rows of a CSV file for a particular ML_USE: + # gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 + # gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 + # gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 + # gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, + # gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, + # gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, + # gs://folder/video2.avi,,,,,,,,,,, + # * For Text Extraction: + # CSV file(s) with each line in format: + # ML_USE,GCS_FILE_PATH + # GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which + # either imports text in-line or as documents. Any given + # .JSONL file must be 100MB or smaller. + # The in-line .JSONL file contains, per line, a proto that wraps a + # TextSnippet proto (in json representation) followed by one or more + # AnnotationPayload protos (called annotations), which have + # display_name and text_extraction detail populated. The given text + # is expected to be annotated exhaustively, for example, if you look + # for animals and text contains "dolphin" that is not labeled, then + # "dolphin" is assumed to not be an animal. Any given text snippet + # content must be 10KB or smaller, and also be UTF-8 NFC encoded + # (ASCII already is). + # The document .JSONL file contains, per line, a proto that wraps a + # Document proto. The Document proto must have either document_text + # or input_config set. In document_text case, the Document proto may + # also contain the spatial information of the document, including + # layout, document dimension and page number. In input_config case, + # only PDF documents are supported now, and each document may be up + # to 2MB large. Currently, annotations on documents cannot be + # specified at import. + # Three sample CSV rows: + # TRAIN,gs://folder/file1.jsonl + # VALIDATE,gs://folder/file2.jsonl + # TEST,gs://folder/file3.jsonl + # Sample in-line JSON Lines file for entity extraction (presented here + # with artificial line breaks, but the only actual line break is + # denoted by \n).: + # { + # "document": { + # "document_text": \\{"content": "dog cat"} + # "layout": [ + # { + # "text_segment": { + # "start_offset": 0, + # "end_offset": 3, + # }, + # "page_number": 1, + # "bounding_poly": { + # "normalized_vertices": [ + # \\{"x": 0.1, "y": 0.1}, + # \\{"x": 0.1, "y": 0.3}, + # \\{"x": 0.3, "y": 0.3}, + # \\{"x": 0.3, "y": 0.1}, + # ], + # }, + # "text_segment_type": TOKEN, + # }, + # { + # "text_segment": { + # "start_offset": 4, + # "end_offset": 7, + # }, + # "page_number": 1, + # "bounding_poly": { + # "normalized_vertices": [ + # \\{"x": 0.4, "y": 0.1}, + # \\{"x": 0.4, "y": 0.3}, + # \\{"x": 0.8, "y": 0.3}, + # \\{"x": 0.8, "y": 0.1}, + # ], + # }, + # "text_segment_type": TOKEN, + # } + # + # ], + # "document_dimensions": { + # "width": 8.27, + # "height": 11.69, + # "unit": INCH, + # } + # "page_count": 1, + # }, + # "annotations": [ + # { + # "display_name": "animal", + # "text_extraction": {"text_segment": {"start_offset": 0, + # "end_offset": 3}} + # }, + # { + # "display_name": "animal", + # "text_extraction": {"text_segment": {"start_offset": 4, + # "end_offset": 7}} + # } + # ], + # }\n + # { + # "text_snippet": { + # "content": "This dog is good." + # }, + # "annotations": [ + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": \\{"start_offset": 5, "end_offset": 8} + # } + # } + # ] + # } + # Sample document JSON Lines file (presented here with artificial line + # breaks, but the only actual line break is denoted by \n).: + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] + # } + # } + # } + # }\n + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] + # } + # } + # } + # } + # + # * For Text Classification: + # CSV file(s) with each line in format: + # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... + # TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If + # the column content is a valid gcs file path, i.e. prefixed by + # "gs://", it will be treated as a GCS_FILE_PATH, else if the content + # is enclosed within double quotes (""), it is + # treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path + # must lead to a .txt file with UTF-8 encoding, for example, + # "gs://folder/content.txt", and the content in it is extracted + # as a text snippet. In TEXT_SNIPPET case, the column content + # excluding quotes is treated as to be imported text snippet. In + # both cases, the text snippet/file size must be within 128kB. + # Maximum 100 unique labels are allowed per CSV row. + # Sample rows: + # TRAIN,"They have bad food and very rude",RudeService,BadFood + # TRAIN,gs://folder/content.txt,SlowService + # TEST,"Typically always bad service there.",RudeService + # VALIDATE,"Stomach ache to go.",BadFood + # + # * For Text Sentiment: + # CSV file(s) with each line in format: + # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT + # TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If + # the column content is a valid gcs file path, that is, prefixed by + # "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated + # as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path + # must lead to a .txt file with UTF-8 encoding, for example, + # "gs://folder/content.txt", and the content in it is extracted + # as a text snippet. In TEXT_SNIPPET case, the column content itself + # is treated as to be imported text snippet. In both cases, the + # text snippet must be up to 500 characters long. + # Sample rows: + # TRAIN,"@freewrytin this is way too good for your product",2 + # TRAIN,"I need this product so bad",3 + # TEST,"Thank you for this product.",4 + # VALIDATE,gs://folder/content.txt,2 + # + # * For Tables: + # Either + # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} or + # + # {::Google::Cloud::AutoML::V1beta1::InputConfig#bigquery_source bigquery_source} + # can be used. All inputs is concatenated into a single + # + # [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name] + # For gcs_source: + # CSV file(s), where the first row of the first file is the header, + # containing unique column names. If the first row of a subsequent + # file is the same as the header, then it is also treated as a + # header. All other rows contain values for the corresponding + # columns. + # Each .CSV file by itself must be 10GB or smaller, and their total + # size must be 100GB or smaller. + # First three sample rows of a CSV file: + # "Id","First Name","Last Name","Dob","Addresses" + # + # "1","John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" + # + # "2","Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} + # For bigquery_source: + # An URI of a BigQuery table. The user data size of the BigQuery + # table must be 100GB or smaller. + # An imported table must have between 2 and 1,000 columns, inclusive, + # and between 1000 and 100,000,000 rows, inclusive. There are at most 5 + # import data running in parallel. + # Definitions: + # ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED" + # Describes how the given example (file) should be used for model + # training. "UNASSIGNED" can be used when user has no preference. + # GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png". + # LABEL = A display name of an object on an image, video etc., e.g. "dog". + # Must be up to 32 characters long and can consist only of ASCII + # Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. + # For each label an AnnotationSpec is created which display_name + # becomes the label; AnnotationSpecs are given back in predictions. + # INSTANCE_ID = A positive integer that identifies a specific instance of a + # labeled entity on an example. Used e.g. to track two cars on + # a video while being able to tell apart which one is which. + # BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,, + # A rectangle parallel to the frame of the example (image, + # video). If 4 vertices are given they are connected by edges + # in the order provided, if 2 are given they are recognized + # as diagonally opposite vertices of the rectangle. + # VERTEX = COORDINATE,COORDINATE + # First coordinate is horizontal (x), the second is vertical (y). + # COORDINATE = A float in 0 to 1 range, relative to total length of + # image or video in given dimension. For fractions the + # leading non-decimal 0 can be omitted (i.e. 0.3 = .3). + # Point 0,0 is in top left. + # TIME_SEGMENT_START = TIME_OFFSET + # Expresses a beginning, inclusive, of a time segment + # within an example that has a time dimension + # (e.g. video). + # TIME_SEGMENT_END = TIME_OFFSET + # Expresses an end, exclusive, of a time segment within + # an example that has a time dimension (e.g. video). + # TIME_OFFSET = A number of seconds as measured from the start of an + # example (e.g. video). Fractions are allowed, up to a + # microsecond precision. "inf" is allowed, and it means the end + # of the example. + # TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within + # double quotes (""). + # SENTIMENT = An integer between 0 and + # Dataset.text_sentiment_dataset_metadata.sentiment_max + # (inclusive). Describes the ordinal of the sentiment - higher + # value means a more positive sentiment. All the values are + # completely relative, i.e. neither 0 needs to mean a negative or + # neutral sentiment nor sentiment_max needs to mean a positive one + # - it is just required that 0 is the least positive sentiment + # in the data, and sentiment_max is the most positive one. + # The SENTIMENT shouldn't be confused with "score" or "magnitude" + # from the previous Natural Language Sentiment Analysis API. + # All SENTIMENT values between 0 and sentiment_max must be + # represented in the imported data. On prediction the same 0 to + # sentiment_max range will be used. The difference between + # neighboring sentiment values needs not to be uniform, e.g. 1 and + # 2 may be similar whereas the difference between 2 and 3 may be + # huge. + # + # Errors: + # If any of the provided CSV files can't be parsed or if more than certain + # percent of CSV rows cannot be processed then the operation fails and + # nothing is imported. Regardless of overall success or failure the per-row + # failures, up to a certain count cap, is listed in + # Operation.metadata.partial_failures. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] + # The Google Cloud Storage location for the input content. + # In ImportData, the gcs_source points to a csv with structure described in + # the comment. + # + # Note: The following fields are mutually exclusive: `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_source + # @return [::Google::Cloud::AutoML::V1beta1::BigQuerySource] + # The BigQuery location for the input content. + # + # Note: The following fields are mutually exclusive: `bigquery_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific parameters describing the semantic of the + # imported data, any string must be up to 25000 + # characters long. + # + # * For Tables: + # `schema_inference_version` - (integer) Required. The version of the + # algorithm that should be used for the initial inference of the + # schema (columns' DataTypes) of the table the data is being imported + # into. Allowed values: "1". + class InputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Input configuration for BatchPredict Action. + # + # The format of input depends on the ML problem of the model used for + # prediction. As input source the + # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} + # is expected, unless specified otherwise. + # + # The formats are represented in EBNF with commas being literal and with + # non-terminal symbols defined near the end of this comment. The formats + # are: + # + # * For Image Classification: + # CSV file(s) with each line having just a single column: + # GCS_FILE_PATH + # which leads to image of up to 30MB in size. Supported + # extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in + # the Batch predict output. + # Three sample rows: + # gs://folder/image1.jpeg + # gs://folder/image2.gif + # gs://folder/image3.png + # + # * For Image Object Detection: + # CSV file(s) with each line having just a single column: + # GCS_FILE_PATH + # which leads to image of up to 30MB in size. Supported + # extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in + # the Batch predict output. + # Three sample rows: + # gs://folder/image1.jpeg + # gs://folder/image2.gif + # gs://folder/image3.png + # * For Video Classification: + # CSV file(s) with each line in format: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END + # GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h + # duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the + # length of the video, and end has to be after the start. + # Three sample rows: + # gs://folder/video1.mp4,10,40 + # gs://folder/video1.mp4,20,60 + # gs://folder/vid2.mov,0,inf + # + # * For Video Object Tracking: + # CSV file(s) with each line in format: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END + # GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h + # duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the + # length of the video, and end has to be after the start. + # Three sample rows: + # gs://folder/video1.mp4,10,240 + # gs://folder/video1.mp4,300,360 + # gs://folder/vid2.mov,0,inf + # * For Text Classification: + # CSV file(s) with each line having just a single column: + # GCS_FILE_PATH | TEXT_SNIPPET + # Any given text file can have size upto 128kB. + # Any given text snippet content must have 60,000 characters or less. + # Three sample rows: + # gs://folder/text1.txt + # "Some text content to predict" + # gs://folder/text3.pdf + # Supported file extensions: .txt, .pdf + # + # * For Text Sentiment: + # CSV file(s) with each line having just a single column: + # GCS_FILE_PATH | TEXT_SNIPPET + # Any given text file can have size upto 128kB. + # Any given text snippet content must have 500 characters or less. + # Three sample rows: + # gs://folder/text1.txt + # "Some text content to predict" + # gs://folder/text3.pdf + # Supported file extensions: .txt, .pdf + # + # * For Text Extraction + # .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or + # as documents (for a single BatchPredict call only one of the these + # formats may be used). + # The in-line .JSONL file(s) contain per line a proto that + # wraps a temporary user-assigned TextSnippet ID (string up to 2000 + # characters long) called "id", a TextSnippet proto (in + # json representation) and zero or more TextFeature protos. Any given + # text snippet content must have 30,000 characters or less, and also + # be UTF-8 NFC encoded (ASCII already is). The IDs provided should be + # unique. + # The document .JSONL file(s) contain, per line, a proto that wraps a + # Document proto with input_config set. Only PDF documents are + # supported now, and each document must be up to 2MB large. + # Any given .JSONL file must be 100MB or smaller, and no more than 20 + # files may be given. + # Sample in-line JSON Lines file (presented here with artificial line + # breaks, but the only actual line break is denoted by \n): + # { + # "id": "my_first_id", + # "text_snippet": { "content": "dog car cat"}, + # "text_features": [ + # { + # "text_segment": \\{"start_offset": 4, "end_offset": 6}, + # "structural_type": PARAGRAPH, + # "bounding_poly": { + # "normalized_vertices": [ + # \\{"x": 0.1, "y": 0.1}, + # \\{"x": 0.1, "y": 0.3}, + # \\{"x": 0.3, "y": 0.3}, + # \\{"x": 0.3, "y": 0.1}, + # ] + # }, + # } + # ], + # }\n + # { + # "id": "2", + # "text_snippet": { + # "content": "An elaborate content", + # "mime_type": "text/plain" + # } + # } + # Sample document JSON Lines file (presented here with artificial line + # breaks, but the only actual line break is denoted by \n).: + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] + # } + # } + # } + # }\n + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] + # } + # } + # } + # } + # + # * For Tables: + # Either + # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} or + # + # {::Google::Cloud::AutoML::V1beta1::InputConfig#bigquery_source bigquery_source}. + # GCS case: + # CSV file(s), each by itself 10GB or smaller and total size must be + # 100GB or smaller, where first file must have a header containing + # column names. If the first row of a subsequent file is the same as + # the header, then it is also treated as a header. All other rows + # contain values for the corresponding columns. + # The column names must contain the model's + # + # [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} + # (order doesn't matter). The columns corresponding to the model's + # input feature column specs must contain values compatible with the + # column spec's data types. Prediction on all the rows, i.e. the CSV + # lines, will be attempted. For FORECASTING + # + # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: + # all columns having + # + # [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] + # type will be ignored. + # First three sample rows of a CSV file: + # "First Name","Last Name","Dob","Addresses" + # + # "John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" + # + # "Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} + # BigQuery case: + # An URI of a BigQuery table. The user data size of the BigQuery + # table must be 100GB or smaller. + # The column names must contain the model's + # + # [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} + # (order doesn't matter). The columns corresponding to the model's + # input feature column specs must contain values compatible with the + # column spec's data types. Prediction on all the rows of the table + # will be attempted. For FORECASTING + # + # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: + # all columns having + # + # [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] + # type will be ignored. + # + # Definitions: + # GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi". + # TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within + # double quotes ("") + # TIME_SEGMENT_START = TIME_OFFSET + # Expresses a beginning, inclusive, of a time segment + # within an + # example that has a time dimension (e.g. video). + # TIME_SEGMENT_END = TIME_OFFSET + # Expresses an end, exclusive, of a time segment within + # an example that has a time dimension (e.g. video). + # TIME_OFFSET = A number of seconds as measured from the start of an + # example (e.g. video). Fractions are allowed, up to a + # microsecond precision. "inf" is allowed and it means the end + # of the example. + # + # Errors: + # If any of the provided CSV files can't be parsed or if more than certain + # percent of CSV rows cannot be processed then the operation fails and + # prediction does not happen. Regardless of overall success or failure the + # per-row failures, up to a certain count cap, will be listed in + # Operation.metadata.partial_failures. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] + # The Google Cloud Storage location for the input content. + # + # Note: The following fields are mutually exclusive: `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_source + # @return [::Google::Cloud::AutoML::V1beta1::BigQuerySource] + # The BigQuery location for the input content. + # + # Note: The following fields are mutually exclusive: `bigquery_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BatchPredictInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input configuration of a {::Google::Cloud::AutoML::V1beta1::Document Document}. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] + # The Google Cloud Storage location of the document file. Only a single path + # should be given. + # Max supported size: 512MB. + # Supported extensions: .PDF. + class DocumentInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # * For Translation: + # CSV file `translation.csv`, with each line in format: + # ML_USE,GCS_FILE_PATH + # GCS_FILE_PATH leads to a .TSV file which describes examples that have + # given ML_USE, using the following row format per line: + # TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target + # language) + # + # * For Tables: + # Output depends on whether the dataset was imported from GCS or + # BigQuery. + # GCS case: + # + # {::Google::Cloud::AutoML::V1beta1::OutputConfig#gcs_destination gcs_destination} + # must be set. Exported are CSV file(s) `tables_1.csv`, + # `tables_2.csv`,...,`tables_N.csv` with each having as header line + # the table's column names, and all other lines contain values for + # the header columns. + # BigQuery case: + # + # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} + # pointing to a BigQuery project must be set. In the given project a + # new dataset will be created with name + # + # `export_data__` + # where will be made + # BigQuery-dataset-name compatible (e.g. most special characters will + # become underscores), and timestamp will be in + # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that + # dataset a new table called `primary_table` will be created, and + # filled with precisely the same data as this obtained on import. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] + # The Google Cloud Storage location where the output is to be written to. + # For Image Object Detection, Text Extraction, Video Classification and + # Tables, in the given directory a new directory will be created with name: + # export_data-- where + # timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export + # output will be written into that directory. + # + # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_destination + # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] + # The BigQuery location where the output is to be written to. + # + # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class OutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for BatchPredict Action. + # + # As destination the + # + # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#gcs_destination gcs_destination} + # must be set unless specified otherwise for a domain. If gcs_destination is + # set then in the given directory a new directory is created. Its name + # will be + # "prediction--", + # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents + # of it depends on the ML problem the predictions are made for. + # + # * For Image Classification: + # In the created directory files `image_classification_1.jsonl`, + # `image_classification_2.jsonl`,...,`image_classification_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of the successfully predicted images and annotations. + # A single image will be listed only once with all its annotations, + # and its annotations will never be split across files. + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps image's "ID" : "" followed by a list of + # zero or more AnnotationPayload protos (called annotations), which + # have classification detail populated. + # If prediction for any image failed (partially or completely), then an + # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` + # files will be created (N depends on total number of failed + # predictions). These files will have a JSON representation of a proto + # that wraps the same "ID" : "" but here followed by + # exactly one + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`fields. + # + # * For Image Object Detection: + # In the created directory files `image_object_detection_1.jsonl`, + # `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of the successfully predicted images and annotations. + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps image's "ID" : "" followed by a list of + # zero or more AnnotationPayload protos (called annotations), which + # have image_object_detection detail populated. A single image will + # be listed only once with all its annotations, and its annotations + # will never be split across files. + # If prediction for any image failed (partially or completely), then + # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` + # files will be created (N depends on total number of failed + # predictions). These files will have a JSON representation of a proto + # that wraps the same "ID" : "" but here followed by + # exactly one + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`fields. + # * For Video Classification: + # In the created directory a video_classification.csv file, and a .JSON + # file per each video classification requested in the input (i.e. each + # line in given CSV(s)), will be created. + # + # The format of video_classification.csv is: + # + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS + # where: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 + # the prediction input lines (i.e. video_classification.csv has + # precisely the same number of lines as the prediction input had.) + # JSON_FILE_NAME = Name of .JSON file in the output directory, which + # contains prediction responses for the video time segment. + # STATUS = "OK" if prediction completed successfully, or an error code + # with message otherwise. If STATUS is not "OK" then the .JSON file + # for that line may not exist or be empty. + # + # Each .JSON file, assuming STATUS is "OK", will contain a list of + # AnnotationPayload protos in JSON format, which are the predictions + # for the video time segment the file is assigned to in the + # video_classification.csv. All AnnotationPayload protos will have + # video_classification field set, and will be sorted by + # video_classification.type field (note that the returned types are + # governed by `classifaction_types` parameter in + # [PredictService.BatchPredictRequest.params][]). + # + # * For Video Object Tracking: + # In the created directory a video_object_tracking.csv file will be + # created, and multiple files video_object_trackinng_1.json, + # video_object_trackinng_2.json,..., video_object_trackinng_N.json, + # where N is the number of requests in the input (i.e. the number of + # lines in given CSV(s)). + # + # The format of video_object_tracking.csv is: + # + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS + # where: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 + # the prediction input lines (i.e. video_object_tracking.csv has + # precisely the same number of lines as the prediction input had.) + # JSON_FILE_NAME = Name of .JSON file in the output directory, which + # contains prediction responses for the video time segment. + # STATUS = "OK" if prediction completed successfully, or an error + # code with message otherwise. If STATUS is not "OK" then the .JSON + # file for that line may not exist or be empty. + # + # Each .JSON file, assuming STATUS is "OK", will contain a list of + # AnnotationPayload protos in JSON format, which are the predictions + # for each frame of the video time segment the file is assigned to in + # video_object_tracking.csv. All AnnotationPayload protos will have + # video_object_tracking field set. + # * For Text Classification: + # In the created directory files `text_classification_1.jsonl`, + # `text_classification_2.jsonl`,...,`text_classification_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps input text snippet or input text file and a list of + # zero or more AnnotationPayload protos (called annotations), which + # have classification detail populated. A single text snippet or file + # will be listed only once with all its annotations, and its + # annotations will never be split across files. + # + # If prediction for any text snippet or file failed (partially or + # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps input text snippet or input text file followed by + # exactly one + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Text Sentiment: + # In the created directory files `text_sentiment_1.jsonl`, + # `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps input text snippet or input text file and a list of + # zero or more AnnotationPayload protos (called annotations), which + # have text_sentiment detail populated. A single text snippet or file + # will be listed only once with all its annotations, and its + # annotations will never be split across files. + # + # If prediction for any text snippet or file failed (partially or + # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps input text snippet or input text file followed by + # exactly one + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Text Extraction: + # In the created directory files `text_extraction_1.jsonl`, + # `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # The contents of these .JSONL file(s) depend on whether the input + # used inline text, or documents. + # If input was inline, then each .JSONL file will contain, per line, + # a JSON representation of a proto that wraps given in request text + # snippet's "id" (if specified), followed by input text snippet, + # and a list of zero or more + # AnnotationPayload protos (called annotations), which have + # text_extraction detail populated. A single text snippet will be + # listed only once with all its annotations, and its annotations will + # never be split across files. + # If input used documents, then each .JSONL file will contain, per + # line, a JSON representation of a proto that wraps given in request + # document proto, followed by its OCR-ed representation in the form + # of a text snippet, finally followed by a list of zero or more + # AnnotationPayload protos (called annotations), which have + # text_extraction detail populated and refer, via their indices, to + # the OCR-ed text snippet. A single document (and its text snippet) + # will be listed only once with all its annotations, and its + # annotations will never be split across files. + # If prediction for any text snippet failed (partially or completely), + # then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps either the "id" : "" (in case of inline) + # or the document proto (in case of document) but here followed by + # exactly one + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Tables: + # Output depends on whether + # + # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#gcs_destination gcs_destination} + # or + # + # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#bigquery_destination bigquery_destination} + # is set (either is allowed). + # GCS case: + # In the created directory files `tables_1.csv`, `tables_2.csv`,..., + # `tables_N.csv` will be created, where N may be 1, and depends on + # the total number of the successfully predicted rows. + # For all CLASSIFICATION + # + # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: + # Each .csv file will contain a header, listing all columns' + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} + # given on input followed by M target column names in the format of + # + # "<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>__score" where M is the number of distinct target values, + # i.e. number of distinct values in the target column of the table + # used to train the model. Subsequent lines will contain the + # respective values of successfully predicted rows, with the last, + # i.e. the target, columns having the corresponding prediction + # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation#score scores}. + # For REGRESSION and FORECASTING + # + # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: + # Each .csv file will contain a header, listing all columns' + # [display_name-s][google.cloud.automl.v1beta1.display_name] given + # on input followed by the predicted target column with name in the + # format of + # + # "predicted_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>" + # Subsequent lines will contain the respective values of + # successfully predicted rows, with the last, i.e. the target, + # column having the predicted target value. + # If prediction for any rows failed, then an additional + # `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be + # created (N depends on total number of failed rows). These files + # will have analogous format as `tables_*.csv`, but always with a + # single target column having + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # represented as a JSON string, and containing only `code` and + # `message`. + # BigQuery case: + # + # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} + # pointing to a BigQuery project must be set. In the given project a + # new dataset will be created with name + # `prediction__` + # where will be made + # BigQuery-dataset-name compatible (e.g. most special characters will + # become underscores), and timestamp will be in + # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset + # two tables will be created, `predictions`, and `errors`. + # The `predictions` table's column names will be the input columns' + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} + # followed by the target column with name in the format of + # + # "predicted_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>" + # The input feature columns will contain the respective values of + # successfully predicted rows, with the target column having an + # ARRAY of + # + # {::Google::Cloud::AutoML::V1beta1::AnnotationPayload AnnotationPayloads}, + # represented as STRUCT-s, containing + # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation TablesAnnotation}. + # The `errors` table contains rows for which the prediction has + # failed, it has analogous input columns while the target column name + # is in the format of + # + # "errors_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>", + # and as a value has + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # represented as a STRUCT, and containing only `code` and `message`. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] + # The Google Cloud Storage location of the directory where the output is to + # be written to. + # + # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_destination + # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] + # The BigQuery location where the output is to be written to. + # + # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BatchPredictOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for ModelExport Action. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] + # The Google Cloud Storage location where the model is to be written to. + # This location may only be set for the following model formats: + # "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". + # + # Under the directory given as the destination a new one with name + # "model-export--", + # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, + # will be created. Inside the model and any of its supporting files + # will be written. + # + # Note: The following fields are mutually exclusive: `gcs_destination`, `gcr_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcr_destination + # @return [::Google::Cloud::AutoML::V1beta1::GcrDestination] + # The GCR location where model image is to be pushed to. This location + # may only be set for the following model formats: + # "docker". + # + # The model image will be created under the given URI. + # + # Note: The following fields are mutually exclusive: `gcr_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] model_format + # @return [::String] + # The format in which the model must be exported. The available, and default, + # formats depend on the problem and model type (if given problem and type + # combination doesn't have a format listed, it means its models are not + # exportable): + # + # * For Image Classification mobile-low-latency-1, mobile-versatile-1, + # mobile-high-accuracy-1: + # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", + # "docker". + # + # * For Image Classification mobile-core-ml-low-latency-1, + # mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: + # "core_ml" (default). + # + # * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, + # mobile-high-accuracy-1: + # "tflite", "tf_saved_model", "tf_js". + # + # * For Video Classification cloud, + # "tf_saved_model". + # + # * For Video Object Tracking cloud, + # "tf_saved_model". + # + # * For Video Object Tracking mobile-versatile-1: + # "tflite", "edgetpu_tflite", "tf_saved_model", "docker". + # + # * For Video Object Tracking mobile-coral-versatile-1: + # "tflite", "edgetpu_tflite", "docker". + # + # * For Video Object Tracking mobile-coral-low-latency-1: + # "tflite", "edgetpu_tflite", "docker". + # + # * For Video Object Tracking mobile-jetson-versatile-1: + # "tf_saved_model", "docker". + # + # * For Tables: + # "docker". + # + # Formats description: + # + # * tflite - Used for Android mobile devices. + # * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) + # devices. + # * tf_saved_model - A tensorflow model in SavedModel format. + # * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can + # be used in the browser and in Node.js using JavaScript. + # * docker - Used for Docker containers. Use the params field to customize + # the container. The container is verified to work correctly on + # ubuntu 16.04 operating system. See more at + # [containers + # + # quickstart](https: + # //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) + # * core_ml - Used for iOS mobile devices. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional model-type and format specific parameters describing the + # requirements for the to be exported model files, any string must be up to + # 25000 characters long. + # + # * For `docker` format: + # `cpu_architecture` - (string) "x86_64" (default). + # `gpu_architecture` - (string) "none" (default), "nvidia". + class ModelExportOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Output configuration for ExportEvaluatedExamples Action. Note that this call + # is available only for 30 days since the moment the model was evaluated. + # The output depends on the domain, as follows (note that only examples from + # the TEST set are exported): + # + # * For Tables: + # + # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} + # pointing to a BigQuery project must be set. In the given project a + # new dataset will be created with name + # + # `export_evaluated_examples__` + # where will be made BigQuery-dataset-name + # compatible (e.g. most special characters will become underscores), + # and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" + # format. In the dataset an `evaluated_examples` table will be + # created. It will have all the same columns as the + # + # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id primary_table} + # of the + # {::Google::Cloud::AutoML::V1beta1::Model#dataset_id dataset} from which + # the model was created, as they were at the moment of model's + # evaluation (this includes the target column with its ground + # truth), followed by a column called "predicted_". That + # last column will contain the model's prediction result for each + # respective row, given as ARRAY of + # {::Google::Cloud::AutoML::V1beta1::AnnotationPayload AnnotationPayloads}, + # represented as STRUCT-s, containing + # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation TablesAnnotation}. + # @!attribute [rw] bigquery_destination + # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] + # The BigQuery location where the output is to be written to. + class ExportEvaluatedExamplesOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location for the input content. + # @!attribute [rw] input_uris + # @return [::Array<::String>] + # Required. Google Cloud Storage URIs to input files, up to 2000 characters + # long. Accepted forms: + # * Full object path, e.g. gs://bucket/directory/object.csv + class GcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The BigQuery location for the input content. + # @!attribute [rw] input_uri + # @return [::String] + # Required. BigQuery URI to a table, up to 2000 characters long. + # Accepted forms: + # * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId + class BigQuerySource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location where the output is to be written to. + # @!attribute [rw] output_uri_prefix + # @return [::String] + # Required. Google Cloud Storage URI to output directory, up to 2000 + # characters long. + # Accepted forms: + # * Prefix path: gs://bucket/directory + # The requesting user must have write permission to the bucket. + # The directory is created if it doesn't exist. + class GcsDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The BigQuery location for the output content. + # @!attribute [rw] output_uri + # @return [::String] + # Required. BigQuery URI to a project, up to 2000 characters long. + # Accepted forms: + # * BigQuery path e.g. bq://projectId + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The GCR location where the image must be pushed to. + # @!attribute [rw] output_uri + # @return [::String] + # Required. Google Contained Registry URI of the new image, up to 2000 + # characters long. See + # + # https: + # //cloud.google.com/container-registry/do + # // cs/pushing-and-pulling#pushing_an_image_to_a_registry + # Accepted forms: + # * [HOSTNAME]/[PROJECT-ID]/[IMAGE] + # * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG] + # + # The requesting user must have permission to push images the project. + class GcrDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb new file mode 100644 index 000000000000..6e167f65d37b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.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 AutoML + module V1beta1 + # API proto representing a trained machine learning model. + # @!attribute [rw] translation_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TranslationModelMetadata] + # Metadata for translation models. + # + # Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata] + # Metadata for image classification models. + # + # Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_classification_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextClassificationModelMetadata] + # Metadata for text classification models. + # + # Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelMetadata] + # Metadata for image object detection models. + # + # Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_classification_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationModelMetadata] + # Metadata for video classification models. + # + # Note: The following fields are mutually exclusive: `video_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_object_tracking_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingModelMetadata] + # Metadata for video object tracking models. + # + # Note: The following fields are mutually exclusive: `video_object_tracking_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionModelMetadata] + # Metadata for text extraction models. + # + # Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tables_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TablesModelMetadata] + # Metadata for Tables models. + # + # Note: The following fields are mutually exclusive: `tables_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentModelMetadata] + # Metadata for text sentiment models. + # + # Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the model. + # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the model to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores + # (_), and ASCII digits 0-9. It must start with a letter. + # @!attribute [rw] dataset_id + # @return [::String] + # Required. The resource ID of the dataset used to create the model. The dataset must + # come from the same ancestor project and location. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the model training finished and can be used for prediction. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this model was last updated. + # @!attribute [rw] deployment_state + # @return [::Google::Cloud::AutoML::V1beta1::Model::DeploymentState] + # Output only. Deployment state of the model. A model can only serve + # prediction requests after it gets deployed. + class Model + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Deployment state of the model. + module DeploymentState + # Should not be used, an un-set enum has this value by default. + DEPLOYMENT_STATE_UNSPECIFIED = 0 + + # Model is deployed. + DEPLOYED = 1 + + # Model is not deployed. + UNDEPLOYED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb new file mode 100644 index 000000000000..86132556d0f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb @@ -0,0 +1,117 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Evaluation results of a model. + # @!attribute [rw] classification_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics] + # Model evaluation metrics for image, text, video and tables + # classification. + # Tables problem is considered a classification when the target column + # is CATEGORY DataType. + # + # Note: The following fields are mutually exclusive: `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regression_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::RegressionEvaluationMetrics] + # Model evaluation metrics for Tables regression. + # Tables problem is considered a regression when the target column + # has FLOAT64 DataType. + # + # Note: The following fields are mutually exclusive: `regression_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] translation_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::TranslationEvaluationMetrics] + # Model evaluation metrics for translation. + # + # Note: The following fields are mutually exclusive: `translation_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionEvaluationMetrics] + # Model evaluation metrics for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_object_tracking_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingEvaluationMetrics] + # Model evaluation metrics for video object tracking. + # + # Note: The following fields are mutually exclusive: `video_object_tracking_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentEvaluationMetrics] + # Evaluation metrics for text sentiment models. + # + # Note: The following fields are mutually exclusive: `text_sentiment_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics] + # Evaluation metrics for text extraction models. + # + # Note: The following fields are mutually exclusive: `text_extraction_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the model evaluation. + # Format: + # + # `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` + # @!attribute [rw] annotation_spec_id + # @return [::String] + # Output only. The ID of the annotation spec that the model evaluation applies to. The + # The ID is empty for the overall model evaluation. + # For Tables annotation specs in the dataset do not exist and this ID is + # always not set, but for CLASSIFICATION + # + # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] + # the + # {::Google::Cloud::AutoML::V1beta1::ModelEvaluation#display_name display_name} + # field is used. + # @!attribute [rw] display_name + # @return [::String] + # Output only. The value of + # {::Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name} at + # the moment when the model was trained. Because this field returns a value + # at model training time, for different models trained from the same dataset, + # the values may differ, since display names could had been changed between + # the two model's trainings. + # For Tables CLASSIFICATION + # + # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] + # distinct values of the target column at the moment of the model evaluation + # are populated here. + # The display_name is empty for the overall model evaluation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this model evaluation was created. + # @!attribute [rw] evaluated_example_count + # @return [::Integer] + # Output only. The number of examples used for model evaluation, i.e. for + # which ground truth from time of model creation is compared against the + # predicted annotations created by the model. + # For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is + # the total number of all examples used for evaluation. + # Otherwise, this is the count of examples that according to the ground + # truth were annotated by the + # + # {::Google::Cloud::AutoML::V1beta1::ModelEvaluation#annotation_spec_id annotation_spec_id}. + class ModelEvaluation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb new file mode 100644 index 000000000000..6920b67fbe65 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb @@ -0,0 +1,232 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Metadata used across all long running operations returned by AutoML API. + # @!attribute [rw] delete_details + # @return [::Google::Cloud::AutoML::V1beta1::DeleteOperationMetadata] + # Details of a Delete operation. + # + # Note: The following fields are mutually exclusive: `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] deploy_model_details + # @return [::Google::Cloud::AutoML::V1beta1::DeployModelOperationMetadata] + # Details of a DeployModel operation. + # + # Note: The following fields are mutually exclusive: `deploy_model_details`, `delete_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] undeploy_model_details + # @return [::Google::Cloud::AutoML::V1beta1::UndeployModelOperationMetadata] + # Details of an UndeployModel operation. + # + # Note: The following fields are mutually exclusive: `undeploy_model_details`, `delete_details`, `deploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] create_model_details + # @return [::Google::Cloud::AutoML::V1beta1::CreateModelOperationMetadata] + # Details of CreateModel operation. + # + # Note: The following fields are mutually exclusive: `create_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] import_data_details + # @return [::Google::Cloud::AutoML::V1beta1::ImportDataOperationMetadata] + # Details of ImportData operation. + # + # Note: The following fields are mutually exclusive: `import_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] batch_predict_details + # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOperationMetadata] + # Details of BatchPredict operation. + # + # Note: The following fields are mutually exclusive: `batch_predict_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_data_details + # @return [::Google::Cloud::AutoML::V1beta1::ExportDataOperationMetadata] + # Details of ExportData operation. + # + # Note: The following fields are mutually exclusive: `export_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_model_details + # @return [::Google::Cloud::AutoML::V1beta1::ExportModelOperationMetadata] + # Details of ExportModel operation. + # + # Note: The following fields are mutually exclusive: `export_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_evaluated_examples_details + # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOperationMetadata] + # Details of ExportEvaluatedExamples operation. + # + # Note: The following fields are mutually exclusive: `export_evaluated_examples_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] progress_percent + # @return [::Integer] + # Output only. Progress of operation. Range: [0, 100]. + # Not used currently. + # @!attribute [rw] partial_failures + # @return [::Array<::Google::Rpc::Status>] + # Output only. Partial failures encountered. + # E.g. single files that couldn't be read. + # This field should never exceed 20 entries. + # Status details field will contain standard GCP error details. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the operation was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the operation was updated for the last time. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of operations that perform deletes of any entities. + class DeleteOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of DeployModel operation. + class DeployModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of UndeployModel operation. + class UndeployModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of CreateModel operation. + class CreateModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of ImportData operation. + class ImportDataOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of ExportData operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1beta1::ExportDataOperationMetadata::ExportDataOutputInfo] + # Output only. Information further describing this export data's output. + class ExportDataOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes this export data's output. + # Supplements + # {::Google::Cloud::AutoML::V1beta1::OutputConfig OutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the exported data is written. + # + # Note: The following fields are mutually exclusive: `gcs_output_directory`, `bigquery_output_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_output_dataset + # @return [::String] + # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + # format, into which the exported data is written. + # + # Note: The following fields are mutually exclusive: `bigquery_output_dataset`, `gcs_output_directory`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExportDataOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details of BatchPredict operation. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig] + # Output only. The input config that was given upon starting this + # batch predict operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOperationMetadata::BatchPredictOutputInfo] + # Output only. Information further describing this batch predict's output. + class BatchPredictOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes this batch predict's output. + # Supplements + # + # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig BatchPredictOutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the prediction output is written. + # + # Note: The following fields are mutually exclusive: `gcs_output_directory`, `bigquery_output_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_output_dataset + # @return [::String] + # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + # format, into which the prediction output is written. + # + # Note: The following fields are mutually exclusive: `bigquery_output_dataset`, `gcs_output_directory`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BatchPredictOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details of ExportModel operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1beta1::ExportModelOperationMetadata::ExportModelOutputInfo] + # Output only. Information further describing the output of this model + # export. + class ExportModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes the output of model export. + # Supplements + # + # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the model will be exported. + class ExportModelOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details of EvaluatedExamples operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOperationMetadata::ExportEvaluatedExamplesOutputInfo] + # Output only. Information further describing the output of this evaluated + # examples export. + class ExportEvaluatedExamplesOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes the output of the evaluated examples export. + # Supplements + # + # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig ExportEvaluatedExamplesOutputConfig}. + # @!attribute [rw] bigquery_output_dataset + # @return [::String] + # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + # format, into which the output of export evaluated examples is written. + class ExportEvaluatedExamplesOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb new file mode 100644 index 000000000000..87c78db799ad --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb @@ -0,0 +1,238 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Request message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict PredictionService.Predict}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the model requested to serve the prediction. + # @!attribute [rw] payload + # @return [::Google::Cloud::AutoML::V1beta1::ExamplePayload] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned in the response. Default is 100, the + # requested value may be limited by server. + # * For Tables: + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotation. + # The default is false. + class PredictRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict PredictionService.Predict}. + # @!attribute [rw] payload + # @return [::Array<::Google::Cloud::AutoML::V1beta1::AnnotationPayload>] + # Prediction result. + # Translation and Text Sentiment will return precisely one payload. + # @!attribute [rw] preprocessed_input + # @return [::Google::Cloud::AutoML::V1beta1::ExamplePayload] + # The preprocessed example that AutoML actually makes prediction on. + # Empty if AutoML does not preprocess the input example. + # * For Text Extraction: + # If the input is a .pdf file, the OCR'ed text will be provided in + # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific prediction response metadata. + # + # * For Image Object Detection: + # `max_bounding_box_count` - (int64) At most that many bounding boxes per + # image could have been returned. + # + # * For Text Sentiment: + # `sentiment_score` - (float, deprecated) A value between -1 and 1, + # -1 maps to least positive sentiment, while 1 maps to the most positive + # one and the higher the score, the more positive the sentiment in the + # document is. Yet these values are relative to the training data, so + # e.g. if all data was positive then -1 will be also positive (though + # the least). + # The sentiment_score shouldn't be confused with "score" or "magnitude" + # from the previous Natural Language Sentiment Analysis API. + class PredictResponse + 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 + + # Request message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the model requested to serve the batch prediction. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig] + # Required. The input configuration for batch prediction. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig] + # Required. The Configuration specifying where output predictions should + # be written. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Required. Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # * For Text Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be produced per image. Default is 100, the + # requested value may be limited by server. + # + # * For Video Classification : + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # `segment_classification` - (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is "true". + # `shot_classification` - (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. The default is "false". + # `1s_interval_classification` - (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. The default is + # "false". + # + # * For Tables: + # + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotations. The + # default is false. + # + # * For Video Object Tracking: + # + # `score_threshold` - (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned per frame. Default is 100, the requested + # value may be limited by server. + # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size will be + # returned. Value in 0 to 1 range. Default is 0. + class BatchPredictRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Result of the Batch Predict. This message is returned in + # {::Google::Longrunning::Operation#response response} of the operation returned + # by the {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific prediction response metadata. + # + # * For Image Object Detection: + # `max_bounding_box_count` - (int64) At most that many bounding boxes per + # image could have been returned. + # + # * For Video Object Tracking: + # `max_bounding_box_count` - (int64) At most that many bounding boxes per + # frame could have been returned. + class BatchPredictResult + 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-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb new file mode 100644 index 000000000000..7fc488386a6c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.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! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A range between two double numbers. + # @!attribute [rw] start + # @return [::Float] + # Start of the range, inclusive. + # @!attribute [rw] end + # @return [::Float] + # End of the range, exclusive. + class DoubleRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb new file mode 100644 index 000000000000..147832f1fabb --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.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 Cloud + module AutoML + module V1beta1 + # Metrics for regression problems. + # @!attribute [rw] root_mean_squared_error + # @return [::Float] + # Output only. Root Mean Squared Error (RMSE). + # @!attribute [rw] mean_absolute_error + # @return [::Float] + # Output only. Mean Absolute Error (MAE). + # @!attribute [rw] mean_absolute_percentage_error + # @return [::Float] + # Output only. Mean absolute percentage error. Only set if all ground truth + # values are are positive. + # @!attribute [rw] r_squared + # @return [::Float] + # Output only. R squared. + # @!attribute [rw] root_mean_squared_log_error + # @return [::Float] + # Output only. Root mean squared log error. + class RegressionEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb new file mode 100644 index 000000000000..1c76959322fb --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset AutoMl.CreateDataset}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project to create the dataset for. + # @!attribute [rw] dataset + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # Required. The dataset to create. + class CreateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset AutoMl.GetDataset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset to retrieve. + class GetDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project from which to list datasets. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of + # using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. + class ListDatasetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets}. + # @!attribute [rw] datasets + # @return [::Array<::Google::Cloud::AutoML::V1beta1::Dataset>] + # The datasets read. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest#page_token ListDatasetsRequest.page_token} to obtain that page. + class ListDatasetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset AutoMl.UpdateDataset} + # @!attribute [rw] dataset + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # Required. The dataset which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. + class UpdateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset AutoMl.DeleteDataset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset to delete. + class DeleteDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data AutoMl.ImportData}. + # @!attribute [rw] name + # @return [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1beta1::InputConfig] + # Required. The desired input location and its domain specific semantics, + # if any. + class ImportDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data AutoMl.ExportData}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1beta1::OutputConfig] + # Required. The desired output location. + class ExportDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec AutoMl.GetAnnotationSpec}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the annotation spec to retrieve. + class GetAnnotationSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec AutoMl.GetTableSpec}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the table spec to retrieve. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Mask specifying which fields to read. + class GetTableSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the dataset to list table specs from. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Mask specifying which fields to read. + # @!attribute [rw] filter + # @return [::String] + # Filter expression, see go/filtering. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call. + class ListTableSpecsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs}. + # @!attribute [rw] table_specs + # @return [::Array<::Google::Cloud::AutoML::V1beta1::TableSpec>] + # The table specs read. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest#page_token ListTableSpecsRequest.page_token} to obtain that page. + class ListTableSpecsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec AutoMl.UpdateTableSpec} + # @!attribute [rw] table_spec + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # Required. The table spec which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. + class UpdateTableSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec AutoMl.GetColumnSpec}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the column spec to retrieve. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Mask specifying which fields to read. + class GetColumnSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the table spec to list column specs from. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Mask specifying which fields to read. + # @!attribute [rw] filter + # @return [::String] + # Filter expression, see go/filtering. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call. + class ListColumnSpecsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs}. + # @!attribute [rw] column_specs + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # The column specs read. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest#page_token ListColumnSpecsRequest.page_token} to obtain that page. + class ListColumnSpecsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec AutoMl.UpdateColumnSpec} + # @!attribute [rw] column_spec + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # Required. The column spec which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. + class UpdateColumnSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model AutoMl.CreateModel}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent project where the model is being created. + # @!attribute [rw] model + # @return [::Google::Cloud::AutoML::V1beta1::Model] + # Required. The model to create. + class CreateModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model AutoMl.GetModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model. + class GetModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the project, from which to list the models. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call. + class ListModelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels}. + # @!attribute [rw] model + # @return [::Array<::Google::Cloud::AutoML::V1beta1::Model>] + # List of models in the requested page. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1beta1::ListModelsRequest#page_token ListModelsRequest.page_token} to obtain that page. + class ListModelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model AutoMl.DeleteModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model being deleted. + class DeleteModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model AutoMl.DeployModel}. + # @!attribute [rw] image_object_detection_model_deployment_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_model_deployment_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata] + # Model deployment metadata specific to Image Classification. + # + # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model to deploy. + class DeployModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model AutoMl.UndeployModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model to undeploy. + class UndeployModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}. + # Models need to be enabled for exporting, otherwise an error code will be + # returned. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the model to export. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig] + # Required. The desired output location and configuration. + class ExportModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples AutoMl.ExportEvaluatedExamples}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the model whose evaluated examples are to + # be exported. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig] + # Required. The desired output location and configuration. + class ExportEvaluatedExamplesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation AutoMl.GetModelEvaluation}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the model evaluation. + class GetModelEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + class ListModelEvaluationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. + # @!attribute [rw] model_evaluation + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] + # List of model evaluations in the requested page. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to the {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest#page_token ListModelEvaluationsRequest.page_token} field of a new + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} request to obtain that page. + class ListModelEvaluationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb new file mode 100644 index 000000000000..adc8f6e775c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A specification of a relational table. + # The table's schema is represented via its child column specs. It is + # pre-populated as part of ImportData by schema inference algorithm, the + # version of which is a required parameter of ImportData InputConfig. + # Note: While working with a table, at times the schema may be + # inconsistent with the data in the table (e.g. string in a FLOAT64 column). + # The consistency validation is done upon creation of a model. + # Used by: + # * Tables + # @!attribute [rw] name + # @return [::String] + # Output only. The resource name of the table spec. + # Form: + # + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}` + # @!attribute [rw] time_column_spec_id + # @return [::String] + # column_spec_id of the time column. Only used if the parent dataset's + # ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE + # and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and + # those in between to VALIDATE. + # Required type: TIMESTAMP. + # If both this column and ml_use_column are not set, then ML use of all rows + # will be assigned by AutoML. NOTE: Updates of this field will instantly + # affect any other users concurrently working with the dataset. + # @!attribute [rw] row_count + # @return [::Integer] + # Output only. The number of rows (i.e. examples) in the table. + # @!attribute [rw] valid_row_count + # @return [::Integer] + # Output only. The number of valid rows (i.e. without values that don't match + # DataType-s of their columns). + # @!attribute [rw] column_count + # @return [::Integer] + # Output only. The number of columns of the table. That is, the number of + # child ColumnSpec-s. + # @!attribute [rw] input_configs + # @return [::Array<::Google::Cloud::AutoML::V1beta1::InputConfig>] + # Output only. Input configs via which data currently residing in the table + # had been imported. + # @!attribute [rw] etag + # @return [::String] + # Used to perform consistent read-modify-write updates. If not set, a blind + # "overwrite" update happens. + class TableSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb new file mode 100644 index 000000000000..cb70cab357c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb @@ -0,0 +1,304 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Metadata for a dataset used for AutoML Tables. + # @!attribute [rw] primary_table_spec_id + # @return [::String] + # Output only. The table_spec_id of the primary table of this dataset. + # @!attribute [rw] target_column_spec_id + # @return [::String] + # column_spec_id of the primary table's column that should be used as the + # training & prediction target. + # This column must be non-nullable and have one of following data types + # (otherwise model creation will error): + # + # * CATEGORY + # + # * FLOAT64 + # + # If the type is CATEGORY , only up to + # 100 unique values may exist in that column across all rows. + # + # NOTE: Updates of this field will instantly affect any other users + # concurrently working with the dataset. + # @!attribute [rw] weight_column_spec_id + # @return [::String] + # column_spec_id of the primary table's column that should be used as the + # weight column, i.e. the higher the value the more important the row will be + # during model training. + # Required type: FLOAT64. + # Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is + # ignored for training. + # If not set all rows are assumed to have equal weight of 1. + # NOTE: Updates of this field will instantly affect any other users + # concurrently working with the dataset. + # @!attribute [rw] ml_use_column_spec_id + # @return [::String] + # column_spec_id of the primary table column which specifies a possible ML + # use of the row, i.e. the column will be used to split the rows into TRAIN, + # VALIDATE and TEST sets. + # Required type: STRING. + # This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST` + # among its values, or only have `TEST`, `UNASSIGNED` values. In the latter + # case the rows with `UNASSIGNED` value will be assigned by AutoML. Note + # that if a given ml use distribution makes it impossible to create a "good" + # model, that call will error describing the issue. + # If both this column_spec_id and primary table's time_column_spec_id are not + # set, then all rows are treated as `UNASSIGNED`. + # NOTE: Updates of this field will instantly affect any other users + # concurrently working with the dataset. + # @!attribute [rw] target_column_correlations + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::CorrelationStats}] + # Output only. Correlations between + # + # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#target_column_spec_id TablesDatasetMetadata.target_column_spec_id}, + # and other columns of the + # + # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id TablesDatasetMetadataprimary_table}. + # Only set if the target column is set. Mapping from other column spec id to + # its CorrelationStats with the target column. + # This field may be stale, see the stats_update_time field for + # for the timestamp at which these stats were last updated. + # @!attribute [rw] stats_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent timestamp when target_column_correlations + # field and all descendant ColumnSpec.data_stats and + # ColumnSpec.top_correlated_columns fields were last (re-)generated. Any + # changes that happened to the dataset afterwards are not reflected in these + # fields values. The regeneration happens in the background on a best effort + # basis. + class TablesDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::AutoML::V1beta1::CorrelationStats] + class TargetColumnCorrelationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Model metadata specific to AutoML Tables. + # @!attribute [rw] optimization_objective_recall_value + # @return [::Float] + # Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL". + # Must be between 0 and 1, inclusive. + # + # Note: The following fields are mutually exclusive: `optimization_objective_recall_value`, `optimization_objective_precision_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] optimization_objective_precision_value + # @return [::Float] + # Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION". + # Must be between 0 and 1, inclusive. + # + # Note: The following fields are mutually exclusive: `optimization_objective_precision_value`, `optimization_objective_recall_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] target_column_spec + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # Column spec of the dataset's primary table's column the model is + # predicting. Snapshotted when model creation started. + # Only 3 fields are used: + # name - May be set on CreateModel, if it's not then the ColumnSpec + # corresponding to the current target_column_spec_id of the dataset + # the model is trained from is used. + # If neither is set, CreateModel will error. + # display_name - Output only. + # data_type - Output only. + # @!attribute [rw] input_feature_column_specs + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # Column specs of the dataset's primary table's columns, on which + # the model is trained and which are used as the input for predictions. + # The + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column} + # as well as, according to dataset's state upon model creation, + # + # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#weight_column_spec_id weight_column}, + # and + # + # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#ml_use_column_spec_id ml_use_column} + # must never be included here. + # + # Only 3 fields are used: + # + # * name - May be set on CreateModel, if set only the columns specified are + # used, otherwise all primary table's columns (except the ones listed + # above) are used for the training and prediction input. + # + # * display_name - Output only. + # + # * data_type - Output only. + # @!attribute [rw] optimization_objective + # @return [::String] + # Objective function the model is optimizing towards. The training process + # creates a model that maximizes/minimizes the value of the objective + # function over the validation set. + # + # The supported optimization objectives depend on the prediction type. + # If the field is not set, a default objective function is used. + # + # CLASSIFICATION_BINARY: + # "MAXIMIZE_AU_ROC" (default) - Maximize the area under the receiver + # operating characteristic (ROC) curve. + # "MINIMIZE_LOG_LOSS" - Minimize log loss. + # "MAXIMIZE_AU_PRC" - Maximize the area under the precision-recall curve. + # "MAXIMIZE_PRECISION_AT_RECALL" - Maximize precision for a specified + # recall value. + # "MAXIMIZE_RECALL_AT_PRECISION" - Maximize recall for a specified + # precision value. + # + # CLASSIFICATION_MULTI_CLASS : + # "MINIMIZE_LOG_LOSS" (default) - Minimize log loss. + # + # + # REGRESSION: + # "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE). + # "MINIMIZE_MAE" - Minimize mean-absolute error (MAE). + # "MINIMIZE_RMSLE" - Minimize root-mean-squared log error (RMSLE). + # @!attribute [rw] tables_model_column_info + # @return [::Array<::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>] + # Output only. Auxiliary information for each of the + # input_feature_column_specs with respect to this particular model. + # @!attribute [rw] train_budget_milli_node_hours + # @return [::Integer] + # Required. The train budget of creating this model, expressed in milli node + # hours i.e. 1,000 value in this field means 1 node hour. + # + # The training cost of the model will not exceed this budget. The final cost + # will be attempted to be close to the budget, though may end up being (even) + # noticeably smaller - at the backend's discretion. This especially may + # happen when further model training ceases to provide any improvements. + # + # If the budget is set to a value known to be insufficient to train a + # model for the given dataset, the training won't be attempted and + # will error. + # + # The train budget must be between 1,000 and 72,000 milli node hours, + # inclusive. + # @!attribute [rw] train_cost_milli_node_hours + # @return [::Integer] + # Output only. The actual training cost of the model, expressed in milli + # node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed + # to not exceed the train budget. + # @!attribute [rw] disable_early_stopping + # @return [::Boolean] + # Use the entire training budget. This disables the early stopping feature. + # By default, the early stopping feature is enabled, which means that AutoML + # Tables might stop training before the entire training budget has been used. + class TablesModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains annotation details specific to Tables. + # @!attribute [rw] score + # @return [::Float] + # Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher + # value means greater confidence in the returned value. + # For + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec} + # of FLOAT64 data type the score is not populated. + # @!attribute [rw] prediction_interval + # @return [::Google::Cloud::AutoML::V1beta1::DoubleRange] + # Output only. Only populated when + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec} + # has FLOAT64 data type. An interval in which the exactly correct target + # value has 95% chance to be in. + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + # The predicted value of the row's + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column}. + # The value depends on the column's DataType: + # + # * CATEGORY - the predicted (with the above confidence `score`) CATEGORY + # value. + # + # * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value. + # @!attribute [rw] tables_model_column_info + # @return [::Array<::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>] + # Output only. Auxiliary information for each of the model's + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs input_feature_column_specs} + # with respect to this particular prediction. + # If no other fields than + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_spec_name column_spec_name} + # and + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_display_name column_display_name} + # would be populated, then this whole field is not. + # @!attribute [rw] baseline_score + # @return [::Float] + # Output only. Stores the prediction score for the baseline example, which + # is defined as the example with all values set to their baseline values. + # This is used as part of the Sampled Shapley explanation of the model's + # prediction. This field is populated only when feature importance is + # requested. For regression models, this holds the baseline prediction for + # the baseline example. For classification models, this holds the baseline + # prediction for the baseline example for the argmax class. + class TablesAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An information specific to given column and Tables Model, in context + # of the Model and the predictions created by it. + # @!attribute [rw] column_spec_name + # @return [::String] + # Output only. The name of the ColumnSpec describing the column. Not + # populated when this proto is outputted to BigQuery. + # @!attribute [rw] column_display_name + # @return [::String] + # Output only. The display name of the column (same as the display_name of + # its ColumnSpec). + # @!attribute [rw] feature_importance + # @return [::Float] + # Output only. When given as part of a Model (always populated): + # Measurement of how much model predictions correctness on the TEST data + # depend on values in this column. A value between 0 and 1, higher means + # higher influence. These values are normalized - for all input feature + # columns of a given model they add to 1. + # + # When given back by Predict (populated iff + # [feature_importance + # param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch + # Predict (populated iff + # {::Google::Cloud::AutoML::V1beta1::PredictRequest#params feature_importance} + # param is set): + # Measurement of how impactful for the prediction returned for the given row + # the value in this column was. Specifically, the feature importance + # specifies the marginal contribution that the feature made to the prediction + # score compared to the baseline score. These values are computed using the + # Sampled Shapley method. + class TablesModelColumnInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb new file mode 100644 index 000000000000..0214a830f15a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.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 AutoML + module V1beta1 + # A time period inside of an example that has a time dimension (e.g. video). + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Start of the time segment (inclusive), represented as the duration since + # the example start. + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # End of the time segment (exclusive), represented as the duration since the + # example start. + class TimeSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb new file mode 100644 index 000000000000..1c3b18d079ef --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.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 AutoML + module V1beta1 + # Dataset metadata for classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] + # Required. Type of the classification problem. + class TextClassificationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] + # Output only. Classification type of the dataset used to train this model. + class TextClassificationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata that is specific to text extraction + class TextExtractionDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text extraction. + # @!attribute [rw] model_hint + # @return [::String] + # Indicates the scope of model use case. + # + # * `default`: Use to train a general text extraction model. Default value. + # + # * `health_care`: Use to train a text extraction model that is tuned for + # healthcare applications. + class TextExtractionModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata for text sentiment. + # @!attribute [rw] sentiment_max + # @return [::Integer] + # Required. A sentiment is expressed as an integer ordinal, where higher value + # means a more positive sentiment. The range of sentiments that will be used + # is between 0 and sentiment_max (inclusive on both ends), and all the values + # in the range must be represented in the dataset before a model can be + # created. + # sentiment_max value must be between 1 and 10 (inclusive). + class TextSentimentDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text sentiment. + class TextSentimentModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb new file mode 100644 index 000000000000..ca5b21931f3b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.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 AutoML + module V1beta1 + # Annotation for identifying spans of text. + # @!attribute [rw] text_segment + # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] + # An entity annotation will set this, which is the part of the original + # text to which the annotation pertains. + # @!attribute [rw] score + # @return [::Float] + # Output only. A confidence estimate between 0.0 and 1.0. A higher value + # means greater confidence in correctness of the annotation. + class TextExtractionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for text extraction problems. + # @!attribute [rw] au_prc + # @return [::Float] + # Output only. The Area under precision recall curve metric. + # @!attribute [rw] confidence_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics::ConfidenceMetricsEntry>] + # Output only. Metrics that have confidence thresholds. + # Precision-recall curve can be derived from it. + class TextExtractionEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. The confidence threshold value used to compute the metrics. + # Only annotations with score of at least this threshold are considered to + # be ones the model would return. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall under the given confidence threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision under the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb new file mode 100644 index 000000000000..0ab880d1d0de --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.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 AutoML + module V1beta1 + # A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. + # @!attribute [rw] content + # @return [::String] + # Output only. The content of the TextSegment. + # @!attribute [rw] start_offset + # @return [::Integer] + # Required. Zero-based character index of the first character of the text + # segment (counting characters from the beginning of the text). + # @!attribute [rw] end_offset + # @return [::Integer] + # Required. Zero-based character index of the first character past the end of + # the text segment (counting character from the beginning of the text). + # The character at the end_offset is NOT included in the text segment. + class TextSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb new file mode 100644 index 000000000000..9b48bef95e98 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.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 AutoML + module V1beta1 + # Contains annotation details specific to text sentiment. + # @!attribute [rw] sentiment + # @return [::Integer] + # Output only. The sentiment with the semantic, as given to the + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data AutoMl.ImportData} when populating the dataset from which the model used + # for the prediction had been trained. + # The sentiment values are between 0 and + # Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), + # with higher value meaning more positive sentiment. They are completely + # relative, i.e. 0 means least positive sentiment and sentiment_max means + # the most positive from the sentiments present in the train data. Therefore + # e.g. if train data had only negative sentiment, then sentiment_max, would + # be still negative (although least negative). + # The sentiment shouldn't be confused with "score" or "magnitude" + # from the previous Natural Language Sentiment Analysis API. + class TextSentimentAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for text sentiment problems. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + # @!attribute [rw] mean_absolute_error + # @return [::Float] + # Output only. Mean absolute error. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] mean_squared_error + # @return [::Float] + # Output only. Mean squared error. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] linear_kappa + # @return [::Float] + # Output only. Linear weighted kappa. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] quadratic_kappa + # @return [::Float] + # Output only. Quadratic weighted kappa. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] confusion_matrix + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix] + # Output only. Confusion matrix of the evaluation. + # Only set for the overall model evaluation, not for evaluation of a single + # annotation spec. + # @!attribute [rw] annotation_spec_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::String>] + # Output only. The annotation spec ids used for this evaluation. + # Deprecated . + class TextSentimentEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb new file mode 100644 index 000000000000..4826f3a2fb6f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.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 AutoML + module V1beta1 + # Dataset metadata that is specific to translation. + # @!attribute [rw] source_language_code + # @return [::String] + # Required. The BCP-47 language code of the source language. + # @!attribute [rw] target_language_code + # @return [::String] + # Required. The BCP-47 language code of the target language. + class TranslationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluation metrics for the dataset. + # @!attribute [rw] bleu_score + # @return [::Float] + # Output only. BLEU score. + # @!attribute [rw] base_bleu_score + # @return [::Float] + # Output only. BLEU score for base model. + class TranslationEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to translation. + # @!attribute [rw] base_model + # @return [::String] + # The resource name of the model to use as a baseline to train the custom + # model. If unset, we use the default base model provided by Google + # Translate. Format: + # `projects/{project_id}/locations/{location_id}/models/{model_id}` + # @!attribute [rw] source_language_code + # @return [::String] + # Output only. Inferred from the dataset. + # The source languge (The BCP-47 language code) that is used for training. + # @!attribute [rw] target_language_code + # @return [::String] + # Output only. The target languge (The BCP-47 language code) that is used for + # training. + class TranslationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation details specific to translation. + # @!attribute [rw] translated_content + # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] + # Output only . The translated content. + class TranslationAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb new file mode 100644 index 000000000000..8c029ee5303b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.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 AutoML + module V1beta1 + # Dataset metadata specific to video classification. + # All Video Classification datasets are treated as multi label. + class VideoClassificationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata specific to video object tracking. + class VideoObjectTrackingDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata specific to video classification. + class VideoClassificationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata specific to video object tracking. + class VideoObjectTrackingModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..4af8ecce5fb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-automl-v1beta1", path: "../" +else + gem "google-cloud-automl-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-automl-v1beta1/snippets/automl/create_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb new file mode 100644 index 000000000000..0a974be0868c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_CreateDataset_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the create_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset. +# +def create_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new + + # Call the create_dataset method. + result = client.create_dataset request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + p result +end +# [END automl_v1beta1_generated_AutoML_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb new file mode 100644 index 000000000000..22cb436527e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.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 automl_v1beta1_generated_AutoML_CreateModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the create_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model. +# +def create_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new + + # Call the create_model method. + result = client.create_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb new file mode 100644 index 000000000000..628da07c0d25 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.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 automl_v1beta1_generated_AutoML_DeleteDataset_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the delete_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset. +# +def delete_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new + + # Call the delete_dataset method. + result = client.delete_dataset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb new file mode 100644 index 000000000000..15ca9acb6cac --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.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 automl_v1beta1_generated_AutoML_DeleteModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the delete_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model. +# +def delete_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new + + # Call the delete_model method. + result = client.delete_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb new file mode 100644 index 000000000000..140df82eb01c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.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 automl_v1beta1_generated_AutoML_DeployModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the deploy_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model. +# +def deploy_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new + + # Call the deploy_model method. + result = client.deploy_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_DeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb new file mode 100644 index 000000000000..d2be3e5b1a63 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.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 automl_v1beta1_generated_AutoML_ExportData_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the export_data call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data. +# +def export_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new + + # Call the export_data method. + result = client.export_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_ExportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb new file mode 100644 index 000000000000..ba25ff7ba592 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.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 automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the export_evaluated_examples call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples. +# +def export_evaluated_examples + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new + + # Call the export_evaluated_examples method. + result = client.export_evaluated_examples request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb new file mode 100644 index 000000000000..7c6e81cc84b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.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 automl_v1beta1_generated_AutoML_ExportModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the export_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model. +# +def export_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new + + # Call the export_model method. + result = client.export_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_ExportModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb new file mode 100644 index 000000000000..9a97355601b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_annotation_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec. +# +def get_annotation_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new + + # Call the get_annotation_spec method. + result = client.get_annotation_spec request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. + p result +end +# [END automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb new file mode 100644 index 000000000000..2a52e3c32551 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetColumnSpec_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_column_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec. +# +def get_column_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new + + # Call the get_column_spec method. + result = client.get_column_spec request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + p result +end +# [END automl_v1beta1_generated_AutoML_GetColumnSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb new file mode 100644 index 000000000000..68d3e53aa211 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetDataset_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset. +# +def get_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new + + # Call the get_dataset method. + result = client.get_dataset request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + p result +end +# [END automl_v1beta1_generated_AutoML_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb new file mode 100644 index 000000000000..e50cdc32d622 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model. +# +def get_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new + + # Call the get_model method. + result = client.get_model request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. + p result +end +# [END automl_v1beta1_generated_AutoML_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb new file mode 100644 index 000000000000..ca4f8591f907 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetModelEvaluation_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_model_evaluation call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation. +# +def get_model_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new + + # Call the get_model_evaluation method. + result = client.get_model_evaluation request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. + p result +end +# [END automl_v1beta1_generated_AutoML_GetModelEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb new file mode 100644 index 000000000000..cfe8b2137d84 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetTableSpec_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_table_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec. +# +def get_table_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new + + # Call the get_table_spec method. + result = client.get_table_spec request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + p result +end +# [END automl_v1beta1_generated_AutoML_GetTableSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb new file mode 100644 index 000000000000..1cb0abe33861 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.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 automl_v1beta1_generated_AutoML_ImportData_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the import_data call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data. +# +def import_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new + + # Call the import_data method. + result = client.import_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_ImportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb new file mode 100644 index 000000000000..c74afd3280ca --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.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 automl_v1beta1_generated_AutoML_ListColumnSpecs_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the list_column_specs call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs. +# +def list_column_specs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new + + # Call the list_column_specs method. + result = client.list_column_specs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. + p item + end +end +# [END automl_v1beta1_generated_AutoML_ListColumnSpecs_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb new file mode 100644 index 000000000000..87378a8792fc --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.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 automl_v1beta1_generated_AutoML_ListDatasets_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the list_datasets call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets. +# +def list_datasets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new + + # Call the list_datasets method. + result = client.list_datasets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. + p item + end +end +# [END automl_v1beta1_generated_AutoML_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb new file mode 100644 index 000000000000..528ea60d5c5d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.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 automl_v1beta1_generated_AutoML_ListModelEvaluations_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the list_model_evaluations call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations. +# +def list_model_evaluations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new + + # Call the list_model_evaluations method. + result = client.list_model_evaluations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. + p item + end +end +# [END automl_v1beta1_generated_AutoML_ListModelEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb new file mode 100644 index 000000000000..82eec30e8372 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.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 automl_v1beta1_generated_AutoML_ListModels_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the list_models call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models. +# +def list_models + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new + + # Call the list_models method. + result = client.list_models request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. + p item + end +end +# [END automl_v1beta1_generated_AutoML_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb new file mode 100644 index 000000000000..b3ce41523371 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.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 automl_v1beta1_generated_AutoML_ListTableSpecs_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the list_table_specs call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs. +# +def list_table_specs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new + + # Call the list_table_specs method. + result = client.list_table_specs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. + p item + end +end +# [END automl_v1beta1_generated_AutoML_ListTableSpecs_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb new file mode 100644 index 000000000000..c4dd0d5ccf13 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.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 automl_v1beta1_generated_AutoML_UndeployModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the undeploy_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model. +# +def undeploy_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new + + # Call the undeploy_model method. + result = client.undeploy_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_UndeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb new file mode 100644 index 000000000000..e2f0d1af6b69 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the update_column_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec. +# +def update_column_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new + + # Call the update_column_spec method. + result = client.update_column_spec request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + p result +end +# [END automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb new file mode 100644 index 000000000000..a8a8c79b852f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_UpdateDataset_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the update_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset. +# +def update_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new + + # Call the update_dataset method. + result = client.update_dataset request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + p result +end +# [END automl_v1beta1_generated_AutoML_UpdateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb new file mode 100644 index 000000000000..66268b4bfcd3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_UpdateTableSpec_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the update_table_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec. +# +def update_table_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new + + # Call the update_table_spec method. + result = client.update_table_spec request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + p result +end +# [END automl_v1beta1_generated_AutoML_UpdateTableSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb new file mode 100644 index 000000000000..181699c503a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.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 automl_v1beta1_generated_PredictionService_BatchPredict_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the batch_predict call in the PredictionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict. +# +def batch_predict + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new + + # Call the batch_predict method. + result = client.batch_predict request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_PredictionService_BatchPredict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb new file mode 100644 index 000000000000..aaba4299f11f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_PredictionService_Predict_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the predict call in the PredictionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict. +# +def predict + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::PredictRequest.new + + # Call the predict method. + result = client.predict request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. + p result +end +# [END automl_v1beta1_generated_PredictionService_Predict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json new file mode 100644 index 000000000000..4b7ca3c8ef40 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json @@ -0,0 +1,1055 @@ +{ + "client_library": { + "name": "google-cloud-automl-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.automl.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "automl_v1beta1_generated_PredictionService_Predict_sync", + "title": "Snippet for the predict call in the PredictionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict.", + "file": "prediction_service/predict.rb", + "language": "RUBY", + "client_method": { + "short_name": "predict", + "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::PredictRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::PredictResponse", + "client": { + "short_name": "PredictionService::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client" + }, + "method": { + "short_name": "Predict", + "full_name": "google.cloud.automl.v1beta1.PredictionService.Predict", + "service": { + "short_name": "PredictionService", + "full_name": "google.cloud.automl.v1beta1.PredictionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_PredictionService_BatchPredict_sync", + "title": "Snippet for the batch_predict call in the PredictionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict.", + "file": "prediction_service/batch_predict.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_predict", + "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::BatchPredictRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PredictionService::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client" + }, + "method": { + "short_name": "BatchPredict", + "full_name": "google.cloud.automl.v1beta1.PredictionService.BatchPredict", + "service": { + "short_name": "PredictionService", + "full_name": "google.cloud.automl.v1beta1.PredictionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_CreateDataset_sync", + "title": "Snippet for the create_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset.", + "file": "automl/create_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_dataset", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "CreateDataset", + "full_name": "google.cloud.automl.v1beta1.AutoMl.CreateDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetDataset_sync", + "title": "Snippet for the get_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset.", + "file": "automl/get_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dataset", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetDataset", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ListDatasets_sync", + "title": "Snippet for the list_datasets call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets.", + "file": "automl/list_datasets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_datasets", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ListDatasets", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ListDatasets", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_UpdateDataset_sync", + "title": "Snippet for the update_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset.", + "file": "automl/update_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_dataset", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "UpdateDataset", + "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_DeleteDataset_sync", + "title": "Snippet for the delete_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset.", + "file": "automl/delete_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_dataset", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "DeleteDataset", + "full_name": "google.cloud.automl.v1beta1.AutoMl.DeleteDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ImportData_sync", + "title": "Snippet for the import_data call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data.", + "file": "automl/import_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_data", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ImportDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ImportData", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ImportData", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ExportData_sync", + "title": "Snippet for the export_data call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data.", + "file": "automl/export_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_data", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ExportDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ExportData", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportData", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync", + "title": "Snippet for the get_annotation_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec.", + "file": "automl/get_annotation_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_annotation_spec", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::AnnotationSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetAnnotationSpec", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetTableSpec_sync", + "title": "Snippet for the get_table_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec.", + "file": "automl/get_table_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_table_spec", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::TableSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetTableSpec", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetTableSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ListTableSpecs_sync", + "title": "Snippet for the list_table_specs call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs.", + "file": "automl/list_table_specs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_table_specs", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ListTableSpecs", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ListTableSpecs", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_UpdateTableSpec_sync", + "title": "Snippet for the update_table_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec.", + "file": "automl/update_table_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_table_spec", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::TableSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "UpdateTableSpec", + "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetColumnSpec_sync", + "title": "Snippet for the get_column_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec.", + "file": "automl/get_column_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_column_spec", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ColumnSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetColumnSpec", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetColumnSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ListColumnSpecs_sync", + "title": "Snippet for the list_column_specs call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs.", + "file": "automl/list_column_specs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_column_specs", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ListColumnSpecs", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync", + "title": "Snippet for the update_column_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec.", + "file": "automl/update_column_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_column_spec", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ColumnSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "UpdateColumnSpec", + "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_CreateModel_sync", + "title": "Snippet for the create_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model.", + "file": "automl/create_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::CreateModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "CreateModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.CreateModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetModel_sync", + "title": "Snippet for the get_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model.", + "file": "automl/get_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::Model", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ListModels_sync", + "title": "Snippet for the list_models call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models.", + "file": "automl/list_models.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_models", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ListModelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ListModelsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ListModels", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ListModels", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_DeleteModel_sync", + "title": "Snippet for the delete_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model.", + "file": "automl/delete_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::DeleteModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "DeleteModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.DeleteModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_DeployModel_sync", + "title": "Snippet for the deploy_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model.", + "file": "automl/deploy_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "deploy_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::DeployModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "DeployModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.DeployModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_UndeployModel_sync", + "title": "Snippet for the undeploy_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model.", + "file": "automl/undeploy_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "undeploy_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::UndeployModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "UndeployModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.UndeployModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ExportModel_sync", + "title": "Snippet for the export_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model.", + "file": "automl/export_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ExportModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ExportModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync", + "title": "Snippet for the export_evaluated_examples call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples.", + "file": "automl/export_evaluated_examples.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_evaluated_examples", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ExportEvaluatedExamples", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetModelEvaluation_sync", + "title": "Snippet for the get_model_evaluation call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation.", + "file": "automl/get_model_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_model_evaluation", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ModelEvaluation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetModelEvaluation", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ListModelEvaluations_sync", + "title": "Snippet for the list_model_evaluations call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations.", + "file": "automl/list_model_evaluations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_model_evaluations", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ListModelEvaluations", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "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-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb new file mode 100644 index 000000000000..75d1640c3c69 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_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/automl/v1beta1/service_pb" +require "google/cloud/automl/v1beta1/service_services_pb" +require "google/cloud/automl/v1beta1/automl" + +class ::Google::Cloud::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb new file mode 100644 index 000000000000..267b97d1fab1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_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/automl/v1beta1/automl" + +class ::Google::Cloud::AutoML::V1beta1::AutoML::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_annotation_spec_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.annotation_spec_path project: "value0", location: "value1", dataset: "value2", annotation_spec: "value3" + assert_equal "projects/value0/locations/value1/datasets/value2/annotationSpecs/value3", path + end + end + + def test_column_spec_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.column_spec_path project: "value0", location: "value1", dataset: "value2", table_spec: "value3", column_spec: "value4" + assert_equal "projects/value0/locations/value1/datasets/value2/tableSpecs/value3/columnSpecs/value4", path + end + end + + def test_dataset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project: "value0", location: "value1", dataset: "value2" + assert_equal "projects/value0/locations/value1/datasets/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::AutoML::V1beta1::AutoML::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_model_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end + + def test_model_evaluation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_evaluation_path project: "value0", location: "value1", model: "value2", model_evaluation: "value3" + assert_equal "projects/value0/locations/value1/models/value2/modelEvaluations/value3", path + end + end + + def test_table_spec_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_spec_path project: "value0", location: "value1", dataset: "value2", table_spec: "value3" + assert_equal "projects/value0/locations/value1/datasets/value2/tableSpecs/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb new file mode 100644 index 000000000000..76cbacb1181f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb @@ -0,0 +1,1424 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/automl/v1beta1/service_pb" +require "google/cloud/automl/v1beta1/automl/rest" + + +class ::Google::Cloud::AutoML::V1beta1::AutoML::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_dataset + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + dataset = {} + + create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_dataset parent: parent, dataset: dataset do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_dataset ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_dataset(::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_dataset_client_stub.call_count + end + end + end + + def test_get_dataset + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_dataset ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_dataset(::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dataset_client_stub.call_count + end + end + end + + def test_list_datasets + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.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_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_datasets({ 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_datasets 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_datasets ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.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_datasets_client_stub.call_count + end + end + end + + def test_update_dataset + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + dataset = {} + update_mask = {} + + update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_dataset({ dataset: dataset, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_dataset dataset: dataset, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_dataset ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_dataset({ dataset: dataset, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_dataset(::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_dataset_client_stub.call_count + end + end + end + + def test_delete_dataset + # Create test objects. + 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_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_dataset ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_dataset(::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_dataset_client_stub.call_count + end + end + end + + def test_import_data + # Create test objects. + 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" + input_config = {} + + import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_data_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.import_data({ name: name, input_config: input_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.import_data name: name, input_config: input_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.import_data ::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.import_data({ name: name, input_config: input_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.import_data(::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_data_client_stub.call_count + end + end + end + + def test_export_data + # Create test objects. + 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" + output_config = {} + + export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_data_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.export_data({ name: name, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.export_data name: name, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.export_data ::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.export_data({ name: name, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.export_data(::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_data_client_stub.call_count + end + end + end + + def test_get_annotation_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_annotation_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_annotation_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_annotation_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_annotation_spec({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_annotation_spec name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_annotation_spec ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_annotation_spec({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_annotation_spec(::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_annotation_spec_client_stub.call_count + end + end + end + + def test_get_table_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::TableSpec.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_table_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_table_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_table_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_table_spec({ name: name, field_mask: field_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_table_spec name: name, field_mask: field_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_table_spec ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.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_table_spec({ 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_table_spec(::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.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_table_spec_client_stub.call_count + end + end + end + + def test_list_table_specs + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + field_mask = {} + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_table_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_table_specs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_table_specs_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_table_specs({ parent: parent, field_mask: field_mask, 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_table_specs parent: parent, field_mask: field_mask, 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_table_specs ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, 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_table_specs({ parent: parent, field_mask: field_mask, 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_table_specs(::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, 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_table_specs_client_stub.call_count + end + end + end + + def test_update_table_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::TableSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + table_spec = {} + update_mask = {} + + update_table_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_table_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_table_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_table_spec({ table_spec: table_spec, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_table_spec table_spec: table_spec, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_table_spec ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_table_spec({ table_spec: table_spec, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_table_spec(::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_table_spec_client_stub.call_count + end + end + end + + def test_get_column_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.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_column_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_column_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_column_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_column_spec({ name: name, field_mask: field_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_column_spec name: name, field_mask: field_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_column_spec ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.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_column_spec({ 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_column_spec(::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.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_column_spec_client_stub.call_count + end + end + end + + def test_list_column_specs + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + field_mask = {} + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_column_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_column_specs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_column_specs_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_column_specs({ parent: parent, field_mask: field_mask, 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_column_specs parent: parent, field_mask: field_mask, 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_column_specs ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, 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_column_specs({ parent: parent, field_mask: field_mask, 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_column_specs(::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, 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_column_specs_client_stub.call_count + end + end + end + + def test_update_column_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + column_spec = {} + update_mask = {} + + update_column_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_column_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_column_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_column_spec({ column_spec: column_spec, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_column_spec column_spec: column_spec, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_column_spec ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_column_spec({ column_spec: column_spec, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_column_spec(::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_column_spec_client_stub.call_count + end + end + end + + def test_create_model + # Create test objects. + 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" + model = {} + + create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_model({ parent: parent, model: model }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_model parent: parent, model: model do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_model ::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_model({ parent: parent, model: model }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_model(::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_model_client_stub.call_count + end + end + end + + def test_get_model + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::Model.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_model ::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_model(::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_model_client_stub.call_count + end + end + end + + def test_list_models + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.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_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_models_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_models({ 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_models 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_models ::Google::Cloud::AutoML::V1beta1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::AutoML::V1beta1::ListModelsRequest.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_models_client_stub.call_count + end + end + end + + def test_delete_model + # Create test objects. + 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_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_model ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_model(::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_model_client_stub.call_count + end + end + end + + def test_deploy_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + image_object_detection_model_deployment_metadata = {} + name = "hello world" + + deploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_deploy_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, deploy_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.deploy_model ::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.deploy_model(::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, deploy_model_client_stub.call_count + end + end + end + + def test_undeploy_model + # Create test objects. + 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" + + undeploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_undeploy_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undeploy_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.undeploy_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.undeploy_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.undeploy_model ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.undeploy_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.undeploy_model(::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undeploy_model_client_stub.call_count + end + end + end + + def test_export_model + # Create test objects. + 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" + output_config = {} + + export_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.export_model({ name: name, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.export_model name: name, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.export_model ::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.export_model({ name: name, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.export_model(::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_model_client_stub.call_count + end + end + end + + def test_export_evaluated_examples + # Create test objects. + 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" + output_config = {} + + export_evaluated_examples_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_evaluated_examples_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_evaluated_examples_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.export_evaluated_examples({ name: name, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.export_evaluated_examples name: name, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.export_evaluated_examples ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.export_evaluated_examples({ name: name, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.export_evaluated_examples(::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_evaluated_examples_client_stub.call_count + end + end + end + + def test_get_model_evaluation + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_model_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_model_evaluation_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_model_evaluation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_model_evaluation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_model_evaluation ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_model_evaluation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_model_evaluation(::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_model_evaluation_client_stub.call_count + end + end + end + + def test_list_model_evaluations + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.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_model_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_model_evaluations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_model_evaluations_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_model_evaluations({ 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_model_evaluations 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_model_evaluations ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.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_model_evaluations({ 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_model_evaluations(::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.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_model_evaluations_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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb new file mode 100644 index 000000000000..e43526b6361c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb @@ -0,0 +1,1639 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/automl/v1beta1/service_pb" +require "google/cloud/automl/v1beta1/automl" + +class ::Google::Cloud::AutoML::V1beta1::AutoML::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_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + dataset = {} + + create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Dataset), request["dataset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_dataset({ parent: parent, dataset: dataset }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_dataset parent: parent, dataset: dataset do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_dataset ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_dataset({ parent: parent, dataset: dataset }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_dataset(::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_dataset_client_stub.call_rpc_count + end + end + + def test_get_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_dataset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_dataset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_dataset ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_dataset({ 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_dataset(::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(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_dataset_client_stub.call_rpc_count + end + end + + def test_list_datasets + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_datasets, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, 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_datasets_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_datasets({ 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_datasets 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_datasets ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.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_datasets_client_stub.call_rpc_count + end + end + + def test_update_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + dataset = {} + update_mask = {} + + update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Dataset), request["dataset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_dataset({ dataset: dataset, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_dataset dataset: dataset, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_dataset ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, 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_dataset({ dataset: dataset, 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_dataset(::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, 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_dataset_client_stub.call_rpc_count + end + end + + def test_delete_dataset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_dataset_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_dataset({ 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_dataset 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_dataset ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.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_dataset({ 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_dataset(::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.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_dataset_client_stub.call_rpc_count + end + end + + def test_import_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + + import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_data, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ImportDataRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::InputConfig), request["input_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_data_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.import_data({ name: name, input_config: input_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.import_data name: name, input_config: input_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.import_data ::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_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.import_data({ name: name, input_config: input_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.import_data(::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_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, import_data_client_stub.call_rpc_count + end + end + + def test_export_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_data, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportDataRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::OutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_data_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.export_data({ name: name, 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.export_data name: name, 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.export_data ::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, 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.export_data({ name: name, 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.export_data(::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_data_client_stub.call_rpc_count + end + end + + def test_get_annotation_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_annotation_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_annotation_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_annotation_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_annotation_spec({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_annotation_spec name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_annotation_spec ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_annotation_spec({ 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_annotation_spec(::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(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_annotation_spec_client_stub.call_rpc_count + end + end + + def test_get_table_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::TableSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_table_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_table_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, 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_table_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_table_spec({ 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_table_spec 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_table_spec ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.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_table_spec({ 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_table_spec(::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.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_table_spec_client_stub.call_rpc_count + end + end + + def test_list_table_specs + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + field_mask = {} + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_table_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_table_specs, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + 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_table_specs_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_table_specs({ parent: parent, field_mask: field_mask, 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_table_specs parent: parent, field_mask: field_mask, 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_table_specs ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, 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_table_specs({ parent: parent, field_mask: field_mask, 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_table_specs(::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, 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_table_specs_client_stub.call_rpc_count + end + end + + def test_update_table_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::TableSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + table_spec = {} + update_mask = {} + + update_table_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_table_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::TableSpec), request["table_spec"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_table_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_table_spec({ table_spec: table_spec, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_table_spec table_spec: table_spec, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_table_spec ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, 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_table_spec({ table_spec: table_spec, 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_table_spec(::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, 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_table_spec_client_stub.call_rpc_count + end + end + + def test_get_column_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_column_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_column_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, 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_column_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_column_spec({ 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_column_spec 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_column_spec ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.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_column_spec({ 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_column_spec(::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.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_column_spec_client_stub.call_rpc_count + end + end + + def test_list_column_specs + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + field_mask = {} + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_column_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_column_specs, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + 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_column_specs_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_column_specs({ parent: parent, field_mask: field_mask, 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_column_specs parent: parent, field_mask: field_mask, 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_column_specs ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, 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_column_specs({ parent: parent, field_mask: field_mask, 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_column_specs(::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, 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_column_specs_client_stub.call_rpc_count + end + end + + def test_update_column_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + column_spec = {} + update_mask = {} + + update_column_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_column_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ColumnSpec), request["column_spec"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_column_spec_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_column_spec({ column_spec: column_spec, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_column_spec column_spec: column_spec, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_column_spec ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, 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_column_spec({ column_spec: column_spec, 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_column_spec(::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, 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_column_spec_client_stub.call_rpc_count + end + end + + def test_create_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + model = {} + + create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::CreateModelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Model), request["model"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_model({ parent: parent, model: model }) do |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_model parent: parent, model: model do |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_model ::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model) do |response, operation| + 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_model({ parent: parent, model: model }, grpc_options) do |response, operation| + 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_model(::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| + assert_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_model_client_stub.call_rpc_count + end + end + + def test_get_model + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::Model.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_model({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_model name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_model ::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_model({ 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_model(::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(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_model_client_stub.call_rpc_count + end + end + + def test_list_models + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_models, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListModelsRequest, 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_models_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_models({ 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_models 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_models ::Google::Cloud::AutoML::V1beta1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::AutoML::V1beta1::ListModelsRequest.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_models_client_stub.call_rpc_count + end + end + + def test_delete_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_model({ 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_model 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_model ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.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_model({ 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_model(::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.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_model_client_stub.call_rpc_count + end + end + + def test_deploy_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + image_object_detection_model_deployment_metadata = {} + name = "hello world" + + deploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :deploy_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeployModelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata), request["image_object_detection_model_deployment_metadata"] + assert_equal :image_object_detection_model_deployment_metadata, request.model_deployment_metadata + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, deploy_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model ::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model(::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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, deploy_model_client_stub.call_rpc_count + end + end + + def test_undeploy_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undeploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undeploy_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undeploy_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.undeploy_model({ 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.undeploy_model 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.undeploy_model ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.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.undeploy_model({ 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.undeploy_model(::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.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, undeploy_model_client_stub.call_rpc_count + end + end + + def test_export_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportModelRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_model_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.export_model({ name: name, 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.export_model name: name, 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.export_model ::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, 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.export_model({ name: name, 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.export_model(::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_model_client_stub.call_rpc_count + end + end + + def test_export_evaluated_examples + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_evaluated_examples_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_evaluated_examples, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_evaluated_examples_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.export_evaluated_examples({ name: name, 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.export_evaluated_examples name: name, 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.export_evaluated_examples ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, 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.export_evaluated_examples({ name: name, 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.export_evaluated_examples(::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_evaluated_examples_client_stub.call_rpc_count + end + end + + def test_get_model_evaluation + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_model_evaluation, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_model_evaluation_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_model_evaluation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_model_evaluation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_model_evaluation ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_model_evaluation({ 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_model_evaluation(::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(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_model_evaluation_client_stub.call_rpc_count + end + end + + def test_list_model_evaluations + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_model_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_model_evaluations, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, 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_model_evaluations_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_model_evaluations({ 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_model_evaluations 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_model_evaluations ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.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_model_evaluations({ 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_model_evaluations(::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.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_model_evaluations_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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb new file mode 100644 index 000000000000..63bf5ca8cd95 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_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/automl/v1beta1/prediction_service_pb" +require "google/cloud/automl/v1beta1/prediction_service_services_pb" +require "google/cloud/automl/v1beta1/prediction_service" + +class ::Google::Cloud::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb new file mode 100644 index 000000000000..f82674af6532 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_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/automl/v1beta1/prediction_service" + +class ::Google::Cloud::AutoML::V1beta1::PredictionService::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_model_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb new file mode 100644 index 000000000000..40557dac392a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/automl/v1beta1/prediction_service_pb" +require "google/cloud/automl/v1beta1/prediction_service/rest" + + +class ::Google::Cloud::AutoML::V1beta1::PredictionService::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_predict + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::PredictResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + params = {} + + predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.stub :transcode_predict_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, predict_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.predict({ name: name, payload: payload, params: params }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.predict name: name, payload: payload, params: params do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.predict ::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.predict({ name: name, payload: payload, params: params }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.predict(::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, predict_client_stub.call_count + end + end + end + + def test_batch_predict + # Create test objects. + 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" + input_config = {} + output_config = {} + params = {} + + batch_predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.stub :transcode_batch_predict_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_predict_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_predict ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_predict(::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_predict_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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb new file mode 100644 index 000000000000..9c66c7b2e013 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb @@ -0,0 +1,249 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/automl/v1beta1/prediction_service_pb" +require "google/cloud/automl/v1beta1/prediction_service" + +class ::Google::Cloud::AutoML::V1beta1::PredictionService::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_predict + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::PredictResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + params = {} + + predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :predict, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ExamplePayload), request["payload"] + assert_equal({}, request["params"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, predict_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.predict({ name: name, payload: payload, params: params }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.predict name: name, payload: payload, params: params do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.predict ::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.predict({ name: name, payload: payload, params: params }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.predict(::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, predict_client_stub.call_rpc_count + end + end + + def test_batch_predict + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + output_config = {} + params = {} + + batch_predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_predict, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig), request["input_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig), request["output_config"] + assert_equal({}, request["params"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_predict_client_stub do + # Create client + c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |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_predict name: name, input_config: input_config, output_config: output_config, params: params do |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_predict ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |response, operation| + 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_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, grpc_options) do |response, operation| + 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_predict(::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), grpc_options) do |response, operation| + assert_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_predict_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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-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-backupdr-v1/.gitignore b/owl-bot-staging/google-cloud-backupdr-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json new file mode 100644 index 000000000000..11a24894cf9d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json @@ -0,0 +1,19 @@ +{ + "api_id": "backupdr.googleapis.com", + "api_shortname": "backupdr", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest", + "distribution_name": "google-cloud-backupdr-v1", + "is_cloud": true, + "language": "ruby", + "name": "backupdr", + "name_pretty": "Backup and DR Service V1 API", + "product_documentation": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", + "ruby-cloud-path-override": "backup_dr=backupdr", + "ruby-cloud-namespace-override": "Backupdr=BackupDR", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml b/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml new file mode 100644 index 000000000000..cbd65e44ff07 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-backupdr-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-backupdr-v1.rb" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb b/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/.yardopts b/owl-bot-staging/google-cloud-backupdr-v1/.yardopts new file mode 100644 index 000000000000..17df553d8c78 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Backup and DR 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-backupdr-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..d053ec6f167e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-backupdr-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-backupdr-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/backupdr/v1" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/backupdr/v1" + +::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BackupDR::V1::BackupDR::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-backupdr-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/backupdr/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::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-backupdr-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-backupdr-v1/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/LICENSE.md b/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/README.md b/owl-bot-staging/google-cloud-backupdr-v1/README.md new file mode 100644 index 000000000000..b0d44836bd67 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Backup and DR Service V1 API + +API Client library for the Backup and DR Service V1 API + +google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Backup and DR Service V1 API. Most users should consider using +the main client gem, +[google-cloud-backupdr](https://rubygems.org/gems/google-cloud-backupdr). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-backupdr-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/backupdr.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/backupdr/v1" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new +request = ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new # (request fields as keyword arguments...) +response = client.list_management_servers request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc) +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/backupdr/v1" +require "logger" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::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-backupdr`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-backupdr-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-backupdr`. +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-backupdr-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-backupdr-v1/Rakefile b/owl-bot-staging/google-cloud-backupdr-v1/Rakefile new file mode 100644 index 000000000000..7990877ac4bf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-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/backupdr/v1/backupdr/credentials" + ::Google::Cloud::BackupDR::V1::BackupDR::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-backupdr-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-backupdr-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-backupdr-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-backupdr-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-backupdr-v1" + header "google-cloud-backupdr-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-backupdr-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-backupdr-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-backupdr-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-backupdr-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-backupdr-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json new file mode 100644 index 000000000000..590f02f148a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json @@ -0,0 +1,217 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.backupdr.v1", + "libraryPackage": "::Google::Cloud::BackupDR::V1", + "services": { + "BackupDR": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDR::Client", + "rpcs": { + "ListManagementServers": { + "methods": [ + "list_management_servers" + ] + }, + "GetManagementServer": { + "methods": [ + "get_management_server" + ] + }, + "CreateManagementServer": { + "methods": [ + "create_management_server" + ] + }, + "DeleteManagementServer": { + "methods": [ + "delete_management_server" + ] + }, + "CreateBackupVault": { + "methods": [ + "create_backup_vault" + ] + }, + "ListBackupVaults": { + "methods": [ + "list_backup_vaults" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetch_usable_backup_vaults" + ] + }, + "GetBackupVault": { + "methods": [ + "get_backup_vault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "update_backup_vault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "delete_backup_vault" + ] + }, + "ListDataSources": { + "methods": [ + "list_data_sources" + ] + }, + "GetDataSource": { + "methods": [ + "get_data_source" + ] + }, + "UpdateDataSource": { + "methods": [ + "update_data_source" + ] + }, + "ListBackups": { + "methods": [ + "list_backups" + ] + }, + "FetchBackupsForResourceType": { + "methods": [ + "fetch_backups_for_resource_type" + ] + }, + "GetBackup": { + "methods": [ + "get_backup" + ] + }, + "UpdateBackup": { + "methods": [ + "update_backup" + ] + }, + "DeleteBackup": { + "methods": [ + "delete_backup" + ] + }, + "RestoreBackup": { + "methods": [ + "restore_backup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "create_backup_plan" + ] + }, + "UpdateBackupPlan": { + "methods": [ + "update_backup_plan" + ] + }, + "GetBackupPlan": { + "methods": [ + "get_backup_plan" + ] + }, + "ListBackupPlans": { + "methods": [ + "list_backup_plans" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "delete_backup_plan" + ] + }, + "GetBackupPlanRevision": { + "methods": [ + "get_backup_plan_revision" + ] + }, + "ListBackupPlanRevisions": { + "methods": [ + "list_backup_plan_revisions" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "create_backup_plan_association" + ] + }, + "UpdateBackupPlanAssociation": { + "methods": [ + "update_backup_plan_association" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "get_backup_plan_association" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "list_backup_plan_associations" + ] + }, + "FetchBackupPlanAssociationsForResourceType": { + "methods": [ + "fetch_backup_plan_associations_for_resource_type" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "delete_backup_plan_association" + ] + }, + "TriggerBackup": { + "methods": [ + "trigger_backup" + ] + }, + "GetDataSourceReference": { + "methods": [ + "get_data_source_reference" + ] + }, + "ListDataSourceReferences": { + "methods": [ + "list_data_source_references" + ] + }, + "FetchDataSourceReferencesForResourceType": { + "methods": [ + "fetch_data_source_references_for_resource_type" + ] + }, + "InitializeService": { + "methods": [ + "initialize_service" + ] + } + } + } + } + }, + "BackupDrProtectionSummary": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client", + "rpcs": { + "ListResourceBackupConfigs": { + "methods": [ + "list_resource_backup_configs" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec b/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec new file mode 100644 index 000000000000..2b0919a8e70d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/backupdr/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-backupdr-v1" + gem.version = Google::Cloud::BackupDR::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details." + gem.summary = "API Client library for the Backup and DR Service V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.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-backupdr-v1/lib/google-cloud-backupdr-v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb new file mode 100644 index 000000000000..7bea88dbd327 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-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/backupdr/v1" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb new file mode 100644 index 000000000000..978a9a0cc88f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/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/backupdr/v1/backupdr" +require "google/cloud/backupdr/v1/backup_dr_protection_summary" +require "google/cloud/backupdr/v1/version" + +module Google + module Cloud + module BackupDR + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/backupdr/v1" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/backupdr/v1" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/backupdr/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb new file mode 100644 index 000000000000..52b98449e819 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.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/backupdr/v1/version" + +require "google/cloud/backupdr/v1/backup_dr_protection_summary/credentials" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/paths" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/client" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The Protection Summary service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/backupdr/v1/backup_dr_protection_summary" + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + module BackupDrProtectionSummary + end + end + end + end +end + +helper_path = ::File.join __dir__, "backup_dr_protection_summary", "helpers.rb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb new file mode 100644 index 000000000000..f5245ab36d7b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb @@ -0,0 +1,532 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/backupdr/v1/protection_summary_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + ## + # Client for the BackupDrProtectionSummary service. + # + # The Protection Summary service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_protection_summary_stub + + ## + # Configure the BackupDrProtectionSummary Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDrProtectionSummary clients + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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", "BackupDR", "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_resource_backup_configs.timeout = 60.0 + default_config.rpcs.list_resource_backup_configs.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 BackupDrProtectionSummary 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::BackupDR::V1::BackupDrProtectionSummary::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 + @backup_dr_protection_summary_stub.universe_domain + end + + ## + # Create a new BackupDrProtectionSummary client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDrProtectionSummary 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/backupdr/v1/protection_summary_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 + + @backup_dr_protection_summary_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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 + ) + + @backup_dr_protection_summary_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 = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.logger = @backup_dr_protection_summary_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 = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.logger = @backup_dr_protection_summary_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 + + ## + # 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 + @backup_dr_protection_summary_stub.logger + end + + # Service calls + + ## + # Lists ResourceBackupConfigs. + # + # @overload list_resource_backup_configs(request, options = nil) + # Pass arguments to `list_resource_backup_configs` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve resource backup + # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will use 100 as default. Maximum value is + # 500 and values above 500 will be coerced to 500. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new + # + # # Call the list_resource_backup_configs method. + # result = client.list_resource_backup_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::BackupDR::V1::ResourceBackupConfig. + # p item + # end + # + def list_resource_backup_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest + + # Converts hash and nil to an 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_backup_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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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_backup_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_protection_summary_stub.call_rpc :list_resource_backup_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_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 BackupDrProtectionSummary API. + # + # This class represents the configuration for BackupDrProtectionSummary, + # providing control 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::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_resource_backup_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_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::BackupDR::V1::BackupDrProtectionSummary::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 = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::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 BackupDrProtectionSummary API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_resource_backup_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_backup_configs + + # @private + def initialize parent_rpcs = nil + list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs + @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb new file mode 100644 index 000000000000..94614c32dfd5 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/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 BackupDR + module V1 + module BackupDrProtectionSummary + # Credentials for the BackupDrProtectionSummary 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-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb new file mode 100644 index 000000000000..cbaeba7a3956 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/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 BackupDR + module V1 + module BackupDrProtectionSummary + # Path helper methods for the BackupDrProtectionSummary API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb new file mode 100644 index 000000000000..38b3a06e8a03 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/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/backupdr/v1/version" +require "google/cloud/backupdr/v1/bindings_override" + +require "google/cloud/backupdr/v1/backup_dr_protection_summary/credentials" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/paths" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The Protection Summary service. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + module BackupDrProtectionSummary + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb new file mode 100644 index 000000000000..74b1c5ff1835 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb @@ -0,0 +1,491 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/backupdr/v1/protection_summary_pb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + module Rest + ## + # REST client for the BackupDrProtectionSummary service. + # + # The Protection Summary service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_protection_summary_stub + + ## + # Configure the BackupDrProtectionSummary Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDrProtectionSummary clients + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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", "BackupDR", "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_resource_backup_configs.timeout = 60.0 + default_config.rpcs.list_resource_backup_configs.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 BackupDrProtectionSummary 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::BackupDR::V1::BackupDrProtectionSummary::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 + @backup_dr_protection_summary_stub.universe_domain + end + + ## + # Create a new BackupDrProtectionSummary REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDrProtectionSummary 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 + + @backup_dr_protection_summary_stub = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @backup_dr_protection_summary_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 = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_protection_summary_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 = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_protection_summary_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 + + ## + # 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 + @backup_dr_protection_summary_stub.logger + end + + # Service calls + + ## + # Lists ResourceBackupConfigs. + # + # @overload list_resource_backup_configs(request, options = nil) + # Pass arguments to `list_resource_backup_configs` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve resource backup + # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will use 100 as default. Maximum value is + # 500 and values above 500 will be coerced to 500. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new + # + # # Call the list_resource_backup_configs method. + # result = client.list_resource_backup_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::BackupDR::V1::ResourceBackupConfig. + # p item + # end + # + def list_resource_backup_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest + + # Converts hash and nil to an options 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_backup_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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_backup_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_protection_summary_stub.list_resource_backup_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_configs, "resource_backup_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 BackupDrProtectionSummary REST API. + # + # This class represents the configuration for BackupDrProtectionSummary 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::BackupDR::V1::BackupDrProtectionSummary::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_resource_backup_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_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 = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::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 BackupDrProtectionSummary API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_resource_backup_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_backup_configs + + # @private + def initialize parent_rpcs = nil + list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs + @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_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-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb new file mode 100644 index 000000000000..b788e5ec9af1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/protection_summary_pb" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + module Rest + ## + # REST service stub for the BackupDrProtectionSummary 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_resource_backup_configs REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse] + # A result object deserialized from the server's reply + def list_resource_backup_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_backup_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_backup_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.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_resource_backup_configs REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest] + # A 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_backup_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/resourceBackupConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb new file mode 100644 index 000000000000..9807b8cc2845 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.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/backupdr/v1/version" + +require "google/cloud/backupdr/v1/backupdr/credentials" +require "google/cloud/backupdr/v1/backupdr/paths" +require "google/cloud/backupdr/v1/backupdr/operations" +require "google/cloud/backupdr/v1/backupdr/client" +require "google/cloud/backupdr/v1/backupdr/rest" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The BackupDR Service + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/backupdr/v1/backupdr" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/backupdr/v1/backupdr/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module BackupDR + end + end + end + end +end + +helper_path = ::File.join __dir__, "backupdr", "helpers.rb" +require "google/cloud/backupdr/v1/backupdr/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb new file mode 100644 index 000000000000..30e7a373b7e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb @@ -0,0 +1,4788 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/backupdr/v1/backupdr_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + ## + # Client for the BackupDR service. + # + # The BackupDR Service + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_stub + + ## + # Configure the BackupDR Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDR clients + # ::Google::Cloud::BackupDR::V1::BackupDR::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", "BackupDR", "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_management_servers.timeout = 60.0 + default_config.rpcs.list_management_servers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_management_server.timeout = 60.0 + default_config.rpcs.get_management_server.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_management_server.timeout = 60.0 + + default_config.rpcs.delete_management_server.timeout = 60.0 + + default_config.rpcs.create_backup_vault.timeout = 60.0 + default_config.rpcs.create_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_backup_vaults.timeout = 60.0 + default_config.rpcs.list_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 + default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_vault.timeout = 60.0 + default_config.rpcs.get_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup_vault.timeout = 60.0 + + default_config.rpcs.delete_backup_vault.timeout = 60.0 + default_config.rpcs.delete_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_sources.timeout = 60.0 + default_config.rpcs.list_data_sources.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_source.timeout = 60.0 + default_config.rpcs.get_data_source.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_source.timeout = 60.0 + + default_config.rpcs.list_backups.timeout = 60.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup.timeout = 60.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup.timeout = 60.0 + + default_config.rpcs.restore_backup.timeout = 60.0 + + default_config.rpcs.initialize_service.timeout = 60.0 + default_config.rpcs.initialize_service.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 BackupDR 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::BackupDR::V1::BackupDR::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 + @backup_dr_stub.universe_domain + end + + ## + # Create a new BackupDR client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDR 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/backupdr/v1/backupdr_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 + + @backup_dr_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BackupDR::V1::BackupDR::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 + ) + + @backup_dr_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 = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.logger = @backup_dr_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 = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.logger = @backup_dr_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BackupDR::V1::BackupDR::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 + @backup_dr_stub.logger + end + + # Service calls + + ## + # Lists ManagementServers in a given project and location. + # + # @overload list_management_servers(request, options = nil) + # Pass arguments to `list_management_servers` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_management_servers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve management servers + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud BackupDR, locations map to Google Cloud regions, for example + # **us-central1**. To retrieve management servers for all locations, use "-" + # for the + # '\\{location}' value. + # @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. 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::BackupDR::V1::ManagementServer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new + # + # # Call the list_management_servers method. + # result = client.list_management_servers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. + # p item + # end + # + def list_management_servers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_management_servers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_management_servers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_management_servers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_management_servers, request, response, 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 ManagementServer. + # + # @overload get_management_server(request, options = nil) + # Pass arguments to `get_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_management_server(name: nil) + # Pass arguments to `get_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 management server resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::ManagementServer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new + # + # # Call the get_management_server method. + # result = client.get_management_server request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. + # p result + # + def get_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_management_server, request, 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 ManagementServer in a given project and location. + # + # @overload create_management_server(request, options = nil) + # Pass arguments to `create_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) + # Pass arguments to `create_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The management server project and location in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR + # locations map to Google Cloud regions, for example **us-central1**. + # @param management_server_id [::String] + # Required. The name of the management server to create. The name must be + # unique for the specified project and location. + # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] + # Required. A [management server + # resource][google.cloud.backupdr.v1.ManagementServer] + # @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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new + # + # # Call the create_management_server method. + # result = client.create_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest + + # Converts hash and nil to 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_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_management_server.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_management_server, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 ManagementServer. + # + # @overload delete_management_server(request, options = nil) + # Pass arguments to `delete_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_management_server(name: nil, request_id: nil) + # Pass arguments to `delete_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new + # + # # Call the delete_management_server method. + # result = client.delete_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest + + # Converts hash and nil to 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_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_management_server.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_management_server, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new BackupVault in a given project and location. + # + # @overload create_backup_vault(request, options = nil) + # Pass arguments to `create_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 backup_vault_id [::String] + # Required. ID of the requesting object + # If auto-generating ID server-side, remove this field and + # backup_vault_id from the method_signature of Create RPC + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::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). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new + # + # # Call the create_backup_vault method. + # result = client.create_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest + + # Converts hash and nil to 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_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_backup_vault, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 BackupVaults in a given project and location. + # + # @overload list_backup_vaults(request, options = nil) + # Pass arguments to `list_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @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. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new + # + # # Call the list_backup_vaults method. + # result = client.list_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def list_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest + + # Converts hash and nil to an 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_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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_vaults.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_vaults, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchUsableBackupVaults lists usable BackupVaults in a given project and + # location. Usable BackupVault are the ones that user has + # backupdr.backupVaults.get permission. + # + # @overload fetch_usable_backup_vaults(request, options = nil) + # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @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. 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::BackupDR::V1::BackupVault>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new + # + # # Call the fetch_usable_backup_vaults method. + # result = client.fetch_usable_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def fetch_usable_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest + + # Converts hash and nil to 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_usable_backup_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_usable_backup_vaults.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_usable_backup_vaults, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, request, response, 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 BackupVault. + # + # @overload get_backup_vault(request, options = nil) + # Pass arguments to `get_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_vault(name: nil, view: nil) + # Pass arguments to `get_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 backupvault store resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupVault] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new + # + # # Call the get_backup_vault method. + # result = client.get_backup_vault request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. + # p result + # + def get_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest + + # Converts hash and nil to an 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_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_vault, request, 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 settings of a BackupVault. + # + # @overload update_backup_vault(request, options = nil) + # Pass arguments to `update_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) + # Pass arguments to `update_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # BackupVault 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 the request will fail. + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] + # Required. The resource being updated + # @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). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param force [::Boolean] + # Optional. If set to true, will not check plan duration against backup vault + # enforcement duration. + # @param force_update_access_restriction [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new + # + # # Call the update_backup_vault method. + # result = client.update_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest + + # Converts hash and nil to 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_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-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_vault&.name + header_params["backup_vault.name"] = request.backup_vault.name + end + + request_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_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup_vault, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 BackupVault. + # + # @overload delete_backup_vault(request, options = nil) + # Pass arguments to `delete_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) + # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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, any data source from this backup vault will also + # be deleted. + # @param etag [::String] + # The current etag of the backup vault. + # If an etag is provided and does not match the current etag of the + # connection, deletion will be blocked. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param allow_missing [::Boolean] + # Optional. If true and the BackupVault is not found, the request will + # succeed but no action will be taken. + # @param ignore_backup_plan_references [::Boolean] + # Optional. If set to true, backupvault deletion will proceed even if there + # are backup plans referencing the backupvault. The default is 'false'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new + # + # # Call the delete_backup_vault method. + # result = client.delete_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest + + # Converts hash and nil to 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_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup_vault, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 DataSources in a given project and location. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve data + # sources information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @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. 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::BackupDR::V1::DataSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_data_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a DataSource. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a DataSource. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) + # Pass arguments to `update_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # DataSource 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 the request will fail. + # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] + # Required. The resource being updated + # @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). + # @param allow_missing [::Boolean] + # Optional. Enable upsert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_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 update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_source&.name + header_params["data_source.name"] = request.data_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_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_data_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 Backups in a given project and location. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::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, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: 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 project and location for which to retrieve backup + # information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @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. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::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::BackupDR::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::BackupDR::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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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 + + @backup_dr_stub.call_rpc :list_backups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_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 + + ## + # Fetch Backups for a given resource type. + # + # @overload fetch_backups_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Datasources are the parent resource for the backups. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sqladmin.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of Backups to return. The service may + # return fewer than this value. If unspecified, at most 50 + # Backups will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. This parameter is used to specify the view of the backup. + # If not specified, the default view is BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new + # + # # Call the fetch_backups_for_resource_type method. + # result = client.fetch_backups_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + # p item + # end + # + def fetch_backups_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest + + # Converts hash and nil to 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_backups_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_backups_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_backups_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, request, response, 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 Backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::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, view: 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 data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::Backup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::BackupDR::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::BackupDR::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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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 + + @backup_dr_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 the settings of a Backup. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::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(update_mask: nil, backup: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Backup 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 the request will fail. + # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] + # Required. The resource being updated + # @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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_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 update_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::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::BackupDR::V1::VERSION + metadata[:"x-goog-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 + + @backup_dr_stub.call_rpc :update_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 + + ## + # Deletes a Backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::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, request_id: 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 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_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 delete_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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 + + @backup_dr_stub.call_rpc :delete_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 + + ## + # Restore from a Backup + # + # @overload restore_backup(request, options = nil) + # Pass arguments to `restore_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) + # Pass arguments to `restore_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. The resource name of the Backup instance, in the format + # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + # @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 compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] + # Compute Engine target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. 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 disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] + # Disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. 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 region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] + # Region disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. 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 compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] + # Compute Engine instance properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. 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 disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] + # Disk properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. 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 clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A field mask used to clear server-side default values + # for fields within the `instance_properties` oneof. + # + # When a field in this mask is cleared, the server will not apply its + # default logic (like inheriting a value from the source) for that field. + # + # The most common current use case is clearing default encryption keys. + # + # Examples of field mask paths: + # - Compute Instance Disks: + # `compute_instance_restore_properties.disks.*.disk_encryption_key` + # - Single Disk: `disk_restore_properties.disk_encryption_key` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new + # + # # Call the restore_backup method. + # result = client.restore_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 restore_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest + + # Converts hash and nil to 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_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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restore_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :restore_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 + + ## + # Create a BackupPlan + # + # @overload create_backup_plan(request, options = nil) + # Pass arguments to `create_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) + # Pass arguments to `create_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The `BackupPlan` project and location in the format + # `projects/{project}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @param backup_plan_id [::String] + # Required. The name of the `BackupPlan` to create. The name must be unique + # for the specified project and location.The name must start with a lowercase + # letter followed by up to 62 lowercase letters, numbers, or hyphens. + # Pattern, /[a-z][a-z0-9-]\\{,62}/. + # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The `BackupPlan` resource object to create. + # @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 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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new + # + # # Call the create_backup_plan method. + # result = client.create_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest + + # Converts hash and nil to 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_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_backup_plan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 BackupPlan. + # + # @overload update_backup_plan(request, options = nil) + # Pass arguments to `update_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan(backup_plan: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan` via keyword arguments. Note that at + # least one keyword argument is 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_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan 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 the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @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 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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + # + # # Call the update_backup_plan method. + # result = client.update_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest + + # Converts hash and nil to 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_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-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_plan&.name + header_params["backup_plan.name"] = request.backup_plan.name + end + + request_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_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup_plan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlan. + # + # @overload get_backup_plan(request, options = nil) + # Pass arguments to `get_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan(name: nil) + # Pass arguments to `get_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 `BackupPlan` to retrieve. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlan] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new + # + # # Call the get_backup_plan method. + # result = client.get_backup_plan request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. + # p result + # + def get_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest + + # Converts hash and nil to an 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_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_plan, request, 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 BackupPlans in a given project and location. + # + # @overload list_backup_plans(request, options = nil) + # Pass arguments to `list_backup_plans` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve `BackupPlans` + # information. Format: `projects/{project}/locations/{location}`. In Cloud + # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + # retrieve backup plans for all locations, use "-" for the + # `{location}` value. + # @param page_size [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new + # + # # Call the list_backup_plans method. + # result = client.list_backup_plans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. + # p item + # end + # + def list_backup_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest + + # Converts hash and nil to an 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_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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_plans.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_plans, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single BackupPlan. + # + # @overload delete_backup_plan(request, options = nil) + # Pass arguments to `delete_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 `BackupPlan` to delete. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new + # + # # Call the delete_backup_plan method. + # result = client.delete_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest + + # Converts hash and nil to 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_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup_plan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanRevision. + # + # @overload get_backup_plan_revision(request, options = nil) + # Pass arguments to `get_backup_plan_revision` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_revision(name: nil) + # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + # + # # Call the get_backup_plan_revision method. + # result = client.get_backup_plan_revision request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p result + # + def get_backup_plan_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest + + # Converts hash and nil to an 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_plan_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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_plan_revision.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_plan_revision, request, 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 BackupPlanRevisions in a given project and location. + # + # @overload list_backup_plan_revisions(request, options = nil) + # Pass arguments to `list_backup_plan_revisions` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_revisions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @param page_size [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` 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::BackupDR::V1::BackupPlanRevision>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + # + # # Call the list_backup_plan_revisions method. + # result = client.list_backup_plan_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p item + # end + # + def list_backup_plan_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest + + # Converts hash and nil to an 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_plan_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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_plan_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_plan_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a BackupPlanAssociation + # + # @overload create_backup_plan_association(request, options = nil) + # Pass arguments to `create_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) + # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The backup plan association project and location in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @param backup_plan_association_id [::String] + # Required. The name of the backup plan association to create. The name must + # be unique for the specified project and location. + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::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 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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + # + # # Call the create_backup_plan_association method. + # result = client.create_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest + + # Converts hash and nil to 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_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_backup_plan_association, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 BackupPlanAssociation. + # + # @overload update_backup_plan_association(request, options = nil) + # Pass arguments to `update_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is 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_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation 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 the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @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 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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new + # + # # Call the update_backup_plan_association method. + # result = client.update_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest + + # Converts hash and nil to 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_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-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_plan_association&.name + header_params["backup_plan_association.name"] = request.backup_plan_association.name + end + + request_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_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup_plan_association, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanAssociation. + # + # @overload get_backup_plan_association(request, options = nil) + # Pass arguments to `get_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_association(name: nil) + # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new + # + # # Call the get_backup_plan_association method. + # result = client.get_backup_plan_association request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p result + # + def get_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest + + # Converts hash and nil to an 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_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_plan_association, request, 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 BackupPlanAssociations in a given project and location. + # + # @overload list_backup_plan_associations(request, options = nil) + # Pass arguments to `list_backup_plan_associations` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backup Plan + # Associations information, in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + # map to GCP regions, for example **us-central1**. To retrieve backup plan + # associations for all locations, use "-" for the + # `{location}` value. + # @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. Filtering results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new + # + # # Call the list_backup_plan_associations method. + # result = client.list_backup_plan_associations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def list_backup_plan_associations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest + + # Converts hash and nil to an 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_plan_associations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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_plan_associations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_plan_associations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List BackupPlanAssociations for a given resource type. + # + # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + # + # # Call the fetch_backup_plan_associations_for_resource_type method. + # result = client.fetch_backup_plan_associations_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def fetch_backup_plan_associations_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest + + # Converts hash and nil to 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_backup_plan_associations_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_backup_plan_associations_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_backup_plan_associations_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single BackupPlanAssociation. + # + # @overload delete_backup_plan_association(request, options = nil) + # Pass arguments to `delete_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_association(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new + # + # # Call the delete_backup_plan_association method. + # result = client.delete_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest + + # Converts hash and nil to 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_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup_plan_association, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Triggers a new Backup. + # + # @overload trigger_backup(request, options = nil) + # Pass arguments to `trigger_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) + # Pass arguments to `trigger_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 plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @param rule_id [::String] + # Required. backup rule_id for which a backup needs to be triggered. + # @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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new + # + # # Call the trigger_backup method. + # result = client.trigger_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 trigger_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.trigger_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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.trigger_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :trigger_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 details of a single DataSourceReference. + # + # @overload get_data_source_reference(request, options = nil) + # Pass arguments to `get_data_source_reference` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_source_reference(name: nil) + # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + # + # # Call the get_data_source_reference method. + # result = client.get_data_source_reference request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + # p result + # + def get_data_source_reference request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_source_reference.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source_reference.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_data_source_reference, request, 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 DataSourceReferences for a given project and location. + # + # @overload list_data_source_references(request, options = nil) + # Pass arguments to `list_data_source_references` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_source_references` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSourceReferences` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDataSourceReferences` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the results listed in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. + # + # The following field and operator combinations are supported: + # + # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + # * data_source_gcp_resource_info.type with `=`, `!=` + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new + # + # # Call the list_data_source_references method. + # result = client.list_data_source_references request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def list_data_source_references request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_source_references.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_source_references.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_data_source_references, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch DataSourceReferences for a given project, location and resource type. + # + # @overload fetch_data_source_references_for_resource_type(request, options = nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + # + # # Call the fetch_data_source_references_for_resource_type method. + # result = client.fetch_data_source_references_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def fetch_data_source_references_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest + + # Converts hash and nil to 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_data_source_references_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_data_source_references_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_data_source_references_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Initializes the service related config for a project. + # + # @overload initialize_service(request, options = nil) + # Pass arguments to `initialize_service` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) + # Pass arguments to `initialize_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 resource name of the serviceConfig used to initialize the + # service. Format: + # `projects/{project_id}/locations/{location}/serviceConfig`. + # @param resource_type [::String] + # Required. The resource type to which the default service config will be + # applied. Examples include, "compute.googleapis.com/Instance" and + # "storage.googleapis.com/Bucket". + # @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 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). + # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] + # Optional. The configuration for initializing a Cloud SQL 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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new + # + # # Call the initialize_service method. + # result = client.initialize_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 initialize_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.initialize_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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.initialize_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :initialize_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 + + ## + # Configuration class for the BackupDR API. + # + # This class represents the configuration for BackupDR, + # providing control 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::BackupDR::V1::BackupDR::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_management_servers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::BackupDR::V1::BackupDR::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 = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::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 BackupDR API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_management_servers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_management_servers + ## + # RPC-specific configuration for `get_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :get_management_server + ## + # RPC-specific configuration for `create_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :create_management_server + ## + # RPC-specific configuration for `delete_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_management_server + ## + # RPC-specific configuration for `create_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_vault + ## + # RPC-specific configuration for `list_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_vaults + ## + # RPC-specific configuration for `fetch_usable_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_usable_backup_vaults + ## + # RPC-specific configuration for `get_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_vault + ## + # RPC-specific configuration for `update_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_vault + ## + # RPC-specific configuration for `delete_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_vault + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `fetch_backups_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backups_for_resource_type + ## + # 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 `restore_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_backup + ## + # RPC-specific configuration for `create_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan + ## + # RPC-specific configuration for `update_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan + ## + # RPC-specific configuration for `get_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan + ## + # RPC-specific configuration for `list_backup_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plans + ## + # RPC-specific configuration for `delete_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan + ## + # RPC-specific configuration for `get_backup_plan_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_revision + ## + # RPC-specific configuration for `list_backup_plan_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_revisions + ## + # RPC-specific configuration for `create_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan_association + ## + # RPC-specific configuration for `update_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan_association + ## + # RPC-specific configuration for `get_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_association + ## + # RPC-specific configuration for `list_backup_plan_associations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_associations + ## + # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backup_plan_associations_for_resource_type + ## + # RPC-specific configuration for `delete_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan_association + ## + # RPC-specific configuration for `trigger_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_backup + ## + # RPC-specific configuration for `get_data_source_reference` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source_reference + ## + # RPC-specific configuration for `list_data_source_references` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_source_references + ## + # RPC-specific configuration for `fetch_data_source_references_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source_references_for_resource_type + ## + # RPC-specific configuration for `initialize_service` + # @return [::Gapic::Config::Method] + # + attr_reader :initialize_service + + # @private + def initialize parent_rpcs = nil + list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers + @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config + get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server + @get_management_server = ::Gapic::Config::Method.new get_management_server_config + create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server + @create_management_server = ::Gapic::Config::Method.new create_management_server_config + delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server + @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config + create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault + @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config + list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults + @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config + fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults + @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config + get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault + @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config + update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault + @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config + delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault + @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type + @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_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 + restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup + @restore_backup = ::Gapic::Config::Method.new restore_backup_config + create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan + @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config + update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan + @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config + get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan + @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config + list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans + @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config + delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan + @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config + get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision + @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config + list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions + @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config + create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association + @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config + update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association + @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config + get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association + @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config + list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations + @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config + fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type + @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config + delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association + @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config + trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup + @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config + get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference + @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config + list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references + @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config + fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type + @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config + initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service + @initialize_service = ::Gapic::Config::Method.new initialize_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb new file mode 100644 index 000000000000..f6fc3fd1ca69 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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 BackupDR + module V1 + module BackupDR + # Credentials for the BackupDR 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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb new file mode 100644 index 000000000000..ad52ac7ba1c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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 BackupDR + module V1 + module BackupDR + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BackupDR 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 BackupDR 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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::BackupDR::V1::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 = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb new file mode 100644 index 000000000000..298a5882fa27 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb @@ -0,0 +1,309 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + # Path helper methods for the BackupDR API. + module Paths + ## + # Create a fully-qualified Backup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}` + # + # @param project [String] + # @param location [String] + # @param backupvault [String] + # @param datasource [String] + # @param backup [String] + # + # @return [::String] + def backup_path project:, location:, backupvault:, datasource:, backup: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" + raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}/backups/#{backup}" + end + + ## + # Create a fully-qualified BackupPlan resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # + # @param project [String] + # @param location [String] + # @param backup_plan [String] + # + # @return [::String] + def backup_plan_path project:, location:, backup_plan: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}" + end + + ## + # Create a fully-qualified BackupPlanAssociation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}` + # + # @param project [String] + # @param location [String] + # @param backup_plan_association [String] + # + # @return [::String] + def backup_plan_association_path project:, location:, backup_plan_association: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlanAssociations/#{backup_plan_association}" + end + + ## + # Create a fully-qualified BackupPlanRevision resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # + # @param project [String] + # @param location [String] + # @param backup_plan [String] + # @param revision [String] + # + # @return [::String] + def backup_plan_revision_path project:, location:, backup_plan:, revision: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/revisions/#{revision}" + end + + ## + # Create a fully-qualified BackupVault resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupVaults/{backupvault}` + # + # @param project [String] + # @param location [String] + # @param backupvault [String] + # + # @return [::String] + def backup_vault_path project:, location:, backupvault: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}" + end + + ## + # Create a fully-qualified Cluster resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/clusters/{cluster}` + # + # @param project [String] + # @param location [String] + # @param cluster [String] + # + # @return [::String] + def cluster_path project:, location:, cluster: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/clusters/#{cluster}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}` + # + # @param project [String] + # @param location [String] + # @param ring [String] + # @param key [String] + # + # @return [::String] + def crypto_key_path project:, location:, ring:, key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "ring cannot contain /" if ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{ring}/cryptoKeys/#{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 DataSource resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}` + # + # @param project [String] + # @param location [String] + # @param backupvault [String] + # @param datasource [String] + # + # @return [::String] + def data_source_path project:, location:, backupvault:, datasource: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}" + end + + ## + # Create a fully-qualified DataSourceReference resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}` + # + # @param project [String] + # @param location [String] + # @param data_source_reference [String] + # + # @return [::String] + def data_source_reference_path project:, location:, data_source_reference: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataSourceReferences/#{data_source_reference}" + 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 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 ManagementServer resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/managementServers/{managementserver}` + # + # @param project [String] + # @param location [String] + # @param managementserver [String] + # + # @return [::String] + def management_server_path project:, location:, managementserver: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/managementServers/#{managementserver}" + end + + ## + # Create a fully-qualified StoragePool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/zones/{zone}/storagePools/{storage_pool}` + # + # @param project [String] + # @param zone [String] + # @param storage_pool [String] + # + # @return [::String] + def storage_pool_path project:, zone:, storage_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/zones/#{zone}/storagePools/#{storage_pool}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb new file mode 100644 index 000000000000..5b7fba263be4 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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/backupdr/v1/version" +require "google/cloud/backupdr/v1/bindings_override" + +require "google/cloud/backupdr/v1/backupdr/credentials" +require "google/cloud/backupdr/v1/backupdr/paths" +require "google/cloud/backupdr/v1/backupdr/rest/operations" +require "google/cloud/backupdr/v1/backupdr/rest/client" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The BackupDR Service + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/backupdr/v1/backupdr/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module BackupDR + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/backupdr/v1/backupdr/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb new file mode 100644 index 000000000000..b3b3918968ab --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb @@ -0,0 +1,4495 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + module Rest + ## + # REST client for the BackupDR service. + # + # The BackupDR Service + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_stub + + ## + # Configure the BackupDR Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDR clients + # ::Google::Cloud::BackupDR::V1::BackupDR::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", "BackupDR", "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_management_servers.timeout = 60.0 + default_config.rpcs.list_management_servers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_management_server.timeout = 60.0 + default_config.rpcs.get_management_server.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_management_server.timeout = 60.0 + + default_config.rpcs.delete_management_server.timeout = 60.0 + + default_config.rpcs.create_backup_vault.timeout = 60.0 + default_config.rpcs.create_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_backup_vaults.timeout = 60.0 + default_config.rpcs.list_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 + default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_vault.timeout = 60.0 + default_config.rpcs.get_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup_vault.timeout = 60.0 + + default_config.rpcs.delete_backup_vault.timeout = 60.0 + default_config.rpcs.delete_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_sources.timeout = 60.0 + default_config.rpcs.list_data_sources.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_source.timeout = 60.0 + default_config.rpcs.get_data_source.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_source.timeout = 60.0 + + default_config.rpcs.list_backups.timeout = 60.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup.timeout = 60.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup.timeout = 60.0 + + default_config.rpcs.restore_backup.timeout = 60.0 + + default_config.rpcs.initialize_service.timeout = 60.0 + default_config.rpcs.initialize_service.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 BackupDR 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::BackupDR::V1::BackupDR::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 + @backup_dr_stub.universe_domain + end + + ## + # Create a new BackupDR REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDR 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::BackupDR::V1::BackupDR::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 + + @backup_dr_stub = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @backup_dr_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 = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_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 = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BackupDR::V1::BackupDR::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 + @backup_dr_stub.logger + end + + # Service calls + + ## + # Lists ManagementServers in a given project and location. + # + # @overload list_management_servers(request, options = nil) + # Pass arguments to `list_management_servers` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_management_servers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve management servers + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud BackupDR, locations map to Google Cloud regions, for example + # **us-central1**. To retrieve management servers for all locations, use "-" + # for the + # '\\{location}' value. + # @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. 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::BackupDR::V1::ManagementServer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new + # + # # Call the list_management_servers method. + # result = client.list_management_servers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. + # p item + # end + # + def list_management_servers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_management_servers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_management_servers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_management_servers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_management_servers, "management_servers", request, result, 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 ManagementServer. + # + # @overload get_management_server(request, options = nil) + # Pass arguments to `get_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_management_server(name: nil) + # Pass arguments to `get_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 management server resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new + # + # # Call the get_management_server method. + # result = client.get_management_server request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. + # p result + # + def get_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_management_server request, 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 ManagementServer in a given project and location. + # + # @overload create_management_server(request, options = nil) + # Pass arguments to `create_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) + # Pass arguments to `create_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The management server project and location in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR + # locations map to Google Cloud regions, for example **us-central1**. + # @param management_server_id [::String] + # Required. The name of the management server to create. The name must be + # unique for the specified project and location. + # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] + # Required. A [management server + # resource][google.cloud.backupdr.v1.ManagementServer] + # @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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new + # + # # Call the create_management_server method. + # result = client.create_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest + + # Converts hash and nil to an 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_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_management_server.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_management_server request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 ManagementServer. + # + # @overload delete_management_server(request, options = nil) + # Pass arguments to `delete_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_management_server(name: nil, request_id: nil) + # Pass arguments to `delete_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new + # + # # Call the delete_management_server method. + # result = client.delete_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest + + # Converts hash and nil to an 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_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_management_server.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_management_server request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupVault in a given project and location. + # + # @overload create_backup_vault(request, options = nil) + # Pass arguments to `create_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 backup_vault_id [::String] + # Required. ID of the requesting object + # If auto-generating ID server-side, remove this field and + # backup_vault_id from the method_signature of Create RPC + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::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). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new + # + # # Call the create_backup_vault method. + # result = client.create_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest + + # Converts hash and nil to an 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_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_backup_vault request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupVaults in a given project and location. + # + # @overload list_backup_vaults(request, options = nil) + # Pass arguments to `list_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @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. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new + # + # # Call the list_backup_vaults method. + # result = client.list_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def list_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest + + # Converts hash and nil to an options 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_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_vaults.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_vaults request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, "backup_vaults", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchUsableBackupVaults lists usable BackupVaults in a given project and + # location. Usable BackupVault are the ones that user has + # backupdr.backupVaults.get permission. + # + # @overload fetch_usable_backup_vaults(request, options = nil) + # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @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. 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::BackupDR::V1::BackupVault>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new + # + # # Call the fetch_usable_backup_vaults method. + # result = client.fetch_usable_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def fetch_usable_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest + + # Converts hash and nil to an 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_usable_backup_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_usable_backup_vaults.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_usable_backup_vaults request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, "backup_vaults", request, result, 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 BackupVault. + # + # @overload get_backup_vault(request, options = nil) + # Pass arguments to `get_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_vault(name: nil, view: nil) + # Pass arguments to `get_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 backupvault store resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new + # + # # Call the get_backup_vault method. + # result = client.get_backup_vault request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. + # p result + # + def get_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest + + # Converts hash and nil to an options 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_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_vault request, 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 settings of a BackupVault. + # + # @overload update_backup_vault(request, options = nil) + # Pass arguments to `update_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) + # Pass arguments to `update_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # BackupVault 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 the request will fail. + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] + # Required. The resource being updated + # @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). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param force [::Boolean] + # Optional. If set to true, will not check plan duration against backup vault + # enforcement duration. + # @param force_update_access_restriction [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new + # + # # Call the update_backup_vault method. + # result = client.update_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest + + # Converts hash and nil to an 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_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup_vault request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupVault. + # + # @overload delete_backup_vault(request, options = nil) + # Pass arguments to `delete_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) + # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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, any data source from this backup vault will also + # be deleted. + # @param etag [::String] + # The current etag of the backup vault. + # If an etag is provided and does not match the current etag of the + # connection, deletion will be blocked. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param allow_missing [::Boolean] + # Optional. If true and the BackupVault is not found, the request will + # succeed but no action will be taken. + # @param ignore_backup_plan_references [::Boolean] + # Optional. If set to true, backupvault deletion will proceed even if there + # are backup plans referencing the backupvault. The default is 'false'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new + # + # # Call the delete_backup_vault method. + # result = client.delete_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest + + # Converts hash and nil to an 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_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup_vault request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 DataSources in a given project and location. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve data + # sources information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @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. 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::BackupDR::V1::DataSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_data_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_sources, "data_sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a DataSource. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a DataSource. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) + # Pass arguments to `update_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # DataSource 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 the request will fail. + # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] + # Required. The resource being updated + # @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). + # @param allow_missing [::Boolean] + # Optional. Enable upsert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_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 update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_data_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 Backups in a given project and location. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::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, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: 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 project and location for which to retrieve backup + # information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @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. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::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::BackupDR::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::BackupDR::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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @backup_dr_stub.list_backups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_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 + + ## + # Fetch Backups for a given resource type. + # + # @overload fetch_backups_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Datasources are the parent resource for the backups. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sqladmin.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of Backups to return. The service may + # return fewer than this value. If unspecified, at most 50 + # Backups will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. This parameter is used to specify the view of the backup. + # If not specified, the default view is BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new + # + # # Call the fetch_backups_for_resource_type method. + # result = client.fetch_backups_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + # p item + # end + # + def fetch_backups_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest + + # Converts hash and nil to an 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_backups_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backups_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_backups_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, "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 + + ## + # Gets details of a Backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::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, view: 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 data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::BackupDR::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::BackupDR::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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @backup_dr_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 the settings of a Backup. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::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(update_mask: nil, backup: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Backup 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 the request will fail. + # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] + # Required. The resource being updated + # @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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_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 update_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @backup_dr_stub.update_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 + + ## + # Deletes a Backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::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, request_id: 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 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_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 delete_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @backup_dr_stub.delete_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 + + ## + # Restore from a Backup + # + # @overload restore_backup(request, options = nil) + # Pass arguments to `restore_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) + # Pass arguments to `restore_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. The resource name of the Backup instance, in the format + # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + # @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 compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] + # Compute Engine target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. 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 disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] + # Disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. 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 region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] + # Region disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. 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 compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] + # Compute Engine instance properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. 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 disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] + # Disk properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. 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 clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A field mask used to clear server-side default values + # for fields within the `instance_properties` oneof. + # + # When a field in this mask is cleared, the server will not apply its + # default logic (like inheriting a value from the source) for that field. + # + # The most common current use case is clearing default encryption keys. + # + # Examples of field mask paths: + # - Compute Instance Disks: + # `compute_instance_restore_properties.disks.*.disk_encryption_key` + # - Single Disk: `disk_restore_properties.disk_encryption_key` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new + # + # # Call the restore_backup method. + # result = client.restore_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 restore_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest + + # Converts hash and nil to an 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_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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restore_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.restore_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 + + ## + # Create a BackupPlan + # + # @overload create_backup_plan(request, options = nil) + # Pass arguments to `create_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) + # Pass arguments to `create_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The `BackupPlan` project and location in the format + # `projects/{project}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @param backup_plan_id [::String] + # Required. The name of the `BackupPlan` to create. The name must be unique + # for the specified project and location.The name must start with a lowercase + # letter followed by up to 62 lowercase letters, numbers, or hyphens. + # Pattern, /[a-z][a-z0-9-]\\{,62}/. + # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The `BackupPlan` resource object to create. + # @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 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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new + # + # # Call the create_backup_plan method. + # result = client.create_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest + + # Converts hash and nil to an 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_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupPlan. + # + # @overload update_backup_plan(request, options = nil) + # Pass arguments to `update_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan(backup_plan: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan` via keyword arguments. Note that at + # least one keyword argument is 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_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan 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 the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @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 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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + # + # # Call the update_backup_plan method. + # result = client.update_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest + + # Converts hash and nil to an 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_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupPlan. + # + # @overload get_backup_plan(request, options = nil) + # Pass arguments to `get_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan(name: nil) + # Pass arguments to `get_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 `BackupPlan` to retrieve. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new + # + # # Call the get_backup_plan method. + # result = client.get_backup_plan request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. + # p result + # + def get_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest + + # Converts hash and nil to an options 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_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_plan request, 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 BackupPlans in a given project and location. + # + # @overload list_backup_plans(request, options = nil) + # Pass arguments to `list_backup_plans` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve `BackupPlans` + # information. Format: `projects/{project}/locations/{location}`. In Cloud + # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + # retrieve backup plans for all locations, use "-" for the + # `{location}` value. + # @param page_size [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new + # + # # Call the list_backup_plans method. + # result = client.list_backup_plans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. + # p item + # end + # + def list_backup_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest + + # Converts hash and nil to an options 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_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_plans.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_plans request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, "backup_plans", request, result, 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 BackupPlan. + # + # @overload delete_backup_plan(request, options = nil) + # Pass arguments to `delete_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 `BackupPlan` to delete. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new + # + # # Call the delete_backup_plan method. + # result = client.delete_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest + + # Converts hash and nil to an 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_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupPlanRevision. + # + # @overload get_backup_plan_revision(request, options = nil) + # Pass arguments to `get_backup_plan_revision` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_revision(name: nil) + # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + # + # # Call the get_backup_plan_revision method. + # result = client.get_backup_plan_revision request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p result + # + def get_backup_plan_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest + + # Converts hash and nil to an options 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_plan_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_plan_revision.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_plan_revision request, 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 BackupPlanRevisions in a given project and location. + # + # @overload list_backup_plan_revisions(request, options = nil) + # Pass arguments to `list_backup_plan_revisions` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_revisions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @param page_size [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` 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::BackupDR::V1::BackupPlanRevision>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + # + # # Call the list_backup_plan_revisions method. + # result = client.list_backup_plan_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p item + # end + # + def list_backup_plan_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest + + # Converts hash and nil to an options 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_plan_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_plan_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_plan_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, "backup_plan_revisions", request, result, 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 BackupPlanAssociation + # + # @overload create_backup_plan_association(request, options = nil) + # Pass arguments to `create_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) + # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The backup plan association project and location in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @param backup_plan_association_id [::String] + # Required. The name of the backup plan association to create. The name must + # be unique for the specified project and location. + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::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 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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + # + # # Call the create_backup_plan_association method. + # result = client.create_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest + + # Converts hash and nil to an 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_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_backup_plan_association request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupPlanAssociation. + # + # @overload update_backup_plan_association(request, options = nil) + # Pass arguments to `update_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is 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_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation 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 the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @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 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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new + # + # # Call the update_backup_plan_association method. + # result = client.update_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest + + # Converts hash and nil to an 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_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup_plan_association request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupPlanAssociation. + # + # @overload get_backup_plan_association(request, options = nil) + # Pass arguments to `get_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_association(name: nil) + # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new + # + # # Call the get_backup_plan_association method. + # result = client.get_backup_plan_association request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p result + # + def get_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest + + # Converts hash and nil to an options 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_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_plan_association request, 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 BackupPlanAssociations in a given project and location. + # + # @overload list_backup_plan_associations(request, options = nil) + # Pass arguments to `list_backup_plan_associations` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backup Plan + # Associations information, in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + # map to GCP regions, for example **us-central1**. To retrieve backup plan + # associations for all locations, use "-" for the + # `{location}` value. + # @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. Filtering results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new + # + # # Call the list_backup_plan_associations method. + # result = client.list_backup_plan_associations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def list_backup_plan_associations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest + + # Converts hash and nil to an options 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_plan_associations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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_plan_associations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_plan_associations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, "backup_plan_associations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List BackupPlanAssociations for a given resource type. + # + # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + # + # # Call the fetch_backup_plan_associations_for_resource_type method. + # result = client.fetch_backup_plan_associations_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def fetch_backup_plan_associations_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest + + # Converts hash and nil to an 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_backup_plan_associations_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_plan_associations_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_backup_plan_associations_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, "backup_plan_associations", request, result, 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 BackupPlanAssociation. + # + # @overload delete_backup_plan_association(request, options = nil) + # Pass arguments to `delete_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, 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_plan_association(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new + # + # # Call the delete_backup_plan_association method. + # result = client.delete_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest + + # Converts hash and nil to an 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_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup_plan_association request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Triggers a new Backup. + # + # @overload trigger_backup(request, options = nil) + # Pass arguments to `trigger_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) + # Pass arguments to `trigger_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 plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @param rule_id [::String] + # Required. backup rule_id for which a backup needs to be triggered. + # @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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new + # + # # Call the trigger_backup method. + # result = client.trigger_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 trigger_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.trigger_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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.trigger_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.trigger_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 details of a single DataSourceReference. + # + # @overload get_data_source_reference(request, options = nil) + # Pass arguments to `get_data_source_reference` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_source_reference(name: nil) + # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + # + # # Call the get_data_source_reference method. + # result = client.get_data_source_reference request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + # p result + # + def get_data_source_reference request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_source_reference.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source_reference.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_data_source_reference request, 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 DataSourceReferences for a given project and location. + # + # @overload list_data_source_references(request, options = nil) + # Pass arguments to `list_data_source_references` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_source_references` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSourceReferences` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDataSourceReferences` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the results listed in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. + # + # The following field and operator combinations are supported: + # + # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + # * data_source_gcp_resource_info.type with `=`, `!=` + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new + # + # # Call the list_data_source_references method. + # result = client.list_data_source_references request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def list_data_source_references request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_source_references.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_source_references.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_data_source_references request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, "data_source_references", request, result, 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 DataSourceReferences for a given project, location and resource type. + # + # @overload fetch_data_source_references_for_resource_type(request, options = nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + # + # # Call the fetch_data_source_references_for_resource_type method. + # result = client.fetch_data_source_references_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def fetch_data_source_references_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest + + # Converts hash and nil to an 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_data_source_references_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_data_source_references_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_data_source_references_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, "data_source_references", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Initializes the service related config for a project. + # + # @overload initialize_service(request, options = nil) + # Pass arguments to `initialize_service` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) + # Pass arguments to `initialize_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 resource name of the serviceConfig used to initialize the + # service. Format: + # `projects/{project_id}/locations/{location}/serviceConfig`. + # @param resource_type [::String] + # Required. The resource type to which the default service config will be + # applied. Examples include, "compute.googleapis.com/Instance" and + # "storage.googleapis.com/Bucket". + # @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 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). + # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] + # Optional. The configuration for initializing a Cloud SQL 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/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new + # + # # Call the initialize_service method. + # result = client.initialize_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 initialize_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.initialize_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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.initialize_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.initialize_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 + + ## + # Configuration class for the BackupDR REST API. + # + # This class represents the configuration for BackupDR 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::BackupDR::V1::BackupDR::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_management_servers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::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 BackupDR API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_management_servers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_management_servers + ## + # RPC-specific configuration for `get_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :get_management_server + ## + # RPC-specific configuration for `create_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :create_management_server + ## + # RPC-specific configuration for `delete_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_management_server + ## + # RPC-specific configuration for `create_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_vault + ## + # RPC-specific configuration for `list_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_vaults + ## + # RPC-specific configuration for `fetch_usable_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_usable_backup_vaults + ## + # RPC-specific configuration for `get_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_vault + ## + # RPC-specific configuration for `update_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_vault + ## + # RPC-specific configuration for `delete_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_vault + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `fetch_backups_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backups_for_resource_type + ## + # 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 `restore_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_backup + ## + # RPC-specific configuration for `create_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan + ## + # RPC-specific configuration for `update_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan + ## + # RPC-specific configuration for `get_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan + ## + # RPC-specific configuration for `list_backup_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plans + ## + # RPC-specific configuration for `delete_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan + ## + # RPC-specific configuration for `get_backup_plan_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_revision + ## + # RPC-specific configuration for `list_backup_plan_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_revisions + ## + # RPC-specific configuration for `create_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan_association + ## + # RPC-specific configuration for `update_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan_association + ## + # RPC-specific configuration for `get_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_association + ## + # RPC-specific configuration for `list_backup_plan_associations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_associations + ## + # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backup_plan_associations_for_resource_type + ## + # RPC-specific configuration for `delete_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan_association + ## + # RPC-specific configuration for `trigger_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_backup + ## + # RPC-specific configuration for `get_data_source_reference` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source_reference + ## + # RPC-specific configuration for `list_data_source_references` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_source_references + ## + # RPC-specific configuration for `fetch_data_source_references_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source_references_for_resource_type + ## + # RPC-specific configuration for `initialize_service` + # @return [::Gapic::Config::Method] + # + attr_reader :initialize_service + + # @private + def initialize parent_rpcs = nil + list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers + @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config + get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server + @get_management_server = ::Gapic::Config::Method.new get_management_server_config + create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server + @create_management_server = ::Gapic::Config::Method.new create_management_server_config + delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server + @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config + create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault + @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config + list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults + @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config + fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults + @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config + get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault + @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config + update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault + @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config + delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault + @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type + @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_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 + restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup + @restore_backup = ::Gapic::Config::Method.new restore_backup_config + create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan + @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config + update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan + @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config + get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan + @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config + list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans + @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config + delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan + @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config + get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision + @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config + list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions + @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config + create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association + @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config + update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association + @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config + get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association + @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config + list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations + @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config + fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type + @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config + delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association + @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config + trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup + @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config + get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference + @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config + list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references + @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config + fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type + @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config + initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service + @initialize_service = ::Gapic::Config::Method.new initialize_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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb new file mode 100644 index 000000000000..571ade73a8ae --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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 BackupDR + module V1 + module BackupDR + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BackupDR 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 BackupDR 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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb new file mode 100644 index 000000000000..c6ef2555cab9 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb @@ -0,0 +1,2350 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/backupdr_pb" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + module Rest + ## + # REST service stub for the BackupDR 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_management_servers REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] + # A result object deserialized from the server's reply + def list_management_servers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_management_servers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_management_servers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # A result object deserialized from the server's reply + def get_management_server request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_management_server_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_management_server", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ManagementServer.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_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_management_server request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_management_server_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_management_server", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_management_server request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_management_server_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_management_server", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] + # A result object deserialized from the server's reply + def list_backup_vaults request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_vaults_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_vaults", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.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_usable_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] + # A result object deserialized from the server's reply + def fetch_usable_backup_vaults request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_usable_backup_vaults_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_usable_backup_vaults", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.decode_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_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # A result object deserialized from the server's reply + def get_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupVault.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_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_data_sources REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] + # A result object deserialized from the server's reply + def list_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # A result object deserialized from the server's reply + def get_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_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_backups REST call + # + # @param request_pb [::Google::Cloud::BackupDR::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::BackupDR::V1::ListBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::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::BackupDR::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 fetch_backups_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_backups_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backups_for_resource_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backups_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.decode_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::BackupDR::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::BackupDR::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::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::BackupDR::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::BackupDR::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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # 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::Longrunning::Operation.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::BackupDR::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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # 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::Longrunning::Operation.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_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restore_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: "restore_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 create_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_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_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # A result object deserialized from the server's reply + def get_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupPlan.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_plans REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] + # A result object deserialized from the server's reply + def list_backup_plans request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plans_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_plans", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.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_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_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_plan_revision REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # A result object deserialized from the server's reply + def get_backup_plan_revision request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_revision_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_plan_revision", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.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_plan_revisions REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] + # A result object deserialized from the server's reply + def list_backup_plan_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_revisions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_plan_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.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_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_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_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # A result object deserialized from the server's reply + def get_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.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_plan_associations REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] + # A result object deserialized from the server's reply + def list_backup_plan_associations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_associations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |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_plan_associations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.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_backup_plan_associations_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_backup_plan_associations_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_plan_associations_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.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_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the trigger_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def trigger_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_trigger_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: "trigger_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_data_source_reference REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # A result object deserialized from the server's reply + def get_data_source_reference request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_reference_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_source_reference", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::DataSourceReference.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_data_source_references REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] + # A result object deserialized from the server's reply + def list_data_source_references request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_source_references_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_source_references", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.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_data_source_references_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_data_source_references_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_references_for_resource_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_data_source_references_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the initialize_service REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def initialize_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_initialize_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: "initialize_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 + + ## + # @private + # + # GRPC transcoding helper method for the list_management_servers REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_management_servers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/managementServers", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_management_server_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] + # 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_management_server_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/managementServers", + body: "management_server", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] + # 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_management_server_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] + # 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_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupVaults", + body: "backup_vault", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] + # A 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_vaults_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupVaults", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_usable_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] + # 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_usable_backup_vaults_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupVaults:fetchUsable", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] + # A 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_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] + # 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_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_vault.name}", + body: "backup_vault", + matches: [ + ["backup_vault.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] + # 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_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_sources REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSources", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_source.name}", + body: "data_source", + matches: [ + ["data_source.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backups REST call + # + # @param request_pb [::Google::Cloud::BackupDR::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/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_backups_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] + # 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_backups_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::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/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::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/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::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/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restore_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:restore", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] + # 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_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupPlans", + body: "backup_plan", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] + # 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_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_plan.name}", + body: "backup_plan", + matches: [ + ["backup_plan.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] + # A 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_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plans REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] + # A 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_plans_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlans", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] + # 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_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan_revision REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] + # A 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_plan_revision_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/revisions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plan_revisions REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] + # A 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_plan_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/revisions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] + # 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_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupPlanAssociations", + body: "backup_plan_association", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] + # 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_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_plan_association.name}", + body: "backup_plan_association", + matches: [ + ["backup_plan_association.name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] + # A 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_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plan_associations REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] + # A 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_plan_associations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlanAssociations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_backup_plan_associations_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] + # 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_backup_plan_associations_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlanAssociations:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] + # 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_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the trigger_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_trigger_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:triggerBackup", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_source_reference REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_source_reference_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataSourceReferences/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_source_references REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_source_references_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSourceReferences", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_data_source_references_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] + # 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_data_source_references_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSourceReferences:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the initialize_service REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_initialize_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:initialize", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb new file mode 100644 index 000000000000..f53e679c2cb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupdr.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/backupdr/v1/backupplan_pb' +require 'google/cloud/backupdr/v1/backupplanassociation_pb' +require 'google/cloud/backupdr/v1/backupvault_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/cloud/backupdr/v1/datasourcereference_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n\'google/cloud/backupdr/v1/backupdr.proto\x12\x18google.cloud.backupdr.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)google/cloud/backupdr/v1/backupplan.proto\x1a\x34google/cloud/backupdr/v1/backupplanassociation.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x32google/cloud/backupdr/v1/datasourcereference.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbe\x01\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0cpeering_mode\x18\x02 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.NetworkConfig.PeeringModeB\x03\xe0\x41\x01\"G\n\x0bPeeringMode\x12\x1c\n\x18PEERING_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x01\"6\n\rManagementURI\x12\x13\n\x06web_ui\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\"w\n#WorkforceIdentityBasedManagementURI\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"|\n$WorkforceIdentityBasedOAuth2ClientID\x12)\n\x1c\x66irst_party_oauth2_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1cthird_party_oauth2_client_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xd1\n\n\x10ManagementServer\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.ManagementServer.LabelsEntryB\x03\xe0\x41\x01\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\x12J\n\x04type\x18\x0e \x01(\x0e\x32\x37.google.cloud.backupdr.v1.ManagementServer.InstanceTypeB\x03\xe0\x41\x01\x12\x44\n\x0emanagement_uri\x18\x0b \x01(\x0b\x32\'.google.cloud.backupdr.v1.ManagementURIB\x03\xe0\x41\x03\x12s\n\'workforce_identity_based_management_uri\x18\x10 \x01(\x0b\x32=.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURIB\x03\xe0\x41\x03\x12L\n\x05state\x18\x07 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.ManagementServer.InstanceStateB\x03\xe0\x41\x03\x12>\n\x08networks\x18\x08 \x03(\x0b\x32\'.google.cloud.backupdr.v1.NetworkConfigB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10oauth2_client_id\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12v\n)workforce_identity_based_oauth2_client_id\x18\x11 \x01(\x0b\x32>.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientIDB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61_proxy_uri\x18\x12 \x03(\tB\x03\xe0\x41\x03\x12\x36\n\rsatisfies_pzs\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\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\"A\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41\x43KUP_RESTORE\x10\x01\"\x8f\x01\n\rInstanceState\x12\x1e\n\x1aINSTANCE_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0f\n\x0bMAINTENANCE\x10\x06\x12\t\n\x05\x45RROR\x10\x07:\xa1\x01\xea\x41\x9d\x01\n(backupdr.googleapis.com/ManagementServer\x12Lprojects/{project}/locations/{location}/managementServers/{managementserver}*\x11managementServers2\x10managementServer\"\xdf\x01\n\x1cListManagementServersRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\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\x18\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_filterB\x0b\n\t_order_by\"\x95\x01\n\x1dListManagementServersResponse\x12\x46\n\x12management_servers\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.ManagementServer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\\\n\x1aGetManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\"\xe9\x01\n\x1d\x43reateManagementServerRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12!\n\x14management_server_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x11management_server\x18\x03 \x01(\x0b\x32*.google.cloud.backupdr.v1.ManagementServerB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"x\n\x1d\x44\x65leteManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xfc\x01\n\x18InitializeServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\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\x12w\n(cloud_sql_instance_initialization_config\x18\x04 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfigB\x03\xe0\x41\x01H\x00\x42\x17\n\x15initialization_config\"P\n\x19InitializeServiceResponse\x12\x19\n\x11\x62\x61\x63kup_vault_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_plan_name\x18\x02 \x01(\t\"\x96\x03\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\x12]\n\x0f\x61\x64\x64itional_info\x18\x08 \x03(\x0b\x32?.google.cloud.backupdr.v1.OperationMetadata.AdditionalInfoEntryB\x03\xe0\x41\x03\x1a\x35\n\x13\x41\x64\x64itionalInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xd4\x43\n\x08\x42\x61\x63kupDR\x12\xd0\x01\n\x15ListManagementServers\x12\x36.google.cloud.backupdr.v1.ListManagementServersRequest\x1a\x37.google.cloud.backupdr.v1.ListManagementServersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/managementServers\x12\xbd\x01\n\x13GetManagementServer\x12\x34.google.cloud.backupdr.v1.GetManagementServerRequest\x1a*.google.cloud.backupdr.v1.ManagementServer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/managementServers/*}\x12\x9b\x02\n\x16\x43reateManagementServer\x12\x37.google.cloud.backupdr.v1.CreateManagementServerRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10ManagementServer\x12\x11OperationMetadata\xda\x41-parent,management_server,management_server_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/managementServers:\x11management_server\x12\xe3\x01\n\x16\x44\x65leteManagementServer\x12\x37.google.cloud.backupdr.v1.DeleteManagementServerRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/managementServers/*}\x12\xf8\x01\n\x11\x43reateBackupVault\x12\x32.google.cloud.backupdr.v1.CreateBackupVaultRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0b\x42\x61\x63kupVault\x12\x11OperationMetadata\xda\x41#parent,backup_vault,backup_vault_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/backupVaults:\x0c\x62\x61\x63kup_vault\x12\xbc\x01\n\x10ListBackupVaults\x12\x31.google.cloud.backupdr.v1.ListBackupVaultsRequest\x1a\x32.google.cloud.backupdr.v1.ListBackupVaultsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/backupVaults\x12\xdd\x01\n\x17\x46\x65tchUsableBackupVaults\x12\x38.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest\x1a\x39.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources\x12\xb4\x01\n\rGetDataSource\x12..google.cloud.backupdr.v1.GetDataSourceRequest\x1a$.google.cloud.backupdr.v1.DataSource\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}\x12\x82\x02\n\x10UpdateDataSource\x12\x31.google.cloud.backupdr.v1.UpdateDataSourceRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nDataSource\x12\x11OperationMetadata\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xc5\x01\n\x0bListBackups\x12,.google.cloud.backupdr.v1.ListBackupsRequest\x1a-.google.cloud.backupdr.v1.ListBackupsResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups\x12\x98\x02\n\x1b\x46\x65tchBackupsForResourceType\x12<.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest\x1a=.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse\"|\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02_\x12]/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType\x12\xb2\x01\n\tGetBackup\x12*.google.cloud.backupdr.v1.GetBackupRequest\x1a .google.cloud.backupdr.v1.Backup\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf1\x01\n\x0cUpdateBackup\x12-.google.cloud.backupdr.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02Y2O/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:\x06\x62\x61\x63kup\x12\xd3\x01\n\x0c\x44\x65leteBackup\x12-.google.cloud.backupdr.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf0\x01\n\rRestoreBackup\x12..google.cloud.backupdr.v1.RestoreBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15RestoreBackupResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02U\"P/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore:\x01*\x12\xf1\x01\n\x10\x43reateBackupPlan\x12\x31.google.cloud.backupdr.v1.CreateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41!parent,backup_plan,backup_plan_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/backupPlans:\x0b\x62\x61\x63kup_plan\x12\xf3\x01\n\x10UpdateBackupPlan\x12\x31.google.cloud.backupdr.v1.UpdateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41\x17\x62\x61\x63kup_plan,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}:\x0b\x62\x61\x63kup_plan\x12\xa5\x01\n\rGetBackupPlan\x12..google.cloud.backupdr.v1.GetBackupPlanRequest\x1a$.google.cloud.backupdr.v1.BackupPlan\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xb8\x01\n\x0fListBackupPlans\x12\x30.google.cloud.backupdr.v1.ListBackupPlansRequest\x1a\x31.google.cloud.backupdr.v1.ListBackupPlansResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/backupPlans\x12\xd1\x01\n\x10\x44\x65leteBackupPlan\x12\x31.google.cloud.backupdr.v1.DeleteBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xc9\x01\n\x15GetBackupPlanRevision\x12\x36.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest\x1a,.google.cloud.backupdr.v1.BackupPlanRevision\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/backupPlans/*/revisions/*}\x12\xdc\x01\n\x17ListBackupPlanRevisions\x12\x38.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest\x1a\x39.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/backupPlans/*}/revisions\x12\xc1\x02\n\x1b\x43reateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x39parent,backup_plan_association,backup_plan_association_id\x82\xd3\xe4\x93\x02U\":/v1/{parent=projects/*/locations/*}/backupPlanAssociations:\x17\x62\x61\x63kup_plan_association\x12\xc3\x02\n\x1bUpdateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc6\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41#backup_plan_association,update_mask\x82\xd3\xe4\x93\x02m2R/v1/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}:\x17\x62\x61\x63kup_plan_association\x12\xd1\x01\n\x18GetBackupPlanAssociation\x12\x39.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest\x1a/.google.cloud.backupdr.v1.BackupPlanAssociation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xe4\x01\n\x1aListBackupPlanAssociations\x12;.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest\x1a<.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/backupPlanAssociations\x12\xb7\x02\n*FetchBackupPlanAssociationsForResourceType\x12K.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest\x1aL.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse\"n\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02Q\x12O/v1/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType\x12\xf2\x01\n\x1b\x44\x65leteBackupPlanAssociation\x12<.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xf0\x01\n\rTriggerBackup\x12..google.cloud.backupdr.v1.TriggerBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x0cname,rule_id\x82\xd3\xe4\x93\x02M\"H/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup:\x01*\x12\xc9\x01\n\x16GetDataSourceReference\x12\x37.google.cloud.backupdr.v1.GetDataSourceReferenceRequest\x1a-.google.cloud.backupdr.v1.DataSourceReference\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/dataSourceReferences/*}\x12\xdc\x01\n\x18ListDataSourceReferences\x12\x39.google.cloud.backupdr.v1.ListDataSourceReferencesRequest\x1a:.google.cloud.backupdr.v1.ListDataSourceReferencesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/dataSourceReferences\x12\xaf\x02\n(FetchDataSourceReferencesForResourceType\x12I.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest\x1aJ.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse\"l\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02O\x12M/v1/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType\x12\xde\x01\n\x11InitializeService\x12\x32.google.cloud.backupdr.v1.InitializeServiceRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41.\n\x19InitializeServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/serviceConfig}:initialize:\x01*\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbd\x01\n\x1c\x63om.google.cloud.backupdr.v1B\rBackupDRProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig").msgclass + NetworkConfig::PeeringMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig.PeeringMode").enummodule + ManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementURI").msgclass + WorkforceIdentityBasedManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI").msgclass + WorkforceIdentityBasedOAuth2ClientID = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID").msgclass + ManagementServer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer").msgclass + ManagementServer::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceType").enummodule + ManagementServer::InstanceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceState").enummodule + ListManagementServersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersRequest").msgclass + ListManagementServersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersResponse").msgclass + GetManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetManagementServerRequest").msgclass + CreateManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateManagementServerRequest").msgclass + DeleteManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteManagementServerRequest").msgclass + InitializeServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceRequest").msgclass + InitializeServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceResponse").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb new file mode 100644 index 000000000000..91bbec9bb35d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb @@ -0,0 +1,119 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/backupdr/v1/backupdr.proto for package 'Google.Cloud.BackupDR.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/backupdr/v1/backupdr_pb' + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + # The BackupDR Service + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.backupdr.v1.BackupDR' + + # Lists ManagementServers in a given project and location. + rpc :ListManagementServers, ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Google::Cloud::BackupDR::V1::ListManagementServersResponse + # Gets details of a single ManagementServer. + rpc :GetManagementServer, ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Google::Cloud::BackupDR::V1::ManagementServer + # Creates a new ManagementServer in a given project and location. + rpc :CreateManagementServer, ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Google::Longrunning::Operation + # Deletes a single ManagementServer. + rpc :DeleteManagementServer, ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Google::Longrunning::Operation + # Creates a new BackupVault in a given project and location. + rpc :CreateBackupVault, ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Google::Longrunning::Operation + # Lists BackupVaults in a given project and location. + rpc :ListBackupVaults, ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse + # FetchUsableBackupVaults lists usable BackupVaults in a given project and + # location. Usable BackupVault are the ones that user has + # backupdr.backupVaults.get permission. + rpc :FetchUsableBackupVaults, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse + # Gets details of a BackupVault. + rpc :GetBackupVault, ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Google::Cloud::BackupDR::V1::BackupVault + # Updates the settings of a BackupVault. + rpc :UpdateBackupVault, ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Google::Longrunning::Operation + # Deletes a BackupVault. + rpc :DeleteBackupVault, ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Google::Longrunning::Operation + # Lists DataSources in a given project and location. + rpc :ListDataSources, ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse + # Gets details of a DataSource. + rpc :GetDataSource, ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Google::Cloud::BackupDR::V1::DataSource + # Updates the settings of a DataSource. + rpc :UpdateDataSource, ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Google::Longrunning::Operation + # Lists Backups in a given project and location. + rpc :ListBackups, ::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Google::Cloud::BackupDR::V1::ListBackupsResponse + # Fetch Backups for a given resource type. + rpc :FetchBackupsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse + # Gets details of a Backup. + rpc :GetBackup, ::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Google::Cloud::BackupDR::V1::Backup + # Updates the settings of a Backup. + rpc :UpdateBackup, ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Google::Longrunning::Operation + # Deletes a Backup. + rpc :DeleteBackup, ::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Google::Longrunning::Operation + # Restore from a Backup + rpc :RestoreBackup, ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Google::Longrunning::Operation + # Create a BackupPlan + rpc :CreateBackupPlan, ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Google::Longrunning::Operation + # Update a BackupPlan. + rpc :UpdateBackupPlan, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Google::Longrunning::Operation + # Gets details of a single BackupPlan. + rpc :GetBackupPlan, ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Google::Cloud::BackupDR::V1::BackupPlan + # Lists BackupPlans in a given project and location. + rpc :ListBackupPlans, ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse + # Deletes a single BackupPlan. + rpc :DeleteBackupPlan, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Google::Longrunning::Operation + # Gets details of a single BackupPlanRevision. + rpc :GetBackupPlanRevision, ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Google::Cloud::BackupDR::V1::BackupPlanRevision + # Lists BackupPlanRevisions in a given project and location. + rpc :ListBackupPlanRevisions, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse + # Create a BackupPlanAssociation + rpc :CreateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Google::Longrunning::Operation + # Update a BackupPlanAssociation. + rpc :UpdateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Google::Longrunning::Operation + # Gets details of a single BackupPlanAssociation. + rpc :GetBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Google::Cloud::BackupDR::V1::BackupPlanAssociation + # Lists BackupPlanAssociations in a given project and location. + rpc :ListBackupPlanAssociations, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse + # List BackupPlanAssociations for a given resource type. + rpc :FetchBackupPlanAssociationsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse + # Deletes a single BackupPlanAssociation. + rpc :DeleteBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Google::Longrunning::Operation + # Triggers a new Backup. + rpc :TriggerBackup, ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Google::Longrunning::Operation + # Gets details of a single DataSourceReference. + rpc :GetDataSourceReference, ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Google::Cloud::BackupDR::V1::DataSourceReference + # Lists DataSourceReferences for a given project and location. + rpc :ListDataSourceReferences, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse + # Fetch DataSourceReferences for a given project, location and resource type. + rpc :FetchDataSourceReferencesForResourceType, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse + # Initializes the service related config for a project. + rpc :InitializeService, ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb new file mode 100644 index 000000000000..a17a1db88525 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupplan.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/dayofweek_pb' +require 'google/type/month_pb' + + +descriptor_data = "\n)google/cloud/backupdr/v1/backupplan.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x17google/type/month.proto\"\xa5\x07\n\nBackupPlan\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.BackupPlan.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?\n\x0c\x62\x61\x63kup_rules\x18\x06 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupRuleB\x03\xe0\x41\x02\x12>\n\x05state\x18\x07 \x01(\x0e\x32*.google.cloud.backupdr.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x1a\n\rresource_type\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62\x61\x63kup_vault\x18\n \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12)\n\x1c\x62\x61\x63kup_vault_service_account\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12log_retention_days\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18supported_resource_types\x18\r \x03(\tB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rrevision_name\x18\x0f \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\"b\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\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x84\x01\xea\x41\x80\x01\n\"backupdr.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}*\x0b\x62\x61\x63kupPlans2\nbackupPlan\"\xb0\x01\n\nBackupRule\x12\x17\n\x07rule_id\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\"\n\x15\x62\x61\x63kup_retention_days\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12L\n\x11standard_schedule\x18\x05 \x01(\x0b\x32*.google.cloud.backupdr.v1.StandardScheduleB\x03\xe0\x41\x01H\x00\x42\x17\n\x15\x62\x61\x63kup_schedule_oneof\"\x97\x04\n\x10StandardSchedule\x12W\n\x0frecurrence_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.backupdr.v1.StandardSchedule.RecurrenceTypeB\x03\xe0\x41\x02\x12\x1d\n\x10hourly_frequency\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x31\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x1a\n\rdays_of_month\x18\x04 \x03(\x05\x42\x03\xe0\x41\x01\x12H\n\x11week_day_of_month\x18\x05 \x01(\x0b\x32(.google.cloud.backupdr.v1.WeekDayOfMonthB\x03\xe0\x41\x01\x12\'\n\x06months\x18\x06 \x03(\x0e\x32\x12.google.type.MonthB\x03\xe0\x41\x01\x12\x42\n\rbackup_window\x18\x07 \x01(\x0b\x32&.google.cloud.backupdr.v1.BackupWindowB\x03\xe0\x41\x02\x12\x16\n\ttime_zone\x18\x08 \x01(\tB\x03\xe0\x41\x02\"m\n\x0eRecurrenceType\x12\x1f\n\x1bRECURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0b\n\x07MONTHLY\x10\x04\x12\n\n\x06YEARLY\x10\x05\"L\n\x0c\x42\x61\x63kupWindow\x12\x1e\n\x11start_hour_of_day\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x65nd_hour_of_day\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xfa\x01\n\x0eWeekDayOfMonth\x12P\n\rweek_of_month\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonthB\x03\xe0\x41\x02\x12\x30\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x02\"d\n\x0bWeekOfMonth\x12\x1d\n\x19WEEK_OF_MONTH_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IRST\x10\x01\x12\n\n\x06SECOND\x10\x02\x12\t\n\x05THIRD\x10\x03\x12\n\n\x06\x46OURTH\x10\x04\x12\x08\n\x04LAST\x10\x05\"\xd3\x01\n\x17\x43reateBackupPlanRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x0e\x62\x61\x63kup_plan_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x62\x61\x63kup_plan\x18\x03 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\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\"\xb1\x01\n\x16ListBackupPlansRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\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\"\x83\x01\n\x17ListBackupPlansResponse\x12:\n\x0c\x62\x61\x63kup_plans\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\"t\n\x17\x44\x65leteBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n\x17UpdateBackupPlanRequest\x12>\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\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\"\x90\x04\n\x12\x42\x61\x63kupPlanRevision\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x05state\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupPlanRevision.StateB\x03\xe0\x41\x03\x12\x42\n\x14\x62\x61\x63kup_plan_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"T\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\x0c\n\x08INACTIVE\x10\x04:\xb1\x01\xea\x41\xad\x01\n*backupdr.googleapis.com/BackupPlanRevision\x12Vprojects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}*\x13\x62\x61\x63kupPlanRevisions2\x12\x62\x61\x63kupPlanRevision\"`\n\x1cGetBackupPlanRevisionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*backupdr.googleapis.com/BackupPlanRevision\"\x95\x01\n\x1eListBackupPlanRevisionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*backupdr.googleapis.com/BackupPlanRevision\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\"\x9c\x01\n\x1fListBackupPlanRevisionsResponse\x12K\n\x15\x62\x61\x63kup_plan_revisions\x18\x01 \x03(\x0b\x32,.google.cloud.backupdr.v1.BackupPlanRevision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xbf\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + BackupPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan").msgclass + BackupPlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan.State").enummodule + BackupRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupRule").msgclass + StandardSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule").msgclass + StandardSchedule::RecurrenceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule.RecurrenceType").enummodule + BackupWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupWindow").msgclass + WeekDayOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth").msgclass + WeekDayOfMonth::WeekOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth").enummodule + CreateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanRequest").msgclass + ListBackupPlansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansRequest").msgclass + ListBackupPlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansResponse").msgclass + GetBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRequest").msgclass + DeleteBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanRequest").msgclass + UpdateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanRequest").msgclass + BackupPlanRevision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision").msgclass + BackupPlanRevision::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision.State").enummodule + GetBackupPlanRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRevisionRequest").msgclass + ListBackupPlanRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest").msgclass + ListBackupPlanRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb new file mode 100644 index 000000000000..377b868210a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupplanassociation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_alloydb_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n4google/cloud/backupdr/v1/backupplanassociation.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/backupdr/v1/backupvault_alloydb.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xe9\x08\n\x15\x42\x61\x63kupPlanAssociation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x1d\n\rresource_type\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x08resource\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12?\n\x0b\x62\x61\x63kup_plan\x18\x04 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\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\x12I\n\x05state\x18\x07 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.BackupPlanAssociation.StateB\x03\xe0\x41\x03\x12H\n\x11rules_config_info\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.RuleConfigInfoB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x8f\x01\n5cloud_sql_instance_backup_plan_association_properties\x18\n \x01(\x0b\x32I.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12\x8a\x01\n2alloydb_cluster_backup_plan_association_properties\x18\x0f \x01(\x0b\x32G.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12$\n\x17\x62\x61\x63kup_plan_revision_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x62\x61\x63kup_plan_revision_name\x18\x0c \x01(\tB\x03\xe0\x41\x03\"b\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\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\xbc\x01\xea\x41\xb8\x01\n-backupdr.googleapis.com/BackupPlanAssociation\x12Xprojects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}*\x16\x62\x61\x63kupPlanAssociations2\x15\x62\x61\x63kupPlanAssociationB\x15\n\x13resource_properties\"\x89\x03\n\x0eRuleConfigInfo\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12X\n\x11last_backup_state\x18\x03 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"\x8c\x02\n\"CreateBackupPlanAssociationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\'\n\x1a\x62\x61\x63kup_plan_association_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\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\"\xb0\x01\n!ListBackupPlanAssociationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\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\"\xa5\x01\n\"ListBackupPlanAssociationsResponse\x12Q\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xf3\x01\n1FetchBackupPlanAssociationsForResourceTypeRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n2FetchBackupPlanAssociationsForResourceTypeResponse\x12V\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"f\n\x1fGetBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\"\x8a\x01\n\"DeleteBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd2\x01\n\"UpdateBackupPlanAssociationRequest\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x01 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\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\"\x92\x01\n\x14TriggerBackupRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x14\n\x07rule_id\x18\x02 \x01(\tB\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\x42\xca\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x1a\x42\x61\x63kupPlanAssociationProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + BackupPlanAssociation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation").msgclass + BackupPlanAssociation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation.State").enummodule + RuleConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo").msgclass + RuleConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState").enummodule + CreateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest").msgclass + ListBackupPlanAssociationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest").msgclass + ListBackupPlanAssociationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse").msgclass + FetchBackupPlanAssociationsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest").msgclass + FetchBackupPlanAssociationsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse").msgclass + GetBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanAssociationRequest").msgclass + DeleteBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest").msgclass + UpdateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest").msgclass + TriggerBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TriggerBackupRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb new file mode 100644 index 000000000000..779033cb68ba --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_alloydb.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n2google/cloud/backupdr/v1/backupvault_alloydb.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\"Z\n\"AlloyDBClusterDataSourceProperties\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x61lloydb.googleapis.com/Cluster\"\x9b\x01\n\x1e\x41lloyDbClusterBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cstored_bytes\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08\x63hain_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x64\x61tabase_version\x18\x04 \x01(\tB\x03\xe0\x41\x03\x42\x0e\n\x0c_description\"Q\n-AlloyDBClusterBackupPlanAssociationProperties\x12 \n\x0b\x63luster_uid\x18\x01 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xa6\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x17\x42\x61\x63kupvaultAlloyDBProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\\\n\x1e\x61lloydb.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + AlloyDBClusterDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties").msgclass + AlloyDbClusterBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDbClusterBackupProperties").msgclass + AlloyDBClusterBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb new file mode 100644 index 000000000000..54c592031980 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_ba.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/backupdr/v1/backupvault_ba.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xed\x02\n\x1f\x42\x61\x63kupApplianceBackupProperties\x12\x1f\n\rgeneration_id\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12;\n\rfinalize_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12G\n\x19recovery_range_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x45\n\x17recovery_range_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x10\n\x0e_generation_idB\x10\n\x0e_finalize_timeB\x1c\n\x1a_recovery_range_start_timeB\x1a\n\x18_recovery_range_end_timeB\xc2\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x12\x42\x61\x63kupvaultBaProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + BackupApplianceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb new file mode 100644 index 000000000000..74bfb355222d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_cloudsql.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/backupdr/v1/backupvault_cloudsql.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\x01\n$CloudSqlInstanceDataSourceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xc3\x02\n CloudSqlInstanceBackupProperties\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x66inal_backup\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x41\n\x0fsource_instance\x18\x04 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12=\n\x14instance_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_delete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xeb\x01\n-CloudSqlInstanceDataSourceReferenceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n$CloudSqlInstanceInitializationConfig\x12\\\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x46.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.EditionB\x03\xe0\x41\x02\"G\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x02\"p\n/CloudSqlInstanceBackupPlanAssociationProperties\x12=\n\x14instance_create_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x96\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x42\x61\x63kupvaultCloudSqlProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41K\n sqladmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + CloudSqlInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties").msgclass + CloudSqlInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties").msgclass + CloudSqlInstanceDataSourceReferenceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties").msgclass + CloudSqlInstanceInitializationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig").msgclass + CloudSqlInstanceInitializationConfig::Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition").enummodule + CloudSqlInstanceBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb new file mode 100644 index 000000000000..22dcc5473054 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_disk.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_gce_pb' + + +descriptor_data = "\n/google/cloud/backupdr/v1/backupvault_disk.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\"@\n\x15\x44iskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"d\n\x1bRegionDiskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rreplica_zones\x18\x03 \x03(\tB\x03\xe0\x41\x02\"\xa5\x0b\n\x15\x44iskRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x19\n\x07size_gb\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x15\n\x08licenses\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12G\n\x10guest_os_feature\x18\x05 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x06 \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12+\n\x19physical_block_size_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\"\n\x10provisioned_iops\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16provisioned_throughput\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12-\n\x1b\x65nable_confidential_compute\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x45\n\x0cstorage_pool\x18\x0b \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"compute.googleapis.com/StoragePoolH\x08\x88\x01\x01\x12Y\n\x0b\x61\x63\x63\x65ss_mode\x18\x0c \x01(\x0e\x32:.google.cloud.backupdr.v1.DiskRestoreProperties.AccessModeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\\\n\x0c\x61rchitecture\x18\x0e \x01(\x0e\x32<.google.cloud.backupdr.v1.DiskRestoreProperties.ArchitectureB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1c\n\x0fresource_policy\x18\x0f \x03(\tB\x03\xe0\x41\x01\x12\x16\n\x04type\x18\x10 \x01(\tB\x03\xe0\x41\x02H\x0b\x88\x01\x01\x12P\n\x06labels\x18\x11 \x03(\x0b\x32;.google.cloud.backupdr.v1.DiskRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12l\n\x15resource_manager_tags\x18\x12 \x03(\x0b\x32H.google.cloud.backupdr.v1.DiskRestoreProperties.ResourceManagerTagsEntryB\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:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"L\n\nAccessMode\x12\x15\n\x11READ_WRITE_SINGLE\x10\x00\x12\x13\n\x0fREAD_WRITE_MANY\x10\x01\x12\x12\n\x0eREAD_ONLY_MANY\x10\x02\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\n\n\x08_size_gbB\x16\n\x14_disk_encryption_keyB\x1c\n\x1a_physical_block_size_bytesB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\x1e\n\x1c_enable_confidential_computeB\x0f\n\r_storage_poolB\x0e\n\x0c_access_modeB\x0f\n\r_architectureB\x07\n\x05_type\"\xff\x03\n\x14\x44iskBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08licenses\x18\x02 \x03(\t\x12\x42\n\x10guest_os_feature\x18\x03 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeature\x12V\n\x0c\x61rchitecture\x18\x04 \x01(\x0e\x32;.google.cloud.backupdr.v1.DiskBackupProperties.ArchitectureH\x01\x88\x01\x01\x12\x11\n\x04type\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07size_gb\x18\x06 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06region\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x11\n\x04zone\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x15\n\rreplica_zones\x18\t \x03(\t\x12\x18\n\x0bsource_disk\x18\n \x01(\tH\x06\x88\x01\x01\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x0e\n\x0c_descriptionB\x0f\n\r_architectureB\x07\n\x05_typeB\n\n\x08_size_gbB\t\n\x07_regionB\x07\n\x05_zoneB\x0e\n\x0c_source_disk\"\\\n\x18\x44iskDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x0f\n\x07size_gb\x18\x04 \x01(\x03\x42\xa8\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x14\x42\x61\x63kupvaultDiskProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\x61\n\"compute.googleapis.com/StoragePool\x12;projects/{project}/zones/{zone}/storagePools/{storage_pool}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + DiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskTargetEnvironment").msgclass + RegionDiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RegionDiskTargetEnvironment").msgclass + DiskRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties").msgclass + DiskRestoreProperties::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode").enummodule + DiskRestoreProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.Architecture").enummodule + DiskBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties").msgclass + DiskBackupProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties.Architecture").enummodule + DiskDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskDataSourceProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb new file mode 100644 index 000000000000..06a571c45721 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_gce.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' + + +descriptor_data = "\n.google/cloud/backupdr/v1/backupvault_gce.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xe8\x07\n\x1f\x43omputeInstanceBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x04tags\x18\x02 \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsH\x01\x88\x01\x01\x12\x19\n\x0cmachine_type\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0e\x63\x61n_ip_forward\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x45\n\x11network_interface\x18\x05 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterface\x12\x34\n\x04\x64isk\x18\x06 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDisk\x12\x39\n\x08metadata\x18\x07 \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataH\x04\x88\x01\x01\x12\x41\n\x0fservice_account\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccount\x12=\n\nscheduling\x18\t \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingH\x05\x88\x01\x01\x12\x46\n\x11guest_accelerator\x18\n \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfig\x12\x1d\n\x10min_cpu_platform\x18\x0b \x01(\tH\x06\x88\x01\x01\x12Z\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeH\x07\x88\x01\x01\x12\x1c\n\x0fsource_instance\x18\r \x01(\tH\x08\x88\x01\x01\x12U\n\x06labels\x18\x0e \x03(\x0b\x32\x45.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_descriptionB\x07\n\x05_tagsB\x0f\n\r_machine_typeB\x11\n\x0f_can_ip_forwardB\x0b\n\t_metadataB\r\n\x0b_schedulingB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_key_revocation_action_typeB\x12\n\x10_source_instance\"\xc7\x12\n ComputeInstanceRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12^\n\x19\x61\x64vanced_machine_features\x18\x02 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.AdvancedMachineFeaturesB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0e\x63\x61n_ip_forward\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x64\n\x1c\x63onfidential_instance_config\x18\x04 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.ConfidentialInstanceConfigB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12%\n\x13\x64\x65letion_protection\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12:\n\x05\x64isks\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDiskB\x03\xe0\x41\x01\x12I\n\x0e\x64isplay_device\x18\x08 \x01(\x0b\x32\'.google.cloud.backupdr.v1.DisplayDeviceB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12L\n\x12guest_accelerators\x18\t \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfigB\x03\xe0\x41\x01\x12\x1a\n\x08hostname\x18\n \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12Z\n\x17instance_encryption_key\x18\x0b \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12_\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12[\n\x06labels\x18\r \x03(\x0b\x32\x46.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x0cmachine_type\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x08metadata\x18\x0f \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\x10min_cpu_platform\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12K\n\x12network_interfaces\x18\x11 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterfaceB\x03\xe0\x41\x01\x12`\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.NetworkPerformanceConfigB\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x42\n\x06params\x18\x13 \x01(\x0b\x32(.google.cloud.backupdr.v1.InstanceParamsB\x03\xe0\x41\x04H\x0e\x88\x01\x01\x12\x88\x01\n\x1aprivate_ipv6_google_access\x18\x14 \x01(\x0e\x32Z.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccessB\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12h\n\x13\x61llocation_affinity\x18\x15 \x01(\x0b\x32,.google.cloud.backupdr.v1.AllocationAffinityB\x03\xe0\x41\x01H\x10R\x13reservationAffinity\x88\x01\x01\x12\x1e\n\x11resource_policies\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x42\n\nscheduling\x18\x17 \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingB\x03\xe0\x41\x01H\x11\x88\x01\x01\x12G\n\x10service_accounts\x18\x18 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccountB\x03\xe0\x41\x01\x12\x36\n\x04tags\x18\x1a \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsB\x03\xe0\x41\x01H\x12\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc7\x01\n\x1fInstancePrivateIpv6GoogleAccess\x12\x33\n/INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_FROM_SUBNETWORK\x10\x01\x12\'\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\x02\x12)\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\x03\x42\x07\n\x05_nameB\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x11\n\x0f_display_deviceB\x0b\n\t_hostnameB\x1a\n\x18_instance_encryption_keyB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_network_performance_configB\t\n\x07_paramsB\x1d\n\x1b_private_ipv6_google_accessB\x16\n\x14_allocation_affinityB\r\n\x0b_schedulingB\x07\n\x05_tags\"K\n ComputeInstanceTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n#ComputeInstanceDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cmachine_type\x18\x03 \x01(\t\x12\x18\n\x10total_disk_count\x18\x04 \x01(\x03\x12\x1a\n\x12total_disk_size_gb\x18\x05 \x01(\x03\"\xa5\x02\n\x17\x41\x64vancedMachineFeatures\x12.\n\x1c\x65nable_nested_virtualization\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\"\n\x10threads_per_core\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x12visible_core_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12(\n\x16\x65nable_uefi_networking\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualizationB\x13\n\x11_threads_per_coreB\x15\n\x13_visible_core_countB\x19\n\x17_enable_uefi_networking\"k\n\x1a\x43onfidentialInstanceConfig\x12-\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1e\n\x1c_enable_confidential_compute\"D\n\rDisplayDevice\x12 \n\x0e\x65nable_display\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_enable_display\"\x87\x01\n\x11\x41\x63\x63\x65leratorConfig\x12\"\n\x10\x61\x63\x63\x65lerator_type\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61\x63\x63\x65lerator_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_accelerator_typeB\x14\n\x12_accelerator_count\"\xbc\x01\n\x15\x43ustomerEncryptionKey\x12\x16\n\x07raw_key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12 \n\x11rsa_encrypted_key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0ckms_key_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12)\n\x17kms_key_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x05\n\x03keyB\x1a\n\x18_kms_key_service_account\"I\n\x05\x45ntry\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"?\n\x08Metadata\x12\x33\n\x05items\x18\x01 \x03(\x0b\x32\x1f.google.cloud.backupdr.v1.EntryB\x03\xe0\x41\x01\"\x96\t\n\x10NetworkInterface\x12\x19\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12/\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x02H\x02R\tnetworkIP\x88\x01\x01\x12&\n\x0cipv6_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x03H\x03\x88\x01\x01\x12-\n\x1binternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x43\n\x0e\x61\x63\x63\x65ss_configs\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12H\n\x13ipv6_access_configs\x18\x08 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12\x44\n\x0f\x61lias_ip_ranges\x18\t \x03(\x0b\x32&.google.cloud.backupdr.v1.AliasIpRangeB\x03\xe0\x41\x01\x12M\n\nstack_type\x18\n \x01(\x0e\x32\x34.google.cloud.backupdr.v1.NetworkInterface.StackTypeH\x06\x88\x01\x01\x12]\n\x10ipv6_access_type\x18\x0b \x01(\x0e\x32\x39.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessTypeB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0bqueue_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12N\n\x08nic_type\x18\r \x01(\x0e\x32\x32.google.cloud.backupdr.v1.NetworkInterface.NicTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12$\n\x12network_attachment\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\"E\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIPV4_ONLY\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIpv6AccessType\x12 \n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\">\n\x07NicType\x12\x18\n\x14NIC_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nVIRTIO_NET\x10\x01\x12\t\n\x05GVNIC\x10\x02\x42\n\n\x08_networkB\r\n\x0b_subnetworkB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x1e\n\x1c_internal_ipv6_prefix_lengthB\x07\n\x05_nameB\r\n\x0b_stack_typeB\x13\n\x11_ipv6_access_typeB\x0e\n\x0c_queue_countB\x0b\n\t_nic_typeB\x15\n\x13_network_attachment\"\xd9\x01\n\x18NetworkPerformanceConfig\x12\x66\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.NetworkPerformanceConfig.TierB\x03\xe0\x41\x01H\x00\x88\x01\x01\"5\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06TIER_1\x10\x02\x42\x1e\n\x1c_total_egress_bandwidth_tier\"\xb2\x05\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AccessConfig.AccessTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x0b\x65xternal_ip\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02R\x05natIP\x88\x01\x01\x12\x1f\n\rexternal_ipv6\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x65xternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12 \n\x0eset_public_ptr\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16public_ptr_domain_name\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12R\n\x0cnetwork_tier\x18\x08 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.AccessConfig.NetworkTierB\x03\xe0\x41\x01H\x07\x88\x01\x01\"N\n\nAccessType\x12\x1b\n\x17\x41\x43\x43\x45SS_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eONE_TO_ONE_NAT\x10\x01\x12\x0f\n\x0b\x44IRECT_IPV6\x10\x02\"F\n\x0bNetworkTier\x12\x1c\n\x18NETWORK_TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREMIUM\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x42\x07\n\x05_typeB\x07\n\x05_nameB\x0e\n\x0c_external_ipB\x10\n\x0e_external_ipv6B\x1e\n\x1c_external_ipv6_prefix_lengthB\x11\n\x0f_set_public_ptrB\x19\n\x17_public_ptr_domain_nameB\x0f\n\r_network_tier\"\x84\x01\n\x0c\x41liasIpRange\x12\x1f\n\rip_cidr_range\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15subnetwork_range_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\x18\n\x16_subnetwork_range_name\"\xb3\x01\n\x0eInstanceParams\x12\x65\n\x15resource_manager_tags\x18\x01 \x03(\x0b\x32\x41.google.cloud.backupdr.v1.InstanceParams.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbb\x02\n\x12\x41llocationAffinity\x12t\n\x17\x63onsume_allocation_type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AllocationAffinity.TypeB\x03\xe0\x41\x01H\x00R\x16\x63onsumeReservationType\x88\x01\x01\x12\x15\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x42\x1a\n\x18_consume_allocation_typeB\x06\n\x04_key\"\xdc\t\n\nScheduling\x12]\n\x13on_host_maintenance\x18\x01 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.OnHostMaintenanceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61utomatic_restart\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bpreemptible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12O\n\x0fnode_affinities\x18\x04 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.Scheduling.NodeAffinityB\x03\xe0\x41\x01\x12\x1f\n\rmin_node_cpus\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x12provisioning_model\x18\x06 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.ProvisioningModelB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12m\n\x1binstance_termination_action\x18\x07 \x01(\x0e\x32>.google.cloud.backupdr.v1.Scheduling.InstanceTerminationActionB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12Z\n\x1alocal_ssd_recovery_timeout\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.SchedulingDurationB\x03\xe0\x41\x01H\x06\x88\x01\x01\x1a\xe1\x01\n\x0cNodeAffinity\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x08operator\x18\x02 \x01(\x0e\x32:.google.cloud.backupdr.v1.Scheduling.NodeAffinity.OperatorB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\x42\x06\n\x04_keyB\x0b\n\t_operator\"U\n\x11OnHostMaintenance\x12#\n\x1fON_HOST_MAINTENANCE_UNSPECIFIED\x10\x00\x12\r\n\tTERMINATE\x10\x01\x12\x0c\n\x07MIGRATE\x10\xe8\x07\"O\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\"^\n\x19InstanceTerminationAction\x12+\n\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\x16\n\x14_on_host_maintenanceB\x14\n\x12_automatic_restartB\x0e\n\x0c_preemptibleB\x10\n\x0e_min_node_cpusB\x15\n\x13_provisioning_modelB\x1e\n\x1c_instance_termination_actionB\x1d\n\x1b_local_ssd_recovery_timeout\"^\n\x12SchedulingDuration\x12\x19\n\x07seconds\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05nanos\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\n\n\x08_secondsB\x08\n\x06_nanos\"H\n\x0eServiceAccount\x12\x17\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x08\n\x06_email\"\x1a\n\x04Tags\x12\x12\n\x05items\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x91\x0c\n\x0c\x41ttachedDisk\x12\\\n\x11initialize_params\x18\x01 \x01(\x0b\x32\x37.google.cloud.backupdr.v1.AttachedDisk.InitializeParamsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65vice_name\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x16\n\x04kind\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14\x64isk_type_deprecated\x18\x06 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x02\x18\x01H\x03\x88\x01\x01\x12G\n\x04mode\x18\x07 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskModeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x18\n\x06source\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x17\n\x05index\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x16\n\x04\x62oot\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0b\x61uto_delete\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x14\n\x07license\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12V\n\x0e\x64isk_interface\x18\r \x01(\x0e\x32\x34.google.cloud.backupdr.v1.AttachedDisk.DiskInterfaceB\x03\xe0\x41\x01H\t\x88\x01\x01\x12G\n\x10guest_os_feature\x18\x0e \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x0f \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0c\x64isk_size_gb\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12W\n\x0bsaved_state\x18\x11 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.AttachedDisk.DiskSavedStateB\x06\xe0\x41\x01\xe0\x41\x03H\x0c\x88\x01\x01\x12\x1e\n\tdisk_type\x18\x12 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\r\x88\x01\x01\x12G\n\x04type\x18\x13 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x1aY\n\x10InitializeParams\x12\x1b\n\tdisk_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\rreplica_zones\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x0c\n\n_disk_name\"B\n\x08\x44iskType\x12\x19\n\x15\x44ISK_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SCRATCH\x10\x01\x12\x0e\n\nPERSISTENT\x10\x02\"P\n\x08\x44iskMode\x12\x19\n\x15\x44ISK_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\n\n\x06LOCKED\x10\x03\"Z\n\rDiskInterface\x12\x1e\n\x1a\x44ISK_INTERFACE_UNSPECIFIED\x10\x00\x12\x08\n\x04SCSI\x10\x01\x12\x08\n\x04NVME\x10\x02\x12\n\n\x06NVDIMM\x10\x03\x12\t\n\x05ISCSI\x10\x04\"A\n\x0e\x44iskSavedState\x12 \n\x1c\x44ISK_SAVED_STATE_UNSPECIFIED\x10\x00\x12\r\n\tPRESERVED\x10\x01\x42\x14\n\x12_initialize_paramsB\x0e\n\x0c_device_nameB\x07\n\x05_kindB\x17\n\x15_disk_type_deprecatedB\x07\n\x05_modeB\t\n\x07_sourceB\x08\n\x06_indexB\x07\n\x05_bootB\x0e\n\x0c_auto_deleteB\x11\n\x0f_disk_interfaceB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0e\n\x0c_saved_stateB\x0c\n\n_disk_typeB\x07\n\x05_type\"\xb5\x03\n\x0eGuestOsFeature\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.GuestOsFeature.FeatureTypeH\x00\x88\x01\x01\"\xd0\x02\n\x0b\x46\x65\x61tureType\x12\x1c\n\x18\x46\x45\x41TURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VIRTIO_SCSI_MULTIQUEUE\x10\x01\x12\x0b\n\x07WINDOWS\x10\x02\x12\x13\n\x0fMULTI_IP_SUBNET\x10\x03\x12\x13\n\x0fUEFI_COMPATIBLE\x10\x04\x12\x0f\n\x0bSECURE_BOOT\x10\x05\x12\t\n\x05GVNIC\x10\x06\x12\x0f\n\x0bSEV_CAPABLE\x10\x07\x12\x1f\n\x1b\x42\x41RE_METAL_LINUX_COMPATIBLE\x10\x08\x12\x1d\n\x19SUSPEND_RESUME_COMPATIBLE\x10\t\x12\x17\n\x13SEV_LIVE_MIGRATABLE\x10\n\x12\x13\n\x0fSEV_SNP_CAPABLE\x10\x0b\x12\x0f\n\x0bTDX_CAPABLE\x10\x0c\x12\x08\n\x04IDPF\x10\r\x12\x1a\n\x16SEV_LIVE_MIGRATABLE_V2\x10\x0e\x42\x07\n\x05_type*Y\n\x17KeyRevocationActionType\x12*\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\xc3\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x13\x42\x61\x63kupvaultGceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + ComputeInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceBackupProperties").msgclass + ComputeInstanceRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties").msgclass + ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess").enummodule + ComputeInstanceTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment").msgclass + ComputeInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties").msgclass + AdvancedMachineFeatures = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AdvancedMachineFeatures").msgclass + ConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ConfidentialInstanceConfig").msgclass + DisplayDevice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DisplayDevice").msgclass + AcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AcceleratorConfig").msgclass + CustomerEncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CustomerEncryptionKey").msgclass + Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Entry").msgclass + Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Metadata").msgclass + NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface").msgclass + NetworkInterface::StackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.StackType").enummodule + NetworkInterface::Ipv6AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType").enummodule + NetworkInterface::NicType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.NicType").enummodule + NetworkPerformanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig").msgclass + NetworkPerformanceConfig::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier").enummodule + AccessConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig").msgclass + AccessConfig::AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.AccessType").enummodule + AccessConfig::NetworkTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.NetworkTier").enummodule + AliasIpRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AliasIpRange").msgclass + InstanceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InstanceParams").msgclass + AllocationAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity").msgclass + AllocationAffinity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity.Type").enummodule + Scheduling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling").msgclass + Scheduling::NodeAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity").msgclass + Scheduling::NodeAffinity::Operator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator").enummodule + Scheduling::OnHostMaintenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.OnHostMaintenance").enummodule + Scheduling::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.ProvisioningModel").enummodule + Scheduling::InstanceTerminationAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction").enummodule + SchedulingDuration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.SchedulingDuration").msgclass + ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceAccount").msgclass + Tags = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Tags").msgclass + AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk").msgclass + AttachedDisk::InitializeParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.InitializeParams").msgclass + AttachedDisk::DiskType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskType").enummodule + AttachedDisk::DiskMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskMode").enummodule + AttachedDisk::DiskInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskInterface").enummodule + AttachedDisk::DiskSavedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskSavedState").enummodule + GuestOsFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature").msgclass + GuestOsFeature::FeatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature.FeatureType").enummodule + KeyRevocationActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.KeyRevocationActionType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb new file mode 100644 index 000000000000..75f9ea85ef49 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_alloydb_pb' +require 'google/cloud/backupdr/v1/backupvault_ba_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/cloud/backupdr/v1/backupvault_disk_pb' +require 'google/cloud/backupdr/v1/backupvault_gce_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n*google/cloud/backupdr/v1/backupvault.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/backupdr/v1/backupvault_alloydb.proto\x1a-google/cloud/backupdr/v1/backupvault_ba.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a/google/cloud/backupdr/v1/backupvault_disk.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9f\x0f\n\x0b\x42\x61\x63kupVault\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x46\n\x06labels\x18\x03 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.BackupVault.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12W\n*backup_minimum_enforced_retention_duration\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1b \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\tdeletable\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x16\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupVault.StateB\x03\xe0\x41\x03\x12<\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12total_stored_bytes\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x15 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12P\n\x0b\x61nnotations\x18\x16 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.AnnotationsEntryB\x03\xe0\x41\x01\x12X\n\x12\x61\x63\x63\x65ss_restriction\x18\x18 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.BackupVault.AccessRestrictionB\x03\xe0\x41\x01\x12[\n\x11\x65ncryption_config\x18\x1d \x01(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.EncryptionConfigB\x03\xe0\x41\x01H\x08\x88\x01\x01\x1ai\n\x10\x45ncryptionConfig\x12\x44\n\x0ckms_key_name\x18\x01 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x00\x88\x01\x01\x42\x0f\n\r_kms_key_name\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\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\"\x85\x01\n\x1a\x42\x61\x63kupRetentionInheritance\x12,\n(BACKUP_RETENTION_INHERITANCE_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_VAULT_RETENTION\x10\x01\x12\x1c\n\x18MATCH_BACKUP_EXPIRE_TIME\x10\x02\"_\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\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\"\x9e\x01\n\x11\x41\x63\x63\x65ssRestriction\x12\"\n\x1e\x41\x43\x43\x45SS_RESTRICTION_UNSPECIFIED\x10\x00\x12\x12\n\x0eWITHIN_PROJECT\x10\x01\x12\x17\n\x13WITHIN_ORGANIZATION\x10\x02\x12\x10\n\x0cUNRESTRICTED\x10\x03\x12&\n\"WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA\x10\x04:\x88\x01\xea\x41\x84\x01\n#backupdr.googleapis.com/BackupVault\x12\x42projects/{project}/locations/{location}/backupVaults/{backupvault}*\x0c\x62\x61\x63kupVaults2\x0b\x62\x61\x63kupVaultB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB-\n+_backup_minimum_enforced_retention_durationB\x1f\n\x1d_backup_retention_inheritanceB\x0c\n\n_deletableB\x07\n\x05_etagB\x11\n\x0f_effective_timeB\x14\n\x12_encryption_config\"\x8c\t\n\nDataSource\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05state\x18\x15 \x01(\x0e\x32*.google.cloud.backupdr.v1.DataSource.StateB\x03\xe0\x41\x03\x12\x45\n\x06labels\x18\x04 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.DataSource.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x07 \x01(\x03H\x03\x88\x01\x01\x12\x11\n\x04\x65tag\x18\x0e \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x12total_stored_bytes\x18\x17 \x01(\x03H\x05\x88\x01\x01\x12\x46\n\x0c\x63onfig_state\x18\x18 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12K\n\x12\x62\x61\x63kup_config_info\x18\x19 \x01(\x0b\x32*.google.cloud.backupdr.v1.BackupConfigInfoB\x03\xe0\x41\x03\x12S\n\x18\x64\x61ta_source_gcp_resource\x18\x1a \x01(\x0b\x32/.google.cloud.backupdr.v1.DataSourceGcpResourceH\x00\x12r\n(data_source_backup_appliance_application\x18\x1b \x01(\x0b\x32>.google.cloud.backupdr.v1.DataSourceBackupApplianceApplicationH\x00\x12\x37\n*backup_blocked_by_vault_access_restriction\x18\x1c \x01(\x08\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\"Q\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\t\n\x05\x45RROR\x10\x04:\x9e\x01\xea\x41\x9a\x01\n\"backupdr.googleapis.com/DataSource\x12[projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x11\n\x0fsource_resourceB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x0f\n\r_backup_countB\x07\n\x05_etagB\x15\n\x13_total_stored_bytes\"\xb1\x04\n\x10\x42\x61\x63kupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x46\n\x11gcp_backup_config\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.GcpBackupConfigH\x00\x12_\n\x1e\x62\x61\x63kup_appliance_backup_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.BackupApplianceBackupConfigH\x00\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\x0f\n\rbackup_config\"\xa4\x02\n\x0fGcpBackupConfig\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\x17\x62\x61\x63kup_plan_description\x18\x02 \x01(\t\x12S\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\tB2\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x19\n\x11\x62\x61\x63kup_plan_rules\x18\x04 \x03(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x05 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x06 \x01(\t\"\xba\x01\n\x1b\x42\x61\x63kupApplianceBackupConfig\x12\x1d\n\x15\x62\x61\x63kup_appliance_name\x18\x01 \x01(\t\x12\x1b\n\x13\x62\x61\x63kup_appliance_id\x18\x02 \x01(\x03\x12\x0e\n\x06sla_id\x18\x03 \x01(\x03\x12\x18\n\x10\x61pplication_name\x18\x04 \x01(\t\x12\x11\n\thost_name\x18\x05 \x01(\t\x12\x10\n\x08slt_name\x18\x06 \x01(\t\x12\x10\n\x08slp_name\x18\x07 \x01(\t\"\xaa\x04\n\x15\x44\x61taSourceGcpResource\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12o\n&compute_instance_datasource_properties\x18\x04 \x01(\x0b\x32=.google.cloud.backupdr.v1.ComputeInstanceDataSourcePropertiesH\x00\x12w\n(cloud_sql_instance_datasource_properties\x18\x05 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12s\n&alloy_db_cluster_datasource_properties\x18\x06 \x01(\x0b\x32<.google.cloud.backupdr.v1.AlloyDBClusterDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12X\n\x1a\x64isk_datasource_properties\x18\x07 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.DiskDataSourcePropertiesH\x00\x42\x19\n\x17gcp_resource_properties\"\xb9\x01\n$DataSourceBackupApplianceApplication\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_appliance\x18\x02 \x01(\t\x12\x14\n\x0c\x61ppliance_id\x18\x03 \x01(\x03\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x16\n\x0e\x61pplication_id\x18\x08 \x01(\x03\x12\x10\n\x08hostname\x18\x06 \x01(\t\x12\x0f\n\x07host_id\x18\x07 \x01(\x03\")\n\x0fServiceLockInfo\x12\x16\n\toperation\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x17\x42\x61\x63kupApplianceLockInfo\x12 \n\x13\x62\x61\x63kup_appliance_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\"\n\x15\x62\x61\x63kup_appliance_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0block_reason\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x08job_name\x18\x06 \x01(\tH\x00\x12\x16\n\x0c\x62\x61\x63kup_image\x18\x07 \x01(\tH\x00\x12\x10\n\x06sla_id\x18\x08 \x01(\x03H\x00\x42\r\n\x0block_source\"\xfe\x01\n\nBackupLock\x12\x38\n\x0flock_until_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12W\n\x1a\x62\x61\x63kup_appliance_lock_info\x18\x03 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.BackupApplianceLockInfoH\x00\x12K\n\x11service_lock_info\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.ServiceLockInfoB\x03\xe0\x41\x03H\x00\x42\x10\n\x0e\x43lientLockInfo\"\x80\x14\n\x06\x42\x61\x63kup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x39\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x41\n\x06labels\x18\x05 \x03(\x0b\x32,.google.cloud.backupdr.v1.Backup.LabelsEntryB\x03\xe0\x41\x01\x12I\n\x1b\x65nforced_retention_end_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1e \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x39\n\x0b\x65xpire_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12>\n\x10\x63onsistency_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\t\x88\x01\x01\x12\x16\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12:\n\x05state\x18\x0f \x01(\x0e\x32&.google.cloud.backupdr.v1.Backup.StateB\x03\xe0\x41\x03\x12@\n\rservice_locks\x18\x11 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x03\x12I\n\x16\x62\x61\x63kup_appliance_locks\x18\x12 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x01\x12l\n\"compute_instance_backup_properties\x18\x13 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.ComputeInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12o\n$cloud_sql_instance_backup_properties\x18\x1a \x01(\x0b\x32:.google.cloud.backupdr.v1.CloudSqlInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12l\n\"backup_appliance_backup_properties\x18\x15 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.BackupApplianceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x63\n\x1a\x61lloy_db_backup_properties\x18\x1b \x01(\x0b\x32\x38.google.cloud.backupdr.v1.AlloyDbClusterBackupPropertiesB\x03\xe0\x41\x03H\x00\x12U\n\x16\x64isk_backup_properties\x18\x1c \x01(\x0b\x32..google.cloud.backupdr.v1.DiskBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x45\n\x0b\x62\x61\x63kup_type\x18\x14 \x01(\x0e\x32+.google.cloud.backupdr.v1.Backup.BackupTypeB\x03\xe0\x41\x03\x12W\n\x14gcp_backup_plan_info\x18\x16 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfoB\x03\xe0\x41\x03H\x01\x12 \n\x13resource_size_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\"\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x19 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12H\n\x0cgcp_resource\x18\x1f \x01(\x0b\x32+.google.cloud.backupdr.v1.BackupGcpResourceB\x03\xe0\x41\x03H\x02\x12J\n\x10kms_key_versions\x18! \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a\xb2\x01\n\x11GCPBackupPlanInfo\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x13\x62\x61\x63kup_plan_rule_id\x18\x02 \x01(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x03 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x04 \x01(\t\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\t\n\x05\x45RROR\x10\x04\x12\r\n\tUPLOADING\x10\x05\"b\n\nBackupType\x12\x1b\n\x17\x42\x41\x43KUP_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\r\n\tON_DEMAND\x10\x02\x12\x19\n\x15ON_DEMAND_OPERATIONAL\x10\x03:\xa3\x01\xea\x41\x9f\x01\n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12lprojects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupB\x13\n\x11\x62\x61\x63kup_propertiesB\x0b\n\tplan_infoB\x11\n\x0fsource_resourceB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x1e\n\x1c_enforced_retention_end_timeB\x1f\n\x1d_backup_retention_inheritanceB\x0e\n\x0c_expire_timeB\x13\n\x11_consistency_timeB\x07\n\x05_etagB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xf4\x01\n\x18\x43reateBackupVaultRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x1c\n\x0f\x62\x61\x63kup_vault_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x03 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\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\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xf1\x01\n\x17ListBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12<\n\x04view\x18\x06 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x86\x01\n\x18ListBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x1e\x46\x65tchUsableBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\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\"\x8d\x01\n\x1f\x46\x65tchUsableBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8e\x02\n\"FetchBackupsForResourceTypeRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x07 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"q\n#FetchBackupsForResourceTypeResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x90\x01\n\x15GetBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12<\n\x04view\x18\x02 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x91\x02\n\x18UpdateBackupVaultRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x02 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\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\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x66orce_update_access_restriction\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xfc\x01\n\x18\x44\x65leteBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\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\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1dignore_backup_plan_references\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x16ListDataSourcesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/DataSource\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\"\x83\x01\n\x17ListDataSourcesResponse\x12:\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetDataSourceRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/DataSource\"\xcc\x01\n\x17UpdateDataSourceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12>\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32$.google.cloud.backupdr.v1.DataSourceB\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\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe2\x01\n\x12ListBackupsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x06 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"v\n\x13ListBackupsResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10GetBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x37\n\x04view\x18\x02 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"\xa3\x01\n\x13UpdateBackupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x06\x62\x61\x63kup\x18\x02 \x01(\x0b\x32 .google.cloud.backupdr.v1.BackupB\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\"l\n\x13\x44\x65leteBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xe2\x05\n\x14RestoreBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12i\n#compute_instance_target_environment\x18\x03 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironmentH\x00\x12R\n\x17\x64isk_target_environment\x18\x05 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskTargetEnvironmentH\x00\x12_\n\x1eregion_disk_target_environment\x18\x06 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.RegionDiskTargetEnvironmentH\x00\x12i\n#compute_instance_restore_properties\x18\x04 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceRestorePropertiesH\x01\x12R\n\x17\x64isk_restore_properties\x18\x07 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskRestorePropertiesH\x01\x12H\n\x1a\x63lear_overrides_field_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x14\n\x12target_environmentB\x15\n\x13instance_propertiesB\x1d\n\x1b_clear_overrides_field_mask\"Z\n\x15RestoreBackupResponse\x12\x41\n\x0ftarget_resource\x18\x01 \x01(\x0b\x32(.google.cloud.backupdr.v1.TargetResource\"g\n\x0eTargetResource\x12=\n\x0cgcp_resource\x18\x01 \x01(\x0b\x32%.google.cloud.backupdr.v1.GcpResourceH\x00\x42\x16\n\x14target_resource_info\"G\n\x0bGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"M\n\x11\x42\x61\x63kupGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t*Q\n\x11\x42\x61\x63kupConfigState\x12#\n\x1f\x42\x41\x43KUP_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07PASSIVE\x10\x02*V\n\nBackupView\x12\x1b\n\x17\x42\x41\x43KUP_VIEW_UNSPECIFIED\x10\x00\x12\x15\n\x11\x42\x41\x43KUP_VIEW_BASIC\x10\x01\x12\x14\n\x10\x42\x41\x43KUP_VIEW_FULL\x10\x02*m\n\x0f\x42\x61\x63kupVaultView\x12!\n\x1d\x42\x41\x43KUP_VAULT_VIEW_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42\x41\x43KUP_VAULT_VIEW_BASIC\x10\x01\x12\x1a\n\x16\x42\x41\x43KUP_VAULT_VIEW_FULL\x10\x02\x42\xda\x03\n\x1c\x63om.google.cloud.backupdr.v1B\x10\x42\x61\x63kupVaultProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41m\n!cloudkms.googleapis.com/CryptoKey\x12Hprojects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{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 BackupDR + module V1 + BackupVault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault").msgclass + BackupVault::EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.EncryptionConfig").msgclass + BackupVault::BackupRetentionInheritance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance").enummodule + BackupVault::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.State").enummodule + BackupVault::AccessRestriction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.AccessRestriction").enummodule + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource").msgclass + DataSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource.State").enummodule + BackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo").msgclass + BackupConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState").enummodule + GcpBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpBackupConfig").msgclass + BackupApplianceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupConfig").msgclass + DataSourceGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResource").msgclass + DataSourceBackupApplianceApplication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupApplianceApplication").msgclass + ServiceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceLockInfo").msgclass + BackupApplianceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceLockInfo").msgclass + BackupLock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLock").msgclass + Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup").msgclass + Backup::GCPBackupPlanInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo").msgclass + Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.State").enummodule + Backup::BackupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.BackupType").enummodule + CreateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupVaultRequest").msgclass + ListBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsRequest").msgclass + ListBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsResponse").msgclass + FetchUsableBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest").msgclass + FetchUsableBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse").msgclass + FetchBackupsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest").msgclass + FetchBackupsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse").msgclass + GetBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupVaultRequest").msgclass + UpdateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupVaultRequest").msgclass + DeleteBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupVaultRequest").msgclass + ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesRequest").msgclass + ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesResponse").msgclass + GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceRequest").msgclass + UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateDataSourceRequest").msgclass + ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsRequest").msgclass + ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsResponse").msgclass + GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupRequest").msgclass + UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupRequest").msgclass + DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupRequest").msgclass + RestoreBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupRequest").msgclass + RestoreBackupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupResponse").msgclass + TargetResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TargetResource").msgclass + GcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpResource").msgclass + BackupGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupGcpResource").msgclass + BackupConfigState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigState").enummodule + BackupView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupView").enummodule + BackupVaultView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVaultView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb new file mode 100644 index 000000000000..ecfc1771ff13 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/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 BackupDR + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/backupdr/v1/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR"] + 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/[^/]+/managementServers/[^/]+/?$}, 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/[^/]+/managementServers/[^/]+/?$}, 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/[^/]+/managementServers/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb new file mode 100644 index 000000000000..9186933eef02 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/datasourcereference.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/backupdr/v1/datasourcereference.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd7\x05\n\x13\x44\x61taSourceReference\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12?\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"backupdr.googleapis.com/DataSource\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x1f\x64\x61ta_source_backup_config_state\x18\x04 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12%\n\x18\x64\x61ta_source_backup_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x61\n\x1e\x64\x61ta_source_backup_config_info\x18\x06 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.DataSourceBackupConfigInfoB\x03\xe0\x41\x03\x12_\n\x1d\x64\x61ta_source_gcp_resource_info\x18\x07 \x01(\x0b\x32\x33.google.cloud.backupdr.v1.DataSourceGcpResourceInfoB\x03\xe0\x41\x03\x12$\n\x12total_stored_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01:\xb2\x01\xea\x41\xae\x01\n+backupdr.googleapis.com/DataSourceReference\x12Tprojects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}*\x14\x64\x61taSourceReferences2\x13\x64\x61taSourceReferenceB\x15\n\x13_total_stored_bytes\"\xca\x01\n\x1a\x44\x61taSourceBackupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xf2\x01\n\x19\x44\x61taSourceGcpResourceInfo\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12u\n\x1d\x63loud_sql_instance_properties\x18\x04 \x01(\x0b\x32G.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferencePropertiesB\x03\xe0\x41\x03H\x00\x42\x15\n\x13resource_properties\"b\n\x1dGetDataSourceReferenceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+backupdr.googleapis.com/DataSourceReference\"\xc3\x01\n\x1fListDataSourceReferencesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\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\"\x9f\x01\n ListDataSourceReferencesResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xef\x01\n/FetchDataSourceReferencesForResourceTypeRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n0FetchDataSourceReferencesForResourceTypeResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xc8\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x44\x61taSourceReferenceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceReference").msgclass + DataSourceBackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupConfigInfo").msgclass + DataSourceGcpResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResourceInfo").msgclass + GetDataSourceReferenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceReferenceRequest").msgclass + ListDataSourceReferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesRequest").msgclass + ListDataSourceReferencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesResponse").msgclass + FetchDataSourceReferencesForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest").msgclass + FetchDataSourceReferencesForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb new file mode 100644 index 000000000000..373529d726c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/protection_summary.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/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/cloud/backupdr/v1/protection_summary.proto\x12\x18google.cloud.backupdr.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\x1fgoogle/protobuf/timestamp.proto\"\xba\x01\n ListResourceBackupConfigsRequest\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\"\x8d\x01\n!ListResourceBackupConfigsResponse\x12O\n\x17resource_backup_configs\x18\x01 \x03(\x0b\x32..google.cloud.backupdr.v1.ResourceBackupConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xec\x06\n\x14ResourceBackupConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1c\n\x0ftarget_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1ctarget_resource_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x14target_resource_type\x18\x05 \x01(\x0e\x32;.google.cloud.backupdr.v1.ResourceBackupConfig.ResourceTypeB\x03\xe0\x41\x03\x12h\n\x16target_resource_labels\x18\x06 \x03(\x0b\x32H.google.cloud.backupdr.v1.ResourceBackupConfig.TargetResourceLabelsEntry\x12M\n\x16\x62\x61\x63kup_configs_details\x18\x07 \x03(\x0b\x32-.google.cloud.backupdr.v1.BackupConfigDetails\x12\x1e\n\x11\x62\x61\x63kup_configured\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x07vaulted\x18\t \x01(\x08\x42\x03\xe0\x41\x03\x1a;\n\x19TargetResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x97\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LOUD_SQL_INSTANCE\x10\x01\x12\x15\n\x11\x43OMPUTE_ENGINE_VM\x10\x02\x12\x17\n\x13\x43OMPUTE_ENGINE_DISK\x10\x03\x12 \n\x1c\x43OMPUTE_ENGINE_REGIONAL_DISK\x10\x04:\xb7\x01\xea\x41\xb3\x01\n,backupdr.googleapis.com/ResourceBackupConfig\x12Vprojects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}*\x15resourceBackupConfigs2\x14resourceBackupConfig\"\xa2\x07\n\x13\x42\x61\x63kupConfigDetails\x12!\n\x14\x62\x61\x63kup_config_source\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12.\n!backup_config_source_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x04type\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupConfigDetails.TypeB\x03\xe0\x41\x03\x12G\n\x05state\x18\x04 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.BackupConfigDetails.StateB\x03\xe0\x41\x03\x12\x42\n\rpitr_settings\x18\x05 \x01(\x0b\x32&.google.cloud.backupdr.v1.PitrSettingsB\x03\xe0\x41\x03\x12\x46\n\x1dlatest_successful_backup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12 \n\x13\x61pplicable_resource\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61\x63kup_vault\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x10\x62\x61\x63kup_locations\x18\x0c \x03(\x0b\x32(.google.cloud.backupdr.v1.BackupLocation\x12M\n\x15\x62\x61\x63kup_dr_plan_config\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.BackupDrPlanConfigH\x00\x12U\n\x19\x62\x61\x63kup_dr_template_config\x18\x0b \x01(\x0b\x32\x30.google.cloud.backupdr.v1.BackupDrTemplateConfigH\x00\"\x97\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12$\n CLOUD_SQL_INSTANCE_BACKUP_CONFIG\x10\x01\x12\"\n\x1e\x43OMPUTE_ENGINE_RESOURCE_POLICY\x10\x02\x12\x18\n\x14\x42\x41\x43KUPDR_BACKUP_PLAN\x10\x03\x12\x15\n\x11\x42\x41\x43KUPDR_TEMPLATE\x10\x04\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\x16\n\x14plan_specific_config\"+\n\x0cPitrSettings\x12\x1b\n\x0eretention_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\"j\n\x16\x42\x61\x63kupDrTemplateConfig\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"^\n\x12\x42\x61\x63kupDrPlanConfig\x12H\n\x14\x62\x61\x63kup_dr_plan_rules\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.BackupDrPlanRule\"n\n\x10\x42\x61\x63kupDrPlanRule\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x1blast_successful_backup_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xb7\x01\n\x0e\x42\x61\x63kupLocation\x12@\n\x04type\x18\x01 \x01(\x0e\x32-.google.cloud.backupdr.v1.BackupLocation.TypeB\x03\xe0\x41\x03\x12\x18\n\x0blocation_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"I\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02\x12\x12\n\x0eMULTI_REGIONAL\x10\x03\x32\xcb\x02\n\x19\x42\x61\x63kupDrProtectionSummary\x12\xe0\x01\n\x19ListResourceBackupConfigs\x12:.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest\x1a;.google.cloud.backupdr.v1.ListResourceBackupConfigsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/resourceBackupConfigs\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x16ProtectionSummaryProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + ListResourceBackupConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListResourceBackupConfigsRequest").msgclass + ListResourceBackupConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListResourceBackupConfigsResponse").msgclass + ResourceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ResourceBackupConfig").msgclass + ResourceBackupConfig::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ResourceBackupConfig.ResourceType").enummodule + BackupConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails").msgclass + BackupConfigDetails::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails.Type").enummodule + BackupConfigDetails::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails.State").enummodule + PitrSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.PitrSettings").msgclass + BackupDrTemplateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrTemplateConfig").msgclass + BackupDrPlanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrPlanConfig").msgclass + BackupDrPlanRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrPlanRule").msgclass + BackupLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLocation").msgclass + BackupLocation::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLocation.Type").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb new file mode 100644 index 000000000000..6bad6df6a175 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb @@ -0,0 +1,45 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/backupdr/v1/protection_summary.proto for package 'Google.Cloud.BackupDR.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/backupdr/v1/protection_summary_pb' + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + # The Protection Summary service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.backupdr.v1.BackupDrProtectionSummary' + + # Lists ResourceBackupConfigs. + rpc :ListResourceBackupConfigs, ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb new file mode 100644 index 000000000000..9cc488ca2ae8 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/backupdr/rest" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" +require "google/cloud/backupdr/v1/bindings_override" +require "google/cloud/backupdr/v1/version" + +module Google + module Cloud + module BackupDR + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/backupdr/v1/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb new file mode 100644 index 000000000000..e74b73cd9c04 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/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 BackupDR + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md new file mode 100644 index 000000000000..c891244acc73 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Backup and DR 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-backupdr-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb new file mode 100644 index 000000000000..de97c93454cf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb @@ -0,0 +1,415 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # Network configuration for ManagementServer instance. + # @!attribute [rw] network + # @return [::String] + # Optional. The resource name of the Google Compute Engine VPC network to + # which the ManagementServer instance is connected. + # @!attribute [rw] peering_mode + # @return [::Google::Cloud::BackupDR::V1::NetworkConfig::PeeringMode] + # Optional. The network connect mode of the ManagementServer instance. For + # this version, only PRIVATE_SERVICE_ACCESS is supported. + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VPC peering modes supported by Cloud BackupDR. + module PeeringMode + # Peering mode not set. + PEERING_MODE_UNSPECIFIED = 0 + + # Connect using Private Service Access to the Management Server. Private + # services access provides an IP address range for multiple Google Cloud + # services, including Cloud BackupDR. + PRIVATE_SERVICE_ACCESS = 1 + end + end + + # ManagementURI for the Management Server resource. + # @!attribute [r] web_ui + # @return [::String] + # Output only. The ManagementServer AGM/RD WebUI URL. + # @!attribute [r] api + # @return [::String] + # Output only. The ManagementServer AGM/RD API URL. + class ManagementURI + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. + # @!attribute [r] first_party_management_uri + # @return [::String] + # Output only. First party Management URI for Google Identities. + # @!attribute [r] third_party_management_uri + # @return [::String] + # Output only. Third party Management URI for External Identity Providers. + class WorkforceIdentityBasedManagementURI + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, + # @!attribute [r] first_party_oauth2_client_id + # @return [::String] + # Output only. First party OAuth Client ID for Google Identities. + # @!attribute [r] third_party_oauth2_client_id + # @return [::String] + # Output only. Third party OAuth Client ID for External Identity Providers. + class WorkforceIdentityBasedOAuth2ClientID + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ManagementServer describes a single BackupDR ManagementServer instance. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the ManagementServer instance (2048 characters + # or less). + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # Labels currently defined: + # 1. migrate_from_go= + # If set to true, the MS is created in migration ready mode. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceType] + # Optional. The type of the ManagementServer resource. + # @!attribute [r] management_uri + # @return [::Google::Cloud::BackupDR::V1::ManagementURI] + # Output only. The hostname or ip address of the exposed AGM endpoints, used + # by clients to connect to AGM/RD graphical user interface and APIs. + # @!attribute [r] workforce_identity_based_management_uri + # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedManagementURI] + # Output only. The hostnames of the exposed AGM endpoints for both types of + # user i.e. 1p and 3p, used to connect AGM/RM UI. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceState] + # Output only. The ManagementServer state. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkConfig>] + # Optional. VPC networks to which the ManagementServer instance is connected. + # For this version, only a single network is supported. This field is + # optional if MS is created without PSA + # @!attribute [rw] etag + # @return [::String] + # Optional. Server specified ETag for the ManagementServer resource to + # prevent simultaneous updates from overwiting each other. + # @!attribute [r] oauth2_client_id + # @return [::String] + # Output only. The OAuth 2.0 client id is required to make API calls to the + # BackupDR instance API of this ManagementServer. This is the value that + # should be provided in the 'aud' field of the OIDC ID Token (see openid + # specification + # https://openid.net/specs/openid-connect-core-1_0.html#IDToken). + # @!attribute [r] workforce_identity_based_oauth2_client_id + # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedOAuth2ClientID] + # Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. + # @!attribute [r] ba_proxy_uri + # @return [::Array<::String>] + # Output only. The hostname or ip address of the exposed AGM endpoints, used + # by BAs to connect to BA proxy. + # @!attribute [r] satisfies_pzs + # @return [::Google::Protobuf::BoolValue] + # Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Reserved for future use. + class ManagementServer + 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 + + # Type of backup service resource. + module InstanceType + # Instance type is not mentioned. + INSTANCE_TYPE_UNSPECIFIED = 0 + + # Instance for backup and restore management (i.e., AGM). + BACKUP_RESTORE = 1 + end + + # State of Management server instance. + module InstanceState + # State not set. + INSTANCE_STATE_UNSPECIFIED = 0 + + # The instance is being created. + CREATING = 1 + + # The instance has been created and is fully usable. + READY = 2 + + # The instance configuration is being updated. Certain kinds of updates + # may cause the instance to become unusable while the update is in + # progress. + UPDATING = 3 + + # The instance is being deleted. + DELETING = 4 + + # The instance is being repaired and may be unstable. + REPAIRING = 5 + + # Maintenance is being performed on this instance. + MAINTENANCE = 6 + + # The instance is experiencing an issue and might be unusable. You can get + # further details from the statusMessage field of Instance resource. + ERROR = 7 + end + end + + # Request message for listing management servers. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve management servers + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud BackupDR, locations map to Google Cloud regions, for example + # **us-central1**. To retrieve management servers for all locations, use "-" + # for the + # '\\{location}' value. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListManagementServersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing management servers. + # @!attribute [rw] management_servers + # @return [::Array<::Google::Cloud::BackupDR::V1::ManagementServer>] + # The list of ManagementServer instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return management servers in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!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 ListManagementServersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a management server instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the management server resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' + class GetManagementServerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a management server instance. + # @!attribute [rw] parent + # @return [::String] + # Required. The management server project and location in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR + # locations map to Google Cloud regions, for example **us-central1**. + # @!attribute [rw] management_server_id + # @return [::String] + # Required. The name of the management server to create. The name must be + # unique for the specified project and location. + # @!attribute [rw] management_server + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # Required. A [management server + # resource][google.cloud.backupdr.v1.ManagementServer] + # @!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 CreateManagementServerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a management server 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). + class DeleteManagementServerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for initializing the service. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the serviceConfig used to initialize the + # service. Format: + # `projects/{project_id}/locations/{location}/serviceConfig`. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The resource type to which the default service config will be + # applied. Examples include, "compute.googleapis.com/Instance" and + # "storage.googleapis.com/Bucket". + # @!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 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). + # @!attribute [rw] cloud_sql_instance_initialization_config + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig] + # Optional. The configuration for initializing a Cloud SQL instance. + class InitializeServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for initializing the service. + # @!attribute [rw] backup_vault_name + # @return [::String] + # The resource name of the default `BackupVault` created. + # Format: + # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + # @!attribute [rw] backup_plan_name + # @return [::String] + # The resource name of the default `BackupPlan` created. + # Format: + # `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`. + class InitializeServiceResponse + 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. + # @!attribute [r] additional_info + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. AdditionalInfo contains additional Info related to backup plan + # association resource. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AdditionalInfoEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb new file mode 100644 index 000000000000..f7ce82fba389 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb @@ -0,0 +1,588 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # A `BackupPlan` specifies some common fields, such as `description` as well + # as one or more `BackupRule` messages. Each `BackupRule` has a retention + # policy and defines a schedule by which the system is to perform backup + # workloads. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the `BackupPlan`. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the `BackupPlan` resource. + # + # The description allows for additional details about `BackupPlan` and its + # use cases to be provided. An example description is the following: "This + # is a backup plan that performs a daily backup at 6pm and retains data for 3 + # months". The description must be at most 2048 characters. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. This collection of key/value pairs allows for custom labels to be + # supplied by the user. Example, \\{"tag": "Weekly"}. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the `BackupPlan` was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the `BackupPlan` was last updated. + # @!attribute [rw] backup_rules + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupRule>] + # Required. The backup rules for this `BackupPlan`. There must be at least + # one `BackupRule` message. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupPlan::State] + # Output only. The `State` for the `BackupPlan`. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The resource type to which the `BackupPlan` will be applied. + # Examples include, "compute.googleapis.com/Instance", + # "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", + # "compute.googleapis.com/Disk". + # @!attribute [rw] etag + # @return [::String] + # Optional. `etag` is returned from the service in the response. As a user of + # the service, you may provide an etag value in this field to prevent stale + # resources. + # @!attribute [rw] backup_vault + # @return [::String] + # Required. Resource name of backup vault which will be used as storage + # location for backups. Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault} + # @!attribute [r] backup_vault_service_account + # @return [::String] + # Output only. The Google Cloud Platform Service Account to be used by the + # BackupVault for taking backups. Specify the email address of the Backup + # Vault Service Account. + # @!attribute [rw] log_retention_days + # @return [::Integer] + # Optional. Applicable only for CloudSQL and AlloyDB resource_type. + # + # Configures how long logs will be stored. It is defined in “days”. This + # value should be greater than or equal to minimum enforced log retention + # duration of the backup vault. + # @!attribute [r] supported_resource_types + # @return [::Array<::String>] + # Output only. All resource types to which backupPlan can be applied. + # @!attribute [r] revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] revision_name + # @return [::String] + # Output only. The resource id of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` + class BackupPlan + 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 + + # `State` enumerates the possible states for a `BackupPlan`. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The resource is being created. + CREATING = 1 + + # The resource has been created and is fully usable. + ACTIVE = 2 + + # The resource is being deleted. + DELETING = 3 + + # The resource has been created but is not usable. + INACTIVE = 4 + + # The resource is being updated. + UPDATING = 5 + end + end + + # `BackupRule` binds the backup schedule to a retention policy. + # @!attribute [rw] rule_id + # @return [::String] + # Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is + # unique per `BackupPlan`.The `rule_id` must start with a lowercase letter + # followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, + # /[a-z][a-z0-9-]\\{,62}/. + # @!attribute [rw] backup_retention_days + # @return [::Integer] + # Required. Configures the duration for which backup data will be kept. It is + # defined in “days”. The value should be greater than or equal to minimum + # enforced retention of the backup vault. + # + # Minimum value is 1 and maximum value is 36159 for custom retention + # on-demand backup. + # Minimum and maximum values are workload specific for all other rules. + # @!attribute [rw] standard_schedule + # @return [::Google::Cloud::BackupDR::V1::StandardSchedule] + # Optional. Defines a schedule that runs within the confines of a defined + # window of time. + class BackupRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StandardSchedule` defines a schedule that run within the confines of a + # defined window of days. We can define recurrence type for schedule as + # HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. + # @!attribute [rw] recurrence_type + # @return [::Google::Cloud::BackupDR::V1::StandardSchedule::RecurrenceType] + # Required. Specifies the `RecurrenceType` for the schedule. + # @!attribute [rw] hourly_frequency + # @return [::Integer] + # Optional. Specifies frequency for hourly backups. A hourly frequency of 2 + # means jobs will run every 2 hours from start time till end time defined. + # + # This is required for `recurrence_type`, `HOURLY` and is not applicable + # otherwise. A validation error will occur if a value is supplied and + # `recurrence_type` is not `HOURLY`. + # + # Value of hourly frequency should be between 4 and 23. + # + # Reason for limit : We found that there is bandwidth limitation of 3GB/S for + # GMI while taking a backup and 5GB/S while doing a restore. Given the amount + # of parallel backups and restore we are targeting, this will potentially + # take the backup time to mins and hours (in worst case scenario). + # @!attribute [rw] days_of_week + # @return [::Array<::Google::Type::DayOfWeek>] + # Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs + # will run. + # + # This is required for `recurrence_type`, `WEEKLY` and is not applicable + # otherwise. A validation error will occur if a value is supplied and + # `recurrence_type` is not `WEEKLY`. + # @!attribute [rw] days_of_month + # @return [::Array<::Integer>] + # Optional. Specifies days of months like 1, 5, or 14 on which jobs will run. + # + # Values for `days_of_month` are only applicable for `recurrence_type`, + # `MONTHLY` and `YEARLY`. A validation error will occur if other values are + # supplied. + # @!attribute [rw] week_day_of_month + # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth] + # Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST + # MONDAY, on which jobs will run. This will be specified by two fields in + # `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, + # e.g. `LAST`. + # + # This field is only applicable for `recurrence_type`, `MONTHLY` and + # `YEARLY`. A validation error will occur if other values are supplied. + # @!attribute [rw] months + # @return [::Array<::Google::Type::Month>] + # Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on + # which jobs will run. + # + # This field is only applicable when `recurrence_type` is `YEARLY`. A + # validation error will occur if other values are supplied. + # @!attribute [rw] backup_window + # @return [::Google::Cloud::BackupDR::V1::BackupWindow] + # Required. A BackupWindow defines the window of day during which backup jobs + # will run. Jobs are queued at the beginning of the window and will be marked + # as `NOT_RUN` if they do not start by the end of the window. + # + # Note: running jobs will not be cancelled at the end of the window. + # @!attribute [rw] time_zone + # @return [::String] + # Required. The time zone to be used when interpreting the schedule. + # The value of this field must be a time zone name from the IANA tz database. + # See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the + # list of valid timezone names. For e.g., Europe/Paris. + class StandardSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `RecurrenceTypes` enumerates the applicable periodicity for the schedule. + module RecurrenceType + # recurrence type not set + RECURRENCE_TYPE_UNSPECIFIED = 0 + + # The `BackupRule` is to be applied hourly. + HOURLY = 1 + + # The `BackupRule` is to be applied daily. + DAILY = 2 + + # The `BackupRule` is to be applied weekly. + WEEKLY = 3 + + # The `BackupRule` is to be applied monthly. + MONTHLY = 4 + + # The `BackupRule` is to be applied yearly. + YEARLY = 5 + end + end + + # `BackupWindow` defines a window of the day during which backup jobs will run. + # @!attribute [rw] start_hour_of_day + # @return [::Integer] + # Required. The hour of day (0-23) when the window starts for e.g. if value + # of start hour of day is 6 that mean backup window start at 6:00. + # @!attribute [rw] end_hour_of_day + # @return [::Integer] + # Required. The hour of day (1-24) when the window end for e.g. if value of + # end hour of day is 10 that mean backup window end time is 10:00. + # + # End hour of day should be greater than start hour of day. + # 0 <= start_hour_of_day < end_hour_of_day <= 24 + # + # End hour of day is not include in backup window that mean if + # end_hour_of_day= 10 jobs should start before 10:00. + class BackupWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `WeekDayOfMonth` defines the week day of the month on which the backups will + # run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values + # like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. + # @!attribute [rw] week_of_month + # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth::WeekOfMonth] + # Required. Specifies the week of the month. + # @!attribute [rw] day_of_week + # @return [::Google::Type::DayOfWeek] + # Required. Specifies the day of the week. + class WeekDayOfMonth + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, + # third, or last week of the month. + module WeekOfMonth + # The zero value. Do not use. + WEEK_OF_MONTH_UNSPECIFIED = 0 + + # The first week of the month. + FIRST = 1 + + # The second week of the month. + SECOND = 2 + + # The third week of the month. + THIRD = 3 + + # The fourth week of the month. + FOURTH = 4 + + # The last week of the month. + LAST = 5 + end + end + + # The request message for creating a `BackupPlan`. + # @!attribute [rw] parent + # @return [::String] + # Required. The `BackupPlan` project and location in the format + # `projects/{project}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @!attribute [rw] backup_plan_id + # @return [::String] + # Required. The name of the `BackupPlan` to create. The name must be unique + # for the specified project and location.The name must start with a lowercase + # letter followed by up to 62 lowercase letters, numbers, or hyphens. + # Pattern, /[a-z][a-z0-9-]\\{,62}/. + # @!attribute [rw] backup_plan + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # Required. The `BackupPlan` resource object to create. + # @!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 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 CreateBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for getting a list `BackupPlan`. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve `BackupPlans` + # information. Format: `projects/{project}/locations/{location}`. In Cloud + # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + # retrieve backup plans for all locations, use "-" for the + # `{location}` value. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListBackupPlansRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for getting a list of `BackupPlan`. + # @!attribute [rw] backup_plans + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlan>] + # The list of `BackupPlans` in the project for the specified + # location. + # + # If the `{location}` value in the request is "-", the response contains a + # list of resources from all locations. In case any location is unreachable, + # the response will only return backup plans in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # BackupPlan + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest#page_token page_token} in + # a subsequent `ListBackupPlans` call to retrieve the next page of results. + # If this field is omitted or empty, then there are no more results to + # return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlansResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for getting a `BackupPlan`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the `BackupPlan` to retrieve. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + class GetBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for deleting a `BackupPlan`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the `BackupPlan` to delete. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @!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). + class DeleteBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a backup plan. + # @!attribute [rw] backup_plan + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # Required. The resource being updated + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan 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 the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @!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 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 UpdateBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in + # time. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # @!attribute [r] revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision::State] + # Output only. Resource State + # @!attribute [rw] backup_plan_snapshot + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # The Backup Plan being encompassed by this revision. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp that the revision was created. + class BackupPlanRevision + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the `BackupPlanRevision`. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The resource is being created. + CREATING = 1 + + # The resource has been created and is fully usable. + ACTIVE = 2 + + # The resource is being deleted. + DELETING = 3 + + # The resource has been created but is not usable. + INACTIVE = 4 + end + end + + # The request message for getting a `BackupPlanRevision`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + class GetBackupPlanRevisionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for getting a list of `BackupPlanRevision`. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + class ListBackupPlanRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for getting a list of `BackupPlanRevision`. + # @!attribute [rw] backup_plan_revisions + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # The list of `BackupPlanRevisions` in the project for the specified + # location. + # + # If the `{location}` value in the request is "-", the response contains a + # list of resources from all locations. In case any location is unreachable, + # the response will only return backup plans in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest#page_token page_token} + # in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlanRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb new file mode 100644 index 000000000000..b6e38383477c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb @@ -0,0 +1,388 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # A BackupPlanAssociation represents a single BackupPlanAssociation which + # contains details like workload, backup plan etc + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of BackupPlanAssociation in + # below format Format : + # projects/\\{project}/locations/\\{location}/backupPlanAssociations/\\{backupPlanAssociationId} + # @!attribute [rw] resource_type + # @return [::String] + # Required. Immutable. Resource type of workload on which backupplan is + # applied + # @!attribute [rw] resource + # @return [::String] + # Required. Immutable. Resource name of workload on which the backup plan is + # applied. + # + # The format can either be the resource name (e.g., + # "projects/my-project/zones/us-central1-a/instances/my-instance") or the + # full resource URI (e.g., + # "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance"). + # @!attribute [rw] backup_plan + # @return [::String] + # Required. Resource name of backup plan which needs to be applied on + # workload. Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation::State] + # Output only. The BackupPlanAssociation resource state. + # @!attribute [r] rules_config_info + # @return [::Array<::Google::Cloud::BackupDR::V1::RuleConfigInfo>] + # Output only. The config info related to backup rules. + # @!attribute [r] data_source + # @return [::String] + # Output only. Resource name of data source which will be used as storage + # location for backups taken. Format : + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault}/dataSources/\\{datasource} + # @!attribute [r] cloud_sql_instance_backup_plan_association_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupPlanAssociationProperties] + # Output only. Cloud SQL instance's backup plan association properties. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_plan_association_properties`, `alloydb_cluster_backup_plan_association_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] alloydb_cluster_backup_plan_association_properties + # @return [::Google::Cloud::BackupDR::V1::AlloyDBClusterBackupPlanAssociationProperties] + # Output only. AlloyDB cluster's backup plan association properties. + # + # Note: The following fields are mutually exclusive: `alloydb_cluster_backup_plan_association_properties`, `cloud_sql_instance_backup_plan_association_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_plan_revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] backup_plan_revision_name + # @return [::String] + # Output only. The resource id of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` + class BackupPlanAssociation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for State of BackupPlan Association + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The resource is being created. + CREATING = 1 + + # The resource has been created and is fully usable. + ACTIVE = 2 + + # The resource is being deleted. + DELETING = 3 + + # The resource has been created but is not usable. + INACTIVE = 4 + + # The resource is being updated. + UPDATING = 5 + end + end + + # Message for rules config info. + # @!attribute [r] rule_id + # @return [::String] + # Output only. Backup Rule id fetched from backup plan. + # @!attribute [r] last_backup_state + # @return [::Google::Cloud::BackupDR::V1::RuleConfigInfo::LastBackupState] + # Output only. The last backup state for rule. + # @!attribute [r] last_backup_error + # @return [::Google::Rpc::Status] + # Output only. google.rpc.Status object to store the last backup error. + # @!attribute [r] last_successful_backup_consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The point in time when the last successful backup was captured + # from the source. + class RuleConfigInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for LastBackupState + module LastBackupState + # State not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0 + + # The first backup is pending. + FIRST_BACKUP_PENDING = 1 + + # The most recent backup could not be run/failed because of the lack of + # permissions. + PERMISSION_DENIED = 2 + + # The last backup operation succeeded. + SUCCEEDED = 3 + + # The last backup operation failed. + FAILED = 4 + end + end + + # Request message for creating a backup plan. + # @!attribute [rw] parent + # @return [::String] + # Required. The backup plan association project and location in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @!attribute [rw] backup_plan_association_id + # @return [::String] + # Required. The name of the backup plan association to create. The name must + # be unique for the specified project and location. + # @!attribute [rw] backup_plan_association + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # 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 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 CreateBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for List BackupPlanAssociation + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve backup Plan + # Associations information, in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + # map to GCP regions, for example **us-central1**. To retrieve backup plan + # associations for all locations, use "-" for the + # `{location}` value. + # @!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. Filtering results + class ListBackupPlanAssociationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for List BackupPlanAssociation + # @!attribute [rw] backup_plan_associations + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # The list of Backup Plan Associations in the project for the specified + # location. + # + # If the `{location}` value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return backup plan associations in reachable + # locations and the 'unreachable' field will be populated with a list of + # unreachable locations. + # @!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 ListBackupPlanAssociationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the FetchBackupPlanAssociationsForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + class FetchBackupPlanAssociationsForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchBackupPlanAssociationsForResourceType method. + # @!attribute [r] backup_plan_associations + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # Output only. The BackupPlanAssociations from the specified parent. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. 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 FetchBackupPlanAssociationsForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a BackupPlanAssociation resource. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + class GetBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a backup plan association. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @!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). + class DeleteBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a backup plan association. + # @!attribute [rw] backup_plan_association + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # Required. The resource being updated + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation 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 the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @!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 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 UpdateBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for triggering a backup. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @!attribute [rw] rule_id + # @return [::String] + # Required. backup rule_id for which a backup needs to be triggered. + # @!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). + class TriggerBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb new file mode 100644 index 000000000000..02c9559e5abc --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb @@ -0,0 +1,1364 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # Message describing a BackupVault object. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Name of the backup vault to create. It must have + # the + # format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. + # `{backupvault}` cannot be changed after creation. It must be between 3-63 + # characters long and must be unique within the project and location. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the BackupVault instance (2048 characters or + # less). + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # No labels currently defined: + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] backup_minimum_enforced_retention_duration + # @return [::Google::Protobuf::Duration] + # Required. The default and minimum enforced retention for each backup within + # the backup vault. The enforced retention for each backup can be extended. + # @!attribute [rw] backup_retention_inheritance + # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] + # Optional. Setting for how a backup's enforced retention end time is + # inherited. + # @!attribute [r] deletable + # @return [::Boolean] + # Output only. Set to true when there are no backups nested under this + # resource. + # @!attribute [rw] etag + # @return [::String] + # Optional. Server specified ETag for the backup vault resource to + # prevent simultaneous updates from overwiting each other. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupVault::State] + # Output only. The BackupVault resource instance state. + # @!attribute [rw] effective_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Time after which the BackupVault resource is locked. + # @!attribute [r] backup_count + # @return [::Integer] + # Output only. The number of backups in this backup vault. + # @!attribute [r] service_account + # @return [::String] + # Output only. Service account used by the BackupVault Service for this + # BackupVault. The user should grant this account permissions in their + # workload project to enable the service to run backups and restores there. + # @!attribute [r] total_stored_bytes + # @return [::Integer] + # Output only. Total size of the storage used by all backup resources. + # @!attribute [r] uid + # @return [::String] + # Output only. Immutable after resource creation until resource deletion. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User annotations. See https://google.aip.dev/128#annotations + # Stores small amounts of arbitrary data. + # @!attribute [rw] access_restriction + # @return [::Google::Cloud::BackupDR::V1::BackupVault::AccessRestriction] + # Optional. Restricts access to certain sources and destinations for data + # being sent into, or restored from, the backup vault. + # Defaults to WITHIN_ORGANIZATION if not provided during creation. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::BackupDR::V1::BackupVault::EncryptionConfig] + # Optional. The encryption config of the backup vault. + class BackupVault + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message describing the EncryptionConfig of backup vault. + # This determines how data within the vault is encrypted at rest. + # @!attribute [rw] kms_key_name + # @return [::String] + # Optional. The Cloud KMS key name to encrypt backups in this backup vault. + # Must be in the same region as the vault. Some workload backups like + # compute disk backups may use their inherited source key instead. Format: + # projects/\\{project}/locations/\\{location}/keyRings/\\{ring}/cryptoKeys/\\{key} + class EncryptionConfig + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # How a backup's enforced retention end time is inherited. + module BackupRetentionInheritance + # Inheritance behavior not set. This will default to + # `INHERIT_VAULT_RETENTION`. + BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0 + + # The enforced retention end time of a backup will be inherited from the + # backup vault's `backup_minimum_enforced_retention_duration` field. + # + # This is the default behavior. + INHERIT_VAULT_RETENTION = 1 + + # The enforced retention end time of a backup will always match the expire + # time of the backup. + # + # If this is set, the backup's enforced retention end time will be set to + # match the expire time during creation of the backup. When updating, the + # ERET and expire time must be updated together and have the same value. + # Invalid update requests will be rejected by the server. + MATCH_BACKUP_EXPIRE_TIME = 2 + end + + # Holds the state of the backup vault resource. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The backup vault is being created. + CREATING = 1 + + # The backup vault has been created and is fully usable. + ACTIVE = 2 + + # The backup vault is being deleted. + DELETING = 3 + + # The backup vault is experiencing an issue and might be unusable. + ERROR = 4 + + # The backup vault is being updated. + UPDATING = 5 + end + + # Holds the access restriction for the backup vault. + module AccessRestriction + # Access restriction not set. If user does not provide any value or pass + # this value, it will be changed to WITHIN_ORGANIZATION. + ACCESS_RESTRICTION_UNSPECIFIED = 0 + + # Access to or from resources outside your current project will be denied. + WITHIN_PROJECT = 1 + + # Access to or from resources outside your current organization will be + # denied. + WITHIN_ORGANIZATION = 2 + + # No access restriction. + UNRESTRICTED = 3 + + # Access to or from resources outside your current organization will be + # denied except for backup appliance. + WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4 + end + end + + # Message describing a DataSource object. + # Datasource object used to represent Datasource details for both admin and + # basic view. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Name of the datasource to create. + # It must have the + # format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. + # `{datasource}` cannot be changed after creation. It must be between 3-63 + # characters long and must be unique within the backup vault. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::DataSource::State] + # Output only. The DataSource resource instance state. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # No labels currently defined: + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] backup_count + # @return [::Integer] + # Number of backups in the data source. + # @!attribute [rw] etag + # @return [::String] + # Server specified ETag for the ManagementServer resource to prevent + # simultaneous updates from overwiting each other. + # @!attribute [rw] total_stored_bytes + # @return [::Integer] + # The number of bytes (metadata and data) stored in this datasource. + # @!attribute [r] config_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] + # Output only. The backup configuration state. + # @!attribute [r] backup_config_info + # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo] + # Output only. Details of how the resource is configured for backup. + # @!attribute [rw] data_source_gcp_resource + # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResource] + # The backed up resource is a Google Cloud resource. + # The word 'DataSource' was included in the names to indicate that this is + # the representation of the Google Cloud resource used within the + # DataSource object. + # + # Note: The following fields are mutually exclusive: `data_source_gcp_resource`, `data_source_backup_appliance_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_source_backup_appliance_application + # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupApplianceApplication] + # The backed up resource is a backup appliance application. + # + # Note: The following fields are mutually exclusive: `data_source_backup_appliance_application`, `data_source_gcp_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_blocked_by_vault_access_restriction + # @return [::Boolean] + # Output only. This field is set to true if the backup is blocked by vault + # access restriction. + class DataSource + 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 + + # Holds the state of the data source resource. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The data source is being created. + CREATING = 1 + + # The data source has been created and is fully usable. + ACTIVE = 2 + + # The data source is being deleted. + DELETING = 3 + + # The data source is experiencing an issue and might be unusable. + ERROR = 4 + end + end + + # BackupConfigInfo has information about how the resource is configured + # for Backup and about the most recent backup to this vault. + # @!attribute [r] last_backup_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] + # Output only. The status of the last backup to this BackupVault + # @!attribute [r] last_successful_backup_consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. If the last backup were successful, this field has the + # consistency date. + # @!attribute [r] last_backup_error + # @return [::Google::Rpc::Status] + # Output only. If the last backup failed, this field has the error message. + # @!attribute [rw] gcp_backup_config + # @return [::Google::Cloud::BackupDR::V1::GcpBackupConfig] + # Configuration for a Google Cloud resource. + # + # Note: The following fields are mutually exclusive: `gcp_backup_config`, `backup_appliance_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] backup_appliance_backup_config + # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupConfig] + # Configuration for an application backed up by a Backup Appliance. + # + # Note: The following fields are mutually exclusive: `backup_appliance_backup_config`, `gcp_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupConfigInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # LastBackupstate tracks whether the last backup was not yet started, + # successful, failed, or could not be run because of the lack of permissions. + module LastBackupState + # Status not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0 + + # The first backup has not yet completed + FIRST_BACKUP_PENDING = 1 + + # The most recent backup was successful + SUCCEEDED = 2 + + # The most recent backup failed + FAILED = 3 + + # The most recent backup could not be run/failed because of the lack of + # permissions + PERMISSION_DENIED = 4 + end + end + + # GcpBackupConfig captures the Backup configuration details for Google Cloud + # resources. All Google Cloud resources regardless of type are protected with + # backup plan associations. + # @!attribute [rw] backup_plan + # @return [::String] + # The name of the backup plan. + # @!attribute [rw] backup_plan_description + # @return [::String] + # The description of the backup plan. + # @!attribute [rw] backup_plan_association + # @return [::String] + # The name of the backup plan association. + # @!attribute [rw] backup_plan_rules + # @return [::Array<::String>] + # The names of the backup plan rules which point to this backupvault + # @!attribute [rw] backup_plan_revision_name + # @return [::String] + # The name of the backup plan revision. + # @!attribute [rw] backup_plan_revision_id + # @return [::String] + # The user friendly id of the backup plan revision. + # E.g. v0, v1 etc. + class GcpBackupConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupApplianceBackupConfig captures the backup configuration for + # applications that are protected by Backup Appliances. + # @!attribute [rw] backup_appliance_name + # @return [::String] + # The name of the backup appliance. + # @!attribute [rw] backup_appliance_id + # @return [::Integer] + # The ID of the backup appliance. + # @!attribute [rw] sla_id + # @return [::Integer] + # The ID of the SLA of this application. + # @!attribute [rw] application_name + # @return [::String] + # The name of the application. + # @!attribute [rw] host_name + # @return [::String] + # The name of the host where the application is running. + # @!attribute [rw] slt_name + # @return [::String] + # The name of the SLT associated with the application. + # @!attribute [rw] slp_name + # @return [::String] + # The name of the SLP associated with the application. + class BackupApplianceBackupConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataSourceGcpResource is used for protected resources that are Google Cloud + # Resources. This name is easeier to understand than GcpResourceDataSource or + # GcpDataSourceResource + # @!attribute [r] gcp_resourcename + # @return [::String] + # Output only. Full resource pathname URL of the source Google Cloud + # resource. + # @!attribute [rw] location + # @return [::String] + # Location of the resource: //"global"/"unspecified". + # @!attribute [rw] type + # @return [::String] + # The type of the Google Cloud resource. Use the Unified Resource Type, + # eg. compute.googleapis.com/Instance. + # @!attribute [rw] compute_instance_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceDataSourceProperties] + # ComputeInstanceDataSourceProperties has a subset of Compute Instance + # properties that are useful at the Datasource level. + # + # Note: The following fields are mutually exclusive: `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] cloud_sql_instance_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceProperties] + # Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud + # SQL Instance properties that are useful at the Datasource level. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance_datasource_properties`, `compute_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] alloy_db_cluster_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::AlloyDBClusterDataSourceProperties] + # Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB + # cluster properties that are useful at the Datasource level. + # + # Note: The following fields are mutually exclusive: `alloy_db_cluster_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::DiskDataSourceProperties] + # DiskDataSourceProperties has a subset of Disk properties that are useful + # at the Datasource level. + # + # Note: The following fields are mutually exclusive: `disk_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataSourceGcpResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupApplianceApplication describes a Source Resource when it is an + # application backed up by a BackupAppliance. + # @!attribute [rw] application_name + # @return [::String] + # The name of the Application as known to the Backup Appliance. + # @!attribute [rw] backup_appliance + # @return [::String] + # Appliance name. + # @!attribute [rw] appliance_id + # @return [::Integer] + # Appliance Id of the Backup Appliance. + # @!attribute [rw] type + # @return [::String] + # The type of the application. e.g. VMBackup + # @!attribute [rw] application_id + # @return [::Integer] + # The appid field of the application within the Backup Appliance. + # @!attribute [rw] hostname + # @return [::String] + # Hostname of the host where the application is running. + # @!attribute [rw] host_id + # @return [::Integer] + # Hostid of the application host. + class DataSourceBackupApplianceApplication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ServiceLockInfo represents the details of a lock taken by the service on a + # Backup resource. + # @!attribute [r] operation + # @return [::String] + # Output only. The name of the operation that created this lock. + # The lock will automatically be released when the operation completes. + class ServiceLockInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupApplianceLockInfo contains metadata about the backupappliance that + # created the lock. + # @!attribute [rw] backup_appliance_id + # @return [::Integer] + # Required. The ID of the backup/recovery appliance that created this lock. + # @!attribute [rw] backup_appliance_name + # @return [::String] + # Required. The name of the backup/recovery appliance that created this lock. + # @!attribute [rw] lock_reason + # @return [::String] + # Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The + # value of this string is only meaningful to the client and it is not + # interpreted by the BackupVault service. + # @!attribute [rw] job_name + # @return [::String] + # The job name on the backup/recovery appliance that created this lock. + # + # Note: The following fields are mutually exclusive: `job_name`, `backup_image`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] backup_image + # @return [::String] + # The image name that depends on this Backup. + # + # Note: The following fields are mutually exclusive: `backup_image`, `job_name`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sla_id + # @return [::Integer] + # The SLA on the backup/recovery appliance that owns the lock. + # + # Note: The following fields are mutually exclusive: `sla_id`, `job_name`, `backup_image`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupApplianceLockInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupLock represents a single lock on a Backup resource. An unexpired + # lock on a Backup prevents the Backup from being deleted. + # @!attribute [rw] lock_until_time + # @return [::Google::Protobuf::Timestamp] + # Required. The time after which this lock is not considered valid and will + # no longer protect the Backup from deletion. + # @!attribute [rw] backup_appliance_lock_info + # @return [::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo] + # If the client is a backup and recovery appliance, this + # contains metadata about why the lock exists. + # + # Note: The following fields are mutually exclusive: `backup_appliance_lock_info`, `service_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] service_lock_info + # @return [::Google::Cloud::BackupDR::V1::ServiceLockInfo] + # Output only. Contains metadata about the lock exist for Google Cloud + # native backups. + # + # Note: The following fields are mutually exclusive: `service_lock_info`, `backup_appliance_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupLock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message describing a Backup object. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Name of the backup to create. It must have the + # format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. + # `{backup}` cannot be changed after creation. It must be between 3-63 + # characters long and must be unique within the datasource. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the Backup instance (2048 characters or + # less). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # No labels currently defined. + # @!attribute [rw] enforced_retention_end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The backup can not be deleted before this time. + # @!attribute [r] backup_retention_inheritance + # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] + # Output only. Setting for how the enforced retention end time is inherited. + # This value is copied from this backup's BackupVault. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Optional. When this backup is automatically expired. + # @!attribute [r] consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The point in time when this backup was captured from the + # source. + # @!attribute [rw] etag + # @return [::String] + # Optional. Server specified ETag to prevent updates from overwriting each + # other. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::Backup::State] + # Output only. The Backup resource instance state. + # @!attribute [r] service_locks + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] + # Output only. The list of BackupLocks taken by the service to prevent the + # deletion of the backup. + # @!attribute [rw] backup_appliance_locks + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] + # Optional. The list of BackupLocks taken by the accessor Backup Appliance. + # @!attribute [r] compute_instance_backup_properties + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceBackupProperties] + # Output only. Compute Engine specific backup properties. + # + # Note: The following fields are mutually exclusive: `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] cloud_sql_instance_backup_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupProperties] + # Output only. Cloud SQL specific backup properties. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_properties`, `compute_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_appliance_backup_properties + # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupProperties] + # Output only. Backup Appliance specific backup properties. + # + # Note: The following fields are mutually exclusive: `backup_appliance_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] alloy_db_backup_properties + # @return [::Google::Cloud::BackupDR::V1::AlloyDbClusterBackupProperties] + # Output only. AlloyDB specific backup properties. + # + # Note: The following fields are mutually exclusive: `alloy_db_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] disk_backup_properties + # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties] + # Output only. Disk specific backup properties. + # + # Note: The following fields are mutually exclusive: `disk_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_type + # @return [::Google::Cloud::BackupDR::V1::Backup::BackupType] + # Output only. Type of the backup, unspecified, scheduled or ondemand. + # @!attribute [r] gcp_backup_plan_info + # @return [::Google::Cloud::BackupDR::V1::Backup::GCPBackupPlanInfo] + # Output only. Configuration for a Google Cloud resource. + # @!attribute [r] resource_size_bytes + # @return [::Integer] + # Output only. source resource size in bytes at the time of the backup. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Optional. Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Optional. Output only. Reserved for future use. + # @!attribute [r] gcp_resource + # @return [::Google::Cloud::BackupDR::V1::BackupGcpResource] + # Output only. Unique identifier of the GCP resource that is being backed + # up. + # @!attribute [r] kms_key_versions + # @return [::Array<::String>] + # Optional. Output only. The list of KMS key versions used to encrypt the + # backup. + class Backup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # GCPBackupPlanInfo captures the plan configuration details of Google Cloud + # resources at the time of backup. + # @!attribute [rw] backup_plan + # @return [::String] + # Resource name of backup plan by which workload is protected at the time + # of the backup. + # Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} + # @!attribute [rw] backup_plan_rule_id + # @return [::String] + # The rule id of the backup plan which triggered this backup in case of + # scheduled backup or used for + # @!attribute [rw] backup_plan_revision_name + # @return [::String] + # Resource name of the backup plan revision which triggered this backup in + # case of scheduled backup or used for on demand backup. + # Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId}/revisions/\\{revisionId} + # @!attribute [rw] backup_plan_revision_id + # @return [::String] + # The user friendly id of the backup plan revision which triggered this + # backup in case of scheduled backup or used for on demand backup. + class GCPBackupPlanInfo + 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 + + # Holds the state of the backup resource. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The backup is being created. + CREATING = 1 + + # The backup has been created and is fully usable. + ACTIVE = 2 + + # The backup is being deleted. + DELETING = 3 + + # The backup is experiencing an issue and might be unusable. + ERROR = 4 + + # The backup is being uploaded. + UPLOADING = 5 + end + + # Type of the backup, scheduled or ondemand. + module BackupType + # Backup type is unspecified. + BACKUP_TYPE_UNSPECIFIED = 0 + + # Scheduled backup. + SCHEDULED = 1 + + # On demand backup. + ON_DEMAND = 2 + + # Operational backup. + ON_DEMAND_OPERATIONAL = 3 + end + end + + # Message for creating a BackupVault. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] backup_vault_id + # @return [::String] + # Required. ID of the requesting object + # If auto-generating ID server-side, remove this field and + # backup_vault_id from the method_signature of Create RPC + # @!attribute [rw] backup_vault + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + class CreateBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing backupvault stores. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault. + class ListBackupVaultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing BackupVaults. + # @!attribute [rw] backup_vaults + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] + # The list of BackupVault instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return backup vaults in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!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 ListBackupVaultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for fetching usable BackupVaults. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class FetchUsableBackupVaultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for fetching usable BackupVaults. + # @!attribute [rw] backup_vaults + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] + # The list of BackupVault instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return backup vaults in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!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 FetchUsableBackupVaultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the FetchBackupsForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. Datasources are the parent resource for the backups. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sqladmin.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of Backups to return. The service may + # return fewer than this value. If unspecified, at most 50 + # Backups will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupsForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. This parameter is used to specify the view of the backup. + # If not specified, the default view is BASIC. + class FetchBackupsForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchBackupsForResourceType method. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] + # The Backups 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 FetchBackupsForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a BackupVault. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backupvault store resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault + class GetBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a BackupVault. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # BackupVault 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 the request will fail. + # @!attribute [rw] backup_vault + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # Required. The resource being updated + # @!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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, will not check plan duration against backup vault + # enforcement duration. + # @!attribute [rw] force_update_access_restriction + # @return [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. + class UpdateBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a BackupVault. + # @!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, any data source from this backup vault will also + # be deleted. + # @!attribute [rw] etag + # @return [::String] + # The current etag of the backup vault. + # If an etag is provided and does not match the current etag of the + # connection, deletion will be blocked. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If true and the BackupVault is not found, the request will + # succeed but no action will be taken. + # @!attribute [rw] ignore_backup_plan_references + # @return [::Boolean] + # Optional. If set to true, backupvault deletion will proceed even if there + # are backup plans referencing the backupvault. The default is 'false'. + class DeleteBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing DataSources. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve data + # sources information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing DataSources. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Cloud::BackupDR::V1::DataSource>] + # The list of DataSource instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return data sources in reachable locations + # and the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!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 ListDataSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a DataSource instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' + class GetDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a data source instance. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # DataSource 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 the request will fail. + # @!attribute [rw] data_source + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # Required. The resource being updated + # @!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). + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. Enable upsert. + class UpdateDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing Backups. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve backup + # information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + class ListBackupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing Backups. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] + # The list of Backup instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return data sources in reachable locations + # and the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!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 ListBackupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a Backup. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + class GetBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a Backup. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Backup 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 the request will fail. + # @!attribute [rw] backup + # @return [::Google::Cloud::BackupDR::V1::Backup] + # Required. The resource being updated + # @!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 UpdateBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a Backup. + # @!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). + class DeleteBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for restoring from a Backup. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Backup instance, in the format + # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + # @!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] compute_instance_target_environment + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment] + # Compute Engine target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_target_environment + # @return [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment] + # Disk target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] region_disk_target_environment + # @return [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment] + # Region disk target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] compute_instance_restore_properties + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties] + # Compute Engine instance properties to be overridden during restore. + # + # Note: The following fields are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_restore_properties + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties] + # Disk properties to be overridden during restore. + # + # Note: The following fields are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] clear_overrides_field_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. A field mask used to clear server-side default values + # for fields within the `instance_properties` oneof. + # + # When a field in this mask is cleared, the server will not apply its + # default logic (like inheriting a value from the source) for that field. + # + # The most common current use case is clearing default encryption keys. + # + # Examples of field mask paths: + # - Compute Instance Disks: + # `compute_instance_restore_properties.disks.*.disk_encryption_key` + # - Single Disk: `disk_restore_properties.disk_encryption_key` + class RestoreBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for restoring from a Backup. + # @!attribute [rw] target_resource + # @return [::Google::Cloud::BackupDR::V1::TargetResource] + # Details of the target resource created/modified as part of restore. + class RestoreBackupResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of the target resource created/modified as part of restore. + # @!attribute [rw] gcp_resource + # @return [::Google::Cloud::BackupDR::V1::GcpResource] + # Details of the native Google Cloud resource created as part of restore. + class TargetResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Minimum details to identify a Google Cloud resource + # @!attribute [rw] gcp_resourcename + # @return [::String] + # Name of the Google Cloud resource. + # @!attribute [rw] location + # @return [::String] + # Location of the resource: //"global"/"unspecified". + # @!attribute [rw] type + # @return [::String] + # Type of the resource. Use the Unified Resource Type, + # eg. compute.googleapis.com/Instance. + class GcpResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Minimum details to identify a Google Cloud resource for a backup. + # @!attribute [rw] gcp_resourcename + # @return [::String] + # Name of the Google Cloud resource. + # @!attribute [rw] location + # @return [::String] + # Location of the resource: //"global"/"unspecified". + # @!attribute [rw] type + # @return [::String] + # Type of the resource. Use the Unified Resource Type, + # eg. compute.googleapis.com/Instance. + class BackupGcpResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Backup configuration state. Is the resource configured for backup? + module BackupConfigState + # The possible states of backup configuration. + # Status not set. + BACKUP_CONFIG_STATE_UNSPECIFIED = 0 + + # The data source is actively protected (i.e. there is a + # BackupPlanAssociation or Appliance SLA pointing to it) + ACTIVE = 1 + + # The data source is no longer protected (but may have backups under it) + PASSIVE = 2 + end + + # BackupView contains enum options for Partial and Full view. + module BackupView + # If the value is not set, the default 'FULL' view is used. + BACKUP_VIEW_UNSPECIFIED = 0 + + # Includes basic data about the Backup, but not the full contents. + BACKUP_VIEW_BASIC = 1 + + # Includes all data about the Backup. + # This is the default value (for both ListBackups and GetBackup). + BACKUP_VIEW_FULL = 2 + end + + # BackupVaultView contains enum options for Partial and Full view. + module BackupVaultView + # If the value is not set, the default 'FULL' view is used. + BACKUP_VAULT_VIEW_UNSPECIFIED = 0 + + # Includes basic data about the Backup Vault, but not the full contents. + BACKUP_VAULT_VIEW_BASIC = 1 + + # Includes all data about the Backup Vault. + # This is the default value (for both ListBackupVaults and GetBackupVault). + BACKUP_VAULT_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb new file mode 100644 index 000000000000..1498cae8a4ff --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.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 BackupDR + module V1 + # AlloyDBClusterDataSourceProperties represents the properties of a + # AlloyDB cluster resource that are stored in the DataSource. + # . + # @!attribute [r] name + # @return [::String] + # Output only. Name of the AlloyDB cluster backed up by the datasource. + class AlloyDBClusterDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AlloyDbClusterBackupProperties represents AlloyDB cluster + # backup properties. + # . + # @!attribute [rw] description + # @return [::String] + # An optional text description for the backup. + # @!attribute [r] stored_bytes + # @return [::Integer] + # Output only. Storage usage of this particular backup + # @!attribute [r] chain_id + # @return [::String] + # Output only. The chain id of this backup. Backups belonging to the same + # chain are sharing the same chain id. This property is calculated and + # maintained by BackupDR. + # @!attribute [r] database_version + # @return [::String] + # Output only. The PostgreSQL major version of the AlloyDB cluster when the + # backup was taken. + class AlloyDbClusterBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties for an AlloyDB cluster backup plan association. + # @!attribute [r] cluster_uid + # @return [::String] + # Output only. The cluster UID of the AlloyDB cluster. + class AlloyDBClusterBackupPlanAssociationProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb new file mode 100644 index 000000000000..787b36f74c08 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # BackupApplianceBackupProperties represents BackupDR backup appliance's + # properties. + # @!attribute [r] generation_id + # @return [::Integer] + # Output only. The numeric generation ID of the backup (monotonically + # increasing). + # @!attribute [r] finalize_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when this backup object was finalized (if none, + # backup is not finalized). + # @!attribute [rw] recovery_range_start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The earliest timestamp of data available in this Backup. + # @!attribute [rw] recovery_range_end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The latest timestamp of data available in this Backup. + class BackupApplianceBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb new file mode 100644 index 000000000000..c11daec87a93 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # CloudSqlInstanceDataSourceProperties represents the properties of a + # Cloud SQL resource that are stored in the DataSource. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the Cloud SQL instance backed up by the datasource. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + class CloudSqlInstanceDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceBackupProperties represents Cloud SQL Instance + # Backup properties. + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance + # when the backup was taken. + # @!attribute [r] final_backup + # @return [::Boolean] + # Output only. Whether the backup is a final backup. + # @!attribute [r] source_instance + # @return [::String] + # Output only. The source instance of the backup. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + # @!attribute [r] instance_delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance delete timestamp. + class CloudSqlInstanceBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceDataSourceReferenceProperties represents the properties of a + # Cloud SQL resource that are stored in the DataSourceReference. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the Cloud SQL instance backed up by the datasource. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + class CloudSqlInstanceDataSourceReferenceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceInitializationConfig contains the configuration for + # initializing a Cloud SQL instance. + # @!attribute [rw] edition + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig::Edition] + # Required. The edition of the Cloud SQL instance. + class CloudSqlInstanceInitializationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The edition of the Cloud SQL instance. For details, see + # https://cloud.google.com/sql/docs/editions-intro. + module Edition + # Unspecified edition. + EDITION_UNSPECIFIED = 0 + + # Enterprise edition. + ENTERPRISE = 1 + + # Enterprise Plus edition. + ENTERPRISE_PLUS = 2 + end + end + + # Cloud SQL instance's BPA properties. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + class CloudSqlInstanceBackupPlanAssociationProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb new file mode 100644 index 000000000000..d5590a9a587f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.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 BackupDR + module V1 + # DiskTargetEnvironment represents the target environment for the disk. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the disk. + # @!attribute [rw] zone + # @return [::String] + # Required. Target zone for the disk. + class DiskTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RegionDiskTargetEnvironment represents the target environment for the disk. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the disk. + # @!attribute [rw] region + # @return [::String] + # Required. Target region for the disk. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # Required. Target URLs of the replica zones for the disk. + class RegionDiskTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DiskRestoreProperties represents the properties of a Disk restore. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the disk. + # @!attribute [rw] description + # @return [::String] + # Optional. An optional description of this resource. Provide this property + # when you create the resource. + # @!attribute [rw] size_gb + # @return [::Integer] + # Required. The size of the disk in GB. + # @!attribute [rw] licenses + # @return [::Array<::String>] + # Optional. A list of publicly available licenses that are applicable to this + # backup. This is applicable if the original image had licenses attached, + # e.g. Windows image + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # Optional. A list of features to enable in the guest operating system. This + # is applicable only for bootable images. + # @!attribute [rw] disk_encryption_key + # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] + # Optional. Encrypts the disk using a + # customer-supplied encryption key or a customer-managed encryption key. + # @!attribute [rw] physical_block_size_bytes + # @return [::Integer] + # Optional. Physical block size of the persistent disk, in bytes. + # If not present in a request, a default value is used. + # Currently, the supported size is 4096. + # @!attribute [rw] provisioned_iops + # @return [::Integer] + # Optional. Indicates how many IOPS to provision for the disk. This sets the + # number of I/O operations per second that the disk can handle. + # @!attribute [rw] provisioned_throughput + # @return [::Integer] + # Optional. Indicates how much throughput to provision for the disk. This + # sets the number of throughput MB per second that the disk can handle. + # @!attribute [rw] enable_confidential_compute + # @return [::Boolean] + # Optional. Indicates whether this disk is using confidential compute mode. + # Encryption with a Cloud KMS key is required to enable this option. + # @!attribute [rw] storage_pool + # @return [::String] + # Optional. The storage pool in which the new disk is created. You can + # provide this as a partial or full URL to the resource. + # @!attribute [rw] access_mode + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::AccessMode] + # Optional. The access mode of the disk. + # @!attribute [rw] architecture + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::Architecture] + # Optional. The architecture of the source disk. Valid values are + # ARM64 or X86_64. + # @!attribute [rw] resource_policy + # @return [::Array<::String>] + # Optional. Resource policies applied to this disk. + # @!attribute [rw] type + # @return [::String] + # Required. URL of the disk type resource describing which disk type to use + # to create the disk. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels to apply to this disk. These can be modified later using + # setLabels method. Label values can be empty. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource manager tags to be bound to the disk. + class DiskRestoreProperties + 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 ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The supported access modes of the disk. + module AccessMode + # The default AccessMode, means the disk can be attached to single instance + # in RW mode. + READ_WRITE_SINGLE = 0 + + # The AccessMode means the disk can be attached to multiple instances in RW + # mode. + READ_WRITE_MANY = 1 + + # The AccessMode means the disk can be attached to multiple instances in RO + # mode. + READ_ONLY_MANY = 2 + end + + # Architecture of the source disk. + module Architecture + # Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0 + + # Disks with architecture X86_64 + X86_64 = 1 + + # Disks with architecture ARM64 + ARM64 = 2 + end + end + + # DiskBackupProperties represents the properties of a Disk backup. + # @!attribute [rw] description + # @return [::String] + # A description of the source disk. + # @!attribute [rw] licenses + # @return [::Array<::String>] + # A list of publicly available licenses that are applicable to this backup. + # This is applicable if the original image had licenses attached, e.g. + # Windows image. + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # A list of guest OS features that are applicable to this backup. + # @!attribute [rw] architecture + # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties::Architecture] + # The architecture of the source disk. Valid values are + # ARM64 or X86_64. + # @!attribute [rw] type + # @return [::String] + # The URL of the type of the disk. + # @!attribute [rw] size_gb + # @return [::Integer] + # Size(in GB) of the source disk. + # @!attribute [rw] region + # @return [::String] + # Region and zone are mutually exclusive fields. + # The URL of the region of the source disk. + # @!attribute [rw] zone + # @return [::String] + # The URL of the Zone where the source disk. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # The URL of the Zones where the source disk should be replicated. + # @!attribute [rw] source_disk + # @return [::String] + # The source disk used to create this backup. + class DiskBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Architecture of the source disk. + module Architecture + # Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0 + + # Disks with architecture X86_64 + X86_64 = 1 + + # Disks with architecture ARM64 + ARM64 = 2 + end + end + + # DiskDataSourceProperties represents the properties of a + # Disk resource that are stored in the DataSource. + # . + # @!attribute [rw] name + # @return [::String] + # Name of the disk backed up by the datasource. + # @!attribute [rw] description + # @return [::String] + # The description of the disk. + # @!attribute [rw] type + # @return [::String] + # The type of the disk. + # @!attribute [rw] size_gb + # @return [::Integer] + # The size of the disk in GB. + class DiskDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb new file mode 100644 index 000000000000..bc9fe21300c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.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 BackupDR + module V1 + # ComputeInstanceBackupProperties represents Compute Engine instance backup + # properties. + # @!attribute [rw] description + # @return [::String] + # An optional text description for the instances that are created from these + # properties. + # @!attribute [rw] tags + # @return [::Google::Cloud::BackupDR::V1::Tags] + # A list of tags to apply to the instances that are created from these + # properties. The tags identify valid sources or targets for network + # firewalls. The setTags method can modify this list of tags. Each tag within + # the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt). + # @!attribute [rw] machine_type + # @return [::String] + # The machine type to use for instances that are created from these + # properties. + # @!attribute [rw] can_ip_forward + # @return [::Boolean] + # Enables instances created based on these properties to send packets with + # source IP addresses other than their own and receive packets with + # destination IP addresses other than their own. If these instances will be + # used as an IP gateway or it will be set as the next-hop in a Route + # resource, specify `true`. If unsure, leave this set to `false`. See the + # https://cloud.google.com/vpc/docs/using-routes#canipforward + # documentation for more information. + # @!attribute [rw] network_interface + # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] + # An array of network access configurations for this interface. + # @!attribute [rw] disk + # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] + # An array of disks that are associated with the instances that are created + # from these properties. + # @!attribute [rw] metadata + # @return [::Google::Cloud::BackupDR::V1::Metadata] + # The metadata key/value pairs to assign to instances that are created from + # these properties. These pairs can consist of custom metadata or predefined + # keys. See https://cloud.google.com/compute/docs/metadata/overview for more + # information. + # @!attribute [rw] service_account + # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] + # A list of service accounts with specified scopes. Access tokens for these + # service accounts are available to the instances that are created from + # these properties. Use metadata queries to obtain the access tokens for + # these instances. + # @!attribute [rw] scheduling + # @return [::Google::Cloud::BackupDR::V1::Scheduling] + # Specifies the scheduling options for the instances that are created from + # these properties. + # @!attribute [rw] guest_accelerator + # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] + # A list of guest accelerator cards' type and count to use for instances + # created from these properties. + # @!attribute [rw] min_cpu_platform + # @return [::String] + # Minimum cpu/platform to be used by instances. The instance may be + # scheduled on the specified or newer cpu/platform. Applicable values are the + # friendly names of CPU platforms, such as + # `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`. + # For more information, read + # https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + # @!attribute [rw] key_revocation_action_type + # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] + # KeyRevocationActionType of the instance. Supported options are "STOP" and + # "NONE". The default value is "NONE" if it is not specified. + # @!attribute [rw] source_instance + # @return [::String] + # The source instance used to create this backup. This can be a partial or + # full URL to the resource. For example, the following are valid values: + # -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + # -projects/project/zones/zone/instances/instance + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels to apply to instances that are created from these properties. + class ComputeInstanceBackupProperties + 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 + + # ComputeInstanceRestoreProperties represents Compute Engine instance + # properties to be overridden during restore. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the compute instance. + # @!attribute [rw] advanced_machine_features + # @return [::Google::Cloud::BackupDR::V1::AdvancedMachineFeatures] + # Optional. Controls for advanced machine-related behavior features. + # @!attribute [rw] can_ip_forward + # @return [::Boolean] + # Optional. Allows this instance to send and receive packets with + # non-matching destination or source IPs. + # @!attribute [rw] confidential_instance_config + # @return [::Google::Cloud::BackupDR::V1::ConfidentialInstanceConfig] + # Optional. Controls Confidential compute options on the instance + # @!attribute [rw] deletion_protection + # @return [::Boolean] + # Optional. Whether the resource should be protected against deletion. + # @!attribute [rw] description + # @return [::String] + # Optional. An optional description of this resource. Provide this property + # when you create the resource. + # @!attribute [rw] disks + # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] + # Optional. Array of disks associated with this instance. Persistent disks + # must be created before you can assign them. Source regional persistent + # disks will be restored with default replica zones if not specified. + # @!attribute [rw] display_device + # @return [::Google::Cloud::BackupDR::V1::DisplayDevice] + # Optional. Enables display device for the instance. + # @!attribute [rw] guest_accelerators + # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] + # Optional. A list of the type and count of accelerator cards attached to the + # instance. + # @!attribute [rw] hostname + # @return [::String] + # Optional. Specifies the hostname of the instance. The specified hostname + # must be RFC1035 compliant. If hostname is not specified, the default + # hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global + # DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal + # DNS. + # @!attribute [rw] instance_encryption_key + # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] + # Optional. Encrypts suspended data for an instance with a + # customer-managed encryption key. + # @!attribute [rw] key_revocation_action_type + # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] + # Optional. KeyRevocationActionType of the instance. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels to apply to this instance. + # @!attribute [rw] machine_type + # @return [::String] + # Optional. Full or partial URL of the machine type resource to use for this + # instance. + # @!attribute [rw] metadata + # @return [::Google::Cloud::BackupDR::V1::Metadata] + # Optional. This includes custom metadata and predefined keys. + # @!attribute [rw] min_cpu_platform + # @return [::String] + # Optional. Minimum CPU platform to use for this instance. + # @!attribute [rw] network_interfaces + # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] + # Optional. An array of network configurations for this instance. These + # specify how interfaces are configured to interact with other network + # services, such as connecting to the internet. Multiple interfaces are + # supported per instance. Required to restore in different project or region. + # @!attribute [rw] network_performance_config + # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig] + # Optional. Configure network performance such as egress bandwidth tier. + # @!attribute [rw] params + # @return [::Google::Cloud::BackupDR::V1::InstanceParams] + # Input only. Additional params passed with the request, but not persisted + # as part of resource payload. + # @!attribute [rw] private_ipv6_google_access + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess] + # Optional. The private IPv6 google access type for the VM. + # If not specified, use INHERIT_FROM_SUBNETWORK as default. + # @!attribute [rw] allocation_affinity + # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity] + # Optional. Specifies the reservations that this instance can consume from. + # @!attribute [rw] resource_policies + # @return [::Array<::String>] + # Optional. Resource policies applied to this instance. + # By default, no resource policies will be applied. + # @!attribute [rw] scheduling + # @return [::Google::Cloud::BackupDR::V1::Scheduling] + # Optional. Sets the scheduling options for this instance. + # @!attribute [rw] service_accounts + # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] + # Optional. A list of service accounts, with their specified scopes, + # authorized for this instance. Only one service account per VM instance is + # supported. + # @!attribute [rw] tags + # @return [::Google::Cloud::BackupDR::V1::Tags] + # Optional. Tags to apply to this instance. Tags are used to identify valid + # sources or targets for network firewalls and are specified by the client + # during instance creation. + class ComputeInstanceRestoreProperties + 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 private IPv6 google access type for the VMs. + module InstancePrivateIpv6GoogleAccess + # Default value. This value is unused. + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0 + + # Each network interface inherits PrivateIpv6GoogleAccess from its + # subnetwork. + INHERIT_FROM_SUBNETWORK = 1 + + # Outbound private IPv6 access from VMs in this subnet to Google services. + # If specified, the subnetwork who is attached to the instance's default + # network interface will be assigned an internal IPv6 prefix if it doesn't + # have before. + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2 + + # Bidirectional private IPv6 access to/from Google services. If + # specified, the subnetwork who is attached to the instance's default + # network interface will be assigned an internal IPv6 prefix if it doesn't + # have before. + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 + end + end + + # ComputeInstanceTargetEnvironment represents Compute Engine target + # environment to be used during restore. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the Compute Engine instance. + # @!attribute [rw] zone + # @return [::String] + # Required. The zone of the Compute Engine instance. + class ComputeInstanceTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ComputeInstanceDataSourceProperties represents the properties of a + # ComputeEngine resource that are stored in the DataSource. + # @!attribute [rw] name + # @return [::String] + # Name of the compute instance backed up by the datasource. + # @!attribute [rw] description + # @return [::String] + # The description of the Compute Engine instance. + # @!attribute [rw] machine_type + # @return [::String] + # The machine type of the instance. + # @!attribute [rw] total_disk_count + # @return [::Integer] + # The total number of disks attached to the Instance. + # @!attribute [rw] total_disk_size_gb + # @return [::Integer] + # The sum of all the disk sizes. + class ComputeInstanceDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies options for controlling advanced machine features. + # @!attribute [rw] enable_nested_virtualization + # @return [::Boolean] + # Optional. Whether to enable nested virtualization or not (default is + # false). + # @!attribute [rw] threads_per_core + # @return [::Integer] + # Optional. The number of threads per physical core. To disable simultaneous + # multithreading (SMT) set this to 1. If unset, the maximum number + # of threads supported per core by the underlying processor is + # assumed. + # @!attribute [rw] visible_core_count + # @return [::Integer] + # Optional. The number of physical cores to expose to an instance. Multiply + # by the number of threads per core to compute the total number of virtual + # CPUs to expose to the instance. If unset, the number of cores is + # inferred from the instance's nominal CPU count and the underlying + # platform's SMT width. + # @!attribute [rw] enable_uefi_networking + # @return [::Boolean] + # Optional. Whether to enable UEFI networking for instance creation. + class AdvancedMachineFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of Confidential Instance options. + # @!attribute [rw] enable_confidential_compute + # @return [::Boolean] + # Optional. Defines whether the instance should have confidential compute + # enabled. + class ConfidentialInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of Display Device options + # @!attribute [rw] enable_display + # @return [::Boolean] + # Optional. Enables display for the Compute Engine VM + class DisplayDevice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A specification of the type and number of accelerator cards attached to the + # instance. + # @!attribute [rw] accelerator_type + # @return [::String] + # Optional. Full or partial URL of the accelerator type resource to attach to + # this instance. + # @!attribute [rw] accelerator_count + # @return [::Integer] + # Optional. The number of the guest accelerator cards exposed to this + # instance. + class AcceleratorConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A customer-supplied encryption key. + # @!attribute [rw] raw_key + # @return [::String] + # Optional. Specifies a 256-bit customer-supplied + # encryption key. + # + # Note: The following fields are mutually exclusive: `raw_key`, `rsa_encrypted_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] rsa_encrypted_key + # @return [::String] + # Optional. RSA-wrapped 2048-bit + # customer-supplied encryption key to either encrypt or decrypt this + # resource. + # + # Note: The following fields are mutually exclusive: `rsa_encrypted_key`, `raw_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] kms_key_name + # @return [::String] + # Optional. The name of the encryption key that is stored in Google Cloud + # KMS. + # + # Note: The following fields are mutually exclusive: `kms_key_name`, `raw_key`, `rsa_encrypted_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] kms_key_service_account + # @return [::String] + # Optional. The service account being used for the encryption request for the + # given KMS key. If absent, the Compute Engine default service account is + # used. + class CustomerEncryptionKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A key/value pair to be used for storing metadata. + # @!attribute [rw] key + # @return [::String] + # Optional. Key for the metadata entry. + # @!attribute [rw] value + # @return [::String] + # Optional. Value for the metadata entry. These are free-form strings, and + # only have meaning as interpreted by the image running in the instance. The + # only restriction placed on values is that their size must be less than + # or equal to 262144 bytes (256 KiB). + class Entry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A metadata key/value entry. + # @!attribute [rw] items + # @return [::Array<::Google::Cloud::BackupDR::V1::Entry>] + # Optional. Array of key/value pairs. The total size of all keys and values + # must be less than 512 KB. + class Metadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A network interface resource attached to an instance. + # s + # @!attribute [rw] network + # @return [::String] + # Optional. URL of the VPC network resource for this instance. + # @!attribute [rw] subnetwork + # @return [::String] + # Optional. The URL of the Subnetwork resource for this instance. + # @!attribute [rw] ip_address + # @return [::String] + # Optional. An IPv4 internal IP address to assign to the instance for this + # network interface. If not specified by the user, an unused internal IP is + # assigned by the system. + # @!attribute [rw] ipv6_address + # @return [::String] + # Optional. An IPv6 internal network address for this network interface. To + # use a static internal IP address, it must be unused and in the same region + # as the instance's zone. If not specified, Google Cloud will automatically + # assign an internal IPv6 address from the instance's subnetwork. + # @!attribute [rw] internal_ipv6_prefix_length + # @return [::Integer] + # Optional. The prefix length of the primary internal IPv6 range. + # @!attribute [r] name + # @return [::String] + # Output only. [Output Only] The name of the network interface, which is + # generated by the server. + # @!attribute [rw] access_configs + # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] + # Optional. An array of configurations for this interface. Currently, only + # one access config,ONE_TO_ONE_NAT is supported. If there are no + # accessConfigs specified, then this instance will have + # no external internet access. + # @!attribute [rw] ipv6_access_configs + # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] + # Optional. An array of IPv6 access configurations for this interface. + # Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there + # is no ipv6AccessConfig specified, then this instance will + # have no external IPv6 Internet access. + # @!attribute [rw] alias_ip_ranges + # @return [::Array<::Google::Cloud::BackupDR::V1::AliasIpRange>] + # Optional. An array of alias IP ranges for this network interface. + # You can only specify this field for network interfaces in VPC networks. + # @!attribute [rw] stack_type + # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::StackType] + # The stack type for this network interface. + # @!attribute [rw] ipv6_access_type + # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::Ipv6AccessType] + # Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the + # IP can be accessed from the Internet. This field is always inherited from + # its subnetwork. + # @!attribute [rw] queue_count + # @return [::Integer] + # Optional. The networking queue count that's specified by users for the + # network interface. Both Rx and Tx queues will be set to this number. It'll + # be empty if not specified by the users. + # @!attribute [rw] nic_type + # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::NicType] + # Optional. The type of vNIC to be used on this interface. This may be gVNIC + # or VirtioNet. + # @!attribute [rw] network_attachment + # @return [::String] + # Optional. The URL of the network attachment that this interface should + # connect to in the following format: + # projects/\\{project_number}/regions/\\{region_name}/networkAttachments/\\{network_attachment_name}. + class NetworkInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Stack type for this network interface. + module StackType + # Default should be STACK_TYPE_UNSPECIFIED. + STACK_TYPE_UNSPECIFIED = 0 + + # The network interface will be assigned IPv4 address. + IPV4_ONLY = 1 + + # The network interface can have both IPv4 and IPv6 addresses. + IPV4_IPV6 = 2 + end + + # IPv6 access type for this network interface. + module Ipv6AccessType + # IPv6 access type not set. Means this network interface hasn't been + # turned on IPv6 yet. + UNSPECIFIED_IPV6_ACCESS_TYPE = 0 + + # This network interface can have internal IPv6. + INTERNAL = 1 + + # This network interface can have external IPv6. + EXTERNAL = 2 + end + + # Nic type for this network interface. + module NicType + # Default should be NIC_TYPE_UNSPECIFIED. + NIC_TYPE_UNSPECIFIED = 0 + + # VIRTIO + VIRTIO_NET = 1 + + # GVNIC + GVNIC = 2 + end + end + + # Network performance configuration. + # @!attribute [rw] total_egress_bandwidth_tier + # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig::Tier] + # Optional. The tier of the total egress bandwidth. + class NetworkPerformanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Network performance tier. + module Tier + # This value is unused. + TIER_UNSPECIFIED = 0 + + # Default network performance config. + DEFAULT = 1 + + # Tier 1 network performance config. + TIER_1 = 2 + end + end + + # An access configuration attached to an instance's network interface. + # Only one access config per instance is supported. + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::AccessConfig::AccessType] + # Optional. In accessConfigs (IPv4), the + # default and only option is ONE_TO_ONE_NAT. In + # ipv6AccessConfigs, the default and only option is + # DIRECT_IPV6. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of this access configuration. + # @!attribute [rw] external_ip + # @return [::String] + # Optional. The external IP address of this access configuration. + # @!attribute [rw] external_ipv6 + # @return [::String] + # Optional. The external IPv6 address of this access configuration. + # @!attribute [rw] external_ipv6_prefix_length + # @return [::Integer] + # Optional. The prefix length of the external IPv6 range. + # @!attribute [rw] set_public_ptr + # @return [::Boolean] + # Optional. Specifies whether a public DNS 'PTR' record should be created to + # map the external IP address of the instance to a DNS domain name. + # @!attribute [rw] public_ptr_domain_name + # @return [::String] + # Optional. The DNS domain name for the public PTR record. + # @!attribute [rw] network_tier + # @return [::Google::Cloud::BackupDR::V1::AccessConfig::NetworkTier] + # Optional. This signifies the networking tier used for configuring this + # access + class AccessConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of configuration. + module AccessType + # Default value. This value is unused. + ACCESS_TYPE_UNSPECIFIED = 0 + + # ONE_TO_ONE_NAT + ONE_TO_ONE_NAT = 1 + + # Direct IPv6 access. + DIRECT_IPV6 = 2 + end + + # Network tier property used by addresses, instances and forwarding rules. + module NetworkTier + # Default value. This value is unused. + NETWORK_TIER_UNSPECIFIED = 0 + + # High quality, Google-grade network tier, support for all networking + # products. + PREMIUM = 1 + + # Public internet quality, only limited support for other networking + # products. + STANDARD = 2 + end + end + + # An alias IP range attached to an instance's network interface. + # @!attribute [rw] ip_cidr_range + # @return [::String] + # Optional. The IP alias ranges to allocate for this interface. + # @!attribute [rw] subnetwork_range_name + # @return [::String] + # Optional. The name of a subnetwork secondary IP range from which to + # allocate an IP alias range. If not specified, the primary range of the + # subnetwork is used. + class AliasIpRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional instance params. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource manager tags to be bound to the instance. + class InstanceParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Specifies the reservations that this instance can consume from. + # @!attribute [rw] consume_allocation_type + # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity::Type] + # Optional. Specifies the type of reservation from which this instance can + # consume + # @!attribute [rw] key + # @return [::String] + # Optional. Corresponds to the label key of a reservation resource. + # @!attribute [rw] values + # @return [::Array<::String>] + # Optional. Corresponds to the label values of a reservation resource. + class AllocationAffinity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates whether to consume from a reservation or not. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # Do not consume from any allocated capacity. + NO_RESERVATION = 1 + + # Consume any allocation available. + ANY_RESERVATION = 2 + + # Must consume from a specific reservation. Must specify key value fields + # for specifying the reservations. + SPECIFIC_RESERVATION = 3 + end + end + + # Sets the scheduling options for an Instance. + # @!attribute [rw] on_host_maintenance + # @return [::Google::Cloud::BackupDR::V1::Scheduling::OnHostMaintenance] + # Optional. Defines the maintenance behavior for this instance. + # @!attribute [rw] automatic_restart + # @return [::Boolean] + # Optional. Specifies whether the instance should be automatically restarted + # if it is terminated by Compute Engine (not terminated by a user). + # @!attribute [rw] preemptible + # @return [::Boolean] + # Optional. Defines whether the instance is preemptible. + # @!attribute [rw] node_affinities + # @return [::Array<::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity>] + # Optional. A set of node affinity and anti-affinity configurations. + # Overrides reservationAffinity. + # @!attribute [rw] min_node_cpus + # @return [::Integer] + # Optional. The minimum number of virtual CPUs this instance will consume + # when running on a sole-tenant node. + # @!attribute [rw] provisioning_model + # @return [::Google::Cloud::BackupDR::V1::Scheduling::ProvisioningModel] + # Optional. Specifies the provisioning model of the instance. + # @!attribute [rw] instance_termination_action + # @return [::Google::Cloud::BackupDR::V1::Scheduling::InstanceTerminationAction] + # Optional. Specifies the termination action for the instance. + # @!attribute [rw] local_ssd_recovery_timeout + # @return [::Google::Cloud::BackupDR::V1::SchedulingDuration] + # Optional. Specifies the maximum amount of time a Local Ssd Vm should wait + # while recovery of the Local Ssd state is attempted. Its value should be in + # between 0 and 168 hours with hour granularity and the default value being 1 + # hour. + class Scheduling + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Node Affinity: the configuration of desired nodes onto which this Instance + # could be scheduled. + # @!attribute [rw] key + # @return [::String] + # Optional. Corresponds to the label key of Node resource. + # @!attribute [rw] operator + # @return [::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity::Operator] + # Optional. Defines the operation of node selection. + # @!attribute [rw] values + # @return [::Array<::String>] + # Optional. Corresponds to the label values of Node resource. + class NodeAffinity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the type of node selections. + module Operator + # Default value. This value is unused. + OPERATOR_UNSPECIFIED = 0 + + # Requires Compute Engine to seek for matched nodes. + IN = 1 + + # Requires Compute Engine to avoid certain nodes. + NOT_IN = 2 + end + end + + # Defines the maintenance behavior for this instance= + module OnHostMaintenance + # Default value. This value is unused. + ON_HOST_MAINTENANCE_UNSPECIFIED = 0 + + # Tells Compute Engine to terminate and (optionally) restart the instance + # away from the maintenance activity. + TERMINATE = 1 + + # Default, Allows Compute Engine to automatically migrate instances + # out of the way of maintenance events. + MIGRATE = 1000 + end + + # Defines the provisioning model for an instance. + module ProvisioningModel + # Default value. This value is not used. + PROVISIONING_MODEL_UNSPECIFIED = 0 + + # Standard provisioning with user controlled runtime, no discounts. + STANDARD = 1 + + # Heavily discounted, no guaranteed runtime. + SPOT = 2 + end + + # Defines the supported termination actions for an instance. + module InstanceTerminationAction + # Default value. This value is unused. + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0 + + # Delete the VM. + DELETE = 1 + + # Stop the VM without storing in-memory content. default action. + STOP = 2 + end + end + + # A SchedulingDuration represents a 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". Range is approximately 10,000 years. + # @!attribute [rw] seconds + # @return [::Integer] + # Optional. Span of time at a resolution of a second. + # @!attribute [rw] nanos + # @return [::Integer] + # Optional. Span of time that's a fraction of a second at nanosecond + # resolution. + class SchedulingDuration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A service account. + # @!attribute [rw] email + # @return [::String] + # Optional. Email address of the service account. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Optional. The list of scopes to be made available for this service account. + class ServiceAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of instance tags. + # @!attribute [rw] items + # @return [::Array<::String>] + # Optional. An array of tags. Each tag must be 1-63 characters long, and + # comply with RFC1035. + class Tags + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An instance-attached disk resource. + # @!attribute [rw] initialize_params + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::InitializeParams] + # Optional. Specifies the parameters to initialize this disk. + # @!attribute [rw] device_name + # @return [::String] + # Optional. This is used as an identifier for the disks. This is the unique + # name has to provided to modify disk parameters like disk_name and + # replica_zones (in case of RePDs) + # @!attribute [rw] kind + # @return [::String] + # Optional. Type of the resource. + # @!attribute [rw] disk_type_deprecated + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] + # Specifies the type of the disk. + # @!attribute [rw] mode + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskMode] + # Optional. The mode in which to attach this disk. + # @!attribute [rw] source + # @return [::String] + # Optional. Specifies a valid partial or full URL to an existing Persistent + # Disk resource. + # @!attribute [rw] index + # @return [::Integer] + # Optional. A zero-based index to this disk, where 0 is reserved for the + # boot disk. + # @!attribute [rw] boot + # @return [::Boolean] + # Optional. Indicates that this is a boot disk. The virtual machine will use + # the first partition of the disk for its root filesystem. + # @!attribute [rw] auto_delete + # @return [::Boolean] + # Optional. Specifies whether the disk will be auto-deleted when the instance + # is deleted (but not when the disk is detached from the instance). + # @!attribute [rw] license + # @return [::Array<::String>] + # Optional. Any valid publicly visible licenses. + # @!attribute [rw] disk_interface + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskInterface] + # Optional. Specifies the disk interface to use for attaching this disk. + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # Optional. A list of features to enable on the guest operating system. + # Applicable only for bootable images. + # @!attribute [rw] disk_encryption_key + # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] + # Optional. Encrypts or decrypts a disk using a customer-supplied + # encryption key. + # @!attribute [rw] disk_size_gb + # @return [::Integer] + # Optional. The size of the disk in GB. + # @!attribute [r] saved_state + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskSavedState] + # Optional. Output only. The state of the disk. + # @!attribute [r] disk_type + # @return [::String] + # Optional. Output only. The URI of the disk type resource. For example: + # projects/project/zones/zone/diskTypes/pd-standard or pd-ssd + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] + # Optional. Specifies the type of the disk. + class AttachedDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the parameters to initialize this disk. + # @!attribute [rw] disk_name + # @return [::String] + # Optional. Specifies the disk name. If not specified, the default is to + # use the name of the instance. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # Optional. URL of the zone where the disk should be created. + # Required for each regional disk associated with the instance. + class InitializeParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of the Disk Types. + module DiskType + # Default value, which is unused. + DISK_TYPE_UNSPECIFIED = 0 + + # A scratch disk type. + SCRATCH = 1 + + # A persistent disk type. + PERSISTENT = 2 + end + + # List of the Disk Modes. + module DiskMode + # Default value, which is unused. + DISK_MODE_UNSPECIFIED = 0 + + # Attaches this disk in read-write mode. Only one + # virtual machine at a time can be attached to a disk in read-write mode. + READ_WRITE = 1 + + # Attaches this disk in read-only mode. Multiple virtual machines can use + # a disk in read-only mode at a time. + READ_ONLY = 2 + + # The disk is locked for administrative reasons. Nobody else + # can use the disk. This mode is used (for example) when taking + # a snapshot of a disk to prevent mounting the disk while it is + # being snapshotted. + LOCKED = 3 + end + + # List of the Disk Interfaces. + module DiskInterface + # Default value, which is unused. + DISK_INTERFACE_UNSPECIFIED = 0 + + # SCSI Disk Interface. + SCSI = 1 + + # NVME Disk Interface. + NVME = 2 + + # NVDIMM Disk Interface. + NVDIMM = 3 + + # ISCSI Disk Interface. + ISCSI = 4 + end + + # List of the states of the Disk. + module DiskSavedState + # Default Disk state has not been preserved. + DISK_SAVED_STATE_UNSPECIFIED = 0 + + # Disk state has been preserved. + PRESERVED = 1 + end + end + + # Feature type of the Guest OS. + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::GuestOsFeature::FeatureType] + # The ID of a supported feature. + class GuestOsFeature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # List of the Feature Types. + module FeatureType + # Default value, which is unused. + FEATURE_TYPE_UNSPECIFIED = 0 + + # VIRTIO_SCSI_MULTIQUEUE feature type. + VIRTIO_SCSI_MULTIQUEUE = 1 + + # WINDOWS feature type. + WINDOWS = 2 + + # MULTI_IP_SUBNET feature type. + MULTI_IP_SUBNET = 3 + + # UEFI_COMPATIBLE feature type. + UEFI_COMPATIBLE = 4 + + # SECURE_BOOT feature type. + SECURE_BOOT = 5 + + # GVNIC feature type. + GVNIC = 6 + + # SEV_CAPABLE feature type. + SEV_CAPABLE = 7 + + # BARE_METAL_LINUX_COMPATIBLE feature type. + BARE_METAL_LINUX_COMPATIBLE = 8 + + # SUSPEND_RESUME_COMPATIBLE feature type. + SUSPEND_RESUME_COMPATIBLE = 9 + + # SEV_LIVE_MIGRATABLE feature type. + SEV_LIVE_MIGRATABLE = 10 + + # SEV_SNP_CAPABLE feature type. + SEV_SNP_CAPABLE = 11 + + # TDX_CAPABLE feature type. + TDX_CAPABLE = 12 + + # IDPF feature type. + IDPF = 13 + + # SEV_LIVE_MIGRATABLE_V2 feature type. + SEV_LIVE_MIGRATABLE_V2 = 14 + end + end + + # Specifies whether the virtual machine instance will be shut down on key + # revocation. It is currently used in instance, instance properties and GMI + # protos + module KeyRevocationActionType + # Default value. This value is unused. + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0 + + # Indicates user chose no operation. + NONE = 1 + + # Indicates user chose to opt for VM shutdown on key revocation. + STOP = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb new file mode 100644 index 000000000000..d6e8a8da44c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.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! + + +module Google + module Cloud + module BackupDR + module V1 + # DataSourceReference is a reference to a DataSource resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the DataSourceReference. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # @!attribute [r] data_source + # @return [::String] + # Output only. The resource name of the DataSource. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{dataSource} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataSourceReference was created. + # @!attribute [r] data_source_backup_config_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] + # Output only. The backup configuration state of the DataSource. + # @!attribute [r] data_source_backup_count + # @return [::Integer] + # Output only. Number of backups in the DataSource. + # @!attribute [r] data_source_backup_config_info + # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupConfigInfo] + # Output only. Information of backup configuration on the DataSource. + # @!attribute [r] data_source_gcp_resource_info + # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResourceInfo] + # Output only. The GCP resource that the DataSource is associated with. + # @!attribute [r] total_stored_bytes + # @return [::Integer] + # Output only. Total size of the storage used by all backup resources for the + # referenced datasource. + class DataSourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information of backup configuration on the DataSource. + # @!attribute [r] last_backup_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] + # Output only. The status of the last backup in this DataSource + # @!attribute [r] last_successful_backup_consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the last successful backup to this DataSource. + class DataSourceBackupConfigInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The GCP resource that the DataSource is associated with. + # @!attribute [r] gcp_resourcename + # @return [::String] + # Output only. The resource name of the GCP resource. + # Ex: projects/\\{project}/zones/\\{zone}/instances/\\{instance} + # @!attribute [r] type + # @return [::String] + # Output only. The type of the GCP resource. + # Ex: compute.googleapis.com/Instance + # @!attribute [r] location + # @return [::String] + # Output only. The location of the GCP resource. + # Ex: //"global"/"unspecified" + # @!attribute [r] cloud_sql_instance_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceReferenceProperties] + # Output only. The properties of the Cloud SQL instance. + class DataSourceGcpResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the GetDataSourceReference method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + class GetDataSourceReferenceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the ListDataSourceReferences method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataSourceReferences` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDataSourceReferences` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results listed in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. + # + # The following field and operator combinations are supported: + # + # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + # * data_source_gcp_resource_info.type with `=`, `!=` + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + class ListDataSourceReferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the ListDataSourceReferences method. + # @!attribute [rw] data_source_references + # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # The DataSourceReferences 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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataSourceReferencesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the FetchDataSourceReferencesForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + class FetchDataSourceReferencesForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchDataSourceReferencesForResourceType method. + # @!attribute [rw] data_source_references + # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # The DataSourceReferences 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 FetchDataSourceReferencesForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb new file mode 100644 index 000000000000..79acc54ee206 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb @@ -0,0 +1,309 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # Request for ListResourceBackupConfigs. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve resource backup + # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will use 100 as default. Maximum value is + # 500 and values above 500 will be coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListResourceBackupConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListResourceBackupConfigs. + # @!attribute [rw] resource_backup_configs + # @return [::Array<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # The list of ResourceBackupConfigs for the specified scope. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListResourceBackupConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ResourceBackupConfig represents a resource along with its backup + # configurations. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the ResourceBackupConfig. + # Format: + # projects/\\{project}/locations/\\{location}/resourceBackupConfigs/\\{uid} + # @!attribute [r] uid + # @return [::String] + # Output only. The unique identifier of the resource backup config. + # @!attribute [r] target_resource + # @return [::String] + # Output only. The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the cloud resource that this configuration applies to. Supported + # resource types are + # {::Google::Cloud::BackupDR::V1::ResourceBackupConfig::ResourceType ResourceBackupConfig.ResourceType}. + # @!attribute [r] target_resource_display_name + # @return [::String] + # Output only. The human friendly name of the target resource. + # @!attribute [r] target_resource_type + # @return [::Google::Cloud::BackupDR::V1::ResourceBackupConfig::ResourceType] + # Output only. The type of the target resource. + # @!attribute [rw] target_resource_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with the target resource. + # @!attribute [rw] backup_configs_details + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupConfigDetails>] + # Backup configurations applying to the target resource, including those + # targeting its related/child resources. For example, backup configuration + # applicable to Compute Engine disks will be populated in this field for a + # Compute Engine VM which has the disk associated. + # @!attribute [r] backup_configured + # @return [::Boolean] + # Output only. Whether the target resource is configured for backup. This is + # true if the backup_configs_details is not empty. + # @!attribute [r] vaulted + # @return [::Boolean] + # Output only. Whether the target resource is protected by a backup vault. + # This is true if the backup_configs_details is not empty and any of the + # {::Google::Cloud::BackupDR::V1::ResourceBackupConfig#backup_configs_details ResourceBackupConfig.backup_configs_details} + # has a backup configuration with + # {::Google::Cloud::BackupDR::V1::BackupConfigDetails#backup_vault BackupConfigDetails.backup_vault} + # set. set. + class ResourceBackupConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TargetResourceLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the cloud resource. + module ResourceType + # Resource type not set. + RESOURCE_TYPE_UNSPECIFIED = 0 + + # Cloud SQL instance. + CLOUD_SQL_INSTANCE = 1 + + # Compute Engine VM. + COMPUTE_ENGINE_VM = 2 + + # Compute Engine Disk. + COMPUTE_ENGINE_DISK = 3 + + # Compute Engine Regional Disk. + COMPUTE_ENGINE_REGIONAL_DISK = 4 + end + end + + # BackupConfigDetails has information about how the resource is configured + # for backups and about the most recent backup taken for this configuration. + # @!attribute [r] backup_config_source + # @return [::String] + # Output only. The full resource name of the backup config source resource. + # For example, + # "//backupdr.googleapis.com/v1/projects/\\{project}/locations/\\{region}/backupPlans/\\{backupplanId}" + # or + # "//compute.googleapis.com/projects/\\{project}/locations/\\{region}/resourcePolicies/\\{resourcePolicyId}". + # @!attribute [r] backup_config_source_display_name + # @return [::String] + # Output only. The display name of the backup config source resource. + # @!attribute [r] type + # @return [::Google::Cloud::BackupDR::V1::BackupConfigDetails::Type] + # Output only. The type of the backup config resource. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigDetails::State] + # Output only. The state of the backup config resource. + # @!attribute [r] pitr_settings + # @return [::Google::Cloud::BackupDR::V1::PitrSettings] + # Output only. Point in time recovery settings of the backup configuration + # resource. + # @!attribute [r] latest_successful_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the latest successful backup created via this + # backup configuration. + # @!attribute [r] applicable_resource + # @return [::String] + # Output only. The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the resource that is applicable for the backup configuration. Example: + # "//compute.googleapis.com/projects/\\{project}/zones/\\{zone}/instances/\\{instance}" + # @!attribute [r] backup_vault + # @return [::String] + # Output only. The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the backup vault that will store the backups generated through this + # backup configuration. Example: + # "//backupdr.googleapis.com/v1/projects/\\{project}/locations/\\{region}/backupVaults/\\{backupvaultId}" + # @!attribute [rw] backup_locations + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLocation>] + # The locations where the backups are to be stored. + # @!attribute [rw] backup_dr_plan_config + # @return [::Google::Cloud::BackupDR::V1::BackupDrPlanConfig] + # Google Cloud Backup and DR's Backup Plan specific data. + # + # Note: The following fields are mutually exclusive: `backup_dr_plan_config`, `backup_dr_template_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] backup_dr_template_config + # @return [::Google::Cloud::BackupDR::V1::BackupDrTemplateConfig] + # Google Cloud Backup and DR's Template specific data. + # + # Note: The following fields are mutually exclusive: `backup_dr_template_config`, `backup_dr_plan_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupConfigDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of the backup configuration. + # This enum may receive new values in the future. + module Type + # Backup config type is unspecified. + TYPE_UNSPECIFIED = 0 + + # Backup config is Cloud SQL instance's automated backup config. + CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1 + + # Backup config is Compute Engine Resource Policy. + COMPUTE_ENGINE_RESOURCE_POLICY = 2 + + # Backup config is Google Cloud Backup and DR's Backup Plan. + BACKUPDR_BACKUP_PLAN = 3 + + # Backup config is Google Cloud Backup and DR's Template. + BACKUPDR_TEMPLATE = 4 + end + + # The state tells whether the backup config is active or not. + module State + # Backup config state not set. + STATE_UNSPECIFIED = 0 + + # The config is in an active state protecting the resource + ACTIVE = 1 + + # The config is currently not protecting the resource. Either because it is + # disabled or the owning project has been deleted without cleanup of the + # actual resource. + INACTIVE = 2 + + # The config still exists but because of some error state it is not + # protecting the resource. Like the source project is deleted. For eg. + # PlanAssociation, BackupPlan is deleted. + ERROR = 3 + end + end + + # Point in time recovery settings of the backup configuration resource. + # @!attribute [r] retention_days + # @return [::Integer] + # Output only. Number of days to retain the backup. + class PitrSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides additional information about Google Cloud Backup + # and DR's Template backup configuration. + # @!attribute [r] first_party_management_uri + # @return [::String] + # Output only. The URI of the BackupDr template resource for the first party + # identity users. + # @!attribute [r] third_party_management_uri + # @return [::String] + # Output only. The URI of the BackupDr template resource for the third party + # identity users. + class BackupDrTemplateConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupDrPlanConfig has additional information about Google Cloud Backup and + # DR's Plan backup configuration. + # @!attribute [rw] backup_dr_plan_rules + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupDrPlanRule>] + # Backup rules of the backup plan resource. + class BackupDrPlanConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupDrPlanRule has rule specific information of the backup plan resource. + # @!attribute [r] rule_id + # @return [::String] + # Output only. Unique Id of the backup rule. + # @!attribute [r] last_successful_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the latest successful backup created via this + # backup rule. + class BackupDrPlanRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupLocation represents a cloud location where a backup can be stored. + # @!attribute [r] type + # @return [::Google::Cloud::BackupDR::V1::BackupLocation::Type] + # Output only. The type of the location. + # @!attribute [r] location_id + # @return [::String] + # Output only. The id of the cloud location. Example: "us-central1" + class BackupLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the location. + module Type + # Location type is unspecified. + TYPE_UNSPECIFIED = 0 + + # Location type is zonal. + ZONAL = 1 + + # Location type is regional. + REGIONAL = 2 + + # Location type is multi regional. + MULTI_REGIONAL = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..973211b9ffe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.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 Type + # Represents a day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/type/month.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb new file mode 100644 index 000000000000..3e27c902551d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.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 Type + # Represents a month in the Gregorian calendar. + module Month + # The unspecified month. + MONTH_UNSPECIFIED = 0 + + # The month of January. + JANUARY = 1 + + # The month of February. + FEBRUARY = 2 + + # The month of March. + MARCH = 3 + + # The month of April. + APRIL = 4 + + # The month of May. + MAY = 5 + + # The month of June. + JUNE = 6 + + # The month of July. + JULY = 7 + + # The month of August. + AUGUST = 8 + + # The month of September. + SEPTEMBER = 9 + + # The month of October. + OCTOBER = 10 + + # The month of November. + NOVEMBER = 11 + + # The month of December. + DECEMBER = 12 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile new file mode 100644 index 000000000000..4febd3ff4e67 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1", path: "../" +else + gem "google-cloud-backupdr-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-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb new file mode 100644 index 000000000000..2b79d9a8674f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_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 backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs. +# +def list_resource_backup_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new + + # Call the list_resource_backup_configs method. + result = client.list_resource_backup_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::BackupDR::V1::ResourceBackupConfig. + p item + end +end +# [END backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb new file mode 100644 index 000000000000..e5b889a4dfa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.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 backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan. +# +def create_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new + + # Call the create_backup_plan method. + result = client.create_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb new file mode 100644 index 000000000000..628c925da9e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.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 backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association. +# +def create_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + + # Call the create_backup_plan_association method. + result = client.create_backup_plan_association request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb new file mode 100644 index 000000000000..30f7bcaa3098 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.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 backupdr_v1_generated_BackupDR_CreateBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault. +# +def create_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new + + # Call the create_backup_vault method. + result = client.create_backup_vault request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb new file mode 100644 index 000000000000..8eb6c732f376 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.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 backupdr_v1_generated_BackupDR_CreateManagementServer_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_management_server call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server. +# +def create_management_server + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new + + # Call the create_management_server method. + result = client.create_management_server request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb new file mode 100644 index 000000000000..d920bccbb83b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_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 backupdr_v1_generated_BackupDR_DeleteBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup. +# +def delete_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new + + # Call the delete_backup method. + result = client.delete_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 backupdr_v1_generated_BackupDR_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb new file mode 100644 index 000000000000..a1585e7a803b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.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 backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan. +# +def delete_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new + + # Call the delete_backup_plan method. + result = client.delete_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb new file mode 100644 index 000000000000..68037dc3c1c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.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 backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association. +# +def delete_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new + + # Call the delete_backup_plan_association method. + result = client.delete_backup_plan_association request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb new file mode 100644 index 000000000000..bfc3d415812f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.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 backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault. +# +def delete_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new + + # Call the delete_backup_vault method. + result = client.delete_backup_vault request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb new file mode 100644 index 000000000000..6e0a6c8cea65 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.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 backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_management_server call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server. +# +def delete_management_server + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new + + # Call the delete_management_server method. + result = client.delete_management_server request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb new file mode 100644 index 000000000000..0caa4cac2125 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.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 backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type. +# +def fetch_backup_plan_associations_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + + # Call the fetch_backup_plan_associations_for_resource_type method. + result = client.fetch_backup_plan_associations_for_resource_type request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb new file mode 100644 index 000000000000..8cd5de148567 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.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 backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_backups_for_resource_type call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type. +# +def fetch_backups_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new + + # Call the fetch_backups_for_resource_type method. + result = client.fetch_backups_for_resource_type request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb new file mode 100644 index 000000000000..dfcab2575125 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.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 backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type. +# +def fetch_data_source_references_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + + # Call the fetch_data_source_references_for_resource_type method. + result = client.fetch_data_source_references_for_resource_type request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb new file mode 100644 index 000000000000..a69bc309bc34 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.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 backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_usable_backup_vaults call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults. +# +def fetch_usable_backup_vaults + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new + + # Call the fetch_usable_backup_vaults method. + result = client.fetch_usable_backup_vaults request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb new file mode 100644 index 000000000000..657958fff3c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/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 backupdr_v1_generated_BackupDR_GetBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup. +# +def get_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupRequest.new + + # Call the get_backup method. + result = client.get_backup request + + # The returned object is of type Google::Cloud::BackupDR::V1::Backup. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb new file mode 100644 index 000000000000..7f12d19c6466 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan. +# +def get_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new + + # Call the get_backup_plan method. + result = client.get_backup_plan request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb new file mode 100644 index 000000000000..95a3715c6d53 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association. +# +def get_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new + + # Call the get_backup_plan_association method. + result = client.get_backup_plan_association request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb new file mode 100644 index 000000000000..d9bdfc3ff576 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_plan_revision call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision. +# +def get_backup_plan_revision + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + + # Call the get_backup_plan_revision method. + result = client.get_backup_plan_revision request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb new file mode 100644 index 000000000000..b42028f7c351 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault. +# +def get_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new + + # Call the get_backup_vault method. + result = client.get_backup_vault request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb new file mode 100644 index 000000000000..d86a885d8a7f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetDataSource_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_data_source call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source. +# +def get_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new + + # Call the get_data_source method. + result = client.get_data_source request + + # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. + p result +end +# [END backupdr_v1_generated_BackupDR_GetDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb new file mode 100644 index 000000000000..789a665be9b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_data_source_reference call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference. +# +def get_data_source_reference + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + + # Call the get_data_source_reference method. + result = client.get_data_source_reference request + + # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + p result +end +# [END backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb new file mode 100644 index 000000000000..0ab70b155c06 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetManagementServer_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_management_server call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server. +# +def get_management_server + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new + + # Call the get_management_server method. + result = client.get_management_server request + + # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. + p result +end +# [END backupdr_v1_generated_BackupDR_GetManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb new file mode 100644 index 000000000000..1a6248e10433 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_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 backupdr_v1_generated_BackupDR_InitializeService_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the initialize_service call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service. +# +def initialize_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new + + # Call the initialize_service method. + result = client.initialize_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 backupdr_v1_generated_BackupDR_InitializeService_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb new file mode 100644 index 000000000000..1be14c9502b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.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 backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_plan_associations call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations. +# +def list_backup_plan_associations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new + + # Call the list_backup_plan_associations method. + result = client.list_backup_plan_associations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb new file mode 100644 index 000000000000..523bdada0405 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_plan_revisions call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions. +# +def list_backup_plan_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + + # Call the list_backup_plan_revisions method. + result = client.list_backup_plan_revisions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb new file mode 100644 index 000000000000..68a2931714bf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.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 backupdr_v1_generated_BackupDR_ListBackupPlans_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_plans call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans. +# +def list_backup_plans + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new + + # Call the list_backup_plans method. + result = client.list_backup_plans request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupPlans_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb new file mode 100644 index 000000000000..bd68d0f95f72 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.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 backupdr_v1_generated_BackupDR_ListBackupVaults_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_vaults call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults. +# +def list_backup_vaults + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new + + # Call the list_backup_vaults method. + result = client.list_backup_vaults request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb new file mode 100644 index 000000000000..865ebe38ae19 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/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 backupdr_v1_generated_BackupDR_ListBackups_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backups call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups. +# +def list_backups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::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::BackupDR::V1::Backup. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb new file mode 100644 index 000000000000..c0cbb790e2d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.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 backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_data_source_references call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references. +# +def list_data_source_references + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new + + # Call the list_data_source_references method. + result = client.list_data_source_references request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb new file mode 100644 index 000000000000..5607c9beb443 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListDataSources_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_data_sources call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources. +# +def list_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new + + # Call the list_data_sources method. + result = client.list_data_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListDataSources_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb new file mode 100644 index 000000000000..c026e846fb03 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.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 backupdr_v1_generated_BackupDR_ListManagementServers_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_management_servers call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers. +# +def list_management_servers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new + + # Call the list_management_servers method. + result = client.list_management_servers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListManagementServers_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb new file mode 100644 index 000000000000..0f57a119d916 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_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 backupdr_v1_generated_BackupDR_RestoreBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the restore_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup. +# +def restore_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new + + # Call the restore_backup method. + result = client.restore_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 backupdr_v1_generated_BackupDR_RestoreBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb new file mode 100644 index 000000000000..d5b2a0664bef --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_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 backupdr_v1_generated_BackupDR_TriggerBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the trigger_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup. +# +def trigger_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new + + # Call the trigger_backup method. + result = client.trigger_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 backupdr_v1_generated_BackupDR_TriggerBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb new file mode 100644 index 000000000000..90ba04ae397e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_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 backupdr_v1_generated_BackupDR_UpdateBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup. +# +def update_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new + + # Call the update_backup method. + result = client.update_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 backupdr_v1_generated_BackupDR_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb new file mode 100644 index 000000000000..f2bdd1d70e64 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.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 backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan. +# +def update_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + + # Call the update_backup_plan method. + result = client.update_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb new file mode 100644 index 000000000000..eaf3f010e273 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.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 backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association. +# +def update_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new + + # Call the update_backup_plan_association method. + result = client.update_backup_plan_association request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb new file mode 100644 index 000000000000..5b0d5a057c05 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.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 backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault. +# +def update_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new + + # Call the update_backup_vault method. + result = client.update_backup_vault request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb new file mode 100644 index 000000000000..1167757bc2d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_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 backupdr_v1_generated_BackupDR_UpdateDataSource_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_data_source call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source. +# +def update_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new + + # Call the update_data_source method. + result = client.update_data_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 backupdr_v1_generated_BackupDR_UpdateDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json new file mode 100644 index 000000000000..fa4385c64a8c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json @@ -0,0 +1,1535 @@ +{ + "client_library": { + "name": "google-cloud-backupdr-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.backupdr.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "backupdr_v1_generated_BackupDR_ListManagementServers_sync", + "title": "Snippet for the list_management_servers call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers.", + "file": "backupdr/list_management_servers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_management_servers", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListManagementServersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListManagementServersResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListManagementServers", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetManagementServer_sync", + "title": "Snippet for the get_management_server call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server.", + "file": "backupdr/get_management_server.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_management_server", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetManagementServerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ManagementServer", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetManagementServer", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateManagementServer_sync", + "title": "Snippet for the create_management_server call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server.", + "file": "backupdr/create_management_server.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_management_server", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateManagementServerRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateManagementServer", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_sync", + "title": "Snippet for the delete_management_server call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server.", + "file": "backupdr/delete_management_server.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_management_server", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteManagementServer", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupVault_sync", + "title": "Snippet for the create_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault.", + "file": "backupdr/create_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupVaults_sync", + "title": "Snippet for the list_backup_vaults call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults.", + "file": "backupdr/list_backup_vaults.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_vaults", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupVaults", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync", + "title": "Snippet for the fetch_usable_backup_vaults call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults.", + "file": "backupdr/fetch_usable_backup_vaults.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_usable_backup_vaults", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchUsableBackupVaults", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupVault_sync", + "title": "Snippet for the get_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault.", + "file": "backupdr/get_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupVault", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_sync", + "title": "Snippet for the update_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault.", + "file": "backupdr/update_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_sync", + "title": "Snippet for the delete_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault.", + "file": "backupdr/delete_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListDataSources_sync", + "title": "Snippet for the list_data_sources call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources.", + "file": "backupdr/list_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_sources", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourcesResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListDataSources", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetDataSource_sync", + "title": "Snippet for the get_data_source call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source.", + "file": "backupdr/get_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::DataSource", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetDataSource", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateDataSource_sync", + "title": "Snippet for the update_data_source call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source.", + "file": "backupdr/update_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_source", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateDataSource", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackups_sync", + "title": "Snippet for the list_backups call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups.", + "file": "backupdr/list_backups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backups", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackups", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync", + "title": "Snippet for the fetch_backups_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type.", + "file": "backupdr/fetch_backups_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_backups_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchBackupsForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupsForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackup_sync", + "title": "Snippet for the get_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup.", + "file": "backupdr/get_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::Backup", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackup_sync", + "title": "Snippet for the update_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup.", + "file": "backupdr/update_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackup_sync", + "title": "Snippet for the delete_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup.", + "file": "backupdr/delete_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_RestoreBackup_sync", + "title": "Snippet for the restore_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup.", + "file": "backupdr/restore_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "restore_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::RestoreBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "RestoreBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_sync", + "title": "Snippet for the create_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan.", + "file": "backupdr/create_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync", + "title": "Snippet for the update_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan.", + "file": "backupdr/update_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlan_sync", + "title": "Snippet for the get_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan.", + "file": "backupdr/get_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupPlan", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlans_sync", + "title": "Snippet for the list_backup_plans call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans.", + "file": "backupdr/list_backup_plans.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plans", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupPlansRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlansResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupPlans", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync", + "title": "Snippet for the delete_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan.", + "file": "backupdr/delete_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync", + "title": "Snippet for the get_backup_plan_revision call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision.", + "file": "backupdr/get_backup_plan_revision.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan_revision", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanRevision", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupPlanRevision", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanRevision", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync", + "title": "Snippet for the list_backup_plan_revisions call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions.", + "file": "backupdr/list_backup_plan_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plan_revisions", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupPlanRevisions", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanRevisions", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync", + "title": "Snippet for the create_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association.", + "file": "backupdr/create_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync", + "title": "Snippet for the update_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association.", + "file": "backupdr/update_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync", + "title": "Snippet for the get_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association.", + "file": "backupdr/get_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanAssociation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync", + "title": "Snippet for the list_backup_plan_associations call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations.", + "file": "backupdr/list_backup_plan_associations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plan_associations", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupPlanAssociations", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync", + "title": "Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type.", + "file": "backupdr/fetch_backup_plan_associations_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_backup_plan_associations_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchBackupPlanAssociationsForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupPlanAssociationsForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync", + "title": "Snippet for the delete_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association.", + "file": "backupdr/delete_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_TriggerBackup_sync", + "title": "Snippet for the trigger_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup.", + "file": "backupdr/trigger_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "trigger_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::TriggerBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "TriggerBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetDataSourceReference_sync", + "title": "Snippet for the get_data_source_reference call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference.", + "file": "backupdr/get_data_source_reference.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source_reference", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::DataSourceReference", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetDataSourceReference", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSourceReference", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync", + "title": "Snippet for the list_data_source_references call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references.", + "file": "backupdr/list_data_source_references.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_source_references", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListDataSourceReferences", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSourceReferences", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync", + "title": "Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type.", + "file": "backupdr/fetch_data_source_references_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_data_source_references_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchDataSourceReferencesForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchDataSourceReferencesForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_InitializeService_sync", + "title": "Snippet for the initialize_service call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service.", + "file": "backupdr/initialize_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "initialize_service", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::InitializeServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "InitializeService", + "full_name": "google.cloud.backupdr.v1.BackupDR.InitializeService", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync", + "title": "Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs.", + "file": "backup_dr_protection_summary/list_resource_backup_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_backup_configs", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse", + "client": { + "short_name": "BackupDrProtectionSummary::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client" + }, + "method": { + "short_name": "ListResourceBackupConfigs", + "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary.ListResourceBackupConfigs", + "service": { + "short_name": "BackupDrProtectionSummary", + "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary" + } + } + }, + "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-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb new file mode 100644 index 000000000000..9d979a3cfce6 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_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/backupdr/v1/backup_dr_protection_summary" + +class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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::BackupDR::V1::BackupDrProtectionSummary::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-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb new file mode 100644 index 000000000000..8ec42b655e04 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/backupdr/v1/protection_summary_pb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + + +class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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_resource_backup_configs + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.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_resource_backup_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::BackupDR::V1::BackupDrProtectionSummary::Rest::ServiceStub.stub :transcode_list_resource_backup_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_backup_configs_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_resource_backup_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_resource_backup_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_resource_backup_configs ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.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_resource_backup_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_resource_backup_configs(::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.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_resource_backup_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::BackupDR::V1::BackupDrProtectionSummary::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::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb new file mode 100644 index 000000000000..4558e7043ce9 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/backupdr/v1/protection_summary_pb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary" + +class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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_resource_backup_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_resource_backup_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_backup_configs, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, 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_resource_backup_configs_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_resource_backup_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_resource_backup_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_resource_backup_configs ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.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_resource_backup_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_resource_backup_configs(::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.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_resource_backup_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::BackupDR::V1::BackupDrProtectionSummary::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::BackupDR::V1::BackupDrProtectionSummary::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::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb new file mode 100644 index 000000000000..afa3cdaab7ae --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_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/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr_services_pb" +require "google/cloud/backupdr/v1/backupdr" + +class ::Google::Cloud::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb new file mode 100644 index 000000000000..5c155040928d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_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/backupdr/v1/backupdr" + +class ::Google::Cloud::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3", backup: "value4" + assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3/backups/value4", path + end + end + + def test_backup_plan_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_path project: "value0", location: "value1", backup_plan: "value2" + assert_equal "projects/value0/locations/value1/backupPlans/value2", path + end + end + + def test_backup_plan_association_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_association_path project: "value0", location: "value1", backup_plan_association: "value2" + assert_equal "projects/value0/locations/value1/backupPlanAssociations/value2", path + end + end + + def test_backup_plan_revision_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_revision_path project: "value0", location: "value1", backup_plan: "value2", revision: "value3" + assert_equal "projects/value0/locations/value1/backupPlans/value2/revisions/value3", path + end + end + + def test_backup_vault_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_vault_path project: "value0", location: "value1", backupvault: "value2" + assert_equal "projects/value0/locations/value1/backupVaults/value2", path + end + end + + def test_cluster_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cluster_path project: "value0", location: "value1", cluster: "value2" + assert_equal "projects/value0/locations/value1/clusters/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::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", ring: "value2", 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::BackupDR::V1::BackupDR::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_data_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3" + assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3", path + end + end + + def test_data_source_reference_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_reference_path project: "value0", location: "value1", data_source_reference: "value2" + assert_equal "projects/value0/locations/value1/dataSourceReferences/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::BackupDR::V1::BackupDR::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_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::BackupDR::V1::BackupDR::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_management_server_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.management_server_path project: "value0", location: "value1", managementserver: "value2" + assert_equal "projects/value0/locations/value1/managementServers/value2", path + end + end + + def test_storage_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::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.storage_pool_path project: "value0", zone: "value1", storage_pool: "value2" + assert_equal "projects/value0/zones/value1/storagePools/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb new file mode 100644 index 000000000000..24065daa0da5 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb @@ -0,0 +1,2196 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr/rest" + + +class ::Google::Cloud::BackupDR::V1::BackupDR::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_management_servers + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.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_management_servers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_management_servers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_management_servers_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_management_servers({ 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_management_servers 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_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.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_management_servers({ 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_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.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_management_servers_client_stub.call_count + end + end + end + + def test_get_management_server + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ManagementServer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_management_server_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_management_server_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_management_server({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_management_server name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_management_server({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_management_server_client_stub.call_count + end + end + end + + def test_create_management_server + # Create test objects. + 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" + management_server_id = "hello world" + management_server = {} + request_id = "hello world" + + create_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_management_server_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_management_server_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_management_server_client_stub.call_count + end + end + end + + def test_delete_management_server + # Create test objects. + 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_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_management_server_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_management_server_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_management_server({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_management_server name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.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_management_server({ 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_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.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_management_server_client_stub.call_count + end + end + end + + def test_create_backup_vault + # Create test objects. + 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_vault_id = "hello world" + backup_vault = {} + request_id = "hello world" + validate_only = true + + create_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_vault_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_vault_client_stub.call_count + end + end + end + + def test_list_backup_vaults + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.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" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + list_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_vaults_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_vaults_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_vaults_client_stub.call_count + end + end + end + + def test_fetch_usable_backup_vaults + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.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" + + fetch_usable_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_usable_backup_vaults_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_usable_backup_vaults_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_usable_backup_vaults({ 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.fetch_usable_backup_vaults 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.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.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.fetch_usable_backup_vaults({ 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.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.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, fetch_usable_backup_vaults_client_stub.call_count + end + end + end + + def test_get_backup_vault + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupVault.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + get_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_vault_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_backup_vault({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_backup_vault name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_backup_vault({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_vault_client_stub.call_count + end + end + end + + def test_update_backup_vault + # Create test objects. + 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 = {} + backup_vault = {} + request_id = "hello world" + validate_only = true + force = true + force_update_access_restriction = true + + update_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_vault_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_vault_client_stub.call_count + end + end + end + + def test_delete_backup_vault + # Create test objects. + 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 + etag = "hello world" + validate_only = true + allow_missing = true + ignore_backup_plan_references = true + + delete_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_vault_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_vault_client_stub.call_count + end + end + end + + def test_list_data_sources + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_data_sources({ 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_data_sources 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_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_count + end + end + end + + def test_get_data_source + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_count + end + end + end + + def test_update_data_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. + update_mask = {} + data_source = {} + request_id = "hello world" + allow_missing = true + + update_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_source_client_stub.call_count + end + end + end + + def test_list_backups + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.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" + view = :BACKUP_VIEW_UNSPECIFIED + + 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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), 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_fetch_backups_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + fetch_backups_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backups_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_backups_for_resource_type_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_backups_for_resource_type_client_stub.call_count + end + end + end + + def test_get_backup + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::Backup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + 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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_backup({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_backup name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_backup({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_count + end + end + end + + def test_update_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. + update_mask = {} + backup = {} + request_id = "hello world" + + 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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_backup update_mask: update_mask, backup: backup, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id), 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::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_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_backup({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_backup name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.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_backup({ 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_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.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_backup_client_stub.call_count + end + end + end + + def test_restore_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. + name = "hello world" + request_id = "hello world" + compute_instance_target_environment = {} + compute_instance_restore_properties = {} + clear_overrides_field_mask = {} + + restore_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_restore_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restore_backup_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restore_backup_client_stub.call_count + end + end + end + + def test_create_backup_plan + # Create test objects. + 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_plan_id = "hello world" + backup_plan = {} + request_id = "hello world" + + create_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_plan_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_plan_client_stub.call_count + end + end + end + + def test_update_backup_plan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup_plan = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_plan_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan({ backup_plan: backup_plan, 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_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan_client_stub.call_count + end + end + end + + def test_get_backup_plan + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupPlan.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_backup_plan({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_backup_plan name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_backup_plan({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_backup_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_client_stub.call_count + end + end + end + + def test_list_backup_plans + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.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_backup_plans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plans_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plans_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_backup_plans({ 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_backup_plans 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_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.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_backup_plans({ 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_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.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_backup_plans_client_stub.call_count + end + end + end + + def test_delete_backup_plan + # Create test objects. + 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_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_plan_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_backup_plan({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_backup_plan name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.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_backup_plan({ 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_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.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_backup_plan_client_stub.call_count + end + end + end + + def test_get_backup_plan_revision + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_revision_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_revision_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_backup_plan_revision({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_backup_plan_revision name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_backup_plan_revision({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_revision_client_stub.call_count + end + end + end + + def test_list_backup_plan_revisions + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.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_plan_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plan_revisions_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_backup_plan_revisions({ 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_plan_revisions 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_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.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_plan_revisions({ 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_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.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_plan_revisions_client_stub.call_count + end + end + end + + def test_create_backup_plan_association + # Create test objects. + 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_plan_association_id = "hello world" + backup_plan_association = {} + request_id = "hello world" + + create_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_plan_association_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_plan_association_client_stub.call_count + end + end + end + + def test_update_backup_plan_association + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup_plan_association = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_plan_association_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, 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_backup_plan_association({ backup_plan_association: backup_plan_association, 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_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, 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_backup_plan_association_client_stub.call_count + end + end + end + + def test_get_backup_plan_association + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_association_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_backup_plan_association({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_backup_plan_association name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_backup_plan_association({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_backup_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_association_client_stub.call_count + end + end + end + + def test_list_backup_plan_associations + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.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_backup_plan_associations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_associations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plan_associations_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_backup_plan_associations({ 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_backup_plan_associations 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_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.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_backup_plan_associations({ 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_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.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_backup_plan_associations_client_stub.call_count + end + end + end + + def test_fetch_backup_plan_associations_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backup_plan_associations_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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, fetch_backup_plan_associations_for_resource_type_client_stub.call_count + end + end + end + + def test_delete_backup_plan_association + # Create test objects. + 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_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_plan_association_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_backup_plan_association({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_backup_plan_association name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.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_backup_plan_association({ 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_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.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_backup_plan_association_client_stub.call_count + end + end + end + + def test_trigger_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. + name = "hello world" + rule_id = "hello world" + request_id = "hello world" + + trigger_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_trigger_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, trigger_backup_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.trigger_backup name: name, rule_id: rule_id, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, trigger_backup_client_stub.call_count + end + end + end + + def test_get_data_source_reference + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::DataSourceReference.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_reference_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_reference_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_reference_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_data_source_reference({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_data_source_reference name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_data_source_reference({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_reference_client_stub.call_count + end + end + end + + def test_list_data_source_references + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.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_data_source_references_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_source_references_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_source_references_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_data_source_references({ 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_data_source_references 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_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.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_data_source_references({ 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_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.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_data_source_references_client_stub.call_count + end + end + end + + def test_fetch_data_source_references_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_data_source_references_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_data_source_references_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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, fetch_data_source_references_for_resource_type_client_stub.call_count + end + end + end + + def test_initialize_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" + resource_type = "hello world" + request_id = "hello world" + cloud_sql_instance_initialization_config = {} + + initialize_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_initialize_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, initialize_service_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, initialize_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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb new file mode 100644 index 000000000000..15150c279ece --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb @@ -0,0 +1,2613 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr" + +class ::Google::Cloud::BackupDR::V1::BackupDR::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_management_servers + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_management_servers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_management_servers, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, 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 request.has_filter? + assert_equal "hello world", request["order_by"] + assert request.has_order_by? + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_management_servers_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_management_servers({ 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_management_servers 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_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.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_management_servers({ 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_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.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_management_servers_client_stub.call_rpc_count + end + end + + def test_get_management_server + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ManagementServer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_management_server, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_management_server_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_management_server({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_management_server name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_management_server({ 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_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(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_management_server_client_stub.call_rpc_count + end + end + + def test_create_management_server + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + management_server_id = "hello world" + management_server = {} + request_id = "hello world" + + create_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_management_server, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["management_server_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ManagementServer), request["management_server"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_management_server_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, 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_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, 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_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, 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_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, 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_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, 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_management_server_client_stub.call_rpc_count + end + end + + def test_delete_management_server + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_management_server, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_management_server_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_management_server({ 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_management_server 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_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.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_management_server({ 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_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.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_management_server_client_stub.call_rpc_count + end + end + + def test_create_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_vault_id = "hello world" + backup_vault = {} + request_id = "hello world" + validate_only = true + + create_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_vault_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_vault_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_backup_vault_client_stub.call_rpc_count + end + end + + def test_list_backup_vaults + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + list_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_vaults, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_vaults_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backup_vaults_client_stub.call_rpc_count + end + end + + def test_fetch_usable_backup_vaults + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + fetch_usable_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_usable_backup_vaults, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, 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, fetch_usable_backup_vaults_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_usable_backup_vaults({ 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.fetch_usable_backup_vaults 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.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.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.fetch_usable_backup_vaults({ 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.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.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, fetch_usable_backup_vaults_client_stub.call_rpc_count + end + end + + def test_get_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupVault.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + get_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, request + assert_equal "hello world", request["name"] + assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_vault_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_backup_vault({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_backup_vault name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_backup_vault({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_vault_client_stub.call_rpc_count + end + end + + def test_update_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + backup_vault = {} + request_id = "hello world" + validate_only = true + force = true + force_update_access_restriction = true + + update_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal true, request["force"] + assert_equal true, request["force_update_access_restriction"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_vault_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |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_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |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_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |response, operation| + 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_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, grpc_options) do |response, operation| + 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_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), grpc_options) do |response, operation| + assert_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_backup_vault_client_stub.call_rpc_count + end + end + + def test_delete_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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 + etag = "hello world" + validate_only = true + allow_missing = true + ignore_backup_plan_references = true + + delete_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["force"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + assert_equal true, request["ignore_backup_plan_references"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_vault_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |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_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |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_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |response, operation| + 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_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, grpc_options) do |response, operation| + 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_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), grpc_options) do |response, operation| + assert_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_backup_vault_client_stub.call_rpc_count + end + end + + def test_list_data_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_sources, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, 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_data_sources_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_data_sources({ 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_data_sources 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_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_rpc_count + end + end + + def test_get_data_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::DataSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_rpc_count + end + end + + def test_update_data_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. + update_mask = {} + data_source = {} + request_id = "hello world" + allow_missing = true + + update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_source, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::DataSource), request["data_source"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_source_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, 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.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, 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.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, 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.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, 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.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, 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, update_data_source_client_stub.call_rpc_count + end + end + + def test_list_backups + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backups, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backups_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups_client_stub.call_rpc_count + end + end + + def test_fetch_backups_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + fetch_backups_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_backups_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_backups_for_resource_type_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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, fetch_backups_for_resource_type_client_stub.call_rpc_count + end + end + + def test_get_backup + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::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" + view = :BACKUP_VIEW_UNSPECIFIED + + get_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_backup({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_backup name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_backup({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_rpc_count + end + end + + def test_update_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. + update_mask = {} + backup = {} + request_id = "hello world" + + update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::Backup), request["backup"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_backup({ update_mask: update_mask, backup: backup, 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_backup update_mask: update_mask, backup: backup, 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_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, 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_backup({ update_mask: update_mask, backup: backup, 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_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, 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_backup_client_stub.call_rpc_count + end + end + + def test_delete_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. + name = "hello world" + request_id = "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::BackupDR::V1::DeleteBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_backup({ 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_backup 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_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.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_backup({ 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_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.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_backup_client_stub.call_rpc_count + end + end + + def test_restore_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. + name = "hello world" + request_id = "hello world" + compute_instance_target_environment = {} + compute_instance_restore_properties = {} + clear_overrides_field_mask = {} + + restore_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restore_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment), request["compute_instance_target_environment"] + assert_equal :compute_instance_target_environment, request.target_environment + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties), request["compute_instance_restore_properties"] + assert_equal :compute_instance_restore_properties, request.instance_properties + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["clear_overrides_field_mask"] + assert request.has_clear_overrides_field_mask? + refute_nil options + end + + Gapic::ServiceStub.stub :new, restore_backup_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_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.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_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.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_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.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_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.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_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, restore_backup_client_stub.call_rpc_count + end + end + + def test_create_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_plan_id = "hello world" + backup_plan = {} + request_id = "hello world" + + create_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_plan_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_plan_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, 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_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, 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_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, 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_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, 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_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, 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_backup_plan_client_stub.call_rpc_count + end + end + + def test_update_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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_plan = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] + 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_backup_plan_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_backup_plan({ backup_plan: backup_plan, 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_backup_plan backup_plan: backup_plan, 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_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan({ backup_plan: backup_plan, 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_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan_client_stub.call_rpc_count + end + end + + def test_get_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlan.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_backup_plan({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_backup_plan name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.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_plan({ 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_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(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_plan_client_stub.call_rpc_count + end + end + + def test_list_backup_plans + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_plans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plans, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, 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_backup_plans_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_backup_plans({ 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_backup_plans 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_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.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_backup_plans({ 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_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.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_backup_plans_client_stub.call_rpc_count + end + end + + def test_delete_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_plan_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_backup_plan({ 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_backup_plan 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_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.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_backup_plan({ 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_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.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_backup_plan_client_stub.call_rpc_count + end + end + + def test_get_backup_plan_revision + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_plan_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan_revision, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_revision_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_backup_plan_revision({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_backup_plan_revision name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.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_plan_revision({ 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_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(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_plan_revision_client_stub.call_rpc_count + end + end + + def test_list_backup_plan_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_plan_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plan_revisions, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, 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_plan_revisions_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: 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_plan_revisions parent: parent, page_size: page_size, page_token: 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_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.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_plan_revisions({ 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_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.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_plan_revisions_client_stub.call_rpc_count + end + end + + def test_create_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_plan_association_id = "hello world" + backup_plan_association = {} + request_id = "hello world" + + create_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_plan_association_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_plan_association_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, 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_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, 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_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, 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_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, 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_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, 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_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_update_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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_plan_association = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] + 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_backup_plan_association_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_backup_plan_association({ backup_plan_association: backup_plan_association, 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_backup_plan_association backup_plan_association: backup_plan_association, 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_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, 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_backup_plan_association({ backup_plan_association: backup_plan_association, 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_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, 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_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_get_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_association_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_backup_plan_association({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_backup_plan_association name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.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_plan_association({ 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_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(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_plan_association_client_stub.call_rpc_count + end + end + + def test_list_backup_plan_associations + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_plan_associations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plan_associations, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, 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_backup_plan_associations_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_backup_plan_associations({ 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_backup_plan_associations 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_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.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_backup_plan_associations({ 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_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.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_backup_plan_associations_client_stub.call_rpc_count + end + end + + def test_fetch_backup_plan_associations_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_backup_plan_associations_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + 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, fetch_backup_plan_associations_for_resource_type_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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, fetch_backup_plan_associations_for_resource_type_client_stub.call_rpc_count + end + end + + def test_delete_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_plan_association_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_backup_plan_association({ 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_backup_plan_association 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_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.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_backup_plan_association({ 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_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.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_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_trigger_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. + name = "hello world" + rule_id = "hello world" + request_id = "hello world" + + trigger_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :trigger_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["rule_id"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, trigger_backup_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.trigger_backup({ name: name, rule_id: rule_id, 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.trigger_backup name: name, rule_id: rule_id, 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.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, 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.trigger_backup({ name: name, rule_id: rule_id, 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.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, 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, trigger_backup_client_stub.call_rpc_count + end + end + + def test_get_data_source_reference + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::DataSourceReference.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_reference_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source_reference, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_reference_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_data_source_reference({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_data_source_reference name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_data_source_reference({ 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_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_source_reference_client_stub.call_rpc_count + end + end + + def test_list_data_source_references + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_data_source_references_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_source_references, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, 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_data_source_references_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_data_source_references({ 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_data_source_references 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_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.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_data_source_references({ 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_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.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_data_source_references_client_stub.call_rpc_count + end + end + + def test_fetch_data_source_references_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_data_source_references_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_data_source_references_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + 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, fetch_data_source_references_for_resource_type_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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, fetch_data_source_references_for_resource_type_client_stub.call_rpc_count + end + end + + def test_initialize_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" + resource_type = "hello world" + request_id = "hello world" + cloud_sql_instance_initialization_config = {} + + initialize_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :initialize_service, name + assert_kind_of ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["resource_type"] + assert_equal "hello world", request["request_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig), request["cloud_sql_instance_initialization_config"] + assert_equal :cloud_sql_instance_initialization_config, request.initialization_config + refute_nil options + end + + Gapic::ServiceStub.stub :new, initialize_service_client_stub do + # Create client + c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_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.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_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.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_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.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_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.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_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, initialize_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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-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-bare_metal_solution-v2/.gitignore b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json new file mode 100644 index 000000000000..484136c8a856 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "baremetalsolution.googleapis.com", + "api_shortname": "baremetalsolution", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bare_metal_solution-v2/latest", + "distribution_name": "google-cloud-bare_metal_solution-v2", + "is_cloud": true, + "language": "ruby", + "name": "baremetalsolution", + "name_pretty": "Bare Metal Solution V2 API", + "product_documentation": "https://cloud.google.com/bare-metal/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. Note that google-cloud-bare_metal_solution-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bare_metal_solution instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/bare-metal/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml new file mode 100644 index 000000000000..1d57d709ce5b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bare_metal_solution-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-bare_metal_solution-v2.rb" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/.yardopts b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts new file mode 100644 index 000000000000..54f5b5f1015c --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Bare Metal Solution 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-bare_metal_solution-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..ae79d1ebde45 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bare_metal_solution-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-bare_metal_solution-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/bare_metal_solution/v2" + +client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bare_metal_solution/v2" + +::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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-bare_metal_solution-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/bare_metal_solution/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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-bare_metal_solution-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/LICENSE.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/README.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md new file mode 100644 index 000000000000..fa9b1e1fa20c --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Bare Metal Solution V2 API + +Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center. + +Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Bare Metal Solution V2 API. Most users should consider using +the main client gem, +[google-cloud-bare_metal_solution](https://rubygems.org/gems/google-cloud-bare_metal_solution). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bare_metal_solution-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/baremetalsolution.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bare_metal_solution/v2" + +client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new +request = ::Google::Cloud::BareMetalSolution::V2::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-bare_metal_solution-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bare-metal/) +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/bare_metal_solution/v2" +require "logger" + +client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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-bare_metal_solution`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bare_metal_solution-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-bare_metal_solution`. +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-bare_metal_solution-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-bare_metal_solution-v2/Rakefile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile new file mode 100644 index 000000000000..c38c913d0c54 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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-bare_metal_solution-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-bare_metal_solution-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-bare_metal_solution-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-bare_metal_solution-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bare_metal_solution-v2" + header "google-cloud-bare_metal_solution-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bare_metal_solution-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bare_metal_solution-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-bare_metal_solution-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-bare_metal_solution-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-bare_metal_solution-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json new file mode 100644 index 000000000000..7c860b1ff908 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json @@ -0,0 +1,238 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.baremetalsolution.v2", + "libraryPackage": "::Google::Cloud::BareMetalSolution::V2", + "services": { + "BareMetalSolution": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client", + "rpcs": { + "ListInstances": { + "methods": [ + "list_instances" + ] + }, + "GetInstance": { + "methods": [ + "get_instance" + ] + }, + "UpdateInstance": { + "methods": [ + "update_instance" + ] + }, + "RenameInstance": { + "methods": [ + "rename_instance" + ] + }, + "ResetInstance": { + "methods": [ + "reset_instance" + ] + }, + "StartInstance": { + "methods": [ + "start_instance" + ] + }, + "StopInstance": { + "methods": [ + "stop_instance" + ] + }, + "EnableInteractiveSerialConsole": { + "methods": [ + "enable_interactive_serial_console" + ] + }, + "DisableInteractiveSerialConsole": { + "methods": [ + "disable_interactive_serial_console" + ] + }, + "DetachLun": { + "methods": [ + "detach_lun" + ] + }, + "ListSSHKeys": { + "methods": [ + "list_ssh_keys" + ] + }, + "CreateSSHKey": { + "methods": [ + "create_ssh_key" + ] + }, + "DeleteSSHKey": { + "methods": [ + "delete_ssh_key" + ] + }, + "ListVolumes": { + "methods": [ + "list_volumes" + ] + }, + "GetVolume": { + "methods": [ + "get_volume" + ] + }, + "UpdateVolume": { + "methods": [ + "update_volume" + ] + }, + "RenameVolume": { + "methods": [ + "rename_volume" + ] + }, + "EvictVolume": { + "methods": [ + "evict_volume" + ] + }, + "ResizeVolume": { + "methods": [ + "resize_volume" + ] + }, + "ListNetworks": { + "methods": [ + "list_networks" + ] + }, + "ListNetworkUsage": { + "methods": [ + "list_network_usage" + ] + }, + "GetNetwork": { + "methods": [ + "get_network" + ] + }, + "UpdateNetwork": { + "methods": [ + "update_network" + ] + }, + "CreateVolumeSnapshot": { + "methods": [ + "create_volume_snapshot" + ] + }, + "RestoreVolumeSnapshot": { + "methods": [ + "restore_volume_snapshot" + ] + }, + "DeleteVolumeSnapshot": { + "methods": [ + "delete_volume_snapshot" + ] + }, + "GetVolumeSnapshot": { + "methods": [ + "get_volume_snapshot" + ] + }, + "ListVolumeSnapshots": { + "methods": [ + "list_volume_snapshots" + ] + }, + "GetLun": { + "methods": [ + "get_lun" + ] + }, + "ListLuns": { + "methods": [ + "list_luns" + ] + }, + "EvictLun": { + "methods": [ + "evict_lun" + ] + }, + "GetNfsShare": { + "methods": [ + "get_nfs_share" + ] + }, + "ListNfsShares": { + "methods": [ + "list_nfs_shares" + ] + }, + "UpdateNfsShare": { + "methods": [ + "update_nfs_share" + ] + }, + "CreateNfsShare": { + "methods": [ + "create_nfs_share" + ] + }, + "RenameNfsShare": { + "methods": [ + "rename_nfs_share" + ] + }, + "DeleteNfsShare": { + "methods": [ + "delete_nfs_share" + ] + }, + "ListProvisioningQuotas": { + "methods": [ + "list_provisioning_quotas" + ] + }, + "SubmitProvisioningConfig": { + "methods": [ + "submit_provisioning_config" + ] + }, + "GetProvisioningConfig": { + "methods": [ + "get_provisioning_config" + ] + }, + "CreateProvisioningConfig": { + "methods": [ + "create_provisioning_config" + ] + }, + "UpdateProvisioningConfig": { + "methods": [ + "update_provisioning_config" + ] + }, + "RenameNetwork": { + "methods": [ + "rename_network" + ] + }, + "ListOSImages": { + "methods": [ + "list_os_images" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec b/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec new file mode 100644 index 000000000000..33c47faab427 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bare_metal_solution/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bare_metal_solution-v2" + gem.version = Google::Cloud::BareMetalSolution::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. Note that google-cloud-bare_metal_solution-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bare_metal_solution instead. See the readme for more details." + gem.summary = "Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data 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 "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb new file mode 100644 index 000000000000..e3cbed72515b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-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/bare_metal_solution/v2" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb new file mode 100644 index 000000000000..4decd222cabc --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/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/bare_metal_solution/v2/bare_metal_solution" +require "google/cloud/bare_metal_solution/v2/version" + +module Google + module Cloud + module BareMetalSolution + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bare_metal_solution/v2" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bare_metal_solution/v2" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + module V2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/bare_metal_solution/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb new file mode 100644 index 000000000000..0ef9b283c295 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bare_metal_solution/v2/version" + +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/paths" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/operations" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/client" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" + +module Google + module Cloud + module BareMetalSolution + module V2 + ## + # Performs management operations on Bare Metal Solution servers. + # + # The `baremetalsolution.googleapis.com` service provides management + # capabilities for Bare Metal Solution servers. To access the API methods, you + # must assign Bare Metal Solution IAM roles containing the desired permissions + # to your staff in your Google Cloud project. You must also enable the Bare + # Metal Solution API. Once enabled, the methods act + # upon specific servers in your Bare Metal Solution environment. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bare_metal_solution/v2/bare_metal_solution" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + module BareMetalSolution + end + end + end + end +end + +helper_path = ::File.join __dir__, "bare_metal_solution", "helpers.rb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb new file mode 100644 index 000000000000..e8a36e013d7a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb @@ -0,0 +1,4838 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/baremetalsolution/v2/baremetalsolution_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + ## + # Client for the BareMetalSolution service. + # + # Performs management operations on Bare Metal Solution servers. + # + # The `baremetalsolution.googleapis.com` service provides management + # capabilities for Bare Metal Solution servers. To access the API methods, you + # must assign Bare Metal Solution IAM roles containing the desired permissions + # to your staff in your Google Cloud project. You must also enable the Bare + # Metal Solution API. Once enabled, the methods act + # upon specific servers in your Bare Metal Solution environment. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :bare_metal_solution_stub + + ## + # Configure the BareMetalSolution Client class. + # + # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BareMetalSolution clients + # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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", "BareMetalSolution", "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.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BareMetalSolution 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::BareMetalSolution::V2::BareMetalSolution::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 + @bare_metal_solution_stub.universe_domain + end + + ## + # Create a new BareMetalSolution client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BareMetalSolution 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/baremetalsolution/v2/baremetalsolution_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 + + @bare_metal_solution_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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 + ) + + @bare_metal_solution_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 = @bare_metal_solution_stub.endpoint + config.universe_domain = @bare_metal_solution_stub.universe_domain + config.logger = @bare_metal_solution_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 = @bare_metal_solution_stub.endpoint + config.universe_domain = @bare_metal_solution_stub.universe_domain + config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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 + @bare_metal_solution_stub.logger + end + + # Service calls + + ## + # List servers 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::BareMetalSolution::V2::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::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) + # 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] + # Requested page size. Server may return fewer items than requested. + # If unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::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_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 + + @bare_metal_solution_stub.call_rpc :list_instances, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_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 + + ## + # Get details about a single server. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::Instance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::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_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 + + @bare_metal_solution_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 + + ## + # Update details of a single server. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::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, update_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::BareMetalSolution::V2::Instance, ::Hash] + # Required. The server to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The currently supported fields are: + # `labels` + # `hyperthreading_enabled` + # `os_image` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.instance&.name + 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 + + @bare_metal_solution_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 + + ## + # RenameInstance sets a new name for an instance. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_instance(request, options = nil) + # Pass arguments to `rename_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rename_instance(name: nil, new_instance_id: nil) + # Pass arguments to `rename_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` field is used to identify the instance. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param new_instance_id [::String] + # Required. The new `id` of the instance. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Instance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new + # + # # Call the rename_instance method. + # result = client.rename_instance request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. + # p result + # + def rename_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rename_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::BareMetalSolution::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.rename_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rename_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :rename_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 + + ## + # Perform an ungraceful, hard reset on a server. Equivalent to shutting the + # power off and then turning it back on. + # + # @overload reset_instance(request, options = nil) + # Pass arguments to `reset_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload reset_instance(name: nil) + # Pass arguments to `reset_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 [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new + # + # # Call the reset_instance method. + # result = client.reset_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 reset_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.reset_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::BareMetalSolution::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.reset_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.reset_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :reset_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 + + ## + # Starts a server that was shutdown. + # + # @overload start_instance(request, options = nil) + # Pass arguments to `start_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(name: nil) + # Pass arguments to `start_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 [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new + # + # # Call the start_instance method. + # result = client.start_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 start_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest + + # Converts hash and nil to 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_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::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :start_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 + + ## + # Stop a running server. + # + # @overload stop_instance(request, options = nil) + # Pass arguments to `stop_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload stop_instance(name: nil) + # Pass arguments to `stop_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 [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new + # + # # Call the stop_instance method. + # result = client.stop_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 stop_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.stop_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::BareMetalSolution::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.stop_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stop_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :stop_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 + + ## + # Enable the interactive serial console feature on an instance. + # + # @overload enable_interactive_serial_console(request, options = nil) + # Pass arguments to `enable_interactive_serial_console` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_interactive_serial_console(name: nil) + # Pass arguments to `enable_interactive_serial_console` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new + # + # # Call the enable_interactive_serial_console method. + # result = client.enable_interactive_serial_console request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_interactive_serial_console request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest + + # Converts hash and nil to 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_interactive_serial_console.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.enable_interactive_serial_console.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_interactive_serial_console.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :enable_interactive_serial_console, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 the interactive serial console feature on an instance. + # + # @overload disable_interactive_serial_console(request, options = nil) + # Pass arguments to `disable_interactive_serial_console` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_interactive_serial_console(name: nil) + # Pass arguments to `disable_interactive_serial_console` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new + # + # # Call the disable_interactive_serial_console method. + # result = client.disable_interactive_serial_console request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_interactive_serial_console request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest + + # Converts hash and nil to 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_interactive_serial_console.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.disable_interactive_serial_console.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_interactive_serial_console.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :disable_interactive_serial_console, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Detach LUN from Instance. + # + # @overload detach_lun(request, options = nil) + # Pass arguments to `detach_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload detach_lun(instance: nil, lun: nil, skip_reboot: nil) + # Pass arguments to `detach_lun` via keyword arguments. Note that at + # least one keyword argument is 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 [::String] + # Required. Name of the instance. + # @param lun [::String] + # Required. Name of the Lun to detach. + # @param skip_reboot [::Boolean] + # If true, performs lun unmapping without instance reboot. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new + # + # # Call the detach_lun method. + # result = client.detach_lun request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def detach_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.detach_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.instance + header_params["instance"] = request.instance + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.detach_lun.timeout, + metadata: metadata, + retry_policy: @config.rpcs.detach_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :detach_lun, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 public SSH keys registered for the specified project. + # These SSH keys are used only for the interactive serial console feature. + # + # @overload list_ssh_keys(request, options = nil) + # Pass arguments to `list_ssh_keys` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_ssh_keys(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_ssh_keys` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent containing the SSH keys. + # Currently, the only valid value for the location is "global". + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new + # + # # Call the list_ssh_keys method. + # result = client.list_ssh_keys request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. + # p item + # end + # + def list_ssh_keys request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_ssh_keys.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_ssh_keys.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_ssh_keys.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_ssh_keys, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_ssh_keys, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Register a public SSH key in the specified project for use with the + # interactive serial console feature. + # + # @overload create_ssh_key(request, options = nil) + # Pass arguments to `create_ssh_key` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil) + # Pass arguments to `create_ssh_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 parent [::String] + # Required. The parent containing the SSH keys. + # @param ssh_key [::Google::Cloud::BareMetalSolution::V2::SSHKey, ::Hash] + # Required. The SSH key to register. + # @param ssh_key_id [::String] + # Required. The ID to use for the key, which will become the final component + # of the key's resource name. + # + # This value must match the regex: + # [a-zA-Z0-9@.\-_]\\{1,64} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new + # + # # Call the create_ssh_key method. + # result = client.create_ssh_key request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. + # p result + # + def create_ssh_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest + + # Converts hash and nil to 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_ssh_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::BareMetalSolution::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_ssh_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_ssh_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :create_ssh_key, request, 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 public SSH key registered in the specified project. + # + # @overload delete_ssh_key(request, options = nil) + # Pass arguments to `delete_ssh_key` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_ssh_key(name: nil) + # Pass arguments to `delete_ssh_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 name [::String] + # Required. The name of the SSH key to delete. + # Currently, the only valid value for the location is "global". + # + # @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/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new + # + # # Call the delete_ssh_key method. + # result = client.delete_ssh_key request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_ssh_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest + + # Converts hash and nil to 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_ssh_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::BareMetalSolution::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_ssh_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_ssh_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :delete_ssh_key, request, 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 storage volumes in a given project and location. + # + # @overload list_volumes(request, options = nil) + # Pass arguments to `list_volumes` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_volumes` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListVolumesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new + # + # # Call the list_volumes method. + # result = client.list_volumes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. + # p item + # end + # + def list_volumes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_volumes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volumes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_volumes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_volumes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single storage volume. + # + # @overload get_volume(request, options = nil) + # Pass arguments to `get_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_volume(name: nil) + # Pass arguments to `get_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Volume] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new + # + # # Call the get_volume method. + # result = client.get_volume request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + # p result + # + def get_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_volume, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single storage volume. + # + # @overload update_volume(request, options = nil) + # Pass arguments to `update_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_volume(volume: nil, update_mask: nil) + # Pass arguments to `update_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash] + # Required. The volume to update. + # + # The `name` field is used to identify the volume to update. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # 'labels' + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new + # + # # Call the update_volume method. + # result = client.update_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest + + # Converts hash and nil to 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_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.volume&.name + header_params["volume.name"] = request.volume.name + end + + request_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_volume.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :update_volume, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameVolume sets a new name for a volume. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_volume(request, options = nil) + # Pass arguments to `rename_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rename_volume(name: nil, new_volume_id: nil) + # Pass arguments to `rename_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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` field is used to identify the volume. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @param new_volume_id [::String] + # Required. The new `id` of the volume. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Volume] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new + # + # # Call the rename_volume method. + # result = client.rename_volume request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + # p result + # + def rename_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rename_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_volume.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rename_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :rename_volume, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Skips volume's cooloff and deletes it now. + # Volume must be in cooloff state. + # + # @overload evict_volume(request, options = nil) + # Pass arguments to `evict_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload evict_volume(name: nil) + # Pass arguments to `evict_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Volume. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new + # + # # Call the evict_volume method. + # result = client.evict_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def evict_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.evict_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.evict_volume.timeout, + metadata: metadata, + retry_policy: @config.rpcs.evict_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :evict_volume, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Emergency Volume resize. + # + # @overload resize_volume(request, options = nil) + # Pass arguments to `resize_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload resize_volume(volume: nil, size_gib: nil) + # Pass arguments to `resize_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume [::String] + # Required. Volume to resize. + # @param size_gib [::Integer] + # New Volume size, in GiB. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new + # + # # Call the resize_volume method. + # result = client.resize_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def resize_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.resize_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.volume + header_params["volume"] = request.volume + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resize_volume.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resize_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :resize_volume, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List network in a given project and location. + # + # @overload list_networks(request, options = nil) + # Pass arguments to `list_networks` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_networks` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListNetworksRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new + # + # # Call the list_networks method. + # result = client.list_networks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. + # p item + # end + # + def list_networks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_networks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_networks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_networks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_networks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all Networks (and used IPs for each Network) in the vendor account + # associated with the specified project. + # + # @overload list_network_usage(request, options = nil) + # Pass arguments to `list_network_usage` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_network_usage(location: nil) + # Pass arguments to `list_network_usage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param location [::String] + # Required. Parent value (project and location). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new + # + # # Call the list_network_usage method. + # result = client.list_network_usage request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. + # p result + # + def list_network_usage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_network_usage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.location + header_params["location"] = request.location + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_network_usage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_network_usage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_network_usage, request, 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 details of a single network. + # + # @overload get_network(request, options = nil) + # Pass arguments to `get_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_network(name: nil) + # Pass arguments to `get_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Network] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new + # + # # Call the get_network method. + # result = client.get_network request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + # p result + # + def get_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_network.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_network, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single network. + # + # @overload update_network(request, options = nil) + # Pass arguments to `update_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_network(network: nil, update_mask: nil) + # Pass arguments to `update_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash] + # Required. The network to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # `labels`, `reservations`, `vrf.vlan_attachments` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new + # + # # Call the update_network method. + # result = client.update_network request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest + + # Converts hash and nil to 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_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.network&.name + header_params["network.name"] = request.network.name + end + + request_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_network.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :update_network, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Takes a snapshot of a boot volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload create_volume_snapshot(request, options = nil) + # Pass arguments to `create_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_volume_snapshot(parent: nil, volume_snapshot: nil) + # Pass arguments to `create_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The volume to snapshot. + # @param volume_snapshot [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot, ::Hash] + # Required. The snapshot to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new + # + # # Call the create_volume_snapshot method. + # result = client.create_volume_snapshot request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p result + # + def create_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest + + # Converts hash and nil to 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_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :create_volume_snapshot, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Uses the specified snapshot to restore its parent volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload restore_volume_snapshot(request, options = nil) + # Pass arguments to `restore_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_volume_snapshot(volume_snapshot: nil) + # Pass arguments to `restore_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume_snapshot [::String] + # Required. Name of the snapshot which will be used to restore its parent + # volume. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new + # + # # Call the restore_volume_snapshot method. + # result = client.restore_volume_snapshot request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest + + # Converts hash and nil to 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_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.volume_snapshot + header_params["volume_snapshot"] = request.volume_snapshot + end + + request_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_volume_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restore_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :restore_volume_snapshot, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 volume snapshot. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload delete_volume_snapshot(request, options = nil) + # Pass arguments to `delete_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_volume_snapshot(name: nil) + # Pass arguments to `delete_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 snapshot 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/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new + # + # # Call the delete_volume_snapshot method. + # result = client.delete_volume_snapshot request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest + + # Converts hash and nil to 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_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :delete_volume_snapshot, request, 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 specified snapshot resource. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload get_volume_snapshot(request, options = nil) + # Pass arguments to `get_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_volume_snapshot(name: nil) + # Pass arguments to `get_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 snapshot. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new + # + # # Call the get_volume_snapshot method. + # result = client.get_volume_snapshot request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p result + # + def get_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_volume_snapshot, request, 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 the list of snapshots for the specified volume. + # Returns a response with an empty list of snapshots if called + # for a non-boot volume. + # + # @overload list_volume_snapshots(request, options = nil) + # Pass arguments to `list_volume_snapshots` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_volume_snapshots` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListVolumesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new + # + # # Call the list_volume_snapshots method. + # result = client.list_volume_snapshots request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p item + # end + # + def list_volume_snapshots request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_volume_snapshots.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshots.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_volume_snapshots.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_volume_snapshots, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volume_snapshots, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single storage logical unit number(LUN). + # + # @overload get_lun(request, options = nil) + # Pass arguments to `get_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_lun(name: nil) + # Pass arguments to `get_lun` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Lun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Lun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new + # + # # Call the get_lun method. + # result = client.get_lun request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. + # p result + # + def get_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_lun.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_lun, request, 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 storage volume luns for given storage volume. + # + # @overload list_luns(request, options = nil) + # Pass arguments to `list_luns` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_luns(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_luns` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListLunsRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new + # + # # Call the list_luns method. + # result = client.list_luns request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. + # p item + # end + # + def list_luns request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_luns.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_luns.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_luns.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_luns, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Skips lun's cooloff and deletes it now. + # Lun must be in cooloff state. + # + # @overload evict_lun(request, options = nil) + # Pass arguments to `evict_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EvictLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload evict_lun(name: nil) + # Pass arguments to `evict_lun` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 lun. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new + # + # # Call the evict_lun method. + # result = client.evict_lun request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def evict_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.evict_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.evict_lun.timeout, + metadata: metadata, + retry_policy: @config.rpcs.evict_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :evict_lun, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 details of a single NFS share. + # + # @overload get_nfs_share(request, options = nil) + # Pass arguments to `get_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_nfs_share(name: nil) + # Pass arguments to `get_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new + # + # # Call the get_nfs_share method. + # result = client.get_nfs_share request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + # p result + # + def get_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_nfs_share, request, 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 NFS shares. + # + # @overload list_nfs_shares(request, options = nil) + # Pass arguments to `list_nfs_shares` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_nfs_shares` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListNfsSharesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new + # + # # Call the list_nfs_shares method. + # result = client.list_nfs_shares request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. + # p item + # end + # + def list_nfs_shares request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_nfs_shares.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_shares.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_nfs_shares.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_nfs_shares, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, request, response, 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 details of a single NFS share. + # + # @overload update_nfs_share(request, options = nil) + # Pass arguments to `update_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_nfs_share(nfs_share: nil, update_mask: nil) + # Pass arguments to `update_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] + # Required. The NFS share to update. + # + # The `name` field is used to identify the NFS share to update. + # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # `labels` + # `allowed_clients` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new + # + # # Call the update_nfs_share method. + # result = client.update_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest + + # Converts hash and nil to 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_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.nfs_share&.name + header_params["nfs_share.name"] = request.nfs_share.name + end + + request_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_nfs_share.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :update_nfs_share, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 an NFS share. + # + # @overload create_nfs_share(request, options = nil) + # Pass arguments to `create_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_nfs_share(parent: nil, nfs_share: nil) + # Pass arguments to `create_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location. + # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] + # Required. The NfsShare 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/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new + # + # # Call the create_nfs_share method. + # result = client.create_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest + + # Converts hash and nil to 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_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :create_nfs_share, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameNfsShare sets a new name for an nfsshare. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_nfs_share(request, options = nil) + # Pass arguments to `rename_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rename_nfs_share(name: nil, new_nfsshare_id: nil) + # Pass arguments to `rename_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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` field is used to identify the nfsshare. + # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} + # @param new_nfsshare_id [::String] + # Required. The new `id` of the nfsshare. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new + # + # # Call the rename_nfs_share method. + # result = client.rename_nfs_share request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + # p result + # + def rename_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rename_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_nfs_share.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rename_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :rename_nfs_share, request, 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 an NFS share. The underlying volume is automatically deleted. + # + # @overload delete_nfs_share(request, options = nil) + # Pass arguments to `delete_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_nfs_share(name: nil) + # Pass arguments to `delete_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 NFS share to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new + # + # # Call the delete_nfs_share method. + # result = client.delete_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest + + # Converts hash and nil to 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_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :delete_nfs_share, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List the budget details to provision resources on a given project. + # + # @overload list_provisioning_quotas(request, options = nil) + # Pass arguments to `list_provisioning_quotas` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_provisioning_quotas` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListProvisioningQuotasRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @param page_token [::String] + # A token identifying a page of results from the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new + # + # # Call the list_provisioning_quotas method. + # result = client.list_provisioning_quotas request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. + # p item + # end + # + def list_provisioning_quotas request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_provisioning_quotas.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_provisioning_quotas.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_provisioning_quotas.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_provisioning_quotas, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_provisioning_quotas, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Submit a provisiong configuration for a given project. + # + # @overload submit_provisioning_config(request, options = nil) + # Pass arguments to `submit_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_provisioning_config(parent: nil, provisioning_config: nil, email: nil) + # Pass arguments to `submit_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to create. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new + # + # # Call the submit_provisioning_config method. + # result = client.submit_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. + # p result + # + def submit_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest + + # Converts hash and nil to 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_provisioning_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::BareMetalSolution::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.submit_provisioning_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.submit_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :submit_provisioning_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 + + ## + # Get ProvisioningConfig by name. + # + # @overload get_provisioning_config(request, options = nil) + # Pass arguments to `get_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_provisioning_config(name: nil) + # Pass arguments to `get_provisioning_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 ProvisioningConfig. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new + # + # # Call the get_provisioning_config method. + # result = client.get_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def get_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_provisioning_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::BareMetalSolution::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_provisioning_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_provisioning_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 + + ## + # Create new ProvisioningConfig. + # + # @overload create_provisioning_config(request, options = nil) + # Pass arguments to `create_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) + # Pass arguments to `create_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to create. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new + # + # # Call the create_provisioning_config method. + # result = client.create_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def create_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest + + # Converts hash and nil to 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_provisioning_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::BareMetalSolution::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_provisioning_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :create_provisioning_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 + + ## + # Update existing ProvisioningConfig. + # + # @overload update_provisioning_config(request, options = nil) + # Pass arguments to `update_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) + # Pass arguments to `update_provisioning_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 provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new + # + # # Call the update_provisioning_config method. + # result = client.update_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def update_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest + + # Converts hash and nil to 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_provisioning_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::BareMetalSolution::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.provisioning_config&.name + header_params["provisioning_config.name"] = request.provisioning_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_provisioning_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :update_provisioning_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 + + ## + # RenameNetwork sets a new name for a network. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_network(request, options = nil) + # Pass arguments to `rename_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rename_network(name: nil, new_network_id: nil) + # Pass arguments to `rename_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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` field is used to identify the network. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @param new_network_id [::String] + # Required. The new `id` of the network. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Network] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new + # + # # Call the rename_network method. + # result = client.rename_network request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + # p result + # + def rename_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rename_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_network.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rename_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :rename_network, request, 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 the list of OS images which are currently approved. + # + # @overload list_os_images(request, options = nil) + # Pass arguments to `list_os_images` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_os_images(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_os_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListProvisioningQuotasRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @param page_token [::String] + # A token identifying a page of results from the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new + # + # # Call the list_os_images method. + # result = client.list_os_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. + # p item + # end + # + def list_os_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_os_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_os_images.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_os_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_os_images, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_os_images, request, response, 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 BareMetalSolution API. + # + # This class represents the configuration for BareMetalSolution, + # providing control 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::BareMetalSolution::V2::BareMetalSolution::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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 = "baremetalsolution.googleapis.com" + + config_attr :endpoint, nil, ::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 BareMetalSolution API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `rename_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_instance + ## + # RPC-specific configuration for `reset_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :reset_instance + ## + # RPC-specific configuration for `start_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :start_instance + ## + # RPC-specific configuration for `stop_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_instance + ## + # RPC-specific configuration for `enable_interactive_serial_console` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_interactive_serial_console + ## + # RPC-specific configuration for `disable_interactive_serial_console` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_interactive_serial_console + ## + # RPC-specific configuration for `detach_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :detach_lun + ## + # RPC-specific configuration for `list_ssh_keys` + # @return [::Gapic::Config::Method] + # + attr_reader :list_ssh_keys + ## + # RPC-specific configuration for `create_ssh_key` + # @return [::Gapic::Config::Method] + # + attr_reader :create_ssh_key + ## + # RPC-specific configuration for `delete_ssh_key` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_ssh_key + ## + # RPC-specific configuration for `list_volumes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volumes + ## + # RPC-specific configuration for `get_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume + ## + # RPC-specific configuration for `update_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :update_volume + ## + # RPC-specific configuration for `rename_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_volume + ## + # RPC-specific configuration for `evict_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :evict_volume + ## + # RPC-specific configuration for `resize_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :resize_volume + ## + # RPC-specific configuration for `list_networks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_networks + ## + # RPC-specific configuration for `list_network_usage` + # @return [::Gapic::Config::Method] + # + attr_reader :list_network_usage + ## + # RPC-specific configuration for `get_network` + # @return [::Gapic::Config::Method] + # + attr_reader :get_network + ## + # RPC-specific configuration for `update_network` + # @return [::Gapic::Config::Method] + # + attr_reader :update_network + ## + # RPC-specific configuration for `create_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :create_volume_snapshot + ## + # RPC-specific configuration for `restore_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_volume_snapshot + ## + # RPC-specific configuration for `delete_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_volume_snapshot + ## + # RPC-specific configuration for `get_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume_snapshot + ## + # RPC-specific configuration for `list_volume_snapshots` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volume_snapshots + ## + # RPC-specific configuration for `get_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lun + ## + # RPC-specific configuration for `list_luns` + # @return [::Gapic::Config::Method] + # + attr_reader :list_luns + ## + # RPC-specific configuration for `evict_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :evict_lun + ## + # RPC-specific configuration for `get_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :get_nfs_share + ## + # RPC-specific configuration for `list_nfs_shares` + # @return [::Gapic::Config::Method] + # + attr_reader :list_nfs_shares + ## + # RPC-specific configuration for `update_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :update_nfs_share + ## + # RPC-specific configuration for `create_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :create_nfs_share + ## + # RPC-specific configuration for `rename_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_nfs_share + ## + # RPC-specific configuration for `delete_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_nfs_share + ## + # RPC-specific configuration for `list_provisioning_quotas` + # @return [::Gapic::Config::Method] + # + attr_reader :list_provisioning_quotas + ## + # RPC-specific configuration for `submit_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_provisioning_config + ## + # RPC-specific configuration for `get_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_provisioning_config + ## + # RPC-specific configuration for `create_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_provisioning_config + ## + # RPC-specific configuration for `update_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_provisioning_config + ## + # RPC-specific configuration for `rename_network` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_network + ## + # RPC-specific configuration for `list_os_images` + # @return [::Gapic::Config::Method] + # + attr_reader :list_os_images + + # @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 + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_instance_config + rename_instance_config = parent_rpcs.rename_instance if parent_rpcs.respond_to? :rename_instance + @rename_instance = ::Gapic::Config::Method.new rename_instance_config + reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance + @reset_instance = ::Gapic::Config::Method.new reset_instance_config + start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance + @start_instance = ::Gapic::Config::Method.new start_instance_config + stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance + @stop_instance = ::Gapic::Config::Method.new stop_instance_config + enable_interactive_serial_console_config = parent_rpcs.enable_interactive_serial_console if parent_rpcs.respond_to? :enable_interactive_serial_console + @enable_interactive_serial_console = ::Gapic::Config::Method.new enable_interactive_serial_console_config + disable_interactive_serial_console_config = parent_rpcs.disable_interactive_serial_console if parent_rpcs.respond_to? :disable_interactive_serial_console + @disable_interactive_serial_console = ::Gapic::Config::Method.new disable_interactive_serial_console_config + detach_lun_config = parent_rpcs.detach_lun if parent_rpcs.respond_to? :detach_lun + @detach_lun = ::Gapic::Config::Method.new detach_lun_config + list_ssh_keys_config = parent_rpcs.list_ssh_keys if parent_rpcs.respond_to? :list_ssh_keys + @list_ssh_keys = ::Gapic::Config::Method.new list_ssh_keys_config + create_ssh_key_config = parent_rpcs.create_ssh_key if parent_rpcs.respond_to? :create_ssh_key + @create_ssh_key = ::Gapic::Config::Method.new create_ssh_key_config + delete_ssh_key_config = parent_rpcs.delete_ssh_key if parent_rpcs.respond_to? :delete_ssh_key + @delete_ssh_key = ::Gapic::Config::Method.new delete_ssh_key_config + list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes + @list_volumes = ::Gapic::Config::Method.new list_volumes_config + get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume + @get_volume = ::Gapic::Config::Method.new get_volume_config + update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume + @update_volume = ::Gapic::Config::Method.new update_volume_config + rename_volume_config = parent_rpcs.rename_volume if parent_rpcs.respond_to? :rename_volume + @rename_volume = ::Gapic::Config::Method.new rename_volume_config + evict_volume_config = parent_rpcs.evict_volume if parent_rpcs.respond_to? :evict_volume + @evict_volume = ::Gapic::Config::Method.new evict_volume_config + resize_volume_config = parent_rpcs.resize_volume if parent_rpcs.respond_to? :resize_volume + @resize_volume = ::Gapic::Config::Method.new resize_volume_config + list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks + @list_networks = ::Gapic::Config::Method.new list_networks_config + list_network_usage_config = parent_rpcs.list_network_usage if parent_rpcs.respond_to? :list_network_usage + @list_network_usage = ::Gapic::Config::Method.new list_network_usage_config + get_network_config = parent_rpcs.get_network if parent_rpcs.respond_to? :get_network + @get_network = ::Gapic::Config::Method.new get_network_config + update_network_config = parent_rpcs.update_network if parent_rpcs.respond_to? :update_network + @update_network = ::Gapic::Config::Method.new update_network_config + create_volume_snapshot_config = parent_rpcs.create_volume_snapshot if parent_rpcs.respond_to? :create_volume_snapshot + @create_volume_snapshot = ::Gapic::Config::Method.new create_volume_snapshot_config + restore_volume_snapshot_config = parent_rpcs.restore_volume_snapshot if parent_rpcs.respond_to? :restore_volume_snapshot + @restore_volume_snapshot = ::Gapic::Config::Method.new restore_volume_snapshot_config + delete_volume_snapshot_config = parent_rpcs.delete_volume_snapshot if parent_rpcs.respond_to? :delete_volume_snapshot + @delete_volume_snapshot = ::Gapic::Config::Method.new delete_volume_snapshot_config + get_volume_snapshot_config = parent_rpcs.get_volume_snapshot if parent_rpcs.respond_to? :get_volume_snapshot + @get_volume_snapshot = ::Gapic::Config::Method.new get_volume_snapshot_config + list_volume_snapshots_config = parent_rpcs.list_volume_snapshots if parent_rpcs.respond_to? :list_volume_snapshots + @list_volume_snapshots = ::Gapic::Config::Method.new list_volume_snapshots_config + get_lun_config = parent_rpcs.get_lun if parent_rpcs.respond_to? :get_lun + @get_lun = ::Gapic::Config::Method.new get_lun_config + list_luns_config = parent_rpcs.list_luns if parent_rpcs.respond_to? :list_luns + @list_luns = ::Gapic::Config::Method.new list_luns_config + evict_lun_config = parent_rpcs.evict_lun if parent_rpcs.respond_to? :evict_lun + @evict_lun = ::Gapic::Config::Method.new evict_lun_config + get_nfs_share_config = parent_rpcs.get_nfs_share if parent_rpcs.respond_to? :get_nfs_share + @get_nfs_share = ::Gapic::Config::Method.new get_nfs_share_config + list_nfs_shares_config = parent_rpcs.list_nfs_shares if parent_rpcs.respond_to? :list_nfs_shares + @list_nfs_shares = ::Gapic::Config::Method.new list_nfs_shares_config + update_nfs_share_config = parent_rpcs.update_nfs_share if parent_rpcs.respond_to? :update_nfs_share + @update_nfs_share = ::Gapic::Config::Method.new update_nfs_share_config + create_nfs_share_config = parent_rpcs.create_nfs_share if parent_rpcs.respond_to? :create_nfs_share + @create_nfs_share = ::Gapic::Config::Method.new create_nfs_share_config + rename_nfs_share_config = parent_rpcs.rename_nfs_share if parent_rpcs.respond_to? :rename_nfs_share + @rename_nfs_share = ::Gapic::Config::Method.new rename_nfs_share_config + delete_nfs_share_config = parent_rpcs.delete_nfs_share if parent_rpcs.respond_to? :delete_nfs_share + @delete_nfs_share = ::Gapic::Config::Method.new delete_nfs_share_config + list_provisioning_quotas_config = parent_rpcs.list_provisioning_quotas if parent_rpcs.respond_to? :list_provisioning_quotas + @list_provisioning_quotas = ::Gapic::Config::Method.new list_provisioning_quotas_config + submit_provisioning_config_config = parent_rpcs.submit_provisioning_config if parent_rpcs.respond_to? :submit_provisioning_config + @submit_provisioning_config = ::Gapic::Config::Method.new submit_provisioning_config_config + get_provisioning_config_config = parent_rpcs.get_provisioning_config if parent_rpcs.respond_to? :get_provisioning_config + @get_provisioning_config = ::Gapic::Config::Method.new get_provisioning_config_config + create_provisioning_config_config = parent_rpcs.create_provisioning_config if parent_rpcs.respond_to? :create_provisioning_config + @create_provisioning_config = ::Gapic::Config::Method.new create_provisioning_config_config + update_provisioning_config_config = parent_rpcs.update_provisioning_config if parent_rpcs.respond_to? :update_provisioning_config + @update_provisioning_config = ::Gapic::Config::Method.new update_provisioning_config_config + rename_network_config = parent_rpcs.rename_network if parent_rpcs.respond_to? :rename_network + @rename_network = ::Gapic::Config::Method.new rename_network_config + list_os_images_config = parent_rpcs.list_os_images if parent_rpcs.respond_to? :list_os_images + @list_os_images = ::Gapic::Config::Method.new list_os_images_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb new file mode 100644 index 000000000000..ca17fd2fa097 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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 BareMetalSolution + module V2 + module BareMetalSolution + # Credentials for the BareMetalSolution 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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb new file mode 100644 index 000000000000..7057baa137f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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 BareMetalSolution + module V2 + module BareMetalSolution + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BareMetalSolution 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 BareMetalSolution 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::BareMetalSolution::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::BareMetalSolution::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::BareMetalSolution::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::BareMetalSolution::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::BareMetalSolution::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 = "baremetalsolution.googleapis.com" + + config_attr :endpoint, nil, ::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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb new file mode 100644 index 000000000000..ed6067ff8440 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb @@ -0,0 +1,301 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + # Path helper methods for the BareMetalSolution API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified InstanceConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instanceConfigs/{instance_config}` + # + # @param project [String] + # @param location [String] + # @param instance_config [String] + # + # @return [::String] + def instance_config_path project:, location:, instance_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}/instanceConfigs/#{instance_config}" + end + + ## + # Create a fully-qualified InterconnectAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}` + # + # @param project [String] + # @param region [String] + # @param interconnect_attachment [String] + # + # @return [::String] + def interconnect_attachment_path project:, region:, interconnect_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}/interconnectAttachments/#{interconnect_attachment}" + 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 Lun resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}` + # + # @param project [String] + # @param location [String] + # @param volume [String] + # @param lun [String] + # + # @return [::String] + def lun_path project:, location:, volume:, lun: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "volume cannot contain /" if volume.to_s.include? "/" + + "projects/#{project}/locations/#{location}/volumes/#{volume}/luns/#{lun}" + end + + ## + # Create a fully-qualified NFSShare resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/nfsShares/{nfs_share}` + # + # @param project [String] + # @param location [String] + # @param nfs_share [String] + # + # @return [::String] + def nfs_share_path project:, location:, nfs_share: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/nfsShares/#{nfs_share}" + end + + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/networks/{network}` + # + # @param project [String] + # @param location [String] + # @param network [String] + # + # @return [::String] + def network_path project:, location:, network: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/networks/#{network}" + end + + ## + # Create a fully-qualified NetworkConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/networkConfigs/{network_config}` + # + # @param project [String] + # @param location [String] + # @param network_config [String] + # + # @return [::String] + def network_config_path project:, location:, network_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}/networkConfigs/#{network_config}" + end + + ## + # Create a fully-qualified ProvisioningConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/provisioningConfigs/{provisioning_config}` + # + # @param project [String] + # @param location [String] + # @param provisioning_config [String] + # + # @return [::String] + def provisioning_config_path project:, location:, provisioning_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}/provisioningConfigs/#{provisioning_config}" + end + + ## + # Create a fully-qualified ServerNetworkTemplate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` + # + # @param project [String] + # @param location [String] + # @param server_network_template [String] + # + # @return [::String] + def server_network_template_path project:, location:, server_network_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}/serverNetworkTemplate/#{server_network_template}" + end + + ## + # Create a fully-qualified SshKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/sshKeys/{ssh_key}` + # + # @param project [String] + # @param location [String] + # @param ssh_key [String] + # + # @return [::String] + def ssh_key_path project:, location:, ssh_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/sshKeys/#{ssh_key}" + end + + ## + # Create a fully-qualified Volume resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/volumes/{volume}` + # + # @param project [String] + # @param location [String] + # @param volume [String] + # + # @return [::String] + def volume_path project:, location:, volume: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/volumes/#{volume}" + end + + ## + # Create a fully-qualified VolumeConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/volumeConfigs/{volume_config}` + # + # @param project [String] + # @param location [String] + # @param volume_config [String] + # + # @return [::String] + def volume_config_path project:, location:, volume_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}/volumeConfigs/#{volume_config}" + end + + ## + # Create a fully-qualified VolumeSnapshot resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}` + # + # @param project [String] + # @param location [String] + # @param volume [String] + # @param snapshot [String] + # + # @return [::String] + def volume_snapshot_path project:, location:, volume:, snapshot: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "volume cannot contain /" if volume.to_s.include? "/" + + "projects/#{project}/locations/#{location}/volumes/#{volume}/snapshots/#{snapshot}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb new file mode 100644 index 000000000000..7f95f0aebf5e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bare_metal_solution/v2/version" +require "google/cloud/bare_metal_solution/v2/bindings_override" + +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/paths" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client" + +module Google + module Cloud + module BareMetalSolution + module V2 + ## + # Performs management operations on Bare Metal Solution servers. + # + # The `baremetalsolution.googleapis.com` service provides management + # capabilities for Bare Metal Solution servers. To access the API methods, you + # must assign Bare Metal Solution IAM roles containing the desired permissions + # to your staff in your Google Cloud project. You must also enable the Bare + # Metal Solution API. Once enabled, the methods act + # upon specific servers in your Bare Metal Solution environment. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + module BareMetalSolution + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb new file mode 100644 index 000000000000..e4e2ec63cc78 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb @@ -0,0 +1,4495 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/baremetalsolution/v2/baremetalsolution_pb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + module Rest + ## + # REST client for the BareMetalSolution service. + # + # Performs management operations on Bare Metal Solution servers. + # + # The `baremetalsolution.googleapis.com` service provides management + # capabilities for Bare Metal Solution servers. To access the API methods, you + # must assign Bare Metal Solution IAM roles containing the desired permissions + # to your staff in your Google Cloud project. You must also enable the Bare + # Metal Solution API. Once enabled, the methods act + # upon specific servers in your Bare Metal Solution environment. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :bare_metal_solution_stub + + ## + # Configure the BareMetalSolution Client class. + # + # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BareMetalSolution clients + # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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", "BareMetalSolution", "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.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BareMetalSolution 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::BareMetalSolution::V2::BareMetalSolution::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 + @bare_metal_solution_stub.universe_domain + end + + ## + # Create a new BareMetalSolution REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BareMetalSolution 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::BareMetalSolution::V2::BareMetalSolution::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 + + @bare_metal_solution_stub = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @bare_metal_solution_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 = @bare_metal_solution_stub.endpoint + config.universe_domain = @bare_metal_solution_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @bare_metal_solution_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 = @bare_metal_solution_stub.endpoint + config.universe_domain = @bare_metal_solution_stub.universe_domain + config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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 + @bare_metal_solution_stub.logger + end + + # Service calls + + ## + # List servers 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::BareMetalSolution::V2::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::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) + # 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] + # Requested page size. Server may return fewer items than requested. + # If unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::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_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 + + @bare_metal_solution_stub.list_instances request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_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 + + ## + # Get details about a single server. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::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_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 + + @bare_metal_solution_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 + + ## + # Update details of a single server. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::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, update_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::BareMetalSolution::V2::Instance, ::Hash] + # Required. The server to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The currently supported fields are: + # `labels` + # `hyperthreading_enabled` + # `os_image` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::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_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 + + @bare_metal_solution_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 + + ## + # RenameInstance sets a new name for an instance. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_instance(request, options = nil) + # Pass arguments to `rename_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rename_instance(name: nil, new_instance_id: nil) + # Pass arguments to `rename_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` field is used to identify the instance. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param new_instance_id [::String] + # Required. The new `id` of the instance. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new + # + # # Call the rename_instance method. + # result = client.rename_instance request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. + # p result + # + def rename_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rename_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::BareMetalSolution::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.rename_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rename_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.rename_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 + + ## + # Perform an ungraceful, hard reset on a server. Equivalent to shutting the + # power off and then turning it back on. + # + # @overload reset_instance(request, options = nil) + # Pass arguments to `reset_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload reset_instance(name: nil) + # Pass arguments to `reset_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 [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new + # + # # Call the reset_instance method. + # result = client.reset_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 reset_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.reset_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::BareMetalSolution::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.reset_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.reset_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.reset_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 + + ## + # Starts a server that was shutdown. + # + # @overload start_instance(request, options = nil) + # Pass arguments to `start_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(name: nil) + # Pass arguments to `start_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 [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new + # + # # Call the start_instance method. + # result = client.start_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 start_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest + + # Converts hash and nil to an 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_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::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.start_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 + + ## + # Stop a running server. + # + # @overload stop_instance(request, options = nil) + # Pass arguments to `stop_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload stop_instance(name: nil) + # Pass arguments to `stop_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 [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new + # + # # Call the stop_instance method. + # result = client.stop_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 stop_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.stop_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::BareMetalSolution::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.stop_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.stop_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.stop_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 + + ## + # Enable the interactive serial console feature on an instance. + # + # @overload enable_interactive_serial_console(request, options = nil) + # Pass arguments to `enable_interactive_serial_console` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_interactive_serial_console(name: nil) + # Pass arguments to `enable_interactive_serial_console` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new + # + # # Call the enable_interactive_serial_console method. + # result = client.enable_interactive_serial_console request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_interactive_serial_console request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest + + # Converts hash and nil to an 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_interactive_serial_console.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.enable_interactive_serial_console.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_interactive_serial_console.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.enable_interactive_serial_console request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 the interactive serial console feature on an instance. + # + # @overload disable_interactive_serial_console(request, options = nil) + # Pass arguments to `disable_interactive_serial_console` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_interactive_serial_console(name: nil) + # Pass arguments to `disable_interactive_serial_console` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new + # + # # Call the disable_interactive_serial_console method. + # result = client.disable_interactive_serial_console request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_interactive_serial_console request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest + + # Converts hash and nil to an 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_interactive_serial_console.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.disable_interactive_serial_console.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_interactive_serial_console.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.disable_interactive_serial_console request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Detach LUN from Instance. + # + # @overload detach_lun(request, options = nil) + # Pass arguments to `detach_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload detach_lun(instance: nil, lun: nil, skip_reboot: nil) + # Pass arguments to `detach_lun` via keyword arguments. Note that at + # least one keyword argument is 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 [::String] + # Required. Name of the instance. + # @param lun [::String] + # Required. Name of the Lun to detach. + # @param skip_reboot [::Boolean] + # If true, performs lun unmapping without instance reboot. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new + # + # # Call the detach_lun method. + # result = client.detach_lun request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def detach_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.detach_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.detach_lun.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.detach_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.detach_lun request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 public SSH keys registered for the specified project. + # These SSH keys are used only for the interactive serial console feature. + # + # @overload list_ssh_keys(request, options = nil) + # Pass arguments to `list_ssh_keys` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_ssh_keys(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_ssh_keys` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent containing the SSH keys. + # Currently, the only valid value for the location is "global". + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new + # + # # Call the list_ssh_keys method. + # result = client.list_ssh_keys request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. + # p item + # end + # + def list_ssh_keys request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_ssh_keys.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_ssh_keys.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_ssh_keys.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_ssh_keys request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_ssh_keys, "ssh_keys", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Register a public SSH key in the specified project for use with the + # interactive serial console feature. + # + # @overload create_ssh_key(request, options = nil) + # Pass arguments to `create_ssh_key` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil) + # Pass arguments to `create_ssh_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 parent [::String] + # Required. The parent containing the SSH keys. + # @param ssh_key [::Google::Cloud::BareMetalSolution::V2::SSHKey, ::Hash] + # Required. The SSH key to register. + # @param ssh_key_id [::String] + # Required. The ID to use for the key, which will become the final component + # of the key's resource name. + # + # This value must match the regex: + # [a-zA-Z0-9@.\-_]\\{1,64} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new + # + # # Call the create_ssh_key method. + # result = client.create_ssh_key request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. + # p result + # + def create_ssh_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest + + # Converts hash and nil to an 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_ssh_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::BareMetalSolution::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_ssh_key.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_ssh_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.create_ssh_key request, 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 public SSH key registered in the specified project. + # + # @overload delete_ssh_key(request, options = nil) + # Pass arguments to `delete_ssh_key` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_ssh_key(name: nil) + # Pass arguments to `delete_ssh_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 name [::String] + # Required. The name of the SSH key to delete. + # Currently, the only valid value for the location is "global". + # @yield [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/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new + # + # # Call the delete_ssh_key method. + # result = client.delete_ssh_key request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_ssh_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest + + # Converts hash and nil to an 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_ssh_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::BareMetalSolution::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_ssh_key.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_ssh_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.delete_ssh_key request, 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 storage volumes in a given project and location. + # + # @overload list_volumes(request, options = nil) + # Pass arguments to `list_volumes` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_volumes` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListVolumesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new + # + # # Call the list_volumes method. + # result = client.list_volumes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. + # p item + # end + # + def list_volumes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_volumes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volumes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_volumes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_volumes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, "volumes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single storage volume. + # + # @overload get_volume(request, options = nil) + # Pass arguments to `get_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_volume(name: nil) + # Pass arguments to `get_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Volume] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new + # + # # Call the get_volume method. + # result = client.get_volume request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + # p result + # + def get_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_volume request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single storage volume. + # + # @overload update_volume(request, options = nil) + # Pass arguments to `update_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_volume(volume: nil, update_mask: nil) + # Pass arguments to `update_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash] + # Required. The volume to update. + # + # The `name` field is used to identify the volume to update. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # 'labels' + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new + # + # # Call the update_volume method. + # result = client.update_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest + + # Converts hash and nil to an 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_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.update_volume request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameVolume sets a new name for a volume. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_volume(request, options = nil) + # Pass arguments to `rename_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rename_volume(name: nil, new_volume_id: nil) + # Pass arguments to `rename_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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` field is used to identify the volume. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @param new_volume_id [::String] + # Required. The new `id` of the volume. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new + # + # # Call the rename_volume method. + # result = client.rename_volume request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + # p result + # + def rename_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rename_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_volume.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rename_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.rename_volume request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Skips volume's cooloff and deletes it now. + # Volume must be in cooloff state. + # + # @overload evict_volume(request, options = nil) + # Pass arguments to `evict_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload evict_volume(name: nil) + # Pass arguments to `evict_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Volume. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new + # + # # Call the evict_volume method. + # result = client.evict_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def evict_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.evict_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.evict_volume.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.evict_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.evict_volume request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Emergency Volume resize. + # + # @overload resize_volume(request, options = nil) + # Pass arguments to `resize_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload resize_volume(volume: nil, size_gib: nil) + # Pass arguments to `resize_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume [::String] + # Required. Volume to resize. + # @param size_gib [::Integer] + # New Volume size, in GiB. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new + # + # # Call the resize_volume method. + # result = client.resize_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def resize_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.resize_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.resize_volume.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.resize_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.resize_volume request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List network in a given project and location. + # + # @overload list_networks(request, options = nil) + # Pass arguments to `list_networks` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_networks` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListNetworksRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new + # + # # Call the list_networks method. + # result = client.list_networks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. + # p item + # end + # + def list_networks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_networks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_networks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_networks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_networks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, "networks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all Networks (and used IPs for each Network) in the vendor account + # associated with the specified project. + # + # @overload list_network_usage(request, options = nil) + # Pass arguments to `list_network_usage` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_network_usage(location: nil) + # Pass arguments to `list_network_usage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param location [::String] + # Required. Parent value (project and location). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new + # + # # Call the list_network_usage method. + # result = client.list_network_usage request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. + # p result + # + def list_network_usage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_network_usage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_network_usage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_network_usage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_network_usage request, 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 details of a single network. + # + # @overload get_network(request, options = nil) + # Pass arguments to `get_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_network(name: nil) + # Pass arguments to `get_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Network] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new + # + # # Call the get_network method. + # result = client.get_network request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + # p result + # + def get_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_network.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_network request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single network. + # + # @overload update_network(request, options = nil) + # Pass arguments to `update_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_network(network: nil, update_mask: nil) + # Pass arguments to `update_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash] + # Required. The network to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # `labels`, `reservations`, `vrf.vlan_attachments` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new + # + # # Call the update_network method. + # result = client.update_network request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest + + # Converts hash and nil to an 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_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_network.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.update_network request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Takes a snapshot of a boot volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload create_volume_snapshot(request, options = nil) + # Pass arguments to `create_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_volume_snapshot(parent: nil, volume_snapshot: nil) + # Pass arguments to `create_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The volume to snapshot. + # @param volume_snapshot [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot, ::Hash] + # Required. The snapshot to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new + # + # # Call the create_volume_snapshot method. + # result = client.create_volume_snapshot request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p result + # + def create_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest + + # Converts hash and nil to an 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_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.create_volume_snapshot request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Uses the specified snapshot to restore its parent volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload restore_volume_snapshot(request, options = nil) + # Pass arguments to `restore_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_volume_snapshot(volume_snapshot: nil) + # Pass arguments to `restore_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume_snapshot [::String] + # Required. Name of the snapshot which will be used to restore its parent + # volume. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new + # + # # Call the restore_volume_snapshot method. + # result = client.restore_volume_snapshot request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest + + # Converts hash and nil to an 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_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.restore_volume_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restore_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.restore_volume_snapshot request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 volume snapshot. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload delete_volume_snapshot(request, options = nil) + # Pass arguments to `delete_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_volume_snapshot(name: nil) + # Pass arguments to `delete_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 snapshot 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/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new + # + # # Call the delete_volume_snapshot method. + # result = client.delete_volume_snapshot request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest + + # Converts hash and nil to an 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_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.delete_volume_snapshot request, 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 specified snapshot resource. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload get_volume_snapshot(request, options = nil) + # Pass arguments to `get_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_volume_snapshot(name: nil) + # Pass arguments to `get_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 snapshot. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new + # + # # Call the get_volume_snapshot method. + # result = client.get_volume_snapshot request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p result + # + def get_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_volume_snapshot request, 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 the list of snapshots for the specified volume. + # Returns a response with an empty list of snapshots if called + # for a non-boot volume. + # + # @overload list_volume_snapshots(request, options = nil) + # Pass arguments to `list_volume_snapshots` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_volume_snapshots` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListVolumesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new + # + # # Call the list_volume_snapshots method. + # result = client.list_volume_snapshots request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p item + # end + # + def list_volume_snapshots request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_volume_snapshots.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshots.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_volume_snapshots.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_volume_snapshots request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_volume_snapshots, "volume_snapshots", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single storage logical unit number(LUN). + # + # @overload get_lun(request, options = nil) + # Pass arguments to `get_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_lun(name: nil) + # Pass arguments to `get_lun` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Lun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Lun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new + # + # # Call the get_lun method. + # result = client.get_lun request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. + # p result + # + def get_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_lun.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_lun request, 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 storage volume luns for given storage volume. + # + # @overload list_luns(request, options = nil) + # Pass arguments to `list_luns` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_luns(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_luns` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListLunsRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new + # + # # Call the list_luns method. + # result = client.list_luns request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. + # p item + # end + # + def list_luns request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_luns.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_luns.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_luns.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_luns request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, "luns", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Skips lun's cooloff and deletes it now. + # Lun must be in cooloff state. + # + # @overload evict_lun(request, options = nil) + # Pass arguments to `evict_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EvictLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload evict_lun(name: nil) + # Pass arguments to `evict_lun` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 lun. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new + # + # # Call the evict_lun method. + # result = client.evict_lun request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def evict_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.evict_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.evict_lun.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.evict_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.evict_lun request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single NFS share. + # + # @overload get_nfs_share(request, options = nil) + # Pass arguments to `get_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_nfs_share(name: nil) + # Pass arguments to `get_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new + # + # # Call the get_nfs_share method. + # result = client.get_nfs_share request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + # p result + # + def get_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_nfs_share request, 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 NFS shares. + # + # @overload list_nfs_shares(request, options = nil) + # Pass arguments to `list_nfs_shares` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_nfs_shares` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListNfsSharesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new + # + # # Call the list_nfs_shares method. + # result = client.list_nfs_shares request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. + # p item + # end + # + def list_nfs_shares request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_nfs_shares.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_shares.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_nfs_shares.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_nfs_shares request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, "nfs_shares", request, result, 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 details of a single NFS share. + # + # @overload update_nfs_share(request, options = nil) + # Pass arguments to `update_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_nfs_share(nfs_share: nil, update_mask: nil) + # Pass arguments to `update_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] + # Required. The NFS share to update. + # + # The `name` field is used to identify the NFS share to update. + # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # `labels` + # `allowed_clients` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new + # + # # Call the update_nfs_share method. + # result = client.update_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest + + # Converts hash and nil to an 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_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.update_nfs_share request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 an NFS share. + # + # @overload create_nfs_share(request, options = nil) + # Pass arguments to `create_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_nfs_share(parent: nil, nfs_share: nil) + # Pass arguments to `create_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location. + # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] + # Required. The NfsShare 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/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new + # + # # Call the create_nfs_share method. + # result = client.create_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest + + # Converts hash and nil to an 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_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.create_nfs_share request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameNfsShare sets a new name for an nfsshare. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_nfs_share(request, options = nil) + # Pass arguments to `rename_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rename_nfs_share(name: nil, new_nfsshare_id: nil) + # Pass arguments to `rename_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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` field is used to identify the nfsshare. + # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} + # @param new_nfsshare_id [::String] + # Required. The new `id` of the nfsshare. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new + # + # # Call the rename_nfs_share method. + # result = client.rename_nfs_share request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + # p result + # + def rename_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rename_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_nfs_share.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rename_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.rename_nfs_share request, 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 an NFS share. The underlying volume is automatically deleted. + # + # @overload delete_nfs_share(request, options = nil) + # Pass arguments to `delete_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_nfs_share(name: nil) + # Pass arguments to `delete_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 NFS share to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new + # + # # Call the delete_nfs_share method. + # result = client.delete_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest + + # Converts hash and nil to an 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_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.delete_nfs_share request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List the budget details to provision resources on a given project. + # + # @overload list_provisioning_quotas(request, options = nil) + # Pass arguments to `list_provisioning_quotas` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_provisioning_quotas` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListProvisioningQuotasRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new + # + # # Call the list_provisioning_quotas method. + # result = client.list_provisioning_quotas request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. + # p item + # end + # + def list_provisioning_quotas request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_provisioning_quotas.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_provisioning_quotas.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_provisioning_quotas.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_provisioning_quotas request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_provisioning_quotas, "provisioning_quotas", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Submit a provisiong configuration for a given project. + # + # @overload submit_provisioning_config(request, options = nil) + # Pass arguments to `submit_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_provisioning_config(parent: nil, provisioning_config: nil, email: nil) + # Pass arguments to `submit_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to create. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new + # + # # Call the submit_provisioning_config method. + # result = client.submit_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. + # p result + # + def submit_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest + + # Converts hash and nil to an 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_provisioning_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::BareMetalSolution::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.submit_provisioning_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.submit_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.submit_provisioning_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 + + ## + # Get ProvisioningConfig by name. + # + # @overload get_provisioning_config(request, options = nil) + # Pass arguments to `get_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_provisioning_config(name: nil) + # Pass arguments to `get_provisioning_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 ProvisioningConfig. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new + # + # # Call the get_provisioning_config method. + # result = client.get_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def get_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_provisioning_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::BareMetalSolution::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_provisioning_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_provisioning_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 + + ## + # Create new ProvisioningConfig. + # + # @overload create_provisioning_config(request, options = nil) + # Pass arguments to `create_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) + # Pass arguments to `create_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to create. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new + # + # # Call the create_provisioning_config method. + # result = client.create_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def create_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest + + # Converts hash and nil to an 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_provisioning_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::BareMetalSolution::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_provisioning_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.create_provisioning_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 + + ## + # Update existing ProvisioningConfig. + # + # @overload update_provisioning_config(request, options = nil) + # Pass arguments to `update_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) + # Pass arguments to `update_provisioning_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 provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new + # + # # Call the update_provisioning_config method. + # result = client.update_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def update_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest + + # Converts hash and nil to an 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_provisioning_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::BareMetalSolution::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_provisioning_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.update_provisioning_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 + + ## + # RenameNetwork sets a new name for a network. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_network(request, options = nil) + # Pass arguments to `rename_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rename_network(name: nil, new_network_id: nil) + # Pass arguments to `rename_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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` field is used to identify the network. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @param new_network_id [::String] + # Required. The new `id` of the network. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new + # + # # Call the rename_network method. + # result = client.rename_network request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + # p result + # + def rename_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rename_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_network.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rename_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.rename_network request, 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 the list of OS images which are currently approved. + # + # @overload list_os_images(request, options = nil) + # Pass arguments to `list_os_images` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_os_images(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_os_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListProvisioningQuotasRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new + # + # # Call the list_os_images method. + # result = client.list_os_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. + # p item + # end + # + def list_os_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_os_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::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_os_images.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_os_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_os_images request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_os_images, "os_images", request, result, 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 BareMetalSolution REST API. + # + # This class represents the configuration for BareMetalSolution 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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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 = "baremetalsolution.googleapis.com" + + config_attr :endpoint, nil, ::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 BareMetalSolution API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `rename_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_instance + ## + # RPC-specific configuration for `reset_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :reset_instance + ## + # RPC-specific configuration for `start_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :start_instance + ## + # RPC-specific configuration for `stop_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_instance + ## + # RPC-specific configuration for `enable_interactive_serial_console` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_interactive_serial_console + ## + # RPC-specific configuration for `disable_interactive_serial_console` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_interactive_serial_console + ## + # RPC-specific configuration for `detach_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :detach_lun + ## + # RPC-specific configuration for `list_ssh_keys` + # @return [::Gapic::Config::Method] + # + attr_reader :list_ssh_keys + ## + # RPC-specific configuration for `create_ssh_key` + # @return [::Gapic::Config::Method] + # + attr_reader :create_ssh_key + ## + # RPC-specific configuration for `delete_ssh_key` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_ssh_key + ## + # RPC-specific configuration for `list_volumes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volumes + ## + # RPC-specific configuration for `get_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume + ## + # RPC-specific configuration for `update_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :update_volume + ## + # RPC-specific configuration for `rename_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_volume + ## + # RPC-specific configuration for `evict_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :evict_volume + ## + # RPC-specific configuration for `resize_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :resize_volume + ## + # RPC-specific configuration for `list_networks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_networks + ## + # RPC-specific configuration for `list_network_usage` + # @return [::Gapic::Config::Method] + # + attr_reader :list_network_usage + ## + # RPC-specific configuration for `get_network` + # @return [::Gapic::Config::Method] + # + attr_reader :get_network + ## + # RPC-specific configuration for `update_network` + # @return [::Gapic::Config::Method] + # + attr_reader :update_network + ## + # RPC-specific configuration for `create_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :create_volume_snapshot + ## + # RPC-specific configuration for `restore_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_volume_snapshot + ## + # RPC-specific configuration for `delete_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_volume_snapshot + ## + # RPC-specific configuration for `get_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume_snapshot + ## + # RPC-specific configuration for `list_volume_snapshots` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volume_snapshots + ## + # RPC-specific configuration for `get_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lun + ## + # RPC-specific configuration for `list_luns` + # @return [::Gapic::Config::Method] + # + attr_reader :list_luns + ## + # RPC-specific configuration for `evict_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :evict_lun + ## + # RPC-specific configuration for `get_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :get_nfs_share + ## + # RPC-specific configuration for `list_nfs_shares` + # @return [::Gapic::Config::Method] + # + attr_reader :list_nfs_shares + ## + # RPC-specific configuration for `update_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :update_nfs_share + ## + # RPC-specific configuration for `create_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :create_nfs_share + ## + # RPC-specific configuration for `rename_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_nfs_share + ## + # RPC-specific configuration for `delete_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_nfs_share + ## + # RPC-specific configuration for `list_provisioning_quotas` + # @return [::Gapic::Config::Method] + # + attr_reader :list_provisioning_quotas + ## + # RPC-specific configuration for `submit_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_provisioning_config + ## + # RPC-specific configuration for `get_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_provisioning_config + ## + # RPC-specific configuration for `create_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_provisioning_config + ## + # RPC-specific configuration for `update_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_provisioning_config + ## + # RPC-specific configuration for `rename_network` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_network + ## + # RPC-specific configuration for `list_os_images` + # @return [::Gapic::Config::Method] + # + attr_reader :list_os_images + + # @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 + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_instance_config + rename_instance_config = parent_rpcs.rename_instance if parent_rpcs.respond_to? :rename_instance + @rename_instance = ::Gapic::Config::Method.new rename_instance_config + reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance + @reset_instance = ::Gapic::Config::Method.new reset_instance_config + start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance + @start_instance = ::Gapic::Config::Method.new start_instance_config + stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance + @stop_instance = ::Gapic::Config::Method.new stop_instance_config + enable_interactive_serial_console_config = parent_rpcs.enable_interactive_serial_console if parent_rpcs.respond_to? :enable_interactive_serial_console + @enable_interactive_serial_console = ::Gapic::Config::Method.new enable_interactive_serial_console_config + disable_interactive_serial_console_config = parent_rpcs.disable_interactive_serial_console if parent_rpcs.respond_to? :disable_interactive_serial_console + @disable_interactive_serial_console = ::Gapic::Config::Method.new disable_interactive_serial_console_config + detach_lun_config = parent_rpcs.detach_lun if parent_rpcs.respond_to? :detach_lun + @detach_lun = ::Gapic::Config::Method.new detach_lun_config + list_ssh_keys_config = parent_rpcs.list_ssh_keys if parent_rpcs.respond_to? :list_ssh_keys + @list_ssh_keys = ::Gapic::Config::Method.new list_ssh_keys_config + create_ssh_key_config = parent_rpcs.create_ssh_key if parent_rpcs.respond_to? :create_ssh_key + @create_ssh_key = ::Gapic::Config::Method.new create_ssh_key_config + delete_ssh_key_config = parent_rpcs.delete_ssh_key if parent_rpcs.respond_to? :delete_ssh_key + @delete_ssh_key = ::Gapic::Config::Method.new delete_ssh_key_config + list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes + @list_volumes = ::Gapic::Config::Method.new list_volumes_config + get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume + @get_volume = ::Gapic::Config::Method.new get_volume_config + update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume + @update_volume = ::Gapic::Config::Method.new update_volume_config + rename_volume_config = parent_rpcs.rename_volume if parent_rpcs.respond_to? :rename_volume + @rename_volume = ::Gapic::Config::Method.new rename_volume_config + evict_volume_config = parent_rpcs.evict_volume if parent_rpcs.respond_to? :evict_volume + @evict_volume = ::Gapic::Config::Method.new evict_volume_config + resize_volume_config = parent_rpcs.resize_volume if parent_rpcs.respond_to? :resize_volume + @resize_volume = ::Gapic::Config::Method.new resize_volume_config + list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks + @list_networks = ::Gapic::Config::Method.new list_networks_config + list_network_usage_config = parent_rpcs.list_network_usage if parent_rpcs.respond_to? :list_network_usage + @list_network_usage = ::Gapic::Config::Method.new list_network_usage_config + get_network_config = parent_rpcs.get_network if parent_rpcs.respond_to? :get_network + @get_network = ::Gapic::Config::Method.new get_network_config + update_network_config = parent_rpcs.update_network if parent_rpcs.respond_to? :update_network + @update_network = ::Gapic::Config::Method.new update_network_config + create_volume_snapshot_config = parent_rpcs.create_volume_snapshot if parent_rpcs.respond_to? :create_volume_snapshot + @create_volume_snapshot = ::Gapic::Config::Method.new create_volume_snapshot_config + restore_volume_snapshot_config = parent_rpcs.restore_volume_snapshot if parent_rpcs.respond_to? :restore_volume_snapshot + @restore_volume_snapshot = ::Gapic::Config::Method.new restore_volume_snapshot_config + delete_volume_snapshot_config = parent_rpcs.delete_volume_snapshot if parent_rpcs.respond_to? :delete_volume_snapshot + @delete_volume_snapshot = ::Gapic::Config::Method.new delete_volume_snapshot_config + get_volume_snapshot_config = parent_rpcs.get_volume_snapshot if parent_rpcs.respond_to? :get_volume_snapshot + @get_volume_snapshot = ::Gapic::Config::Method.new get_volume_snapshot_config + list_volume_snapshots_config = parent_rpcs.list_volume_snapshots if parent_rpcs.respond_to? :list_volume_snapshots + @list_volume_snapshots = ::Gapic::Config::Method.new list_volume_snapshots_config + get_lun_config = parent_rpcs.get_lun if parent_rpcs.respond_to? :get_lun + @get_lun = ::Gapic::Config::Method.new get_lun_config + list_luns_config = parent_rpcs.list_luns if parent_rpcs.respond_to? :list_luns + @list_luns = ::Gapic::Config::Method.new list_luns_config + evict_lun_config = parent_rpcs.evict_lun if parent_rpcs.respond_to? :evict_lun + @evict_lun = ::Gapic::Config::Method.new evict_lun_config + get_nfs_share_config = parent_rpcs.get_nfs_share if parent_rpcs.respond_to? :get_nfs_share + @get_nfs_share = ::Gapic::Config::Method.new get_nfs_share_config + list_nfs_shares_config = parent_rpcs.list_nfs_shares if parent_rpcs.respond_to? :list_nfs_shares + @list_nfs_shares = ::Gapic::Config::Method.new list_nfs_shares_config + update_nfs_share_config = parent_rpcs.update_nfs_share if parent_rpcs.respond_to? :update_nfs_share + @update_nfs_share = ::Gapic::Config::Method.new update_nfs_share_config + create_nfs_share_config = parent_rpcs.create_nfs_share if parent_rpcs.respond_to? :create_nfs_share + @create_nfs_share = ::Gapic::Config::Method.new create_nfs_share_config + rename_nfs_share_config = parent_rpcs.rename_nfs_share if parent_rpcs.respond_to? :rename_nfs_share + @rename_nfs_share = ::Gapic::Config::Method.new rename_nfs_share_config + delete_nfs_share_config = parent_rpcs.delete_nfs_share if parent_rpcs.respond_to? :delete_nfs_share + @delete_nfs_share = ::Gapic::Config::Method.new delete_nfs_share_config + list_provisioning_quotas_config = parent_rpcs.list_provisioning_quotas if parent_rpcs.respond_to? :list_provisioning_quotas + @list_provisioning_quotas = ::Gapic::Config::Method.new list_provisioning_quotas_config + submit_provisioning_config_config = parent_rpcs.submit_provisioning_config if parent_rpcs.respond_to? :submit_provisioning_config + @submit_provisioning_config = ::Gapic::Config::Method.new submit_provisioning_config_config + get_provisioning_config_config = parent_rpcs.get_provisioning_config if parent_rpcs.respond_to? :get_provisioning_config + @get_provisioning_config = ::Gapic::Config::Method.new get_provisioning_config_config + create_provisioning_config_config = parent_rpcs.create_provisioning_config if parent_rpcs.respond_to? :create_provisioning_config + @create_provisioning_config = ::Gapic::Config::Method.new create_provisioning_config_config + update_provisioning_config_config = parent_rpcs.update_provisioning_config if parent_rpcs.respond_to? :update_provisioning_config + @update_provisioning_config = ::Gapic::Config::Method.new update_provisioning_config_config + rename_network_config = parent_rpcs.rename_network if parent_rpcs.respond_to? :rename_network + @rename_network = ::Gapic::Config::Method.new rename_network_config + list_os_images_config = parent_rpcs.list_os_images if parent_rpcs.respond_to? :list_os_images + @list_os_images = ::Gapic::Config::Method.new list_os_images_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb new file mode 100644 index 000000000000..0cfaa78087af --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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 BareMetalSolution + module V2 + module BareMetalSolution + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BareMetalSolution 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 BareMetalSolution 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::BareMetalSolution::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::BareMetalSolution::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::BareMetalSolution::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::BareMetalSolution::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 = "baremetalsolution.googleapis.com" + + config_attr :endpoint, nil, ::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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb new file mode 100644 index 000000000000..5dc3748f6217 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb @@ -0,0 +1,2789 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + module Rest + ## + # REST service stub for the BareMetalSolution 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::BareMetalSolution::V2::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::BareMetalSolution::V2::ListInstancesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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 update_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::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 rename_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # A result object deserialized from the server's reply + def rename_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rename_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: "rename_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::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 reset_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def reset_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_reset_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: "reset_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 start_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_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: "start_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 stop_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def stop_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_stop_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: "stop_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 enable_interactive_serial_console REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_interactive_serial_console request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_interactive_serial_console_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_interactive_serial_console", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_interactive_serial_console REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_interactive_serial_console request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_interactive_serial_console_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_interactive_serial_console", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the detach_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def detach_lun request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_detach_lun_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "detach_lun", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_ssh_keys REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse] + # A result object deserialized from the server's reply + def list_ssh_keys request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_ssh_keys_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_ssh_keys", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.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_ssh_key REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # A result object deserialized from the server's reply + def create_ssh_key request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_ssh_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: "create_ssh_key", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::SSHKey.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_ssh_key REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_ssh_key request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_ssh_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: "delete_ssh_key", + 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_volumes REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse] + # A result object deserialized from the server's reply + def list_volumes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_volumes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_volumes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # A result object deserialized from the server's reply + def get_volume request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_volume", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Volume.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_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_volume request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_volume_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_volume", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rename_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # A result object deserialized from the server's reply + def rename_volume request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rename_volume_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rename_volume", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Volume.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the evict_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def evict_volume request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_evict_volume_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "evict_volume", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the resize_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def resize_volume request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_resize_volume_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "resize_volume", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_networks REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse] + # A result object deserialized from the server's reply + def list_networks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_networks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_networks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.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_network_usage REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # A result object deserialized from the server's reply + def list_network_usage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_network_usage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_network_usage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # A result object deserialized from the server's reply + def get_network request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_network_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_network", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Network.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_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_network request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_network_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_network", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # A result object deserialized from the server's reply + def create_volume_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_volume_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_volume_snapshot", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.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_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_volume_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restore_volume_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_volume_snapshot", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_volume_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_volume_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_volume_snapshot", + 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_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # A result object deserialized from the server's reply + def get_volume_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_volume_snapshot", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.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_volume_snapshots REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse] + # A result object deserialized from the server's reply + def list_volume_snapshots request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_volume_snapshots_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_volume_snapshots", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetLunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Lun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Lun] + # A result object deserialized from the server's reply + def get_lun request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lun_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_lun", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Lun.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_luns REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListLunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListLunsResponse] + # A result object deserialized from the server's reply + def list_luns request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_luns_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_luns", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the evict_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def evict_lun request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_evict_lun_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "evict_lun", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # A result object deserialized from the server's reply + def get_nfs_share request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_nfs_share_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_nfs_share", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.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_nfs_shares REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse] + # A result object deserialized from the server's reply + def list_nfs_shares request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_nfs_shares_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_nfs_shares", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.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_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_nfs_share request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_nfs_share_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_nfs_share", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_nfs_share request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_nfs_share_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_nfs_share", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rename_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # A result object deserialized from the server's reply + def rename_nfs_share request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rename_nfs_share_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rename_nfs_share", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.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_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_nfs_share request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_nfs_share_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_nfs_share", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_provisioning_quotas REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse] + # A result object deserialized from the server's reply + def list_provisioning_quotas request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_provisioning_quotas_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_provisioning_quotas", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.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_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # A result object deserialized from the server's reply + def submit_provisioning_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_submit_provisioning_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: "submit_provisioning_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # A result object deserialized from the server's reply + def get_provisioning_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_provisioning_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_provisioning_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.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_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # A result object deserialized from the server's reply + def create_provisioning_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_provisioning_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_provisioning_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.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_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # A result object deserialized from the server's reply + def update_provisioning_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_provisioning_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_provisioning_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rename_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # A result object deserialized from the server's reply + def rename_network request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rename_network_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rename_network", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Network.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_os_images REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse] + # A result object deserialized from the server's reply + def list_os_images request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_os_images_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_os_images", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.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::BareMetalSolution::V2::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: "/v2/{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::BareMetalSolution::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::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: "/v2/{instance.name}", + body: "instance", + matches: [ + ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rename_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rename_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:rename", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the reset_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_reset_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:reset", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:start", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the stop_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_stop_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:stop", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_interactive_serial_console REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest] + # 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_interactive_serial_console_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:enableInteractiveSerialConsole", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_interactive_serial_console REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest] + # 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_interactive_serial_console_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:disableInteractiveSerialConsole", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the detach_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_detach_lun_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{instance}:detachLun", + body: "*", + matches: [ + ["instance", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_ssh_keys REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_ssh_keys_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/sshKeys", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_ssh_key REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest] + # 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_ssh_key_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/sshKeys", + body: "ssh_key", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_ssh_key REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest] + # 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_ssh_key_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/sshKeys/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_volumes REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_volumes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/volumes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_volume_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest] + # 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_volume_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{volume.name}", + body: "volume", + matches: [ + ["volume.name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rename_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rename_volume_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:rename", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the evict_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_evict_volume_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:evict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the resize_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_resize_volume_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{volume}:resize", + body: "*", + matches: [ + ["volume", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_networks REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_networks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/networks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_network_usage REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_network_usage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{location}/networks:listNetworkUsage", + matches: [ + ["location", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_network_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest] + # 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_network_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{network.name}", + body: "network", + matches: [ + ["network.name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest] + # 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_volume_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/snapshots", + body: "volume_snapshot", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restore_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest] + # 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_volume_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{volume_snapshot}:restoreVolumeSnapshot", + body: "*", + matches: [ + ["volume_snapshot", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest] + # 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_volume_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_volume_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_volume_snapshots REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_volume_snapshots_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/snapshots", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetLunRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_lun_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/luns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_luns REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_luns_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/luns", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the evict_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_evict_lun_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:evict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/luns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_nfs_share_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_nfs_shares REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_nfs_shares_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/nfsShares", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest] + # 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_nfs_share_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{nfs_share.name}", + body: "nfs_share", + matches: [ + ["nfs_share.name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest] + # 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_nfs_share_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/nfsShares", + body: "nfs_share", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rename_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rename_nfs_share_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:rename", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest] + # 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_nfs_share_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_provisioning_quotas REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_provisioning_quotas_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/provisioningQuotas", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the submit_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest] + # 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_provisioning_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/provisioningConfigs:submit", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_provisioning_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest] + # 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_provisioning_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/provisioningConfigs", + body: "provisioning_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest] + # 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_provisioning_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{provisioning_config.name}", + body: "provisioning_config", + matches: [ + ["provisioning_config.name", %r{^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rename_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rename_network_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:rename", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_os_images REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_os_images_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/osImages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb new file mode 100644 index 000000000000..37345efedc50 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/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 BareMetalSolution + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/bare_metal_solution/v2/rest" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + module V2 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BareMetalSolution"] + 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: "/v2/{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: "/v2/{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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb new file mode 100644 index 000000000000..980745ed179a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/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/bare_metal_solution/v2/bare_metal_solution/rest" +require "google/cloud/bare_metal_solution/v2/bindings_override" +require "google/cloud/bare_metal_solution/v2/version" + +module Google + module Cloud + module BareMetalSolution + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bare_metal_solution/v2/rest" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + module V2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb new file mode 100644 index 000000000000..8c3694d57a2e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/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 BareMetalSolution + module V2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb new file mode 100644 index 000000000000..ea11c0b2c2e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/baremetalsolution.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/cloud/baremetalsolution/v2/instance_pb' +require 'google/cloud/baremetalsolution/v2/lun_pb' +require 'google/cloud/baremetalsolution/v2/network_pb' +require 'google/cloud/baremetalsolution/v2/nfs_share_pb' +require 'google/cloud/baremetalsolution/v2/osimage_pb' +require 'google/cloud/baremetalsolution/v2/provisioning_pb' +require 'google/cloud/baremetalsolution/v2/ssh_key_pb' +require 'google/cloud/baremetalsolution/v2/volume_pb' +require 'google/cloud/baremetalsolution/v2/volume_snapshot_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/cloud/baremetalsolution/v2/baremetalsolution.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x30google/cloud/baremetalsolution/v2/instance.proto\x1a+google/cloud/baremetalsolution/v2/lun.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a\x31google/cloud/baremetalsolution/v2/nfs_share.proto\x1a/google/cloud/baremetalsolution/v2/osimage.proto\x1a\x34google/cloud/baremetalsolution/v2/provisioning.proto\x1a/google/cloud/baremetalsolution/v2/ssh_key.proto\x1a.google/cloud/baremetalsolution/v2/volume.proto\x1a\x37google/cloud/baremetalsolution/v2/volume_snapshot.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\x17\n\x15ResetInstanceResponse2\xbaK\n\x11\x42\x61reMetalSolution\x12\xc2\x01\n\rListInstances\x12\x37.google.cloud.baremetalsolution.v2.ListInstancesRequest\x1a\x38.google.cloud.baremetalsolution.v2.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/instances\x12\xaf\x01\n\x0bGetInstance\x12\x35.google.cloud.baremetalsolution.v2.GetInstanceRequest\x1a+.google.cloud.baremetalsolution.v2.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/instances/*}\x12\xea\x01\n\x0eUpdateInstance\x12\x38.google.cloud.baremetalsolution.v2.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v2/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xcf\x01\n\x0eRenameInstance\x12\x38.google.cloud.baremetalsolution.v2.RenameInstanceRequest\x1a+.google.cloud.baremetalsolution.v2.Instance\"V\xda\x41\x14name,new_instance_id\x82\xd3\xe4\x93\x02\x39\"4/v2/{name=projects/*/locations/*/instances/*}:rename:\x01*\x12\xdb\x01\n\rResetInstance\x12\x37.google.cloud.baremetalsolution.v2.ResetInstanceRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15ResetInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/instances/*}:reset:\x01*\x12\xdb\x01\n\rStartInstance\x12\x37.google.cloud.baremetalsolution.v2.StartInstanceRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15StartInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/instances/*}:start:\x01*\x12\xd7\x01\n\x0cStopInstance\x12\x36.google.cloud.baremetalsolution.v2.StopInstanceRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41)\n\x14StopInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/instances/*}:stop:\x01*\x12\xa8\x02\n\x1e\x45nableInteractiveSerialConsole\x12H.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest\x1a\x1d.google.longrunning.Operation\"\x9c\x01\xca\x41;\n&EnableInteractiveSerialConsoleResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v2/{name=projects/*/locations/*/instances/*}:enableInteractiveSerialConsole:\x01*\x12\xac\x02\n\x1f\x44isableInteractiveSerialConsole\x12I.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41<\n\'DisableInteractiveSerialConsoleResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v2/{name=projects/*/locations/*/instances/*}:disableInteractiveSerialConsole:\x01*\x12\xd6\x01\n\tDetachLun\x12\x33.google.cloud.baremetalsolution.v2.DetachLunRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x0cinstance,lun\x82\xd3\xe4\x93\x02@\";/v2/{instance=projects/*/locations/*/instances/*}:detachLun:\x01*\x12\xba\x01\n\x0bListSSHKeys\x12\x35.google.cloud.baremetalsolution.v2.ListSSHKeysRequest\x1a\x36.google.cloud.baremetalsolution.v2.ListSSHKeysResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v2/{parent=projects/*/locations/*}/sshKeys\x12\xcb\x01\n\x0c\x43reateSSHKey\x12\x36.google.cloud.baremetalsolution.v2.CreateSSHKeyRequest\x1a).google.cloud.baremetalsolution.v2.SSHKey\"X\xda\x41\x19parent,ssh_key,ssh_key_id\x82\xd3\xe4\x93\x02\x36\"+/v2/{parent=projects/*/locations/*}/sshKeys:\x07ssh_key\x12\x9a\x01\n\x0c\x44\x65leteSSHKey\x12\x36.google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v2/{name=projects/*/locations/*/sshKeys/*}\x12\xba\x01\n\x0bListVolumes\x12\x35.google.cloud.baremetalsolution.v2.ListVolumesRequest\x1a\x36.google.cloud.baremetalsolution.v2.ListVolumesResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v2/{parent=projects/*/locations/*}/volumes\x12\xa7\x01\n\tGetVolume\x12\x33.google.cloud.baremetalsolution.v2.GetVolumeRequest\x1a).google.cloud.baremetalsolution.v2.Volume\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v2/{name=projects/*/locations/*/volumes/*}\x12\xdc\x01\n\x0cUpdateVolume\x12\x36.google.cloud.baremetalsolution.v2.UpdateVolumeRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06Volume\x12\x11OperationMetadata\xda\x41\x12volume,update_mask\x82\xd3\xe4\x93\x02<22/v2/{volume.name=projects/*/locations/*/volumes/*}:\x06volume\x12\xc5\x01\n\x0cRenameVolume\x12\x36.google.cloud.baremetalsolution.v2.RenameVolumeRequest\x1a).google.cloud.baremetalsolution.v2.Volume\"R\xda\x41\x12name,new_volume_id\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/volumes/*}:rename:\x01*\x12\xd5\x01\n\x0b\x45victVolume\x12\x35.google.cloud.baremetalsolution.v2.EvictVolumeRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v2/{name=projects/*/locations/*/volumes/*}:evict:\x01*\x12\xd6\x01\n\x0cResizeVolume\x12\x36.google.cloud.baremetalsolution.v2.ResizeVolumeRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41\x1b\n\x06Volume\x12\x11OperationMetadata\xda\x41\x0fvolume,size_gib\x82\xd3\xe4\x93\x02\x39\"4/v2/{volume=projects/*/locations/*/volumes/*}:resize:\x01*\x12\xbe\x01\n\x0cListNetworks\x12\x36.google.cloud.baremetalsolution.v2.ListNetworksRequest\x1a\x37.google.cloud.baremetalsolution.v2.ListNetworksResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/networks\x12\xdf\x01\n\x10ListNetworkUsage\x12:.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest\x1a;.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse\"R\xda\x41\x08location\x82\xd3\xe4\x93\x02\x41\x12?/v2/{location=projects/*/locations/*}/networks:listNetworkUsage\x12\xab\x01\n\nGetNetwork\x12\x34.google.cloud.baremetalsolution.v2.GetNetworkRequest\x1a*.google.cloud.baremetalsolution.v2.Network\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v2/{name=projects/*/locations/*/networks/*}\x12\xe3\x01\n\rUpdateNetwork\x12\x37.google.cloud.baremetalsolution.v2.UpdateNetworkRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07Network\x12\x11OperationMetadata\xda\x41\x13network,update_mask\x82\xd3\xe4\x93\x02?24/v2/{network.name=projects/*/locations/*/networks/*}:\x07network\x12\xf4\x01\n\x14\x43reateVolumeSnapshot\x12>.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest\x1a\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\"i\xda\x41\x16parent,volume_snapshot\x82\xd3\xe4\x93\x02J\"7/v2/{parent=projects/*/locations/*/volumes/*}/snapshots:\x0fvolume_snapshot\x12\x95\x02\n\x15RestoreVolumeSnapshot\x12?.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41#\n\x0eVolumeSnapshot\x12\x11OperationMetadata\xda\x41\x0fvolume_snapshot\x82\xd3\xe4\x93\x02]\"X/v2/{volume_snapshot=projects/*/locations/*/volumes/*/snapshots/*}:restoreVolumeSnapshot:\x01*\x12\xb6\x01\n\x14\x44\x65leteVolumeSnapshot\x12>.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}\x12\xcb\x01\n\x11GetVolumeSnapshot\x12;.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest\x1a\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}\x12\xde\x01\n\x13ListVolumeSnapshots\x12=.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest\x1a>.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{parent=projects/*/locations/*/volumes/*}/snapshots\x12\xa5\x01\n\x06GetLun\x12\x30.google.cloud.baremetalsolution.v2.GetLunRequest\x1a&.google.cloud.baremetalsolution.v2.Lun\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{name=projects/*/locations/*/volumes/*/luns/*}\x12\xb8\x01\n\x08ListLuns\x12\x32.google.cloud.baremetalsolution.v2.ListLunsRequest\x1a\x33.google.cloud.baremetalsolution.v2.ListLunsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{parent=projects/*/locations/*/volumes/*}/luns\x12\xd6\x01\n\x08\x45victLun\x12\x32.google.cloud.baremetalsolution.v2.EvictLunRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v2/{name=projects/*/locations/*/volumes/*/luns/*}:evict:\x01*\x12\xaf\x01\n\x0bGetNfsShare\x12\x35.google.cloud.baremetalsolution.v2.GetNfsShareRequest\x1a+.google.cloud.baremetalsolution.v2.NfsShare\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/nfsShares/*}\x12\xc2\x01\n\rListNfsShares\x12\x37.google.cloud.baremetalsolution.v2.ListNfsSharesRequest\x1a\x38.google.cloud.baremetalsolution.v2.ListNfsSharesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/nfsShares\x12\xee\x01\n\x0eUpdateNfsShare\x12\x38.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x1d\n\x08NfsShare\x12\x11OperationMetadata\xda\x41\x15nfs_share,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v2/{nfs_share.name=projects/*/locations/*/nfsShares/*}:\tnfs_share\x12\xde\x01\n\x0e\x43reateNfsShare\x12\x38.google.cloud.baremetalsolution.v2.CreateNfsShareRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x1d\n\x08NfsShare\x12\x11OperationMetadata\xda\x41\x10parent,nfs_share\x82\xd3\xe4\x93\x02:\"-/v2/{parent=projects/*/locations/*}/nfsShares:\tnfs_share\x12\xcf\x01\n\x0eRenameNfsShare\x12\x38.google.cloud.baremetalsolution.v2.RenameNfsShareRequest\x1a+.google.cloud.baremetalsolution.v2.NfsShare\"V\xda\x41\x14name,new_nfsshare_id\x82\xd3\xe4\x93\x02\x39\"4/v2/{name=projects/*/locations/*/nfsShares/*}:rename:\x01*\x12\xd4\x01\n\x0e\x44\x65leteNfsShare\x12\x38.google.cloud.baremetalsolution.v2.DeleteNfsShareRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/nfsShares/*}\x12\xe6\x01\n\x16ListProvisioningQuotas\x12@.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest\x1a\x41.google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v2/{parent=projects/*/locations/*}/provisioningQuotas\x12\x8b\x02\n\x18SubmitProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest\x1a\x43.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse\"f\xda\x41\x1aparent,provisioning_config\x82\xd3\xe4\x93\x02\x43\">/v2/{parent=projects/*/locations/*}/provisioningConfigs:submit:\x01*\x12\xd7\x01\n\x15GetProvisioningConfig\x12?.google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/provisioningConfigs/*}\x12\x88\x02\n\x18\x43reateProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"q\xda\x41\x1aparent,provisioning_config\x82\xd3\xe4\x93\x02N\"7/v2/{parent=projects/*/locations/*}/provisioningConfigs:\x13provisioning_config\x12\xa2\x02\n\x18UpdateProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"\x8a\x01\xda\x41\x1fprovisioning_config,update_mask\x82\xd3\xe4\x93\x02\x62\x32K/v2/{provisioning_config.name=projects/*/locations/*/provisioningConfigs/*}:\x13provisioning_config\x12\xca\x01\n\rRenameNetwork\x12\x37.google.cloud.baremetalsolution.v2.RenameNetworkRequest\x1a*.google.cloud.baremetalsolution.v2.Network\"T\xda\x41\x13name,new_network_id\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/networks/*}:rename:\x01*\x12\xbe\x01\n\x0cListOSImages\x12\x36.google.cloud.baremetalsolution.v2.ListOSImagesRequest\x1a\x37.google.cloud.baremetalsolution.v2.ListOSImagesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/osImages\x1aT\xca\x41 baremetalsolution.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x85\x02\n%com.google.cloud.baremetalsolution.v2B\x16\x42\x61reMetalSolutionProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.OperationMetadata").msgclass + ResetInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResetInstanceResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb new file mode 100644 index 000000000000..7a1a2a562afe --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb @@ -0,0 +1,154 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/baremetalsolution/v2/baremetalsolution.proto for package 'Google.Cloud.BareMetalSolution.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/baremetalsolution/v2/baremetalsolution_pb' + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + # Performs management operations on Bare Metal Solution servers. + # + # The `baremetalsolution.googleapis.com` service provides management + # capabilities for Bare Metal Solution servers. To access the API methods, you + # must assign Bare Metal Solution IAM roles containing the desired permissions + # to your staff in your Google Cloud project. You must also enable the Bare + # Metal Solution API. Once enabled, the methods act + # upon specific servers in your Bare Metal Solution environment. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.baremetalsolution.v2.BareMetalSolution' + + # List servers in a given project and location. + rpc :ListInstances, ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse + # Get details about a single server. + rpc :GetInstance, ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, ::Google::Cloud::BareMetalSolution::V2::Instance + # Update details of a single server. + rpc :UpdateInstance, ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, ::Google::Longrunning::Operation + # RenameInstance sets a new name for an instance. + # Use with caution, previous names become immediately invalidated. + rpc :RenameInstance, ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Google::Cloud::BareMetalSolution::V2::Instance + # Perform an ungraceful, hard reset on a server. Equivalent to shutting the + # power off and then turning it back on. + rpc :ResetInstance, ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Google::Longrunning::Operation + # Starts a server that was shutdown. + rpc :StartInstance, ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Google::Longrunning::Operation + # Stop a running server. + rpc :StopInstance, ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Google::Longrunning::Operation + # Enable the interactive serial console feature on an instance. + rpc :EnableInteractiveSerialConsole, ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Google::Longrunning::Operation + # Disable the interactive serial console feature on an instance. + rpc :DisableInteractiveSerialConsole, ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Google::Longrunning::Operation + # Detach LUN from Instance. + rpc :DetachLun, ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Google::Longrunning::Operation + # Lists the public SSH keys registered for the specified project. + # These SSH keys are used only for the interactive serial console feature. + rpc :ListSSHKeys, ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse + # Register a public SSH key in the specified project for use with the + # interactive serial console feature. + rpc :CreateSSHKey, ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Google::Cloud::BareMetalSolution::V2::SSHKey + # Deletes a public SSH key registered in the specified project. + rpc :DeleteSSHKey, ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Google::Protobuf::Empty + # List storage volumes in a given project and location. + rpc :ListVolumes, ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse + # Get details of a single storage volume. + rpc :GetVolume, ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Google::Cloud::BareMetalSolution::V2::Volume + # Update details of a single storage volume. + rpc :UpdateVolume, ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Google::Longrunning::Operation + # RenameVolume sets a new name for a volume. + # Use with caution, previous names become immediately invalidated. + rpc :RenameVolume, ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Google::Cloud::BareMetalSolution::V2::Volume + # Skips volume's cooloff and deletes it now. + # Volume must be in cooloff state. + rpc :EvictVolume, ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Google::Longrunning::Operation + # Emergency Volume resize. + rpc :ResizeVolume, ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Google::Longrunning::Operation + # List network in a given project and location. + rpc :ListNetworks, ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse + # List all Networks (and used IPs for each Network) in the vendor account + # associated with the specified project. + rpc :ListNetworkUsage, ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse + # Get details of a single network. + rpc :GetNetwork, ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Google::Cloud::BareMetalSolution::V2::Network + # Update details of a single network. + rpc :UpdateNetwork, ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Google::Longrunning::Operation + # Takes a snapshot of a boot volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + rpc :CreateVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot + # Uses the specified snapshot to restore its parent volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + rpc :RestoreVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Google::Longrunning::Operation + # Deletes a volume snapshot. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + rpc :DeleteVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Google::Protobuf::Empty + # Returns the specified snapshot resource. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + rpc :GetVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot + # Retrieves the list of snapshots for the specified volume. + # Returns a response with an empty list of snapshots if called + # for a non-boot volume. + rpc :ListVolumeSnapshots, ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse + # Get details of a single storage logical unit number(LUN). + rpc :GetLun, ::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Google::Cloud::BareMetalSolution::V2::Lun + # List storage volume luns for given storage volume. + rpc :ListLuns, ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse + # Skips lun's cooloff and deletes it now. + # Lun must be in cooloff state. + rpc :EvictLun, ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Google::Longrunning::Operation + # Get details of a single NFS share. + rpc :GetNfsShare, ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Google::Cloud::BareMetalSolution::V2::NfsShare + # List NFS shares. + rpc :ListNfsShares, ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse + # Update details of a single NFS share. + rpc :UpdateNfsShare, ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Google::Longrunning::Operation + # Create an NFS share. + rpc :CreateNfsShare, ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Google::Longrunning::Operation + # RenameNfsShare sets a new name for an nfsshare. + # Use with caution, previous names become immediately invalidated. + rpc :RenameNfsShare, ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Google::Cloud::BareMetalSolution::V2::NfsShare + # Delete an NFS share. The underlying volume is automatically deleted. + rpc :DeleteNfsShare, ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Google::Longrunning::Operation + # List the budget details to provision resources on a given project. + rpc :ListProvisioningQuotas, ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse + # Submit a provisiong configuration for a given project. + rpc :SubmitProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse + # Get ProvisioningConfig by name. + rpc :GetProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig + # Create new ProvisioningConfig. + rpc :CreateProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig + # Update existing ProvisioningConfig. + rpc :UpdateProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig + # RenameNetwork sets a new name for a network. + # Use with caution, previous names become immediately invalidated. + rpc :RenameNetwork, ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Google::Cloud::BareMetalSolution::V2::Network + # Retrieves the list of OS images which are currently approved. + rpc :ListOSImages, ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb new file mode 100644 index 000000000000..6dcab60b7988 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/common.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/baremetalsolution/v2/common.proto\x12!google.cloud.baremetalsolution.v2*\xaa\x01\n\x15VolumePerformanceTier\x12\'\n#VOLUME_PERFORMANCE_TIER_UNSPECIFIED\x10\x00\x12\"\n\x1eVOLUME_PERFORMANCE_TIER_SHARED\x10\x01\x12$\n VOLUME_PERFORMANCE_TIER_ASSIGNED\x10\x02\x12\x1e\n\x1aVOLUME_PERFORMANCE_TIER_HT\x10\x03*l\n\x0fWorkloadProfile\x12 \n\x1cWORKLOAD_PROFILE_UNSPECIFIED\x10\x00\x12\x1c\n\x18WORKLOAD_PROFILE_GENERIC\x10\x01\x12\x19\n\x15WORKLOAD_PROFILE_HANA\x10\x02\x42\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0b\x43ommonProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + VolumePerformanceTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumePerformanceTier").enummodule + WorkloadProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.WorkloadProfile").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb new file mode 100644 index 000000000000..a8f5ce8b427a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/instance.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/baremetalsolution/v2/common_pb' +require 'google/cloud/baremetalsolution/v2/lun_pb' +require 'google/cloud/baremetalsolution/v2/network_pb' +require 'google/cloud/baremetalsolution/v2/volume_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/baremetalsolution/v2/instance.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a+google/cloud/baremetalsolution/v2/lun.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a.google/cloud/baremetalsolution/v2/volume.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc9\t\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x0f\n\x02id\x18\x0b \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\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0cmachine_type\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x45\n\x05state\x18\x05 \x01(\x0e\x32\x31.google.cloud.baremetalsolution.v2.Instance.StateB\x03\xe0\x41\x03\x12\x1e\n\x16hyperthreading_enabled\x18\x06 \x01(\x08\x12G\n\x06labels\x18\x07 \x03(\x0b\x32\x37.google.cloud.baremetalsolution.v2.Instance.LabelsEntry\x12\x39\n\x04luns\x18\x08 \x03(\x0b\x32&.google.cloud.baremetalsolution.v2.LunB\x03\xe0\x41\x05\x12?\n\x07volumes\x18\x10 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.VolumeB\x03\xe0\x41\x04\x12\x41\n\x08networks\x18\t \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.NetworkB\x03\xe0\x41\x03\x12/\n\"interactive_serial_console_enabled\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12\x10\n\x08os_image\x18\x0c \x01(\t\x12\x10\n\x03pod\x18\r \x01(\tB\x03\xe0\x41\x05\x12U\n\x10network_template\x18\x0e \x01(\tB;\xfa\x41\x38\n6baremetalsolution.googleapis.com/ServerNetworkTemplate\x12O\n\x12logical_interfaces\x18\x0f \x03(\x0b\x32\x33.google.cloud.baremetalsolution.v2.LogicalInterface\x12\x17\n\nlogin_info\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12L\n\x10workload_profile\x18\x12 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.WorkloadProfile\x12\x1d\n\x10\x66irmware_version\x18\x13 \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\"\x82\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08STARTING\x10\x05\x12\x0c\n\x08STOPPING\x10\x06\x12\x0c\n\x08SHUTDOWN\x10\x07:l\xea\x41i\n)baremetalsolution.googleapis.com/Instance\x12\n\tinstances\x18\x01 \x03(\x0b\x32+.google.cloud.baremetalsolution.v2.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8c\x01\n\x15UpdateInstanceRequest\x12\x42\n\x08instance\x18\x01 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.InstanceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"v\n\x15RenameInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x1c\n\x0fnew_instance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"W\n\x14ResetInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"W\n\x14StartInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"\x17\n\x15StartInstanceResponse\"V\n\x13StopInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"\x16\n\x14StopInstanceResponse\"h\n%EnableInteractiveSerialConsoleRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"(\n&EnableInteractiveSerialConsoleResponse\"i\n&DisableInteractiveSerialConsoleRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\")\n\'DisableInteractiveSerialConsoleResponse\"\xa7\x01\n\x10\x44\x65tachLunRequest\x12\x43\n\x08instance\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x39\n\x03lun\x18\x02 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/Lun\x12\x13\n\x0bskip_reboot\x18\x03 \x01(\x08\"\xac\x04\n\x15ServerNetworkTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12!\n\x19\x61pplicable_instance_types\x18\x02 \x03(\t\x12\x65\n\x12logical_interfaces\x18\x03 \x03(\x0b\x32I.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface\x1a\xdd\x01\n\x10LogicalInterface\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x65\n\x04type\x18\x02 \x01(\x0e\x32W.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType\x12\x10\n\x08required\x18\x03 \x01(\x08\"B\n\rInterfaceType\x12\x1e\n\x1aINTERFACE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OND\x10\x01\x12\x07\n\x03NIC\x10\x02:\x95\x01\xea\x41\x91\x01\n6baremetalsolution.googleapis.com/ServerNetworkTemplate\x12Wprojects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}B\xfc\x01\n%com.google.cloud.baremetalsolution.v2B\rInstanceProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Instance").msgclass + Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Instance.State").enummodule + GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetInstanceRequest").msgclass + ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListInstancesRequest").msgclass + ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListInstancesResponse").msgclass + UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateInstanceRequest").msgclass + RenameInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameInstanceRequest").msgclass + ResetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResetInstanceRequest").msgclass + StartInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StartInstanceRequest").msgclass + StartInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StartInstanceResponse").msgclass + StopInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StopInstanceRequest").msgclass + StopInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StopInstanceResponse").msgclass + EnableInteractiveSerialConsoleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest").msgclass + EnableInteractiveSerialConsoleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleResponse").msgclass + DisableInteractiveSerialConsoleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest").msgclass + DisableInteractiveSerialConsoleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleResponse").msgclass + DetachLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DetachLunRequest").msgclass + ServerNetworkTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate").msgclass + ServerNetworkTemplate::LogicalInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface").msgclass + ServerNetworkTemplate::LogicalInterface::InterfaceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb new file mode 100644 index 000000000000..36f0a6678470 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/lun.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/baremetalsolution/v2/lun.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdd\x06\n\x03Lun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\n \x01(\t\x12;\n\x05state\x18\x02 \x01(\x0e\x32,.google.cloud.baremetalsolution.v2.Lun.State\x12\x0f\n\x07size_gb\x18\x03 \x01(\x03\x12T\n\x12multiprotocol_type\x18\x04 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType\x12\x44\n\x0estorage_volume\x18\x05 \x01(\tB,\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tshareable\x18\x06 \x01(\x08\x12\x10\n\x08\x62oot_lun\x18\x07 \x01(\x08\x12H\n\x0cstorage_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.Lun.StorageType\x12\x0c\n\x04wwid\x18\t \x01(\t\x12\x34\n\x0b\x65xpire_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x0c \x03(\tB1\xe0\x41\x03\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0c\n\x08UPDATING\x10\x02\x12\t\n\x05READY\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0c\n\x08\x43OOL_OFF\x10\x05\"B\n\x11MultiprotocolType\x12\"\n\x1eMULTIPROTOCOL_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05LINUX\x10\x01\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02:n\xea\x41k\n$baremetalsolution.googleapis.com/Lun\x12\x43projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}\"K\n\rGetLunRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/Lun\"y\n\x0fListLunsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"v\n\x10ListLunsResponse\x12\x34\n\x04luns\x18\x01 \x03(\x0b\x32&.google.cloud.baremetalsolution.v2.Lun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x0f\x45victLunRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/LunB\xf7\x01\n%com.google.cloud.baremetalsolution.v2B\x08LunProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + Lun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun").msgclass + Lun::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.State").enummodule + Lun::MultiprotocolType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.MultiprotocolType").enummodule + Lun::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.StorageType").enummodule + GetLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetLunRequest").msgclass + ListLunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListLunsRequest").msgclass + ListLunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListLunsResponse").msgclass + EvictLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EvictLunRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb new file mode 100644 index 000000000000..309def4c477c --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/network.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n/google/cloud/baremetalsolution/v2/network.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa8\x07\n\x07Network\x12\x11\n\x04name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\n \x01(\t\x12=\n\x04type\x18\x02 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Network.Type\x12\x12\n\nip_address\x18\x03 \x01(\t\x12\x13\n\x0bmac_address\x18\x04 \x03(\t\x12?\n\x05state\x18\x06 \x01(\x0e\x32\x30.google.cloud.baremetalsolution.v2.Network.State\x12\x0f\n\x07vlan_id\x18\x07 \x01(\t\x12\x0c\n\x04\x63idr\x18\x08 \x01(\t\x12\x33\n\x03vrf\x18\t \x01(\x0b\x32&.google.cloud.baremetalsolution.v2.VRF\x12\x46\n\x06labels\x18\x0b \x03(\x0b\x32\x36.google.cloud.baremetalsolution.v2.Network.LabelsEntry\x12\x15\n\rservices_cidr\x18\x0c \x01(\t\x12R\n\x0creservations\x18\r \x03(\x0b\x32<.google.cloud.baremetalsolution.v2.NetworkAddressReservation\x12\x10\n\x03pod\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12O\n\x0cmount_points\x18\x0f \x03(\x0b\x32\x34.google.cloud.baremetalsolution.v2.NetworkMountPointB\x03\xe0\x41\x04\x12\x1c\n\x14jumbo_frames_enabled\x18\x10 \x01(\x08\x12\x17\n\ngateway_ip\x18\x11 \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\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\"c\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0f\n\x0bPROVISIONED\x10\x02\x12\x12\n\x0e\x44\x45PROVISIONING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04:i\xea\x41\x66\n(baremetalsolution.googleapis.com/Network\x12:projects/{project}/locations/{location}/networks/{network}\"U\n\x19NetworkAddressReservation\x12\x15\n\rstart_address\x18\x01 \x01(\t\x12\x13\n\x0b\x65nd_address\x18\x02 \x01(\t\x12\x0c\n\x04note\x18\x03 \x01(\t\"\xe5\x04\n\x03VRF\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x05state\x18\x05 \x01(\x0e\x32,.google.cloud.baremetalsolution.v2.VRF.State\x12\x44\n\nqos_policy\x18\x06 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.VRF.QosPolicy\x12O\n\x10vlan_attachments\x18\x07 \x03(\x0b\x32\x35.google.cloud.baremetalsolution.v2.VRF.VlanAttachment\x1a#\n\tQosPolicy\x12\x16\n\x0e\x62\x61ndwidth_gbps\x18\x01 \x01(\x01\x1a\x93\x02\n\x0eVlanAttachment\x12\x14\n\x0cpeer_vlan_id\x18\x01 \x01(\x03\x12\x0f\n\x07peer_ip\x18\x02 \x01(\t\x12\x11\n\trouter_ip\x18\x03 \x01(\t\x12\x18\n\x0bpairing_key\x18\x04 \x01(\tB\x03\xe0\x41\x04\x12\x44\n\nqos_policy\x18\x05 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.VRF.QosPolicy\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x05\x12V\n\x17interconnect_attachment\x18\x07 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-compute.googleapis.com/InterconnectAttachment\"A\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0f\n\x0bPROVISIONED\x10\x02\"\xdb\x02\n\x10LogicalInterface\x12o\n\x1alogical_network_interfaces\x18\x01 \x03(\x0b\x32K.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1b\n\x0finterface_index\x18\x03 \x01(\x05\x42\x02\x18\x01\x1a\xaa\x01\n\x17LogicalNetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nip_address\x18\x02 \x01(\t\x12\x17\n\x0f\x64\x65\x66\x61ult_gateway\x18\x03 \x01(\x08\x12\x45\n\x0cnetwork_type\x18\x04 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Network.Type\x12\n\n\x02id\x18\x05 \x01(\t\"S\n\x11GetNetworkRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(baremetalsolution.googleapis.com/Network\"\x87\x01\n\x13ListNetworksRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x82\x01\n\x14ListNetworksResponse\x12<\n\x08networks\x18\x01 \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.Network\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x89\x01\n\x14UpdateNetworkRequest\x12@\n\x07network\x18\x01 \x01(\x0b\x32*.google.cloud.baremetalsolution.v2.NetworkB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"]\n\x0cNetworkUsage\x12;\n\x07network\x18\x01 \x01(\x0b\x32*.google.cloud.baremetalsolution.v2.Network\x12\x10\n\x08used_ips\x18\x02 \x03(\t\"V\n\x17ListNetworkUsageRequest\x12;\n\x08location\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"]\n\x18ListNetworkUsageResponse\x12\x41\n\x08networks\x18\x01 \x03(\x0b\x32/.google.cloud.baremetalsolution.v2.NetworkUsage\"\x9d\x01\n\x11NetworkMountPoint\x12@\n\x08instance\x18\x01 \x01(\tB.\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x19\n\x11logical_interface\x18\x02 \x01(\t\x12\x17\n\x0f\x64\x65\x66\x61ult_gateway\x18\x03 \x01(\x08\x12\x12\n\nip_address\x18\x04 \x01(\t\"s\n\x14RenameNetworkRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(baremetalsolution.googleapis.com/Network\x12\x1b\n\x0enew_network_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x85\x03\n%com.google.cloud.baremetalsolution.v2B\x0cNetworkProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2\xea\x41\x86\x01\n-compute.googleapis.com/InterconnectAttachment\x12Uprojects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network").msgclass + Network::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network.Type").enummodule + Network::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network.State").enummodule + NetworkAddressReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkAddressReservation").msgclass + VRF = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF").msgclass + VRF::QosPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.QosPolicy").msgclass + VRF::VlanAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.VlanAttachment").msgclass + VRF::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.State").enummodule + LogicalInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.LogicalInterface").msgclass + LogicalInterface::LogicalNetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface").msgclass + GetNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetNetworkRequest").msgclass + ListNetworksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworksRequest").msgclass + ListNetworksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworksResponse").msgclass + UpdateNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateNetworkRequest").msgclass + NetworkUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkUsage").msgclass + ListNetworkUsageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworkUsageRequest").msgclass + ListNetworkUsageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworkUsageResponse").msgclass + NetworkMountPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkMountPoint").msgclass + RenameNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameNetworkRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb new file mode 100644 index 000000000000..2039cd5c0463 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/nfs_share.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n1google/cloud/baremetalsolution/v2/nfs_share.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x9d\t\n\x08NfsShare\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0cnfs_share_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x03 \x01(\x0e\x32\x31.google.cloud.baremetalsolution.v2.NfsShare.StateB\x03\xe0\x41\x03\x12?\n\x06volume\x18\x04 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12R\n\x0f\x61llowed_clients\x18\x05 \x03(\x0b\x32\x39.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient\x12G\n\x06labels\x18\x06 \x03(\x0b\x32\x37.google.cloud.baremetalsolution.v2.NfsShare.LabelsEntry\x12\x1a\n\x12requested_size_gib\x18\x07 \x01(\x03\x12R\n\x0cstorage_type\x18\t \x01(\x0e\x32\x37.google.cloud.baremetalsolution.v2.NfsShare.StorageTypeB\x03\xe0\x41\x05\x1a\xb3\x02\n\rAllowedClient\x12>\n\x07network\x18\x01 \x01(\tB-\xfa\x41*\n(baremetalsolution.googleapis.com/Network\x12\x15\n\x08share_ip\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x14\x61llowed_clients_cidr\x18\x03 \x01(\t\x12W\n\x11mount_permissions\x18\x04 \x01(\x0e\x32<.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions\x12\x11\n\tallow_dev\x18\x05 \x01(\x08\x12\x12\n\nallow_suid\x18\x06 \x01(\x08\x12\x16\n\x0eno_root_squash\x18\x07 \x01(\x08\x12\x15\n\x08nfs_path\x18\x08 \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\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPROVISIONED\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"O\n\x10MountPermissions\x12!\n\x1dMOUNT_PERMISSIONS_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x0e\n\nREAD_WRITE\x10\x02\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02:m\xea\x41j\n)baremetalsolution.googleapis.com/NFSShare\x12=projects/{project}/locations/{location}/nfsShares/{nfs_share}\"U\n\x12GetNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShare\"\x88\x01\n\x14ListNfsSharesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x86\x01\n\x15ListNfsSharesResponse\x12?\n\nnfs_shares\x18\x01 \x03(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShare\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8d\x01\n\x15UpdateNfsShareRequest\x12\x43\n\tnfs_share\x18\x01 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShareB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"v\n\x15RenameNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShare\x12\x1c\n\x0fnew_nfsshare_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x97\x01\n\x15\x43reateNfsShareRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\tnfs_share\x18\x02 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShareB\x03\xe0\x41\x02\"X\n\x15\x44\x65leteNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShareB\xfc\x01\n%com.google.cloud.baremetalsolution.v2B\rNfsShareProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + NfsShare = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare").msgclass + NfsShare::AllowedClient = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.AllowedClient").msgclass + NfsShare::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.State").enummodule + NfsShare::MountPermissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.MountPermissions").enummodule + NfsShare::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.StorageType").enummodule + GetNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetNfsShareRequest").msgclass + ListNfsSharesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNfsSharesRequest").msgclass + ListNfsSharesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNfsSharesResponse").msgclass + UpdateNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateNfsShareRequest").msgclass + RenameNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameNfsShareRequest").msgclass + CreateNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateNfsShareRequest").msgclass + DeleteNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteNfsShareRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb new file mode 100644 index 000000000000..2d966313407d --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/osimage.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n/google/cloud/baremetalsolution/v2/osimage.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x86\x02\n\x07OSImage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12!\n\x19\x61pplicable_instance_types\x18\x04 \x03(\t\x12#\n\x1bsupported_network_templates\x18\x05 \x03(\t:}\xea\x41z\n(baremetalsolution.googleapis.com/OsImage\x12;projects/{project}/locations/{location}/osImages/{os_image}*\x08osImages2\x07osImage\"w\n\x13ListOSImagesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n\x14ListOSImagesResponse\x12=\n\tos_images\x18\x01 \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.OSImage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xfb\x01\n%com.google.cloud.baremetalsolution.v2B\x0cOsImageProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + OSImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.OSImage").msgclass + ListOSImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListOSImagesRequest").msgclass + ListOSImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListOSImagesResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb new file mode 100644 index 000000000000..9167b7547176 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/provisioning.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/baremetalsolution/v2/common_pb' +require 'google/cloud/baremetalsolution/v2/network_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/baremetalsolution/v2/provisioning.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\x06\n\x12ProvisioningConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x02 \x03(\x0b\x32\x31.google.cloud.baremetalsolution.v2.InstanceConfig\x12\x42\n\x08networks\x18\x03 \x03(\x0b\x32\x30.google.cloud.baremetalsolution.v2.NetworkConfig\x12@\n\x07volumes\x18\x04 \x03(\x0b\x32/.google.cloud.baremetalsolution.v2.VolumeConfig\x12\x11\n\tticket_id\x18\x05 \x01(\t\x12 \n\x18handover_service_account\x18\x06 \x01(\t\x12\x11\n\x05\x65mail\x18\x07 \x01(\tB\x02\x18\x01\x12O\n\x05state\x18\x08 \x01(\x0e\x32;.google.cloud.baremetalsolution.v2.ProvisioningConfig.StateB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11\x63loud_console_uri\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x0evpc_sc_enabled\x18\x0c \x01(\x08\x12\x16\n\x0estatus_message\x18\r \x01(\t\x12\x16\n\tcustom_id\x18\x0e \x01(\tB\x03\xe0\x41\x01\"\x85\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\r\n\tSUBMITTED\x10\x02\x12\x10\n\x0cPROVISIONING\x10\x03\x12\x0f\n\x0bPROVISIONED\x10\x04\x12\r\n\tVALIDATED\x10\x05\x12\r\n\tCANCELLED\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07:\x8c\x01\xea\x41\x88\x01\n3baremetalsolution.googleapis.com/ProvisioningConfig\x12Qprojects/{project}/locations/{location}/provisioningConfigs/{provisioning_config}\"\xc9\x01\n\x1fSubmitProvisioningConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12W\n\x13provisioning_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\"v\n SubmitProvisioningConfigResponse\x12R\n\x13provisioning_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"\xe7\x04\n\x11ProvisioningQuota\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12R\n\nasset_type\x18\x02 \x01(\x0e\x32>.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType\x12\x13\n\x0bgcp_service\x18\x03 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x17\n\x0f\x61vailable_count\x18\x05 \x01(\x05\x12J\n\x0einstance_quota\x18\x06 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.InstanceQuotaH\x00\x12\x16\n\x0cserver_count\x18\x07 \x01(\x03H\x01\x12\x1b\n\x11network_bandwidth\x18\x08 \x01(\x03H\x01\x12\x15\n\x0bstorage_gib\x18\t \x01(\x03H\x01\"n\n\tAssetType\x12\x1a\n\x16\x41SSET_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41SSET_TYPE_SERVER\x10\x01\x12\x16\n\x12\x41SSET_TYPE_STORAGE\x10\x02\x12\x16\n\x12\x41SSET_TYPE_NETWORK\x10\x03:\x89\x01\xea\x41\x85\x01\n2baremetalsolution.googleapis.com/ProvisioningQuota\x12Oprojects/{project}/locations/{location}/provisioningQuotas/{provisioning_quota}B\x07\n\x05quotaB\x0e\n\x0c\x61vailability\"\x81\x01\n\x1dListProvisioningQuotasRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8c\x01\n\x1eListProvisioningQuotasResponse\x12Q\n\x13provisioning_quotas\x18\x01 \x03(\x0b\x32\x34.google.cloud.baremetalsolution.v2.ProvisioningQuota\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe3\x06\n\x0eInstanceConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x15\n\rinstance_type\x18\x03 \x01(\t\x12\x16\n\x0ehyperthreading\x18\x04 \x01(\x08\x12\x10\n\x08os_image\x18\x05 \x01(\t\x12\\\n\x0e\x63lient_network\x18\x06 \x01(\x0b\x32@.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressB\x02\x18\x01\x12]\n\x0fprivate_network\x18\x07 \x01(\x0b\x32@.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressB\x02\x18\x01\x12\x11\n\tuser_note\x18\x08 \x01(\t\x12 \n\x18\x61\x63\x63ount_networks_enabled\x18\t \x01(\x08\x12W\n\x0enetwork_config\x18\n \x01(\x0e\x32?.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig\x12\x18\n\x10network_template\x18\x0b \x01(\t\x12O\n\x12logical_interfaces\x18\x0c \x03(\x0b\x32\x33.google.cloud.baremetalsolution.v2.LogicalInterface\x12\x15\n\rssh_key_names\x18\r \x03(\t\x1aR\n\x0eNetworkAddress\x12\x12\n\nnetwork_id\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x1b\n\x13\x65xisting_network_id\x18\x03 \x01(\t\"O\n\rNetworkConfig\x12\x1d\n\x19NETWORKCONFIG_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSINGLE_VLAN\x10\x01\x12\x0e\n\nMULTI_VLAN\x10\x02:\x7f\xea\x41|\n/baremetalsolution.googleapis.com/InstanceConfig\x12Iprojects/{project}/locations/{location}/instanceConfigs/{instance_config}\"\xf6\x08\n\x0cVolumeConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x19\n\x11snapshots_enabled\x18\x03 \x01(\x08\x12\x42\n\x04type\x18\x04 \x01(\x0e\x32\x34.google.cloud.baremetalsolution.v2.VolumeConfig.Type\x12J\n\x08protocol\x18\x05 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol\x12\x0f\n\x07size_gb\x18\x06 \x01(\x05\x12L\n\nlun_ranges\x18\x07 \x03(\x0b\x32\x38.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange\x12\x13\n\x0bmachine_ids\x18\x08 \x03(\t\x12N\n\x0bnfs_exports\x18\t \x03(\x0b\x32\x39.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport\x12\x11\n\tuser_note\x18\n \x01(\t\x12\x13\n\x0bgcp_service\x18\x0b \x01(\t\x12R\n\x10performance_tier\x18\x0c \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumePerformanceTier\x1a-\n\x08LunRange\x12\x10\n\x08quantity\x18\x01 \x01(\x05\x12\x0f\n\x07size_gb\x18\x02 \x01(\x05\x1a\xb5\x02\n\tNfsExport\x12\x12\n\nnetwork_id\x18\x01 \x01(\t\x12\x14\n\nmachine_id\x18\x02 \x01(\tH\x00\x12\x0e\n\x04\x63idr\x18\x03 \x01(\tH\x00\x12Z\n\x0bpermissions\x18\x04 \x01(\x0e\x32\x45.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions\x12\x16\n\x0eno_root_squash\x18\x05 \x01(\x08\x12\x12\n\nallow_suid\x18\x06 \x01(\x08\x12\x11\n\tallow_dev\x18\x07 \x01(\x08\"I\n\x0bPermissions\x12\x1b\n\x17PERMISSIONS_UNSPECIFIED\x10\x00\x12\r\n\tREAD_ONLY\x10\x01\x12\x0e\n\nREAD_WRITE\x10\x02\x42\x08\n\x06\x63lient\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x46LASH\x10\x01\x12\x08\n\x04\x44ISK\x10\x02\"G\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPROTOCOL_FC\x10\x01\x12\x10\n\x0cPROTOCOL_NFS\x10\x02:y\xea\x41v\n-baremetalsolution.googleapis.com/VolumeConfig\x12\x45projects/{project}/locations/{location}/volumeConfigs/{volume_config}\"\x9b\x07\n\rNetworkConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x43\n\x04type\x18\x03 \x01(\x0e\x32\x35.google.cloud.baremetalsolution.v2.NetworkConfig.Type\x12M\n\tbandwidth\x18\x04 \x01(\x0e\x32:.google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth\x12_\n\x10vlan_attachments\x18\x05 \x03(\x0b\x32\x45.google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment\x12\x0c\n\x04\x63idr\x18\x06 \x01(\t\x12R\n\x0cservice_cidr\x18\x07 \x01(\x0e\x32<.google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr\x12\x11\n\tuser_note\x18\x08 \x01(\t\x12\x13\n\x0bgcp_service\x18\t \x01(\t\x12\x19\n\x11vlan_same_project\x18\n \x01(\x08\x12\x1c\n\x14jumbo_frames_enabled\x18\x0b \x01(\x08\x1a\x37\n\x14IntakeVlanAttachment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0bpairing_key\x18\x02 \x01(\t\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\"c\n\tBandwidth\x12\x19\n\x15\x42\x41NDWIDTH_UNSPECIFIED\x10\x00\x12\r\n\tBW_1_GBPS\x10\x01\x12\r\n\tBW_2_GBPS\x10\x02\x12\r\n\tBW_5_GBPS\x10\x03\x12\x0e\n\nBW_10_GBPS\x10\x04\"`\n\x0bServiceCidr\x12\x1c\n\x18SERVICE_CIDR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07HIGH_26\x10\x02\x12\x0b\n\x07HIGH_27\x10\x03\x12\x0b\n\x07HIGH_28\x10\x04:|\xea\x41y\n.baremetalsolution.googleapis.com/NetworkConfig\x12Gprojects/{project}/locations/{location}/networkConfigs/{network_config}\"\x83\x02\n\rInstanceQuota\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\rinstance_type\x18\x02 \x01(\tB\x02\x18\x01\x12\x13\n\x0bgcp_service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\x12\x1f\n\x17\x61vailable_machine_count\x18\x04 \x01(\x05:|\xea\x41y\n.baremetalsolution.googleapis.com/InstanceQuota\x12Gprojects/{project}/locations/{location}/instanceQuotas/{instance_quota}\"i\n\x1cGetProvisioningConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3baremetalsolution.googleapis.com/ProvisioningConfig\"\xc9\x01\n\x1f\x43reateProvisioningConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12W\n\x13provisioning_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x1fUpdateProvisioningConfigRequest\x12W\n\x13provisioning_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x80\x02\n%com.google.cloud.baremetalsolution.v2B\x11ProvisioningProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + ProvisioningConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningConfig").msgclass + ProvisioningConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningConfig.State").enummodule + SubmitProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest").msgclass + SubmitProvisioningConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse").msgclass + ProvisioningQuota = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningQuota").msgclass + ProvisioningQuota::AssetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType").enummodule + ListProvisioningQuotasRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest").msgclass + ListProvisioningQuotasResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse").msgclass + InstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig").msgclass + InstanceConfig::NetworkAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress").msgclass + InstanceConfig::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig").enummodule + VolumeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig").msgclass + VolumeConfig::LunRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.LunRange").msgclass + VolumeConfig::NfsExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport").msgclass + VolumeConfig::NfsExport::Permissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions").enummodule + VolumeConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.Type").enummodule + VolumeConfig::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.Protocol").enummodule + NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig").msgclass + NetworkConfig::IntakeVlanAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment").msgclass + NetworkConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.Type").enummodule + NetworkConfig::Bandwidth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth").enummodule + NetworkConfig::ServiceCidr = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr").enummodule + InstanceQuota = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceQuota").msgclass + GetProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest").msgclass + CreateProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest").msgclass + UpdateProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb new file mode 100644 index 000000000000..47a5792e89d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/ssh_key.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n/google/cloud/baremetalsolution/v2/ssh_key.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x01\n\x06SSHKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\npublic_key\x18\x02 \x01(\t:g\xea\x41\x64\n\'baremetalsolution.googleapis.com/SshKey\x12\x39projects/{project}/locations/{location}/sshKeys/{ssh_key}\"v\n\x12ListSSHKeysRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x13ListSSHKeysResponse\x12;\n\x08ssh_keys\x18\x01 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.SSHKey\x12\x17\n\x0fnext_page_token\x18Z \x01(\t\"\xaa\x01\n\x13\x43reateSSHKeyRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12?\n\x07ssh_key\x18\x02 \x01(\x0b\x32).google.cloud.baremetalsolution.v2.SSHKeyB\x03\xe0\x41\x02\x12\x17\n\nssh_key_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"T\n\x13\x44\x65leteSSHKeyRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/SshKeyB\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0bSshKeyProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + SSHKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SSHKey").msgclass + ListSSHKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListSSHKeysRequest").msgclass + ListSSHKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListSSHKeysResponse").msgclass + CreateSSHKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateSSHKeyRequest").msgclass + DeleteSSHKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb new file mode 100644 index 000000000000..1456dbe6e009 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/volume.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/baremetalsolution/v2/common_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/baremetalsolution/v2/volume.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xec\x0e\n\x06Volume\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x0b \x01(\t\x12K\n\x0cstorage_type\x18\x02 \x01(\x0e\x32\x35.google.cloud.baremetalsolution.v2.Volume.StorageType\x12>\n\x05state\x18\x03 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Volume.State\x12\x1a\n\x12requested_size_gib\x18\x04 \x01(\x03\x12%\n\x1doriginally_requested_size_gib\x18\x10 \x01(\x03\x12\x18\n\x10\x63urrent_size_gib\x18\x05 \x01(\x03\x12\x1a\n\x12\x65mergency_size_gib\x18\x0e \x01(\x03\x12\x14\n\x0cmax_size_gib\x18\x11 \x01(\x03\x12\x1b\n\x13\x61uto_grown_size_gib\x18\x06 \x01(\x03\x12\x1b\n\x13remaining_space_gib\x18\x07 \x01(\x03\x12h\n\x1bsnapshot_reservation_detail\x18\x08 \x01(\x0b\x32\x43.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail\x12k\n\x1dsnapshot_auto_delete_behavior\x18\t \x01(\x0e\x32\x44.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior\x12\x45\n\x06labels\x18\x0c \x03(\x0b\x32\x35.google.cloud.baremetalsolution.v2.Volume.LabelsEntry\x12\x18\n\x10snapshot_enabled\x18\r \x01(\x08\x12\x10\n\x03pod\x18\x0f \x01(\tB\x03\xe0\x41\x05\x12I\n\x08protocol\x18\x12 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.Volume.ProtocolB\x03\xe0\x41\x03\x12\x18\n\x0b\x62oot_volume\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x10performance_tier\x18\x14 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumePerformanceTierB\x03\xe0\x41\x05\x12\x12\n\x05notes\x18\x15 \x01(\tB\x03\xe0\x41\x04\x12S\n\x10workload_profile\x18\x16 \x01(\x0e\x32\x39.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile\x12\x34\n\x0b\x65xpire_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x19 \x03(\tB1\xe0\x41\x03\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x15\n\x08\x61ttached\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x1a\xa2\x01\n\x19SnapshotReservationDetail\x12\x1a\n\x12reserved_space_gib\x18\x01 \x01(\x03\x12#\n\x1breserved_space_used_percent\x18\x02 \x01(\x05\x12$\n\x1creserved_space_remaining_gib\x18\x03 \x01(\x03\x12\x1e\n\x16reserved_space_percent\x18\x04 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08\x43OOL_OFF\x10\x05\"}\n\x1aSnapshotAutoDeleteBehavior\x12-\n)SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x10\n\x0cOLDEST_FIRST\x10\x02\x12\x10\n\x0cNEWEST_FIRST\x10\x03\"@\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x11\n\rFIBRE_CHANNEL\x10\x01\x12\x07\n\x03NFS\x10\x02\"J\n\x0fWorkloadProfile\x12 \n\x1cWORKLOAD_PROFILE_UNSPECIFIED\x10\x00\x12\x0b\n\x07GENERIC\x10\x01\x12\x08\n\x04HANA\x10\x02:f\xea\x41\x63\n\'baremetalsolution.googleapis.com/Volume\x12\x38projects/{project}/locations/{location}/volumes/{volume}\"Q\n\x10GetVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\"\x86\x01\n\x12ListVolumesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x7f\n\x13ListVolumesResponse\x12:\n\x07volumes\x18\x01 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.Volume\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x86\x01\n\x13UpdateVolumeRequest\x12>\n\x06volume\x18\x01 \x01(\x0b\x32).google.cloud.baremetalsolution.v2.VolumeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"p\n\x13RenameVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x1a\n\rnew_volume_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"S\n\x12\x45victVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\"h\n\x13ResizeVolumeRequest\x12?\n\x06volume\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x10\n\x08size_gib\x18\x02 \x01(\x03\x42\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0bVolumeProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume").msgclass + Volume::SnapshotReservationDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail").msgclass + Volume::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.StorageType").enummodule + Volume::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.State").enummodule + Volume::SnapshotAutoDeleteBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior").enummodule + Volume::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.Protocol").enummodule + Volume::WorkloadProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.WorkloadProfile").enummodule + GetVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetVolumeRequest").msgclass + ListVolumesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumesRequest").msgclass + ListVolumesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumesResponse").msgclass + UpdateVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateVolumeRequest").msgclass + RenameVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameVolumeRequest").msgclass + EvictVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EvictVolumeRequest").msgclass + ResizeVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResizeVolumeRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb new file mode 100644 index 000000000000..6dfa4dbe4766 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/volume_snapshot.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n7google/cloud/baremetalsolution/v2/volume_snapshot.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe7\x03\n\x0eVolumeSnapshot\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x0estorage_volume\x18\x05 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12Q\n\x04type\x18\x07 \x01(\x0e\x32>.google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotTypeB\x03\xe0\x41\x03\"H\n\x0cSnapshotType\x12\x1d\n\x19SNAPSHOT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x44_HOC\x10\x01\x12\r\n\tSCHEDULED\x10\x02:\x84\x01\xea\x41\x80\x01\n/baremetalsolution.googleapis.com/VolumeSnapshot\x12Mprojects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}\"a\n\x18GetVolumeSnapshotRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshot\"\x84\x01\n\x1aListVolumeSnapshotsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x98\x01\n\x1bListVolumeSnapshotsResponse\x12K\n\x10volume_snapshots\x18\x01 \x03(\x0b\x32\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x1b\x44\x65leteVolumeSnapshotRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshot\"\xaf\x01\n\x1b\x43reateVolumeSnapshotRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12O\n\x0fvolume_snapshot\x18\x02 \x01(\x0b\x32\x31.google.cloud.baremetalsolution.v2.VolumeSnapshotB\x03\xe0\x41\x02\"p\n\x1cRestoreVolumeSnapshotRequest\x12P\n\x0fvolume_snapshot\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshotB\x82\x02\n%com.google.cloud.baremetalsolution.v2B\x13VolumeSnapshotProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + VolumeSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeSnapshot").msgclass + VolumeSnapshot::SnapshotType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType").enummodule + GetVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest").msgclass + ListVolumeSnapshotsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest").msgclass + ListVolumeSnapshotsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse").msgclass + DeleteVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest").msgclass + CreateVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest").msgclass + RestoreVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md new file mode 100644 index 000000000000..60e71df2a508 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Bare Metal Solution 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-bare_metal_solution-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb new file mode 100644 index 000000000000..78d8f06ad169 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.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! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # Represents the metadata from a long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!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 action 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 requested the cancellation + # of the operation. Operations that have been successfully 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 with the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message from resetting a server. + class ResetInstanceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb new file mode 100644 index 000000000000..0213f58e1483 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.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 BareMetalSolution + module V2 + # Performance tier of the Volume. + module VolumePerformanceTier + # Value is not specified. + VOLUME_PERFORMANCE_TIER_UNSPECIFIED = 0 + + # Regular volumes, shared aggregates. + VOLUME_PERFORMANCE_TIER_SHARED = 1 + + # Assigned aggregates. + VOLUME_PERFORMANCE_TIER_ASSIGNED = 2 + + # High throughput aggregates. + VOLUME_PERFORMANCE_TIER_HT = 3 + end + + # The possible values for a workload profile. + module WorkloadProfile + # The workload profile is in an unknown state. + WORKLOAD_PROFILE_UNSPECIFIED = 0 + + # The workload profile is generic. + WORKLOAD_PROFILE_GENERIC = 1 + + # The workload profile is hana. + WORKLOAD_PROFILE_HANA = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb new file mode 100644 index 000000000000..71f94868fea9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb @@ -0,0 +1,354 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A server. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of this `Instance`. + # Resource names are schemeless URIs that follow the conventions in + # https://cloud.google.com/apis/design/resource_names. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [r] id + # @return [::String] + # Output only. An identifier for the `Instance`, generated by the backend. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create a time stamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update a time stamp. + # @!attribute [rw] machine_type + # @return [::String] + # Immutable. The server type. + # [Available server + # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + # @!attribute [r] state + # @return [::Google::Cloud::BareMetalSolution::V2::Instance::State] + # Output only. The state of the server. + # @!attribute [rw] hyperthreading_enabled + # @return [::Boolean] + # True if you enable hyperthreading for the server, otherwise false. + # The default value is false. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [rw] luns + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Lun>] + # Immutable. List of LUNs associated with this server. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Volume>] + # Input only. List of Volumes to attach to this Instance on creation. + # This field won't be populated in Get/List responses. + # @!attribute [r] networks + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Network>] + # Output only. List of networks associated with this server. + # @!attribute [r] interactive_serial_console_enabled + # @return [::Boolean] + # Output only. True if the interactive serial console feature is enabled for + # the instance, false otherwise. The default value is false. + # @!attribute [rw] os_image + # @return [::String] + # The OS image currently installed on the server. + # @!attribute [rw] pod + # @return [::String] + # Immutable. Pod name. + # Pod is an independent part of infrastructure. + # Instance can be connected to the assets (networks, volumes) allocated + # in the same pod only. + # @!attribute [rw] network_template + # @return [::String] + # Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. + # Generally, the template name follows the syntax of + # "bond" or "nic". + # @!attribute [rw] logical_interfaces + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface>] + # List of logical interfaces for the instance. The number of logical + # interfaces will be the same as number of hardware bond/nic on the chosen + # network template. For the non-multivlan configurations (for eg, existing + # servers) that use existing default network template (bondaa-bondaa), both + # the Instance.networks field and the Instance.logical_interfaces fields will + # be filled to ensure backward compatibility. For the others, only + # Instance.logical_interfaces will be filled. + # @!attribute [r] login_info + # @return [::String] + # Output only. Text field about info for logging in. + # @!attribute [rw] workload_profile + # @return [::Google::Cloud::BareMetalSolution::V2::WorkloadProfile] + # The workload profile for the instance. + # @!attribute [r] firmware_version + # @return [::String] + # Output only. The firmware version for 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 + + # The possible states for this server. + module State + # The server is in an unknown state. + STATE_UNSPECIFIED = 0 + + # The server is being provisioned. + PROVISIONING = 1 + + # The server is running. + RUNNING = 2 + + # The server has been deleted. + DELETED = 3 + + # The server is being updated. + UPDATING = 4 + + # The server is starting. + STARTING = 5 + + # The server is stopping. + STOPPING = 6 + + # The server is shutdown. + SHUTDOWN = 7 + end + end + + # Message for requesting server information. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the list of servers. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListInstancesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, the server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] filter + # @return [::String] + # List filter. + class ListInstancesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the list of servers. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Instance>] + # The list of servers. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListInstancesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to updating a server. + # @!attribute [rw] instance + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # Required. The server to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # The currently supported fields are: + # `labels` + # `hyperthreading_enabled` + # `os_image` + class UpdateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting rename of a server. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the instance. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] new_instance_id + # @return [::String] + # Required. The new `id` of the instance. + class RenameInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to reset a server. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class ResetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to start a server. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class StartInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message from starting a server. + class StartInstanceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to stop a server. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class StopInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message from stopping a server. + class StopInstanceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for enabling the interactive serial console on an instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class EnableInteractiveSerialConsoleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response of EnableInteractiveSerialConsole. + class EnableInteractiveSerialConsoleResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for disabling the interactive serial console on an instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class DisableInteractiveSerialConsoleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response of DisableInteractiveSerialConsole. + class DisableInteractiveSerialConsoleResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for detach specific LUN from an Instance. + # @!attribute [rw] instance + # @return [::String] + # Required. Name of the instance. + # @!attribute [rw] lun + # @return [::String] + # Required. Name of the Lun to detach. + # @!attribute [rw] skip_reboot + # @return [::Boolean] + # If true, performs lun unmapping without instance reboot. + class DetachLunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Network template. + # @!attribute [r] name + # @return [::String] + # Output only. Template's unique name. The full resource name follows the + # pattern: + # `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` + # Generally, the \\{server_network_template} follows the syntax of + # "bond" or "nic". + # @!attribute [rw] applicable_instance_types + # @return [::Array<::String>] + # Instance types this template is applicable to. + # @!attribute [rw] logical_interfaces + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::ServerNetworkTemplate::LogicalInterface>] + # Logical interfaces. + class ServerNetworkTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Logical interface. + # @!attribute [rw] name + # @return [::String] + # Interface name. + # This is not a globally unique identifier. + # Name is unique only inside the ServerNetworkTemplate. This is of syntax + # or + # and forms part of the network template name. + # @!attribute [rw] type + # @return [::Google::Cloud::BareMetalSolution::V2::ServerNetworkTemplate::LogicalInterface::InterfaceType] + # Interface type. + # @!attribute [rw] required + # @return [::Boolean] + # If true, interface must have network connected. + class LogicalInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Interface type. + module InterfaceType + # Unspecified value. + INTERFACE_TYPE_UNSPECIFIED = 0 + + # Bond interface type. + BOND = 1 + + # NIC interface type. + NIC = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb new file mode 100644 index 000000000000..f7a9d2d4263b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb @@ -0,0 +1,161 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A storage volume logical unit number (LUN). + # @!attribute [r] name + # @return [::String] + # Output only. The name of the LUN. + # @!attribute [rw] id + # @return [::String] + # An identifier for the LUN, generated by the backend. + # @!attribute [rw] state + # @return [::Google::Cloud::BareMetalSolution::V2::Lun::State] + # The state of this storage volume. + # @!attribute [rw] size_gb + # @return [::Integer] + # The size of this LUN, in gigabytes. + # @!attribute [rw] multiprotocol_type + # @return [::Google::Cloud::BareMetalSolution::V2::Lun::MultiprotocolType] + # The LUN multiprotocol type ensures the characteristics of the LUN are + # optimized for each operating system. + # @!attribute [rw] storage_volume + # @return [::String] + # Display the storage volume for this LUN. + # @!attribute [rw] shareable + # @return [::Boolean] + # Display if this LUN can be shared between multiple physical servers. + # @!attribute [rw] boot_lun + # @return [::Boolean] + # Display if this LUN is a boot LUN. + # @!attribute [rw] storage_type + # @return [::Google::Cloud::BareMetalSolution::V2::Lun::StorageType] + # The storage type for this LUN. + # @!attribute [rw] wwid + # @return [::String] + # The WWID for this LUN. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time after which LUN will be fully deleted. + # It is filled only for LUNs in COOL_OFF state. + # @!attribute [r] instances + # @return [::Array<::String>] + # Output only. Instances this Lun is attached to. + class Lun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible states for the LUN. + module State + # The LUN is in an unknown state. + STATE_UNSPECIFIED = 0 + + # The LUN is being created. + CREATING = 1 + + # The LUN is being updated. + UPDATING = 2 + + # The LUN is ready for use. + READY = 3 + + # The LUN has been requested to be deleted. + DELETING = 4 + + # The LUN is in cool off state. It will be deleted after `expire_time`. + COOL_OFF = 5 + end + + # Display the operating systems present for the LUN multiprotocol type. + module MultiprotocolType + # Server has no OS specified. + MULTIPROTOCOL_TYPE_UNSPECIFIED = 0 + + # Server with Linux OS. + LINUX = 1 + end + + # The storage types for a LUN. + module StorageType + # The storage type for this LUN is unknown. + STORAGE_TYPE_UNSPECIFIED = 0 + + # This storage type for this LUN is SSD. + SSD = 1 + + # This storage type for this LUN is HDD. + HDD = 2 + end + end + + # Message for requesting storage lun information. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetLunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of storage volume luns. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListLunsRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + class ListLunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the list of storage volume luns. + # @!attribute [rw] luns + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Lun>] + # The list of luns. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListLunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for skip lun cooloff and delete it. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the lun. + class EvictLunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb new file mode 100644 index 000000000000..8448a21a3ceb --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb @@ -0,0 +1,379 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A Network. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of this `Network`. + # Resource names are schemeless URIs that follow the conventions in + # https://cloud.google.com/apis/design/resource_names. + # Format: + # `projects/{project}/locations/{location}/networks/{network}` + # @!attribute [rw] id + # @return [::String] + # An identifier for the `Network`, generated by the backend. + # @!attribute [rw] type + # @return [::Google::Cloud::BareMetalSolution::V2::Network::Type] + # The type of this network. + # @!attribute [rw] ip_address + # @return [::String] + # IP address configured. + # @!attribute [rw] mac_address + # @return [::Array<::String>] + # List of physical interfaces. + # @!attribute [rw] state + # @return [::Google::Cloud::BareMetalSolution::V2::Network::State] + # The Network state. + # @!attribute [rw] vlan_id + # @return [::String] + # The vlan id of the Network. + # @!attribute [rw] cidr + # @return [::String] + # The cidr of the Network. + # @!attribute [rw] vrf + # @return [::Google::Cloud::BareMetalSolution::V2::VRF] + # The vrf for the Network. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [rw] services_cidr + # @return [::String] + # IP range for reserved for services (e.g. NFS). + # @!attribute [rw] reservations + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkAddressReservation>] + # List of IP address reservations in this network. + # When updating this field, an error will be generated if a reservation + # conflicts with an IP address already allocated to a physical server. + # @!attribute [r] pod + # @return [::String] + # Output only. Pod name. + # @!attribute [rw] mount_points + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkMountPoint>] + # Input only. List of mount points to attach the network to. + # @!attribute [rw] jumbo_frames_enabled + # @return [::Boolean] + # Whether network uses standard frames or jumbo ones. + # @!attribute [r] gateway_ip + # @return [::String] + # Output only. Gateway ip address. + class Network + 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 + + # Network type. + module Type + # Unspecified value. + TYPE_UNSPECIFIED = 0 + + # Client network, a network peered to a Google Cloud VPC. + CLIENT = 1 + + # Private network, a network local to the Bare Metal Solution environment. + PRIVATE = 2 + end + + # The possible states for this Network. + module State + # The Network is in an unknown state. + STATE_UNSPECIFIED = 0 + + # The Network is provisioning. + PROVISIONING = 1 + + # The Network has been provisioned. + PROVISIONED = 2 + + # The Network is being deprovisioned. + DEPROVISIONING = 3 + + # The Network is being updated. + UPDATING = 4 + end + end + + # A reservation of one or more addresses in a network. + # @!attribute [rw] start_address + # @return [::String] + # The first address of this reservation block. + # Must be specified as a single IPv4 address, e.g. 10.1.2.2. + # @!attribute [rw] end_address + # @return [::String] + # The last address of this reservation block, inclusive. I.e., for cases when + # reservations are only single addresses, end_address and start_address will + # be the same. + # Must be specified as a single IPv4 address, e.g. 10.1.2.2. + # @!attribute [rw] note + # @return [::String] + # A note about this reservation, intended for human consumption. + class NetworkAddressReservation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A network VRF. + # @!attribute [rw] name + # @return [::String] + # The name of the VRF. + # @!attribute [rw] state + # @return [::Google::Cloud::BareMetalSolution::V2::VRF::State] + # The possible state of VRF. + # @!attribute [rw] qos_policy + # @return [::Google::Cloud::BareMetalSolution::V2::VRF::QosPolicy] + # The QOS policy applied to this VRF. + # The value is only meaningful when all the vlan attachments have the same + # QoS. This field should not be used for new integrations, use vlan + # attachment level qos instead. The field is left for backward-compatibility. + # @!attribute [rw] vlan_attachments + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VRF::VlanAttachment>] + # The list of VLAN attachments for the VRF. + class VRF + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # QOS policy parameters. + # @!attribute [rw] bandwidth_gbps + # @return [::Float] + # The bandwidth permitted by the QOS policy, in gbps. + class QosPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # VLAN attachment details. + # @!attribute [rw] peer_vlan_id + # @return [::Integer] + # The peer vlan ID of the attachment. + # @!attribute [rw] peer_ip + # @return [::String] + # The peer IP of the attachment. + # @!attribute [rw] router_ip + # @return [::String] + # The router IP of the attachment. + # @!attribute [rw] pairing_key + # @return [::String] + # Input only. Pairing key. + # @!attribute [rw] qos_policy + # @return [::Google::Cloud::BareMetalSolution::V2::VRF::QosPolicy] + # The QOS policy applied to this VLAN attachment. + # This value should be preferred to using qos at vrf level. + # @!attribute [rw] id + # @return [::String] + # Immutable. The identifier of the attachment within vrf. + # @!attribute [rw] interconnect_attachment + # @return [::String] + # Optional. The name of the vlan attachment within vrf. This is of the form + # projects/\\{project_number}/regions/\\{region}/interconnectAttachments/\\{interconnect_attachment} + class VlanAttachment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The possible states for this VRF. + module State + # The unspecified state. + STATE_UNSPECIFIED = 0 + + # The vrf is provisioning. + PROVISIONING = 1 + + # The vrf is provisioned. + PROVISIONED = 2 + end + end + + # Each logical interface represents a logical abstraction of the underlying + # physical interface (for eg. bond, nic) of the instance. Each logical + # interface can effectively map to multiple network-IP pairs and still be + # mapped to one underlying physical interface. + # @!attribute [rw] logical_network_interfaces + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface::LogicalNetworkInterface>] + # List of logical network interfaces within a logical interface. + # @!attribute [rw] name + # @return [::String] + # Interface name. This is of syntax or and + # forms part of the network template name. + # @!attribute [rw] interface_index + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # The index of the logical interface mapping to the index of the hardware + # bond or nic on the chosen network template. This field is deprecated. + class LogicalInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Each logical network interface is effectively a network and IP pair. + # @!attribute [rw] network + # @return [::String] + # Name of the network + # @!attribute [rw] ip_address + # @return [::String] + # IP address in the network + # @!attribute [rw] default_gateway + # @return [::Boolean] + # Whether this interface is the default gateway for the instance. Only + # one interface can be the default gateway for the instance. + # @!attribute [rw] network_type + # @return [::Google::Cloud::BareMetalSolution::V2::Network::Type] + # Type of network. + # @!attribute [rw] id + # @return [::String] + # An identifier for the `Network`, generated by the backend. + class LogicalNetworkInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Message for requesting network information. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetNetworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of networks. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListNetworksRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] filter + # @return [::String] + # List filter. + class ListNetworksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the list of networks. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Network>] + # The list of networks. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListNetworksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to updating a network. + # @!attribute [rw] network + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # Required. The network to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # The only currently supported fields are: + # `labels`, `reservations`, `vrf.vlan_attachments` + class UpdateNetworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Network with all used IP addresses. + # @!attribute [rw] network + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # Network. + # @!attribute [rw] used_ips + # @return [::Array<::String>] + # All used IP addresses in this network. + class NetworkUsage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get networks with IPs. + # @!attribute [rw] location + # @return [::String] + # Required. Parent value (project and location). + class ListNetworkUsageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response with Networks with IPs + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkUsage>] + # Networks with IPs. + class ListNetworkUsageResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Mount point for a network. + # @!attribute [rw] instance + # @return [::String] + # Instance to attach network to. + # @!attribute [rw] logical_interface + # @return [::String] + # Logical interface to detach from. + # @!attribute [rw] default_gateway + # @return [::Boolean] + # Network should be a default gateway. + # @!attribute [rw] ip_address + # @return [::String] + # Ip address of the server. + class NetworkMountPoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting rename of a server. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the network. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @!attribute [rw] new_network_id + # @return [::String] + # Required. The new `id` of the network. + class RenameNetworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb new file mode 100644 index 000000000000..a40034963b4f --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb @@ -0,0 +1,243 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # An NFS share. + # @!attribute [rw] name + # @return [::String] + # Immutable. The name of the NFS share. + # @!attribute [r] nfs_share_id + # @return [::String] + # Output only. An identifier for the NFS share, generated by the backend. + # This field will be deprecated in the future, use `id` instead. + # @!attribute [r] id + # @return [::String] + # Output only. An identifier for the NFS share, generated by the backend. + # This is the same value as nfs_share_id and will replace it in the future. + # @!attribute [r] state + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::State] + # Output only. The state of the NFS share. + # @!attribute [r] volume + # @return [::String] + # Output only. The underlying volume of the share. Created automatically + # during provisioning. + # @!attribute [rw] allowed_clients + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NfsShare::AllowedClient>] + # List of allowed access points. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [rw] requested_size_gib + # @return [::Integer] + # The requested size, in GiB. + # @!attribute [rw] storage_type + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::StorageType] + # Immutable. The storage type of the underlying volume. + class NfsShare + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents an 'access point' for the share. + # @!attribute [rw] network + # @return [::String] + # The network the access point sits on. + # @!attribute [r] share_ip + # @return [::String] + # Output only. The IP address of the share on this network. Assigned + # automatically during provisioning based on the network's services_cidr. + # @!attribute [rw] allowed_clients_cidr + # @return [::String] + # The subnet of IP addresses permitted to access the share. + # @!attribute [rw] mount_permissions + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::MountPermissions] + # Mount permissions. + # @!attribute [rw] allow_dev + # @return [::Boolean] + # Allow dev flag. Which controls whether to allow creation of devices. + # @!attribute [rw] allow_suid + # @return [::Boolean] + # Allow the setuid flag. + # @!attribute [rw] no_root_squash + # @return [::Boolean] + # Disable root squashing, which is a feature of NFS. + # Root squash is a special mapping of the remote superuser (root) identity + # when using identity authentication. + # @!attribute [r] nfs_path + # @return [::String] + # Output only. The path to access NFS, in format shareIP:/InstanceID + # InstanceID is the generated ID instead of customer provided name. + # example like "10.0.0.0:/g123456789-nfs001" + class AllowedClient + 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 possible states for this NFS share. + module State + # The share is in an unknown state. + STATE_UNSPECIFIED = 0 + + # The share has been provisioned. + PROVISIONED = 1 + + # The NFS Share is being created. + CREATING = 2 + + # The NFS Share is being updated. + UPDATING = 3 + + # The NFS Share has been requested to be deleted. + DELETING = 4 + end + + # The possible mount permissions. + module MountPermissions + # Permissions were not specified. + MOUNT_PERMISSIONS_UNSPECIFIED = 0 + + # NFS share can be mount with read-only permissions. + READ = 1 + + # NFS share can be mount with read-write permissions. + READ_WRITE = 2 + end + + # The storage type for a volume. + module StorageType + # The storage type for this volume is unknown. + STORAGE_TYPE_UNSPECIFIED = 0 + + # The storage type for this volume is SSD. + SSD = 1 + + # This storage type for this volume is HDD. + HDD = 2 + end + end + + # Message for requesting NFS share information. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetNfsShareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of NFS shares. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListNfsSharesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] filter + # @return [::String] + # List filter. + class ListNfsSharesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the list of NFS shares. + # @!attribute [rw] nfs_shares + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NfsShare>] + # The list of NFS shares. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListNfsSharesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to updating an NFS share. + # @!attribute [rw] nfs_share + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # Required. The NFS share to update. + # + # The `name` field is used to identify the NFS share to update. + # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # The only currently supported fields are: + # `labels` + # `allowed_clients` + class UpdateNfsShareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting rename of a server. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the nfsshare. + # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} + # @!attribute [rw] new_nfsshare_id + # @return [::String] + # Required. The new `id` of the nfsshare. + class RenameNfsShareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating an NFS share. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent project and location. + # @!attribute [rw] nfs_share + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # Required. The NfsShare to create. + class CreateNfsShareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting an NFS share. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the NFS share to delete. + class DeleteNfsShareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb new file mode 100644 index 000000000000..b4785e50e209 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # Operation System image. + # @!attribute [r] name + # @return [::String] + # Output only. OS Image's unique name. + # @!attribute [rw] code + # @return [::String] + # OS Image code. + # @!attribute [rw] description + # @return [::String] + # OS Image description. + # @!attribute [rw] applicable_instance_types + # @return [::Array<::String>] + # Instance types this image is applicable to. + # [Available + # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + # @!attribute [rw] supported_network_templates + # @return [::Array<::String>] + # Network templates that can be used with this OS Image. + class OSImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting all available OS images. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListProvisioningQuotasRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + class ListOSImagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting all available OS images. + # @!attribute [rw] os_images + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::OSImage>] + # The OS images available. + # @!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 ListOSImagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb new file mode 100644 index 000000000000..423eea65f0f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb @@ -0,0 +1,603 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A provisioning configuration. + # @!attribute [r] name + # @return [::String] + # Output only. The system-generated name of the provisioning config. This + # follows the UUID format. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::InstanceConfig>] + # Instances to be created. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkConfig>] + # Networks to be created. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig>] + # Volumes to be created. + # @!attribute [rw] ticket_id + # @return [::String] + # A generated ticket id to track provisioning request. + # @!attribute [rw] handover_service_account + # @return [::String] + # A service account to enable customers to access instance credentials upon + # handover. + # @!attribute [rw] email + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Email provided to send a confirmation with provisioning config to. + # Deprecated in favour of email field in request messages. + # @!attribute [r] state + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig::State] + # Output only. State of ProvisioningConfig. + # @!attribute [rw] location + # @return [::String] + # Optional. Location name of this ProvisioningConfig. + # It is optional only for Intake UI transition period. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update timestamp. + # @!attribute [r] cloud_console_uri + # @return [::String] + # Output only. URI to Cloud Console UI view of this provisioning config. + # @!attribute [rw] vpc_sc_enabled + # @return [::Boolean] + # If true, VPC SC is enabled for the cluster. + # @!attribute [rw] status_message + # @return [::String] + # Optional status messages associated with the FAILED state. + # @!attribute [rw] custom_id + # @return [::String] + # Optional. The user-defined identifier of the provisioning config. + class ProvisioningConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible states for this ProvisioningConfig. + module State + # State wasn't specified. + STATE_UNSPECIFIED = 0 + + # ProvisioningConfig is a draft and can be freely modified. + DRAFT = 1 + + # ProvisioningConfig was already submitted and cannot be modified. + SUBMITTED = 2 + + # ProvisioningConfig was in the provisioning state. Initially this state + # comes from the work order table in big query when SNOW is used. Later + # this field can be set by the work order API. + PROVISIONING = 3 + + # ProvisioningConfig was provisioned, meaning the resources exist. + PROVISIONED = 4 + + # ProvisioningConfig was validated. A validation tool will be run to + # set this state. + VALIDATED = 5 + + # ProvisioningConfig was canceled. + CANCELLED = 6 + + # The request is submitted for provisioning, with error return. + FAILED = 7 + end + end + + # Request for SubmitProvisioningConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @!attribute [rw] provisioning_config + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # Required. The ProvisioningConfig to create. + # @!attribute [rw] email + # @return [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + class SubmitProvisioningConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for SubmitProvisioningConfig. + # @!attribute [rw] provisioning_config + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # The submitted provisioning config. + class SubmitProvisioningConfigResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A provisioning quota for a given project. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the provisioning quota. + # @!attribute [rw] asset_type + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota::AssetType] + # The asset type of this provisioning quota. + # @!attribute [rw] gcp_service + # @return [::String] + # The gcp service of the provisioning quota. + # @!attribute [rw] location + # @return [::String] + # The specific location of the provisioining quota. + # @!attribute [rw] available_count + # @return [::Integer] + # The available count of the provisioning quota. + # @!attribute [rw] instance_quota + # @return [::Google::Cloud::BareMetalSolution::V2::InstanceQuota] + # Instance quota. + # @!attribute [rw] server_count + # @return [::Integer] + # Server count. + # + # Note: The following fields are mutually exclusive: `server_count`, `network_bandwidth`, `storage_gib`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] network_bandwidth + # @return [::Integer] + # Network bandwidth, Gbps + # + # Note: The following fields are mutually exclusive: `network_bandwidth`, `server_count`, `storage_gib`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] storage_gib + # @return [::Integer] + # Storage size (GB). + # + # Note: The following fields are mutually exclusive: `storage_gib`, `server_count`, `network_bandwidth`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ProvisioningQuota + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The available asset types for intake. + module AssetType + # The unspecified type. + ASSET_TYPE_UNSPECIFIED = 0 + + # The server asset type. + ASSET_TYPE_SERVER = 1 + + # The storage asset type. + ASSET_TYPE_STORAGE = 2 + + # The network asset type. + ASSET_TYPE_NETWORK = 3 + end + end + + # Message for requesting the list of provisioning quotas. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListProvisioningQuotasRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + class ListProvisioningQuotasRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the list of provisioning quotas. + # @!attribute [rw] provisioning_quotas + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] + # The provisioning quotas registered in this project. + # @!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 ListProvisioningQuotasResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration parameters for a new instance. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the instance config. + # @!attribute [rw] id + # @return [::String] + # A transient unique identifier to idenfity an instance within an + # ProvisioningConfig request. + # @!attribute [rw] instance_type + # @return [::String] + # Instance type. + # [Available + # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + # @!attribute [rw] hyperthreading + # @return [::Boolean] + # Whether the instance should be provisioned with Hyperthreading enabled. + # @!attribute [rw] os_image + # @return [::String] + # OS image to initialize the instance. + # [Available + # images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + # @!attribute [rw] client_network + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkAddress] + # Client network address. Filled if InstanceConfig.multivlan_config is false. + # @!attribute [rw] private_network + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkAddress] + # Private network address, if any. Filled if InstanceConfig.multivlan_config + # is false. + # @!attribute [rw] user_note + # @return [::String] + # User note field, it can be used by customers to add additional information + # for the BMS Ops team . + # @!attribute [rw] account_networks_enabled + # @return [::Boolean] + # If true networks can be from different projects of the same vendor account. + # @!attribute [rw] network_config + # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkConfig] + # The type of network configuration on the instance. + # @!attribute [rw] network_template + # @return [::String] + # Server network template name. Filled if InstanceConfig.multivlan_config is + # true. + # @!attribute [rw] logical_interfaces + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface>] + # List of logical interfaces for the instance. The number of logical + # interfaces will be the same as number of hardware bond/nic on the chosen + # network template. Filled if InstanceConfig.multivlan_config is true. + # @!attribute [rw] ssh_key_names + # @return [::Array<::String>] + # List of names of ssh keys used to provision the instance. + class InstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A network. + # @!attribute [rw] network_id + # @return [::String] + # Id of the network to use, within the same ProvisioningConfig request. + # @!attribute [rw] address + # @return [::String] + # IPv4 address to be assigned to the server. + # @!attribute [rw] existing_network_id + # @return [::String] + # Name of the existing network to use. + class NetworkAddress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The network configuration of the instance. + module NetworkConfig + # The unspecified network configuration. + NETWORKCONFIG_UNSPECIFIED = 0 + + # Instance part of single client network and single private network. + SINGLE_VLAN = 1 + + # Instance part of multiple (or single) client networks and private + # networks. + MULTI_VLAN = 2 + end + end + + # Configuration parameters for a new volume. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the volume config. + # @!attribute [rw] id + # @return [::String] + # A transient unique identifier to identify a volume within an + # ProvisioningConfig request. + # @!attribute [rw] snapshots_enabled + # @return [::Boolean] + # Whether snapshots should be enabled. + # @!attribute [rw] type + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::Type] + # The type of this Volume. + # @!attribute [rw] protocol + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::Protocol] + # Volume protocol. + # @!attribute [rw] size_gb + # @return [::Integer] + # The requested size of this volume, in GB. + # @!attribute [rw] lun_ranges + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig::LunRange>] + # LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. + # @!attribute [rw] machine_ids + # @return [::Array<::String>] + # Machine ids connected to this volume. Set only when protocol is + # PROTOCOL_FC. + # @!attribute [rw] nfs_exports + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig::NfsExport>] + # NFS exports. Set only when protocol is PROTOCOL_NFS. + # @!attribute [rw] user_note + # @return [::String] + # User note field, it can be used by customers to add additional information + # for the BMS Ops team . + # @!attribute [rw] gcp_service + # @return [::String] + # The GCP service of the storage volume. Available gcp_service are in + # https://cloud.google.com/bare-metal/docs/bms-planning. + # @!attribute [rw] performance_tier + # @return [::Google::Cloud::BareMetalSolution::V2::VolumePerformanceTier] + # Performance tier of the Volume. + # Default is SHARED. + class VolumeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A LUN(Logical Unit Number) range. + # @!attribute [rw] quantity + # @return [::Integer] + # Number of LUNs to create. + # @!attribute [rw] size_gb + # @return [::Integer] + # The requested size of each LUN, in GB. + class LunRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A NFS export entry. + # @!attribute [rw] network_id + # @return [::String] + # Network to use to publish the export. + # @!attribute [rw] machine_id + # @return [::String] + # Either a single machine, identified by an ID, or a comma-separated + # list of machine IDs. + # + # Note: The following fields are mutually exclusive: `machine_id`, `cidr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cidr + # @return [::String] + # A CIDR range. + # + # Note: The following fields are mutually exclusive: `cidr`, `machine_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] permissions + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::NfsExport::Permissions] + # Export permissions. + # @!attribute [rw] no_root_squash + # @return [::Boolean] + # Disable root squashing, which is a feature of NFS. + # Root squash is a special mapping of the remote superuser (root) identity + # when using identity authentication. + # @!attribute [rw] allow_suid + # @return [::Boolean] + # Allow the setuid flag. + # @!attribute [rw] allow_dev + # @return [::Boolean] + # Allow dev flag in NfsShare AllowedClientsRequest. + class NfsExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Permissions that can granted for an export. + module Permissions + # Unspecified value. + PERMISSIONS_UNSPECIFIED = 0 + + # Read-only permission. + READ_ONLY = 1 + + # Read-write permission. + READ_WRITE = 2 + end + end + + # The types of Volumes. + module Type + # The unspecified type. + TYPE_UNSPECIFIED = 0 + + # This Volume is on flash. + FLASH = 1 + + # This Volume is on disk. + DISK = 2 + end + + # The protocol used to access the volume. + module Protocol + # Unspecified value. + PROTOCOL_UNSPECIFIED = 0 + + # Fibre channel. + PROTOCOL_FC = 1 + + # Network file system. + PROTOCOL_NFS = 2 + end + end + + # Configuration parameters for a new network. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the network config. + # @!attribute [rw] id + # @return [::String] + # A transient unique identifier to identify a volume within an + # ProvisioningConfig request. + # @!attribute [rw] type + # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::Type] + # The type of this network, either Client or Private. + # @!attribute [rw] bandwidth + # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::Bandwidth] + # Interconnect bandwidth. Set only when type is CLIENT. + # @!attribute [rw] vlan_attachments + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkConfig::IntakeVlanAttachment>] + # List of VLAN attachments. As of now there are always 2 attachments, but it + # is going to change in the future (multi vlan). + # @!attribute [rw] cidr + # @return [::String] + # CIDR range of the network. + # @!attribute [rw] service_cidr + # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::ServiceCidr] + # Service CIDR, if any. + # @!attribute [rw] user_note + # @return [::String] + # User note field, it can be used by customers to add additional information + # for the BMS Ops team . + # @!attribute [rw] gcp_service + # @return [::String] + # The GCP service of the network. Available gcp_service are in + # https://cloud.google.com/bare-metal/docs/bms-planning. + # @!attribute [rw] vlan_same_project + # @return [::Boolean] + # Whether the VLAN attachment pair is located in the same project. + # @!attribute [rw] jumbo_frames_enabled + # @return [::Boolean] + # The JumboFramesEnabled option for customer to set. + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A GCP vlan attachment. + # @!attribute [rw] id + # @return [::String] + # Identifier of the VLAN attachment. + # @!attribute [rw] pairing_key + # @return [::String] + # Attachment pairing key. + class IntakeVlanAttachment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Network type. + module Type + # Unspecified value. + TYPE_UNSPECIFIED = 0 + + # Client network, that is a network peered to a GCP VPC. + CLIENT = 1 + + # Private network, that is a network local to the BMS POD. + PRIVATE = 2 + end + + # Interconnect bandwidth. + module Bandwidth + # Unspecified value. + BANDWIDTH_UNSPECIFIED = 0 + + # 1 Gbps. + BW_1_GBPS = 1 + + # 2 Gbps. + BW_2_GBPS = 2 + + # 5 Gbps. + BW_5_GBPS = 3 + + # 10 Gbps. + BW_10_GBPS = 4 + end + + # Service network block. + module ServiceCidr + # Unspecified value. + SERVICE_CIDR_UNSPECIFIED = 0 + + # Services are disabled for the given network. + DISABLED = 1 + + # Use the highest /26 block of the network to host services. + HIGH_26 = 2 + + # Use the highest /27 block of the network to host services. + HIGH_27 = 3 + + # Use the highest /28 block of the network to host services. + HIGH_28 = 4 + end + end + + # A resource budget. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the instance quota. + # @!attribute [rw] instance_type + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Instance type. + # Deprecated: use gcp_service. + # @!attribute [rw] gcp_service + # @return [::String] + # The gcp service of the provisioning quota. + # @!attribute [rw] location + # @return [::String] + # Location where the quota applies. + # @!attribute [rw] available_machine_count + # @return [::Integer] + # Number of machines than can be created for the given location and + # instance_type. + class InstanceQuota + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetProvisioningConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the ProvisioningConfig. + class GetProvisioningConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateProvisioningConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @!attribute [rw] provisioning_config + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # Required. The ProvisioningConfig to create. + # @!attribute [rw] email + # @return [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + class CreateProvisioningConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a ProvisioningConfig. + # @!attribute [rw] provisioning_config + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # Required. The ProvisioningConfig to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # @!attribute [rw] email + # @return [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + class UpdateProvisioningConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb new file mode 100644 index 000000000000..b01344ba719c --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # An SSH key, used for authorizing with the interactive serial console feature. + # @!attribute [r] name + # @return [::String] + # Output only. The name of this SSH key. + # Currently, the only valid value for the location is "global". + # @!attribute [rw] public_key + # @return [::String] + # The public SSH key. This must be in OpenSSH .authorized_keys format. + class SSHKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for listing the public SSH keys in a project. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent containing the SSH keys. + # Currently, the only valid value for the location is "global". + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListSSHKeysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response of ListSSHKeys. + # @!attribute [rw] ssh_keys + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::SSHKey>] + # The SSH keys registered in the project. + # @!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 ListSSHKeysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for registering a public SSH key in a project. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent containing the SSH keys. + # @!attribute [rw] ssh_key + # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # Required. The SSH key to register. + # @!attribute [rw] ssh_key_id + # @return [::String] + # Required. The ID to use for the key, which will become the final component + # of the key's resource name. + # + # This value must match the regex: + # [a-zA-Z0-9@.\-_]\\{1,64} + class CreateSSHKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting an SSH key from a project. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the SSH key to delete. + # Currently, the only valid value for the location is "global". + class DeleteSSHKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb new file mode 100644 index 000000000000..d1e0bc7a2db8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.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 BareMetalSolution + module V2 + # A storage volume. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of this `Volume`. + # Resource names are schemeless URIs that follow the conventions in + # https://cloud.google.com/apis/design/resource_names. + # Format: + # `projects/{project}/locations/{location}/volumes/{volume}` + # @!attribute [rw] id + # @return [::String] + # An identifier for the `Volume`, generated by the backend. + # @!attribute [rw] storage_type + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::StorageType] + # The storage type for this volume. + # @!attribute [rw] state + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::State] + # The state of this storage volume. + # @!attribute [rw] requested_size_gib + # @return [::Integer] + # The requested size of this storage volume, in GiB. + # @!attribute [rw] originally_requested_size_gib + # @return [::Integer] + # Originally requested size, in GiB. + # @!attribute [rw] current_size_gib + # @return [::Integer] + # The current size of this storage volume, in GiB, including space reserved + # for snapshots. This size might be different than the requested size if the + # storage volume has been configured with auto grow or auto shrink. + # @!attribute [rw] emergency_size_gib + # @return [::Integer] + # Additional emergency size that was requested for this Volume, in GiB. + # current_size_gib includes this value. + # @!attribute [rw] max_size_gib + # @return [::Integer] + # Maximum size volume can be expanded to in case of evergency, in GiB. + # @!attribute [rw] auto_grown_size_gib + # @return [::Integer] + # The size, in GiB, that this storage volume has expanded as a result of an + # auto grow policy. In the absence of auto-grow, the value is 0. + # @!attribute [rw] remaining_space_gib + # @return [::Integer] + # The space remaining in the storage volume for new LUNs, in GiB, excluding + # space reserved for snapshots. + # @!attribute [rw] snapshot_reservation_detail + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::SnapshotReservationDetail] + # Details about snapshot space reservation and usage on the storage volume. + # @!attribute [rw] snapshot_auto_delete_behavior + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::SnapshotAutoDeleteBehavior] + # The behavior to use when snapshot reserved space is full. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [rw] snapshot_enabled + # @return [::Boolean] + # Whether snapshots are enabled. + # @!attribute [rw] pod + # @return [::String] + # Immutable. Pod name. + # @!attribute [r] protocol + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::Protocol] + # Output only. Storage protocol for the Volume. + # @!attribute [r] boot_volume + # @return [::Boolean] + # Output only. Whether this volume is a boot volume. A boot volume is one + # which contains a boot LUN. + # @!attribute [rw] performance_tier + # @return [::Google::Cloud::BareMetalSolution::V2::VolumePerformanceTier] + # Immutable. Performance tier of the Volume. + # Default is SHARED. + # @!attribute [rw] notes + # @return [::String] + # Input only. User-specified notes for new Volume. + # Used to provision Volumes that require manual intervention. + # @!attribute [rw] workload_profile + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::WorkloadProfile] + # The workload profile for the volume. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time after which volume will be fully deleted. + # It is filled only for volumes in COOLOFF state. + # @!attribute [r] instances + # @return [::Array<::String>] + # Output only. Instances this Volume is attached to. + # This field is set only in Get requests. + # @!attribute [r] attached + # @return [::Boolean] + # Output only. Is the Volume attached at at least one instance. + # This field is a lightweight counterpart of `instances` field. + # It is filled in List responses as well. + class Volume + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details about snapshot space reservation and usage on the storage volume. + # @!attribute [rw] reserved_space_gib + # @return [::Integer] + # The space on this storage volume reserved for snapshots, shown in GiB. + # @!attribute [rw] reserved_space_used_percent + # @return [::Integer] + # The percent of snapshot space on this storage volume actually being used + # by the snapshot copies. This value might be higher than 100% if the + # snapshot copies have overflowed into the data portion of the storage + # volume. + # @!attribute [rw] reserved_space_remaining_gib + # @return [::Integer] + # The amount, in GiB, of available space in this storage volume's reserved + # snapshot space. + # @!attribute [rw] reserved_space_percent + # @return [::Integer] + # Percent of the total Volume size reserved for snapshot copies. + # Enabling snapshots requires reserving 20% or more of + # the storage volume space for snapshots. Maximum reserved space for + # snapshots is 40%. + # Setting this field will effectively set snapshot_enabled to true. + class SnapshotReservationDetail + 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 storage type for a volume. + module StorageType + # The storage type for this volume is unknown. + STORAGE_TYPE_UNSPECIFIED = 0 + + # The storage type for this volume is SSD. + SSD = 1 + + # This storage type for this volume is HDD. + HDD = 2 + end + + # The possible states for a storage volume. + module State + # The storage volume is in an unknown state. + STATE_UNSPECIFIED = 0 + + # The storage volume is being created. + CREATING = 1 + + # The storage volume is ready for use. + READY = 2 + + # The storage volume has been requested to be deleted. + DELETING = 3 + + # The storage volume is being updated. + UPDATING = 4 + + # The storage volume is in cool off state. It will be deleted after + # `expire_time`. + COOL_OFF = 5 + end + + # The kinds of auto delete behavior to use when snapshot reserved space is + # full. + module SnapshotAutoDeleteBehavior + # The unspecified behavior. + SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0 + + # Don't delete any snapshots. This disables new snapshot creation, as + # long as the snapshot reserved space is full. + DISABLED = 1 + + # Delete the oldest snapshots first. + OLDEST_FIRST = 2 + + # Delete the newest snapshots first. + NEWEST_FIRST = 3 + end + + # Storage protocol. + module Protocol + # Value is not specified. + PROTOCOL_UNSPECIFIED = 0 + + # Fibre Channel protocol. + FIBRE_CHANNEL = 1 + + # NFS protocol means Volume is a NFS Share volume. + # Such volumes cannot be manipulated via Volumes API. + NFS = 2 + end + + # The possible values for a workload profile. + module WorkloadProfile + # The workload profile is in an unknown state. + WORKLOAD_PROFILE_UNSPECIFIED = 0 + + # The workload profile is generic. + GENERIC = 1 + + # The workload profile is hana. + HANA = 2 + end + end + + # Message for requesting storage volume information. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetVolumeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of storage volumes. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListVolumesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] filter + # @return [::String] + # List filter. + class ListVolumesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the list of storage volumes. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Volume>] + # The list of storage volumes. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListVolumesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a volume. + # @!attribute [rw] volume + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # Required. The volume to update. + # + # The `name` field is used to identify the volume to update. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # The only currently supported fields are: + # 'labels' + class UpdateVolumeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting rename of a server. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the volume. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @!attribute [rw] new_volume_id + # @return [::String] + # Required. The new `id` of the volume. + class RenameVolumeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for skip volume cooloff and delete it. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Volume. + class EvictVolumeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for emergency resize Volume. + # @!attribute [rw] volume + # @return [::String] + # Required. Volume to resize. + # @!attribute [rw] size_gib + # @return [::Integer] + # New Volume size, in GiB. + class ResizeVolumeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb new file mode 100644 index 000000000000..0525748dfd87 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb @@ -0,0 +1,134 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A snapshot of a volume. Only boot volumes can have snapshots. + # @!attribute [rw] name + # @return [::String] + # The name of the snapshot. + # @!attribute [r] id + # @return [::String] + # Output only. An identifier for the snapshot, generated by the backend. + # @!attribute [rw] description + # @return [::String] + # The description of the snapshot. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time of the snapshot. + # @!attribute [r] storage_volume + # @return [::String] + # Output only. The name of the volume which this snapshot belongs to. + # @!attribute [r] type + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot::SnapshotType] + # Output only. The type of the snapshot which indicates whether it was + # scheduled or manual/ad-hoc. + class VolumeSnapshot + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the type of a snapshot. + module SnapshotType + # Type is not specified. + SNAPSHOT_TYPE_UNSPECIFIED = 0 + + # Snapshot was taken manually by user. + AD_HOC = 1 + + # Snapshot was taken automatically as a part of a snapshot schedule. + SCHEDULED = 2 + end + end + + # Message for requesting volume snapshot information. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the snapshot. + class GetVolumeSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of volume snapshots. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListVolumesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + class ListVolumeSnapshotsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the list of volume snapshots. + # @!attribute [rw] volume_snapshots + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] + # The list of snapshots. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListVolumeSnapshotsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting named Volume snapshot. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the snapshot to delete. + class DeleteVolumeSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a volume snapshot. + # @!attribute [rw] parent + # @return [::String] + # Required. The volume to snapshot. + # @!attribute [rw] volume_snapshot + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # Required. The snapshot to create. + class CreateVolumeSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for restoring a volume snapshot. + # @!attribute [rw] volume_snapshot + # @return [::String] + # Required. Name of the snapshot which will be used to restore its parent + # volume. + class RestoreVolumeSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile new file mode 100644 index 000000000000..5d699c275013 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2", path: "../" +else + gem "google-cloud-bare_metal_solution-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-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb new file mode 100644 index 000000000000..358c745fc756 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.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 baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the create_nfs_share call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share. +# +def create_nfs_share + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new + + # Call the create_nfs_share method. + result = client.create_nfs_share request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb new file mode 100644 index 000000000000..a06fe4fb4bde --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_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 baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the create_provisioning_config call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config. +# +def create_provisioning_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new + + # Call the create_provisioning_config method. + result = client.create_provisioning_config request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb new file mode 100644 index 000000000000..d8bb10ff6bad --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the create_ssh_key call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key. +# +def create_ssh_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new + + # Call the create_ssh_key method. + result = client.create_ssh_key request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb new file mode 100644 index 000000000000..d476c4950cff --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the create_volume_snapshot call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot. +# +def create_volume_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new + + # Call the create_volume_snapshot method. + result = client.create_volume_snapshot request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb new file mode 100644 index 000000000000..d93b24926574 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.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 baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the delete_nfs_share call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share. +# +def delete_nfs_share + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new + + # Call the delete_nfs_share method. + result = client.delete_nfs_share request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb new file mode 100644 index 000000000000..3439a897492e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the delete_ssh_key call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key. +# +def delete_ssh_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new + + # Call the delete_ssh_key method. + result = client.delete_ssh_key request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb new file mode 100644 index 000000000000..2adfa46b129e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the delete_volume_snapshot call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot. +# +def delete_volume_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new + + # Call the delete_volume_snapshot method. + result = client.delete_volume_snapshot request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb new file mode 100644 index 000000000000..3883f7f5756b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.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 baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the detach_lun call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun. +# +def detach_lun + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new + + # Call the detach_lun method. + result = client.detach_lun request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb new file mode 100644 index 000000000000..18430c661223 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.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 baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the disable_interactive_serial_console call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console. +# +def disable_interactive_serial_console + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new + + # Call the disable_interactive_serial_console method. + result = client.disable_interactive_serial_console request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb new file mode 100644 index 000000000000..169e030b544f --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.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 baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the enable_interactive_serial_console call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console. +# +def enable_interactive_serial_console + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new + + # Call the enable_interactive_serial_console method. + result = client.enable_interactive_serial_console request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb new file mode 100644 index 000000000000..916a0b294499 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.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 baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the evict_lun call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun. +# +def evict_lun + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new + + # Call the evict_lun method. + result = client.evict_lun request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb new file mode 100644 index 000000000000..d7d6e882e4a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.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 baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the evict_volume call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume. +# +def evict_volume + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new + + # Call the evict_volume method. + result = client.evict_volume request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb new file mode 100644 index 000000000000..716e61b4abcd --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/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 baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb new file mode 100644 index 000000000000..58f24d70f77f --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_lun call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun. +# +def get_lun + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new + + # Call the get_lun method. + result = client.get_lun request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb new file mode 100644 index 000000000000..5df941d15772 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_network call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network. +# +def get_network + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new + + # Call the get_network method. + result = client.get_network request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb new file mode 100644 index 000000000000..d2c6e1709af7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_nfs_share call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share. +# +def get_nfs_share + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new + + # Call the get_nfs_share method. + result = client.get_nfs_share request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb new file mode 100644 index 000000000000..986b6c62e235 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_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 baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_provisioning_config call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config. +# +def get_provisioning_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new + + # Call the get_provisioning_config method. + result = client.get_provisioning_config request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb new file mode 100644 index 000000000000..939f442e87ae --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_volume call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume. +# +def get_volume + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new + + # Call the get_volume method. + result = client.get_volume request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb new file mode 100644 index 000000000000..001c45e34f3b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_volume_snapshot call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot. +# +def get_volume_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new + + # Call the get_volume_snapshot method. + result = client.get_volume_snapshot request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb new file mode 100644 index 000000000000..3e017bcb7a63 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/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 baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_instances call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances. +# +def list_instances + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::Instance. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb new file mode 100644 index 000000000000..6a79522dc049 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.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 baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_luns call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns. +# +def list_luns + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new + + # Call the list_luns method. + result = client.list_luns request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb new file mode 100644 index 000000000000..3c008bae622a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_network_usage call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage. +# +def list_network_usage + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new + + # Call the list_network_usage method. + result = client.list_network_usage request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb new file mode 100644 index 000000000000..b98c7b7f9d00 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.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 baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_networks call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks. +# +def list_networks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new + + # Call the list_networks method. + result = client.list_networks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb new file mode 100644 index 000000000000..a865e2f86d3f --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.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 baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_nfs_shares call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares. +# +def list_nfs_shares + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new + + # Call the list_nfs_shares method. + result = client.list_nfs_shares request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb new file mode 100644 index 000000000000..12e6f9f047d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.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 baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_os_images call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images. +# +def list_os_images + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new + + # Call the list_os_images method. + result = client.list_os_images request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb new file mode 100644 index 000000000000..0dca5eff2d85 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.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 baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_provisioning_quotas call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas. +# +def list_provisioning_quotas + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new + + # Call the list_provisioning_quotas method. + result = client.list_provisioning_quotas request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb new file mode 100644 index 000000000000..158656b868d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.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 baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_ssh_keys call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys. +# +def list_ssh_keys + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new + + # Call the list_ssh_keys method. + result = client.list_ssh_keys request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb new file mode 100644 index 000000000000..58b170292d00 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.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 baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_volume_snapshots call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots. +# +def list_volume_snapshots + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new + + # Call the list_volume_snapshots method. + result = client.list_volume_snapshots request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb new file mode 100644 index 000000000000..a423d77af7e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.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 baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_volumes call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes. +# +def list_volumes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new + + # Call the list_volumes method. + result = client.list_volumes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb new file mode 100644 index 000000000000..94dbdb0a41ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_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 baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the rename_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance. +# +def rename_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new + + # Call the rename_instance method. + result = client.rename_instance request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb new file mode 100644 index 000000000000..da01cd4cae26 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the rename_network call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network. +# +def rename_network + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new + + # Call the rename_network method. + result = client.rename_network request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb new file mode 100644 index 000000000000..32ec197121d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the rename_nfs_share call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share. +# +def rename_nfs_share + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new + + # Call the rename_nfs_share method. + result = client.rename_nfs_share request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb new file mode 100644 index 000000000000..150aa2cb0fbb --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the rename_volume call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume. +# +def rename_volume + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new + + # Call the rename_volume method. + result = client.rename_volume request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb new file mode 100644 index 000000000000..c1010158d5fc --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_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 baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the reset_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance. +# +def reset_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new + + # Call the reset_instance method. + result = client.reset_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 baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb new file mode 100644 index 000000000000..c79249eb863d --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.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 baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the resize_volume call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume. +# +def resize_volume + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new + + # Call the resize_volume method. + result = client.resize_volume request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb new file mode 100644 index 000000000000..d37a07635475 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.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 baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the restore_volume_snapshot call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot. +# +def restore_volume_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new + + # Call the restore_volume_snapshot method. + result = client.restore_volume_snapshot request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb new file mode 100644 index 000000000000..7beed0235a9a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_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 baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the start_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance. +# +def start_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new + + # Call the start_instance method. + result = client.start_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 baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb new file mode 100644 index 000000000000..6728055e6fe6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_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 baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the stop_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance. +# +def stop_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new + + # Call the stop_instance method. + result = client.stop_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 baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb new file mode 100644 index 000000000000..f35b9ef72741 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_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 baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the submit_provisioning_config call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config. +# +def submit_provisioning_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new + + # Call the submit_provisioning_config method. + result = client.submit_provisioning_config request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb new file mode 100644 index 000000000000..f95a8f3457e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/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 baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the update_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance. +# +def update_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::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 baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb new file mode 100644 index 000000000000..b4c3d334f859 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.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 baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the update_network call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network. +# +def update_network + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new + + # Call the update_network method. + result = client.update_network request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb new file mode 100644 index 000000000000..6caf796b8964 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.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 baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the update_nfs_share call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share. +# +def update_nfs_share + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new + + # Call the update_nfs_share method. + result = client.update_nfs_share request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb new file mode 100644 index 000000000000..3c5676e4d0fe --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_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 baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the update_provisioning_config call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config. +# +def update_provisioning_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new + + # Call the update_provisioning_config method. + result = client.update_provisioning_config request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb new file mode 100644 index 000000000000..a6f74e17e36c --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.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 baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the update_volume call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume. +# +def update_volume + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new + + # Call the update_volume method. + result = client.update_volume request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json new file mode 100644 index 000000000000..a6e0209d6718 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json @@ -0,0 +1,1775 @@ +{ + "client_library": { + "name": "google-cloud-bare_metal_solution-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.baremetalsolution.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync", + "title": "Snippet for the list_instances call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances.", + "file": "bare_metal_solution/list_instances.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instances", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListInstances", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListInstances", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync", + "title": "Snippet for the get_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance.", + "file": "bare_metal_solution/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Instance", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync", + "title": "Snippet for the update_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance.", + "file": "bare_metal_solution/update_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "UpdateInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync", + "title": "Snippet for the rename_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance.", + "file": "bare_metal_solution/rename_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "rename_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Instance", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "RenameInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync", + "title": "Snippet for the reset_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance.", + "file": "bare_metal_solution/reset_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "reset_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ResetInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResetInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync", + "title": "Snippet for the start_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance.", + "file": "bare_metal_solution/start_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "StartInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.StartInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync", + "title": "Snippet for the stop_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance.", + "file": "bare_metal_solution/stop_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "stop_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "StopInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.StopInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync", + "title": "Snippet for the enable_interactive_serial_console call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console.", + "file": "bare_metal_solution/enable_interactive_serial_console.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_interactive_serial_console", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "EnableInteractiveSerialConsole", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EnableInteractiveSerialConsole", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync", + "title": "Snippet for the disable_interactive_serial_console call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console.", + "file": "bare_metal_solution/disable_interactive_serial_console.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_interactive_serial_console", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "DisableInteractiveSerialConsole", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DisableInteractiveSerialConsole", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync", + "title": "Snippet for the detach_lun call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun.", + "file": "bare_metal_solution/detach_lun.rb", + "language": "RUBY", + "client_method": { + "short_name": "detach_lun", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::DetachLunRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "DetachLun", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DetachLun", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync", + "title": "Snippet for the list_ssh_keys call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys.", + "file": "bare_metal_solution/list_ssh_keys.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_ssh_keys", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListSSHKeys", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListSSHKeys", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync", + "title": "Snippet for the create_ssh_key call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key.", + "file": "bare_metal_solution/create_ssh_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_ssh_key", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::SSHKey", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "CreateSSHKey", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateSSHKey", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync", + "title": "Snippet for the delete_ssh_key call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key.", + "file": "bare_metal_solution/delete_ssh_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_ssh_key", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "DeleteSSHKey", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteSSHKey", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync", + "title": "Snippet for the list_volumes call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes.", + "file": "bare_metal_solution/list_volumes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_volumes", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListVolumes", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListVolumes", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync", + "title": "Snippet for the get_volume call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume.", + "file": "bare_metal_solution/get_volume.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_volume", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Volume", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetVolume", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetVolume", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync", + "title": "Snippet for the update_volume call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume.", + "file": "bare_metal_solution/update_volume.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_volume", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "UpdateVolume", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateVolume", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync", + "title": "Snippet for the rename_volume call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume.", + "file": "bare_metal_solution/rename_volume.rb", + "language": "RUBY", + "client_method": { + "short_name": "rename_volume", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Volume", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "RenameVolume", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameVolume", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync", + "title": "Snippet for the evict_volume call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume.", + "file": "bare_metal_solution/evict_volume.rb", + "language": "RUBY", + "client_method": { + "short_name": "evict_volume", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "EvictVolume", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EvictVolume", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync", + "title": "Snippet for the resize_volume call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume.", + "file": "bare_metal_solution/resize_volume.rb", + "language": "RUBY", + "client_method": { + "short_name": "resize_volume", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ResizeVolume", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResizeVolume", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync", + "title": "Snippet for the list_networks call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks.", + "file": "bare_metal_solution/list_networks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_networks", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListNetworks", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworks", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync", + "title": "Snippet for the list_network_usage call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage.", + "file": "bare_metal_solution/list_network_usage.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_network_usage", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListNetworkUsage", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworkUsage", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync", + "title": "Snippet for the get_network call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network.", + "file": "bare_metal_solution/get_network.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_network", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Network", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetNetwork", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNetwork", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync", + "title": "Snippet for the update_network call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network.", + "file": "bare_metal_solution/update_network.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_network", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "UpdateNetwork", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNetwork", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync", + "title": "Snippet for the create_volume_snapshot call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot.", + "file": "bare_metal_solution/create_volume_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_volume_snapshot", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "CreateVolumeSnapshot", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateVolumeSnapshot", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync", + "title": "Snippet for the restore_volume_snapshot call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot.", + "file": "bare_metal_solution/restore_volume_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "restore_volume_snapshot", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "RestoreVolumeSnapshot", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RestoreVolumeSnapshot", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync", + "title": "Snippet for the delete_volume_snapshot call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot.", + "file": "bare_metal_solution/delete_volume_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_volume_snapshot", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "DeleteVolumeSnapshot", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteVolumeSnapshot", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync", + "title": "Snippet for the get_volume_snapshot call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot.", + "file": "bare_metal_solution/get_volume_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_volume_snapshot", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetVolumeSnapshot", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetVolumeSnapshot", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync", + "title": "Snippet for the list_volume_snapshots call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots.", + "file": "bare_metal_solution/list_volume_snapshots.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_volume_snapshots", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListVolumeSnapshots", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListVolumeSnapshots", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync", + "title": "Snippet for the get_lun call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun.", + "file": "bare_metal_solution/get_lun.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lun", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetLunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Lun", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetLun", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetLun", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync", + "title": "Snippet for the list_luns call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns.", + "file": "bare_metal_solution/list_luns.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_luns", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListLunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListLunsResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListLuns", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListLuns", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync", + "title": "Snippet for the evict_lun call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun.", + "file": "bare_metal_solution/evict_lun.rb", + "language": "RUBY", + "client_method": { + "short_name": "evict_lun", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::EvictLunRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "EvictLun", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EvictLun", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync", + "title": "Snippet for the get_nfs_share call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share.", + "file": "bare_metal_solution/get_nfs_share.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_nfs_share", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::NfsShare", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetNfsShare", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNfsShare", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync", + "title": "Snippet for the list_nfs_shares call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares.", + "file": "bare_metal_solution/list_nfs_shares.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_nfs_shares", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListNfsShares", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNfsShares", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync", + "title": "Snippet for the update_nfs_share call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share.", + "file": "bare_metal_solution/update_nfs_share.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_nfs_share", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "UpdateNfsShare", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNfsShare", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync", + "title": "Snippet for the create_nfs_share call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share.", + "file": "bare_metal_solution/create_nfs_share.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_nfs_share", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "CreateNfsShare", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateNfsShare", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync", + "title": "Snippet for the rename_nfs_share call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share.", + "file": "bare_metal_solution/rename_nfs_share.rb", + "language": "RUBY", + "client_method": { + "short_name": "rename_nfs_share", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::NfsShare", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "RenameNfsShare", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameNfsShare", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync", + "title": "Snippet for the delete_nfs_share call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share.", + "file": "bare_metal_solution/delete_nfs_share.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_nfs_share", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "DeleteNfsShare", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteNfsShare", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync", + "title": "Snippet for the list_provisioning_quotas call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas.", + "file": "bare_metal_solution/list_provisioning_quotas.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_provisioning_quotas", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListProvisioningQuotas", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListProvisioningQuotas", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync", + "title": "Snippet for the submit_provisioning_config call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config.", + "file": "bare_metal_solution/submit_provisioning_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "submit_provisioning_config", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "SubmitProvisioningConfig", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.SubmitProvisioningConfig", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync", + "title": "Snippet for the get_provisioning_config call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config.", + "file": "bare_metal_solution/get_provisioning_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_provisioning_config", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetProvisioningConfig", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetProvisioningConfig", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync", + "title": "Snippet for the create_provisioning_config call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config.", + "file": "bare_metal_solution/create_provisioning_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_provisioning_config", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "CreateProvisioningConfig", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateProvisioningConfig", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync", + "title": "Snippet for the update_provisioning_config call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config.", + "file": "bare_metal_solution/update_provisioning_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_provisioning_config", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "UpdateProvisioningConfig", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateProvisioningConfig", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync", + "title": "Snippet for the rename_network call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network.", + "file": "bare_metal_solution/rename_network.rb", + "language": "RUBY", + "client_method": { + "short_name": "rename_network", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Network", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "RenameNetwork", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameNetwork", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync", + "title": "Snippet for the list_os_images call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images.", + "file": "bare_metal_solution/list_os_images.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_os_images", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListOSImages", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListOSImages", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "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-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb new file mode 100644 index 000000000000..d0c2f98192c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_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/baremetalsolution/v2/baremetalsolution_pb" +require "google/cloud/baremetalsolution/v2/baremetalsolution_services_pb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution" + +class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb new file mode 100644 index 000000000000..0969c53605e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_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/bare_metal_solution/v2/bare_metal_solution" + +class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_config_path project: "value0", location: "value1", instance_config: "value2" + assert_equal "projects/value0/locations/value1/instanceConfigs/value2", path + end + end + + def test_interconnect_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.interconnect_attachment_path project: "value0", region: "value1", interconnect_attachment: "value2" + assert_equal "projects/value0/regions/value1/interconnectAttachments/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::BareMetalSolution::V2::BareMetalSolution::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_lun_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lun_path project: "value0", location: "value1", volume: "value2", lun: "value3" + assert_equal "projects/value0/locations/value1/volumes/value2/luns/value3", path + end + end + + def test_nfs_share_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.nfs_share_path project: "value0", location: "value1", nfs_share: "value2" + assert_equal "projects/value0/locations/value1/nfsShares/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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_path project: "value0", location: "value1", network: "value2" + assert_equal "projects/value0/locations/value1/networks/value2", path + end + end + + def test_network_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_config_path project: "value0", location: "value1", network_config: "value2" + assert_equal "projects/value0/locations/value1/networkConfigs/value2", path + end + end + + def test_provisioning_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.provisioning_config_path project: "value0", location: "value1", provisioning_config: "value2" + assert_equal "projects/value0/locations/value1/provisioningConfigs/value2", path + end + end + + def test_server_network_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.server_network_template_path project: "value0", location: "value1", server_network_template: "value2" + assert_equal "projects/value0/locations/value1/serverNetworkTemplate/value2", path + end + end + + def test_ssh_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.ssh_key_path project: "value0", location: "value1", ssh_key: "value2" + assert_equal "projects/value0/locations/value1/sshKeys/value2", path + end + end + + def test_volume_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.volume_path project: "value0", location: "value1", volume: "value2" + assert_equal "projects/value0/locations/value1/volumes/value2", path + end + end + + def test_volume_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.volume_config_path project: "value0", location: "value1", volume_config: "value2" + assert_equal "projects/value0/locations/value1/volumeConfigs/value2", path + end + end + + def test_volume_snapshot_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.volume_snapshot_path project: "value0", location: "value1", volume: "value2", snapshot: "value3" + assert_equal "projects/value0/locations/value1/volumes/value2/snapshots/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb new file mode 100644 index 000000000000..2565ded3d7fb --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb @@ -0,0 +1,2518 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" + + +class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::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" + + 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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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 }) 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 do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_instances ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.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_instances({ 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_instances(::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.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_instances_client_stub.call_count + end + end + end + + def test_get_instance + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::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::BareMetalSolution::V2::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_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 = {} + update_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_instance({ instance: instance, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_instance instance: instance, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_instance ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_instance({ instance: instance, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_instance(::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_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_rename_instance + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_instance_id = "hello world" + + rename_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rename_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.rename_instance({ name: name, new_instance_id: new_instance_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.rename_instance name: name, new_instance_id: new_instance_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.rename_instance ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.rename_instance({ name: name, new_instance_id: new_instance_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.rename_instance(::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rename_instance_client_stub.call_count + end + end + end + + def test_reset_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" + + reset_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_reset_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, reset_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.reset_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.reset_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.reset_instance ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.reset_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.reset_instance(::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, reset_instance_client_stub.call_count + end + end + end + + def test_start_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" + + start_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_start_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.start_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.start_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.start_instance ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.start_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.start_instance(::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_instance_client_stub.call_count + end + end + end + + def test_stop_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" + + stop_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_stop_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, stop_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.stop_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.stop_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.stop_instance ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.stop_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.stop_instance(::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, stop_instance_client_stub.call_count + end + end + end + + def test_enable_interactive_serial_console + # Create test objects. + 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_interactive_serial_console_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_enable_interactive_serial_console_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_interactive_serial_console_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.enable_interactive_serial_console({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.enable_interactive_serial_console name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.enable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.enable_interactive_serial_console({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.enable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_interactive_serial_console_client_stub.call_count + end + end + end + + def test_disable_interactive_serial_console + # Create test objects. + 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_interactive_serial_console_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_disable_interactive_serial_console_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_interactive_serial_console_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.disable_interactive_serial_console({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.disable_interactive_serial_console name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.disable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.disable_interactive_serial_console({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.disable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_interactive_serial_console_client_stub.call_count + end + end + end + + def test_detach_lun + # Create test objects. + 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 = "hello world" + lun = "hello world" + skip_reboot = true + + detach_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_detach_lun_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, detach_lun_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.detach_lun instance: instance, lun: lun, skip_reboot: skip_reboot do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.detach_lun ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.detach_lun(::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, detach_lun_client_stub.call_count + end + end + end + + def test_list_ssh_keys + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.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_ssh_keys_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_ssh_keys_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_ssh_keys_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_ssh_keys({ 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_ssh_keys 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_ssh_keys ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.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_ssh_keys({ 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_ssh_keys(::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.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_ssh_keys_client_stub.call_count + end + end + end + + def test_create_ssh_key + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::SSHKey.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + ssh_key = {} + ssh_key_id = "hello world" + + create_ssh_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_ssh_key_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_ssh_key_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_ssh_key parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_ssh_key ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_ssh_key(::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_ssh_key_client_stub.call_count + end + end + end + + def test_delete_ssh_key + # 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_ssh_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_ssh_key_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_ssh_key_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_ssh_key({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_ssh_key name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_ssh_key ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_ssh_key({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_ssh_key(::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_ssh_key_client_stub.call_count + end + end + end + + def test_list_volumes + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.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_volumes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_volumes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_volumes_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_volumes({ 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_volumes 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_volumes ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.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_volumes({ 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_volumes(::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.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_volumes_client_stub.call_count + end + end + end + + def test_get_volume + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Volume.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_volume_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_volume_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_volume({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_volume name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_volume ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_volume({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_volume(::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_volume_client_stub.call_count + end + end + end + + def test_update_volume + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + volume = {} + update_mask = {} + + update_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_volume_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_volume_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_volume({ volume: volume, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_volume volume: volume, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_volume ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_volume({ volume: volume, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_volume(::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_volume_client_stub.call_count + end + end + end + + def test_rename_volume + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Volume.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_volume_id = "hello world" + + rename_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_volume_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rename_volume_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.rename_volume({ name: name, new_volume_id: new_volume_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.rename_volume name: name, new_volume_id: new_volume_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.rename_volume ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.rename_volume({ name: name, new_volume_id: new_volume_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.rename_volume(::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rename_volume_client_stub.call_count + end + end + end + + def test_evict_volume + # Create test objects. + 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" + + evict_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_evict_volume_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, evict_volume_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.evict_volume({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.evict_volume name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.evict_volume ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.evict_volume({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.evict_volume(::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, evict_volume_client_stub.call_count + end + end + end + + def test_resize_volume + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + volume = "hello world" + size_gib = 42 + + resize_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_resize_volume_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, resize_volume_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.resize_volume({ volume: volume, size_gib: size_gib }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.resize_volume volume: volume, size_gib: size_gib do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.resize_volume ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.resize_volume({ volume: volume, size_gib: size_gib }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.resize_volume(::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, resize_volume_client_stub.call_count + end + end + end + + def test_list_networks + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.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_networks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_networks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_networks_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_networks({ 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_networks 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_networks ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.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_networks({ 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_networks(::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.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_networks_client_stub.call_count + end + end + end + + def test_list_network_usage + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + location = "hello world" + + list_network_usage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_network_usage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_network_usage_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_network_usage({ location: location }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_network_usage location: location do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_network_usage ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_network_usage({ location: location }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_network_usage(::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_network_usage_client_stub.call_count + end + end + end + + def test_get_network + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Network.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_network_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_network_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_network({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_network name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_network ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_network({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_network(::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_network_client_stub.call_count + end + end + end + + def test_update_network + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + network = {} + update_mask = {} + + update_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_network_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_network_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_network({ network: network, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_network network: network, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_network ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_network({ network: network, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_network(::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_network_client_stub.call_count + end + end + end + + def test_create_volume_snapshot + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + volume_snapshot = {} + + create_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_volume_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_volume_snapshot_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_volume_snapshot parent: parent, volume_snapshot: volume_snapshot do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_volume_snapshot_client_stub.call_count + end + end + end + + def test_restore_volume_snapshot + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + volume_snapshot = "hello world" + + restore_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_restore_volume_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restore_volume_snapshot_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.restore_volume_snapshot({ volume_snapshot: volume_snapshot }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.restore_volume_snapshot volume_snapshot: volume_snapshot do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.restore_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.restore_volume_snapshot({ volume_snapshot: volume_snapshot }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.restore_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restore_volume_snapshot_client_stub.call_count + end + end + end + + def test_delete_volume_snapshot + # 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_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_volume_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_volume_snapshot_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_volume_snapshot({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_volume_snapshot name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_volume_snapshot({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_volume_snapshot_client_stub.call_count + end + end + end + + def test_get_volume_snapshot + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_volume_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_volume_snapshot_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_volume_snapshot({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_volume_snapshot name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_volume_snapshot({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_volume_snapshot_client_stub.call_count + end + end + end + + def test_list_volume_snapshots + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.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_volume_snapshots_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_volume_snapshots_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_volume_snapshots_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_volume_snapshots({ 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_volume_snapshots 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_volume_snapshots ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.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_volume_snapshots({ 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_volume_snapshots(::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.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_volume_snapshots_client_stub.call_count + end + end + end + + def test_get_lun + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Lun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_lun_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lun_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_lun({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_lun name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_lun ::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_lun({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_lun(::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lun_client_stub.call_count + end + end + end + + def test_list_luns + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.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_luns_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_luns_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_luns_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_luns({ 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_luns 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_luns ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.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_luns({ 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_luns(::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.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_luns_client_stub.call_count + end + end + end + + def test_evict_lun + # Create test objects. + 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" + + evict_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_evict_lun_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, evict_lun_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.evict_lun({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.evict_lun name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.evict_lun ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.evict_lun({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.evict_lun(::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, evict_lun_client_stub.call_count + end + end + end + + def test_get_nfs_share + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_nfs_share_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_nfs_share_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_nfs_share({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_nfs_share name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_nfs_share ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_nfs_share({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_nfs_share(::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_nfs_share_client_stub.call_count + end + end + end + + def test_list_nfs_shares + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.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_nfs_shares_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_nfs_shares_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_nfs_shares_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_nfs_shares({ 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_nfs_shares 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_nfs_shares ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.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_nfs_shares({ 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_nfs_shares(::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.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_nfs_shares_client_stub.call_count + end + end + end + + def test_update_nfs_share + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + nfs_share = {} + update_mask = {} + + update_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_nfs_share_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_nfs_share_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_nfs_share nfs_share: nfs_share, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_nfs_share ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_nfs_share(::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_nfs_share_client_stub.call_count + end + end + end + + def test_create_nfs_share + # Create test objects. + 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" + nfs_share = {} + + create_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_nfs_share_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_nfs_share_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_nfs_share({ parent: parent, nfs_share: nfs_share }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_nfs_share parent: parent, nfs_share: nfs_share do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_nfs_share ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_nfs_share({ parent: parent, nfs_share: nfs_share }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_nfs_share(::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_nfs_share_client_stub.call_count + end + end + end + + def test_rename_nfs_share + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_nfsshare_id = "hello world" + + rename_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_nfs_share_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rename_nfs_share_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.rename_nfs_share name: name, new_nfsshare_id: new_nfsshare_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.rename_nfs_share ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.rename_nfs_share(::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rename_nfs_share_client_stub.call_count + end + end + end + + def test_delete_nfs_share + # Create test objects. + 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_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_nfs_share_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_nfs_share_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_nfs_share({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_nfs_share name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_nfs_share ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_nfs_share({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_nfs_share(::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_nfs_share_client_stub.call_count + end + end + end + + def test_list_provisioning_quotas + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.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_provisioning_quotas_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_provisioning_quotas_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_provisioning_quotas_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_provisioning_quotas({ 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_provisioning_quotas 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_provisioning_quotas ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.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_provisioning_quotas({ 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_provisioning_quotas(::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.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_provisioning_quotas_client_stub.call_count + end + end + end + + def test_submit_provisioning_config + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provisioning_config = {} + email = "hello world" + + submit_provisioning_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_submit_provisioning_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, submit_provisioning_config_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.submit_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.submit_provisioning_config ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.submit_provisioning_config(::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, submit_provisioning_config_client_stub.call_count + end + end + end + + def test_get_provisioning_config + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_provisioning_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_provisioning_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_provisioning_config_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_provisioning_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_provisioning_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_provisioning_config ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_provisioning_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_provisioning_config(::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_provisioning_config_client_stub.call_count + end + end + end + + def test_create_provisioning_config + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provisioning_config = {} + email = "hello world" + + create_provisioning_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_provisioning_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_provisioning_config_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_provisioning_config ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_provisioning_config(::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_provisioning_config_client_stub.call_count + end + end + end + + def test_update_provisioning_config + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + provisioning_config = {} + update_mask = {} + email = "hello world" + + update_provisioning_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_provisioning_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_provisioning_config_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_provisioning_config provisioning_config: provisioning_config, update_mask: update_mask, email: email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_provisioning_config ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_provisioning_config(::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_provisioning_config_client_stub.call_count + end + end + end + + def test_rename_network + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Network.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_network_id = "hello world" + + rename_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_network_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rename_network_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.rename_network({ name: name, new_network_id: new_network_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.rename_network name: name, new_network_id: new_network_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.rename_network ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.rename_network({ name: name, new_network_id: new_network_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.rename_network(::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rename_network_client_stub.call_count + end + end + end + + def test_list_os_images + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.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_os_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_os_images_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_os_images_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_os_images({ 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_os_images 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_os_images ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.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_os_images({ 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_os_images(::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.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_os_images_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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb new file mode 100644 index 000000000000..8c8eb4f1435b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb @@ -0,0 +1,2881 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/baremetalsolution/v2/baremetalsolution_pb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution" + +class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::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" + + list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instances, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_instances_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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 }) 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 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::BareMetalSolution::V2::ListInstancesRequest.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_instances({ 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_instances(::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.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_instances_client_stub.call_rpc_count + end + end + + def test_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::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::BareMetalSolution::V2::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_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 = {} + update_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::BareMetalSolution::V2::UpdateInstanceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Instance), request["instance"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_instance({ instance: instance, 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_instance instance: instance, 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_instance ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, 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_instance({ instance: instance, 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_instance(::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, 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_instance_client_stub.call_rpc_count + end + end + + def test_rename_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::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" + new_instance_id = "hello world" + + rename_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rename_instance, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["new_instance_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rename_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.rename_instance({ name: name, new_instance_id: new_instance_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.rename_instance name: name, new_instance_id: new_instance_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.rename_instance ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.rename_instance({ name: name, new_instance_id: new_instance_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.rename_instance(::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rename_instance_client_stub.call_rpc_count + end + end + + def test_reset_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" + + reset_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :reset_instance, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, reset_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.reset_instance({ 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.reset_instance 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.reset_instance ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.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.reset_instance({ 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.reset_instance(::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.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, reset_instance_client_stub.call_rpc_count + end + end + + def test_start_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" + + start_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_instance, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.start_instance({ 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.start_instance 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.start_instance ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.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.start_instance({ 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.start_instance(::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.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, start_instance_client_stub.call_rpc_count + end + end + + def test_stop_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" + + stop_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :stop_instance, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, stop_instance_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.stop_instance({ 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.stop_instance 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.stop_instance ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.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.stop_instance({ 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.stop_instance(::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.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, stop_instance_client_stub.call_rpc_count + end + end + + def test_enable_interactive_serial_console + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_interactive_serial_console_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_interactive_serial_console, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_interactive_serial_console_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.enable_interactive_serial_console({ 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_interactive_serial_console 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_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.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_interactive_serial_console({ 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_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.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_interactive_serial_console_client_stub.call_rpc_count + end + end + + def test_disable_interactive_serial_console + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_interactive_serial_console_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_interactive_serial_console, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_interactive_serial_console_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.disable_interactive_serial_console({ 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.disable_interactive_serial_console 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.disable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.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.disable_interactive_serial_console({ 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.disable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.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, disable_interactive_serial_console_client_stub.call_rpc_count + end + end + + def test_detach_lun + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = "hello world" + lun = "hello world" + skip_reboot = true + + detach_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :detach_lun, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, request + assert_equal "hello world", request["instance"] + assert_equal "hello world", request["lun"] + assert_equal true, request["skip_reboot"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, detach_lun_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }) do |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.detach_lun instance: instance, lun: lun, skip_reboot: skip_reboot do |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.detach_lun ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot) do |response, operation| + 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.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }, grpc_options) do |response, operation| + 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.detach_lun(::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, detach_lun_client_stub.call_rpc_count + end + end + + def test_list_ssh_keys + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_ssh_keys_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_ssh_keys, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, 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_ssh_keys_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_ssh_keys({ parent: parent, page_size: page_size, page_token: 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_ssh_keys parent: parent, page_size: page_size, page_token: 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_ssh_keys ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.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_ssh_keys({ 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_ssh_keys(::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.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_ssh_keys_client_stub.call_rpc_count + end + end + + def test_create_ssh_key + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::SSHKey.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + ssh_key = {} + ssh_key_id = "hello world" + + create_ssh_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_ssh_key, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::SSHKey), request["ssh_key"] + assert_equal "hello world", request["ssh_key_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_ssh_key_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_ssh_key parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_ssh_key ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_ssh_key(::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_ssh_key_client_stub.call_rpc_count + end + end + + def test_delete_ssh_key + # 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_ssh_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_ssh_key, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_ssh_key_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_ssh_key({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_ssh_key name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_ssh_key ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_ssh_key({ 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_ssh_key(::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(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_ssh_key_client_stub.call_rpc_count + end + end + + def test_list_volumes + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_volumes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_volumes, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, 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_volumes_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_volumes({ 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_volumes 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_volumes ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.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_volumes({ 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_volumes(::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.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_volumes_client_stub.call_rpc_count + end + end + + def test_get_volume + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Volume.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_volume, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_volume_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_volume({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_volume name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_volume ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_volume({ 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_volume(::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(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_volume_client_stub.call_rpc_count + end + end + + def test_update_volume + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + volume = {} + update_mask = {} + + update_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_volume, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Volume), request["volume"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_volume_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_volume({ volume: volume, 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_volume volume: volume, 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_volume ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, 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_volume({ volume: volume, 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_volume(::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, 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_volume_client_stub.call_rpc_count + end + end + + def test_rename_volume + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Volume.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_volume_id = "hello world" + + rename_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rename_volume, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["new_volume_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rename_volume_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.rename_volume({ name: name, new_volume_id: new_volume_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.rename_volume name: name, new_volume_id: new_volume_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.rename_volume ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.rename_volume({ name: name, new_volume_id: new_volume_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.rename_volume(::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rename_volume_client_stub.call_rpc_count + end + end + + def test_evict_volume + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + evict_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :evict_volume, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, evict_volume_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.evict_volume({ 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.evict_volume 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.evict_volume ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.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.evict_volume({ 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.evict_volume(::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.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, evict_volume_client_stub.call_rpc_count + end + end + + def test_resize_volume + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + volume = "hello world" + size_gib = 42 + + resize_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resize_volume, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, request + assert_equal "hello world", request["volume"] + assert_equal 42, request["size_gib"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resize_volume_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.resize_volume({ volume: volume, size_gib: size_gib }) do |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.resize_volume volume: volume, size_gib: size_gib do |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.resize_volume ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib) do |response, operation| + 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.resize_volume({ volume: volume, size_gib: size_gib }, grpc_options) do |response, operation| + 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.resize_volume(::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resize_volume_client_stub.call_rpc_count + end + end + + def test_list_networks + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_networks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_networks, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, 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_networks_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_networks({ 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_networks 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_networks ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.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_networks({ 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_networks(::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.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_networks_client_stub.call_rpc_count + end + end + + def test_list_network_usage + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + location = "hello world" + + list_network_usage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_network_usage, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, request + assert_equal "hello world", request["location"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_network_usage_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_network_usage({ location: location }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_network_usage location: location do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_network_usage ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_network_usage({ location: location }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_network_usage(::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_network_usage_client_stub.call_rpc_count + end + end + + def test_get_network + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Network.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_network, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_network_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_network({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_network name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_network ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_network({ 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_network(::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(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_network_client_stub.call_rpc_count + end + end + + def test_update_network + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + network = {} + update_mask = {} + + update_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_network, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Network), request["network"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_network_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_network({ network: network, 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_network network: network, 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_network ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, 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_network({ network: network, 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_network(::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, 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_network_client_stub.call_rpc_count + end + end + + def test_create_volume_snapshot + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + volume_snapshot = {} + + create_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_volume_snapshot, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot), request["volume_snapshot"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_volume_snapshot_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_volume_snapshot parent: parent, volume_snapshot: volume_snapshot do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_volume_snapshot_client_stub.call_rpc_count + end + end + + def test_restore_volume_snapshot + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + volume_snapshot = "hello world" + + restore_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restore_volume_snapshot, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, request + assert_equal "hello world", request["volume_snapshot"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, restore_volume_snapshot_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.restore_volume_snapshot({ volume_snapshot: volume_snapshot }) do |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_volume_snapshot volume_snapshot: volume_snapshot do |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_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot) do |response, operation| + 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_volume_snapshot({ volume_snapshot: volume_snapshot }, grpc_options) do |response, operation| + 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_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot), grpc_options) do |response, operation| + assert_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_volume_snapshot_client_stub.call_rpc_count + end + end + + def test_delete_volume_snapshot + # 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_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_volume_snapshot, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_volume_snapshot_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_volume_snapshot({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_volume_snapshot name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_volume_snapshot({ 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_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(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_volume_snapshot_client_stub.call_rpc_count + end + end + + def test_get_volume_snapshot + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_volume_snapshot, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_volume_snapshot_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_volume_snapshot({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_volume_snapshot name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_volume_snapshot({ 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_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(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_volume_snapshot_client_stub.call_rpc_count + end + end + + def test_list_volume_snapshots + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_volume_snapshots_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_volume_snapshots, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, 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_volume_snapshots_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_volume_snapshots({ parent: parent, page_size: page_size, page_token: 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_volume_snapshots parent: parent, page_size: page_size, page_token: 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_volume_snapshots ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.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_volume_snapshots({ 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_volume_snapshots(::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.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_volume_snapshots_client_stub.call_rpc_count + end + end + + def test_get_lun + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Lun.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lun, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetLunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lun_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_lun({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_lun name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_lun ::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_lun({ 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_lun(::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(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_lun_client_stub.call_rpc_count + end + end + + def test_list_luns + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_luns_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_luns, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, 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_luns_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_luns({ parent: parent, page_size: page_size, page_token: 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_luns parent: parent, page_size: page_size, page_token: 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_luns ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.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_luns({ 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_luns(::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.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_luns_client_stub.call_rpc_count + end + end + + def test_evict_lun + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + evict_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :evict_lun, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, evict_lun_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.evict_lun({ 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.evict_lun 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.evict_lun ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.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.evict_lun({ 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.evict_lun(::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.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, evict_lun_client_stub.call_rpc_count + end + end + + def test_get_nfs_share + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_nfs_share, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_nfs_share_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_nfs_share({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_nfs_share name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_nfs_share ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_nfs_share({ 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_nfs_share(::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(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_nfs_share_client_stub.call_rpc_count + end + end + + def test_list_nfs_shares + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_nfs_shares_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_nfs_shares, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, 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_nfs_shares_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_nfs_shares({ 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_nfs_shares 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_nfs_shares ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.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_nfs_shares({ 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_nfs_shares(::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.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_nfs_shares_client_stub.call_rpc_count + end + end + + def test_update_nfs_share + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + nfs_share = {} + update_mask = {} + + update_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_nfs_share, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::NfsShare), request["nfs_share"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_nfs_share_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_nfs_share({ nfs_share: nfs_share, 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_nfs_share nfs_share: nfs_share, 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_nfs_share ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, 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_nfs_share({ nfs_share: nfs_share, 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_nfs_share(::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, 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_nfs_share_client_stub.call_rpc_count + end + end + + def test_create_nfs_share + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + nfs_share = {} + + create_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_nfs_share, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::NfsShare), request["nfs_share"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_nfs_share_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_nfs_share({ parent: parent, nfs_share: nfs_share }) do |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_nfs_share parent: parent, nfs_share: nfs_share do |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_nfs_share ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share) do |response, operation| + 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_nfs_share({ parent: parent, nfs_share: nfs_share }, grpc_options) do |response, operation| + 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_nfs_share(::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share), grpc_options) do |response, operation| + assert_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_nfs_share_client_stub.call_rpc_count + end + end + + def test_rename_nfs_share + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_nfsshare_id = "hello world" + + rename_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rename_nfs_share, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["new_nfsshare_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rename_nfs_share_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.rename_nfs_share name: name, new_nfsshare_id: new_nfsshare_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.rename_nfs_share ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.rename_nfs_share(::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rename_nfs_share_client_stub.call_rpc_count + end + end + + def test_delete_nfs_share + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_nfs_share, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_nfs_share_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_nfs_share({ 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_nfs_share 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_nfs_share ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.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_nfs_share({ 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_nfs_share(::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.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_nfs_share_client_stub.call_rpc_count + end + end + + def test_list_provisioning_quotas + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_provisioning_quotas_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_provisioning_quotas, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, 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_provisioning_quotas_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_provisioning_quotas({ parent: parent, page_size: page_size, page_token: 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_provisioning_quotas parent: parent, page_size: page_size, page_token: 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_provisioning_quotas ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.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_provisioning_quotas({ 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_provisioning_quotas(::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.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_provisioning_quotas_client_stub.call_rpc_count + end + end + + def test_submit_provisioning_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provisioning_config = {} + email = "hello world" + + submit_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :submit_provisioning_config, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] + assert_equal "hello world", request["email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, submit_provisioning_config_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.submit_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.submit_provisioning_config ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.submit_provisioning_config(::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, submit_provisioning_config_client_stub.call_rpc_count + end + end + + def test_get_provisioning_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_provisioning_config, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_provisioning_config_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_provisioning_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_provisioning_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_provisioning_config ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_provisioning_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_provisioning_config(::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(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_provisioning_config_client_stub.call_rpc_count + end + end + + def test_create_provisioning_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provisioning_config = {} + email = "hello world" + + create_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_provisioning_config, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] + assert_equal "hello world", request["email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_provisioning_config_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_provisioning_config ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_provisioning_config(::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_provisioning_config_client_stub.call_rpc_count + end + end + + def test_update_provisioning_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + provisioning_config = {} + update_mask = {} + email = "hello world" + + update_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_provisioning_config, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_provisioning_config_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_provisioning_config provisioning_config: provisioning_config, update_mask: update_mask, email: email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_provisioning_config ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_provisioning_config(::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_provisioning_config_client_stub.call_rpc_count + end + end + + def test_rename_network + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Network.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_network_id = "hello world" + + rename_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rename_network, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["new_network_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rename_network_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.rename_network({ name: name, new_network_id: new_network_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.rename_network name: name, new_network_id: new_network_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.rename_network ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.rename_network({ name: name, new_network_id: new_network_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.rename_network(::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rename_network_client_stub.call_rpc_count + end + end + + def test_list_os_images + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_os_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_os_images, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, 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_os_images_client_stub do + # Create client + c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_os_images({ parent: parent, page_size: page_size, page_token: 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_os_images parent: parent, page_size: page_size, page_token: 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_os_images ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.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_os_images({ 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_os_images(::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.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_os_images_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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-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-batch-v1/.gitignore b/owl-bot-staging/google-cloud-batch-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json new file mode 100644 index 000000000000..e36027edffb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "api_id": "batch.googleapis.com", + "api_shortname": "batch", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest", + "distribution_name": "google-cloud-batch-v1", + "is_cloud": true, + "language": "ruby", + "name": "batch", + "name_pretty": "Batch V1 API", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. Note that google-cloud-batch-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-batch instead. See the readme for more details.", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml b/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml new file mode 100644 index 000000000000..dfe88aff925c --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-batch-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-batch-v1.rb" diff --git a/owl-bot-staging/google-cloud-batch-v1/.toys.rb b/owl-bot-staging/google-cloud-batch-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/.yardopts b/owl-bot-staging/google-cloud-batch-v1/.yardopts new file mode 100644 index 000000000000..5628edd53225 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Batch 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-batch-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..08e3de31e49e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-batch-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-batch-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/batch/v1" + +client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/batch/v1" + +::Google::Cloud::Batch::V1::BatchService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Batch::V1::BatchService::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-batch-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/batch/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Batch::V1::BatchService::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-batch-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-batch-v1/Gemfile b/owl-bot-staging/google-cloud-batch-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/LICENSE.md b/owl-bot-staging/google-cloud-batch-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/README.md b/owl-bot-staging/google-cloud-batch-v1/README.md new file mode 100644 index 000000000000..0769ac925913 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/README.md @@ -0,0 +1,151 @@ +# Ruby Client for the Batch V1 API + +An API to manage the running of Batch resources on Google Cloud Platform. + +Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Batch V1 API. Most users should consider using +the main client gem, +[google-cloud-batch](https://rubygems.org/gems/google-cloud-batch). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-batch-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/batch.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/batch/v1" + +client = ::Google::Cloud::Batch::V1::BatchService::Client.new +request = ::Google::Cloud::Batch::V1::CreateJobRequest.new # (request fields as keyword arguments...) +response = client.create_job request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest) +for class and method documentation. + +## 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/batch/v1" +require "logger" + +client = ::Google::Cloud::Batch::V1::BatchService::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-batch`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-batch-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-batch`. +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-batch-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-batch-v1/Rakefile b/owl-bot-staging/google-cloud-batch-v1/Rakefile new file mode 100644 index 000000000000..639b120c30c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-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/batch/v1/batch_service/credentials" + ::Google::Cloud::Batch::V1::BatchService::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-batch-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-batch-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-batch-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-batch-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-batch-v1" + header "google-cloud-batch-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-batch-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-batch-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-batch-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-batch-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-batch-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json new file mode 100644 index 000000000000..58078d42bdf0 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.batch.v1", + "libraryPackage": "::Google::Cloud::Batch::V1", + "services": { + "BatchService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Batch::V1::BatchService::Client", + "rpcs": { + "CreateJob": { + "methods": [ + "create_job" + ] + }, + "GetJob": { + "methods": [ + "get_job" + ] + }, + "DeleteJob": { + "methods": [ + "delete_job" + ] + }, + "CancelJob": { + "methods": [ + "cancel_job" + ] + }, + "ListJobs": { + "methods": [ + "list_jobs" + ] + }, + "GetTask": { + "methods": [ + "get_task" + ] + }, + "ListTasks": { + "methods": [ + "list_tasks" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec b/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec new file mode 100644 index 000000000000..bd34e5aac37b --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/batch/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-batch-v1" + gem.version = Google::Cloud::Batch::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. Note that google-cloud-batch-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-batch instead. See the readme for more details." + gem.summary = "An API to manage the running of Batch resources on Google Cloud Platform." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.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-batch-v1/lib/google-cloud-batch-v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb new file mode 100644 index 000000000000..d1d4a294e405 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/batch/v1" +# require "google/iam/v1" diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb new file mode 100644 index 000000000000..fe260a4306e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/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/batch/v1/batch_service" +require "google/cloud/batch/v1/version" + +module Google + module Cloud + module Batch + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/batch/v1" + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/batch/v1" + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/batch/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb new file mode 100644 index 000000000000..32d4ce08cba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/batch/v1/batch.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/batch/v1/job_pb' +require 'google/cloud/batch/v1/task_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n!google/cloud/batch/v1/batch.proto\x12\x15google.cloud.batch.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\x1fgoogle/cloud/batch/v1/job.proto\x1a google/cloud/batch/v1/task.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\x01\n\x10\x43reateJobRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x62\x61tch.googleapis.com/Job\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12,\n\x03job\x18\x03 \x01(\x0b\x32\x1a.google.cloud.batch.v1.JobB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"?\n\rGetJobRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x62\x61tch.googleapis.com/Job\"N\n\x10\x44\x65leteJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"c\n\x10\x43\x61ncelJobRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x62\x61tch.googleapis.com/Job\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x13\n\x11\x43\x61ncelJobResponse\"o\n\x0fListJobsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"j\n\x10ListJobsResponse\x12(\n\x04jobs\x18\x01 \x03(\x0b\x32\x1a.google.cloud.batch.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61tch.googleapis.com/TaskGroup\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\"m\n\x11ListTasksResponse\x12*\n\x05tasks\x18\x01 \x03(\x0b\x32\x1b.google.cloud.batch.v1.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"A\n\x0eGetTaskRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x62\x61tch.googleapis.com/Task\"\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\xa5\n\n\x0c\x42\x61tchService\x12\x9b\x01\n\tCreateJob\x12\'.google.cloud.batch.v1.CreateJobRequest\x1a\x1a.google.cloud.batch.v1.Job\"I\xda\x41\x11parent,job,job_id\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/jobs:\x03job\x12\x83\x01\n\x06GetJob\x12$.google.cloud.batch.v1.GetJobRequest\x1a\x1a.google.cloud.batch.v1.Job\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/jobs/*}\x12\xcf\x01\n\tDeleteJob\x12\'.google.cloud.batch.v1.DeleteJobRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41@\n\x15google.protobuf.Empty\x12\'google.cloud.batch.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/jobs/*}\x12\xec\x01\n\tCancelJob\x12\'.google.cloud.batch.v1.CancelJobRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41R\n\'google.cloud.batch.v1.CancelJobResponse\x12\'google.cloud.batch.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/locations/*/jobs/*}:cancel:\x01*\x12\x96\x01\n\x08ListJobs\x12&.google.cloud.batch.v1.ListJobsRequest\x1a\'.google.cloud.batch.v1.ListJobsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/jobs\x12\x9b\x01\n\x07GetTask\x12%.google.cloud.batch.v1.GetTaskRequest\x1a\x1b.google.cloud.batch.v1.Task\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}\x12\xae\x01\n\tListTasks\x12\'.google.cloud.batch.v1.ListTasksRequest\x1a(.google.cloud.batch.v1.ListTasksResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasks\x1aH\xca\x41\x14\x62\x61tch.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xab\x01\n\x19\x63om.google.cloud.batch.v1B\nBatchProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Batch + module V1 + CreateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CreateJobRequest").msgclass + GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GetJobRequest").msgclass + DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.DeleteJobRequest").msgclass + CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CancelJobRequest").msgclass + CancelJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CancelJobResponse").msgclass + ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListJobsRequest").msgclass + ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListJobsResponse").msgclass + ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListTasksRequest").msgclass + ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListTasksResponse").msgclass + GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GetTaskRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb new file mode 100644 index 000000000000..d6104f270747 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/batch/v1/version" + +require "google/cloud/batch/v1/batch_service/credentials" +require "google/cloud/batch/v1/batch_service/paths" +require "google/cloud/batch/v1/batch_service/operations" +require "google/cloud/batch/v1/batch_service/client" +require "google/cloud/batch/v1/batch_service/rest" + +module Google + module Cloud + module Batch + module V1 + ## + # Google Batch Service. + # The service manages user submitted batch jobs and allocates Google Compute + # Engine VM instances to run the jobs. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/batch/v1/batch_service" + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/batch/v1/batch_service/rest" + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + module BatchService + end + end + end + end +end + +helper_path = ::File.join __dir__, "batch_service", "helpers.rb" +require "google/cloud/batch/v1/batch_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb new file mode 100644 index 000000000000..72b6b44bd7a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb @@ -0,0 +1,1192 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/batch/v1/batch_pb" +require "google/cloud/location" + +module Google + module Cloud + module Batch + module V1 + module BatchService + ## + # Client for the BatchService service. + # + # Google Batch Service. + # The service manages user submitted batch jobs and allocates Google Compute + # Engine VM instances to run the jobs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :batch_service_stub + + ## + # Configure the BatchService Client class. + # + # See {::Google::Cloud::Batch::V1::BatchService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BatchService clients + # ::Google::Cloud::Batch::V1::BatchService::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", "Batch", "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_job.timeout = 60.0 + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_job.timeout = 60.0 + + default_config.rpcs.cancel_job.timeout = 60.0 + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.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 BatchService 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::Batch::V1::BatchService::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 + @batch_service_stub.universe_domain + end + + ## + # Create a new BatchService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BatchService 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/batch/v1/batch_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 + + @batch_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Batch::V1::BatchService::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 + ) + + @batch_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 = @batch_service_stub.endpoint + config.universe_domain = @batch_service_stub.universe_domain + config.logger = @batch_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Batch::V1::BatchService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @batch_service_stub.logger + end + + # Service calls + + ## + # Create a Job. + # + # @overload create_job(request, options = nil) + # Pass arguments to `create_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::CreateJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::CreateJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_job(parent: nil, job_id: nil, job: nil, request_id: nil) + # Pass arguments to `create_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name where the Job will be created. + # Pattern: "projects/\\{project}/locations/\\{location}" + # @param job_id [::String] + # ID used to uniquely identify the Job within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and '-' are accepted. + # The '-' character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The job.name field in the request will be ignored and the created resource + # name of the Job will be "\\{parent}/jobs/\\{job_id}". + # @param job [::Google::Cloud::Batch::V1::Job, ::Hash] + # Required. The Job to create. + # @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 [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::CreateJobRequest.new + # + # # Call the create_job method. + # result = client.create_job request + # + # # The returned object is of type Google::Cloud::Batch::V1::Job. + # p result + # + def create_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CreateJobRequest + + # Converts hash and nil to 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :create_job, request, 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 Job specified by its resource name. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Job name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Batch::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :get_job, request, 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 Job. + # + # @overload delete_job(request, options = nil) + # Pass arguments to `delete_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::DeleteJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::DeleteJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_job(name: nil, reason: nil, request_id: nil) + # Pass arguments to `delete_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Job name. + # @param reason [::String] + # Optional. Reason for this deletion. + # @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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::DeleteJobRequest.new + # + # # Call the delete_job method. + # result = client.delete_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::DeleteJobRequest + + # Converts hash and nil to 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :delete_job, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel a Job. + # + # @overload cancel_job(request, options = nil) + # Pass arguments to `cancel_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::CancelJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::CancelJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_job(name: nil, request_id: nil) + # Pass arguments to `cancel_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Job name. + # @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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::CancelJobRequest.new + # + # # Call the cancel_job method. + # result = client.cancel_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def cancel_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CancelJobRequest + + # Converts hash and nil to 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :cancel_job, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all Jobs for a project within a region. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Batch::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_jobs(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To 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 path. + # @param filter [::String] + # List filter. + # @param order_by [::String] + # Optional. Sort results. Supported are "name", "name desc", "create_time", + # and "create_time desc". + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Batch::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @batch_service_stub, :list_jobs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Return a single Task. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Batch::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task(name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Task name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Batch::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Batch::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Batch::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :get_task, request, 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 Tasks associated with a job. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Batch::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tasks(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 a TaskGroup from which Tasks are being requested. + # Pattern: + # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" + # @param filter [::String] + # Task filter, null filter matches all Tasks. + # Filter string should be of the format State=TaskStatus.State e.g. + # State=RUNNING + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Batch::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @batch_service_stub, :list_tasks, request, response, 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 BatchService API. + # + # This class represents the configuration for BatchService, + # providing control 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::Batch::V1::BatchService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Batch::V1::BatchService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Batch::V1::BatchService::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 = "batch.googleapis.com" + + config_attr :endpoint, nil, ::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 BatchService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `delete_job` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job + ## + # RPC-specific configuration for `cancel_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_job + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + + # @private + def initialize parent_rpcs = nil + create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job + @create_job = ::Gapic::Config::Method.new create_job_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job + @delete_job = ::Gapic::Config::Method.new delete_job_config + cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job + @cancel_job = ::Gapic::Config::Method.new cancel_job_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb new file mode 100644 index 000000000000..6a4be9120312 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Batch + module V1 + module BatchService + # Credentials for the BatchService 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-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb new file mode 100644 index 000000000000..901498db28be --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_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 Batch + module V1 + module BatchService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BatchService 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 BatchService 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::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Batch::V1::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 = "batch.googleapis.com" + + config_attr :endpoint, nil, ::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-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb new file mode 100644 index 000000000000..b30e342ea480 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.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 Batch + module V1 + module BatchService + # Path helper methods for the BatchService API. + module Paths + ## + # Create a fully-qualified Job resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/jobs/{job}` + # + # @param project [String] + # @param location [String] + # @param job [String] + # + # @return [::String] + def job_path project:, location:, 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}/jobs/#{job}" + 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 Task resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}` + # + # @param project [String] + # @param location [String] + # @param job [String] + # @param task_group [String] + # @param task [String] + # + # @return [::String] + def task_path project:, location:, job:, task_group:, task: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/" + raise ::ArgumentError, "task_group cannot contain /" if task_group.to_s.include? "/" + + "projects/#{project}/locations/#{location}/jobs/#{job}/taskGroups/#{task_group}/tasks/#{task}" + end + + ## + # Create a fully-qualified TaskGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}` + # + # @param project [String] + # @param location [String] + # @param job [String] + # @param task_group [String] + # + # @return [::String] + def task_group_path project:, location:, job:, task_group: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/" + + "projects/#{project}/locations/#{location}/jobs/#{job}/taskGroups/#{task_group}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb new file mode 100644 index 000000000000..8c251def07d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_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/batch/v1/version" +require "google/cloud/batch/v1/bindings_override" + +require "google/cloud/batch/v1/batch_service/credentials" +require "google/cloud/batch/v1/batch_service/paths" +require "google/cloud/batch/v1/batch_service/rest/operations" +require "google/cloud/batch/v1/batch_service/rest/client" + +module Google + module Cloud + module Batch + module V1 + ## + # Google Batch Service. + # The service manages user submitted batch jobs and allocates Google Compute + # Engine VM instances to run the jobs. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/batch/v1/batch_service/rest" + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + module BatchService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/batch/v1/batch_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb new file mode 100644 index 000000000000..907bbca3ee39 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb @@ -0,0 +1,1108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/batch/v1/batch_pb" +require "google/cloud/batch/v1/batch_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Batch + module V1 + module BatchService + module Rest + ## + # REST client for the BatchService service. + # + # Google Batch Service. + # The service manages user submitted batch jobs and allocates Google Compute + # Engine VM instances to run the jobs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :batch_service_stub + + ## + # Configure the BatchService Client class. + # + # See {::Google::Cloud::Batch::V1::BatchService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BatchService clients + # ::Google::Cloud::Batch::V1::BatchService::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", "Batch", "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_job.timeout = 60.0 + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_job.timeout = 60.0 + + default_config.rpcs.cancel_job.timeout = 60.0 + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.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 BatchService 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::Batch::V1::BatchService::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 + @batch_service_stub.universe_domain + end + + ## + # Create a new BatchService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BatchService 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::Batch::V1::BatchService::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 + + @batch_service_stub = ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @batch_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 = @batch_service_stub.endpoint + config.universe_domain = @batch_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @batch_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Batch::V1::BatchService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @batch_service_stub.logger + end + + # Service calls + + ## + # Create a Job. + # + # @overload create_job(request, options = nil) + # Pass arguments to `create_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::CreateJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::CreateJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_job(parent: nil, job_id: nil, job: nil, request_id: nil) + # Pass arguments to `create_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name where the Job will be created. + # Pattern: "projects/\\{project}/locations/\\{location}" + # @param job_id [::String] + # ID used to uniquely identify the Job within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and '-' are accepted. + # The '-' character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The job.name field in the request will be ignored and the created resource + # name of the Job will be "\\{parent}/jobs/\\{job_id}". + # @param job [::Google::Cloud::Batch::V1::Job, ::Hash] + # Required. The Job to create. + # @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 [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::CreateJobRequest.new + # + # # Call the create_job method. + # result = client.create_job request + # + # # The returned object is of type Google::Cloud::Batch::V1::Job. + # p result + # + def create_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CreateJobRequest + + # Converts hash and nil to an 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.create_job request, 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 Job specified by its resource name. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Job name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Batch::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.get_job request, 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 Job. + # + # @overload delete_job(request, options = nil) + # Pass arguments to `delete_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::DeleteJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::DeleteJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_job(name: nil, reason: nil, request_id: nil) + # Pass arguments to `delete_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Job name. + # @param reason [::String] + # Optional. Reason for this deletion. + # @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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::DeleteJobRequest.new + # + # # Call the delete_job method. + # result = client.delete_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::DeleteJobRequest + + # Converts hash and nil to an 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.delete_job request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel a Job. + # + # @overload cancel_job(request, options = nil) + # Pass arguments to `cancel_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::CancelJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::CancelJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_job(name: nil, request_id: nil) + # Pass arguments to `cancel_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Job name. + # @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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::CancelJobRequest.new + # + # # Call the cancel_job method. + # result = client.cancel_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def cancel_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CancelJobRequest + + # Converts hash and nil to an 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.cancel_job request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all Jobs for a project within a region. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Batch::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_jobs(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To 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 path. + # @param filter [::String] + # List filter. + # @param order_by [::String] + # Optional. Sort results. Supported are "name", "name desc", "create_time", + # and "create_time desc". + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Batch::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.list_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @batch_service_stub, :list_jobs, "jobs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Return a single Task. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Batch::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task(name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Task name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Batch::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.get_task request, 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 Tasks associated with a job. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Batch::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tasks(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 a TaskGroup from which Tasks are being requested. + # Pattern: + # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" + # @param filter [::String] + # Task filter, null filter matches all Tasks. + # Filter string should be of the format State=TaskStatus.State e.g. + # State=RUNNING + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Batch::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.list_tasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @batch_service_stub, :list_tasks, "tasks", request, result, 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 BatchService REST API. + # + # This class represents the configuration for BatchService 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::Batch::V1::BatchService::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_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Batch::V1::BatchService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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 = "batch.googleapis.com" + + config_attr :endpoint, nil, ::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 BatchService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `delete_job` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job + ## + # RPC-specific configuration for `cancel_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_job + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + + # @private + def initialize parent_rpcs = nil + create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job + @create_job = ::Gapic::Config::Method.new create_job_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job + @delete_job = ::Gapic::Config::Method.new delete_job_config + cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job + @cancel_job = ::Gapic::Config::Method.new cancel_job_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb new file mode 100644 index 000000000000..1240267dbffc --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_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 Batch + module V1 + module BatchService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BatchService 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 BatchService 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::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "batch.googleapis.com" + + config_attr :endpoint, nil, ::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-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb new file mode 100644 index 000000000000..c5de3cdedd51 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb @@ -0,0 +1,510 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/batch/v1/batch_pb" + +module Google + module Cloud + module Batch + module V1 + module BatchService + module Rest + ## + # REST service stub for the BatchService 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_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::CreateJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # A result object deserialized from the server's reply + def create_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Batch::V1::Job.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # A result object deserialized from the server's reply + def get_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Batch::V1::Job.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_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::DeleteJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::CancelJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def cancel_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_jobs REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::ListJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::ListJobsResponse] + # A result object deserialized from the server's reply + def list_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Batch::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_task REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Task] + # A result object deserialized from the server's reply + def get_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Batch::V1::Task.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_tasks REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::ListTasksResponse] + # A result object deserialized from the server's reply + def list_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Batch::V1::ListTasksResponse.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_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::CreateJobRequest] + # 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_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/jobs", + body: "job", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::DeleteJobRequest] + # 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_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::CancelJobRequest] + # 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_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb new file mode 100644 index 000000000000..6619a0c9e9fb --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/batch/v1/batch.proto for package 'Google.Cloud.Batch.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/batch/v1/batch_pb' + +module Google + module Cloud + module Batch + module V1 + module BatchService + # Google Batch Service. + # The service manages user submitted batch jobs and allocates Google Compute + # Engine VM instances to run the jobs. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.batch.v1.BatchService' + + # Create a Job. + rpc :CreateJob, ::Google::Cloud::Batch::V1::CreateJobRequest, ::Google::Cloud::Batch::V1::Job + # Get a Job specified by its resource name. + rpc :GetJob, ::Google::Cloud::Batch::V1::GetJobRequest, ::Google::Cloud::Batch::V1::Job + # Delete a Job. + rpc :DeleteJob, ::Google::Cloud::Batch::V1::DeleteJobRequest, ::Google::Longrunning::Operation + # Cancel a Job. + rpc :CancelJob, ::Google::Cloud::Batch::V1::CancelJobRequest, ::Google::Longrunning::Operation + # List all Jobs for a project within a region. + rpc :ListJobs, ::Google::Cloud::Batch::V1::ListJobsRequest, ::Google::Cloud::Batch::V1::ListJobsResponse + # Return a single Task. + rpc :GetTask, ::Google::Cloud::Batch::V1::GetTaskRequest, ::Google::Cloud::Batch::V1::Task + # List Tasks associated with a job. + rpc :ListTasks, ::Google::Cloud::Batch::V1::ListTasksRequest, ::Google::Cloud::Batch::V1::ListTasksResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb new file mode 100644 index 000000000000..16f6486ef2cf --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/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 Batch + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/batch/v1/rest" + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Batch"] + 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-batch-v1/lib/google/cloud/batch/v1/job_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb new file mode 100644 index 000000000000..8127bff9136b --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/batch/v1/job.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/batch/v1/task_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\x1fgoogle/cloud/batch/v1/job.proto\x12\x15google.cloud.batch.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/cloud/batch/v1/task.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x05\n\x03Job\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08priority\x18\x03 \x01(\x03\x12:\n\x0btask_groups\x18\x04 \x03(\x0b\x32 .google.cloud.batch.v1.TaskGroupB\x03\xe0\x41\x02\x12\x42\n\x11\x61llocation_policy\x18\x07 \x01(\x0b\x32\'.google.cloud.batch.v1.AllocationPolicy\x12\x36\n\x06labels\x18\x08 \x03(\x0b\x32&.google.cloud.batch.v1.Job.LabelsEntry\x12\x35\n\x06status\x18\t \x01(\x0b\x32 .google.cloud.batch.v1.JobStatusB\x03\xe0\x41\x03\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\x12\x36\n\x0blogs_policy\x18\r \x01(\x0b\x32!.google.cloud.batch.v1.LogsPolicy\x12=\n\rnotifications\x18\x0e \x03(\x0b\x32&.google.cloud.batch.v1.JobNotification\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:Q\xea\x41N\n\x18\x62\x61tch.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}\"\xcd\x02\n\nLogsPolicy\x12\x42\n\x0b\x64\x65stination\x18\x01 \x01(\x0e\x32-.google.cloud.batch.v1.LogsPolicy.Destination\x12\x11\n\tlogs_path\x18\x02 \x01(\t\x12W\n\x14\x63loud_logging_option\x18\x03 \x01(\x0b\x32\x34.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionB\x03\xe0\x41\x01\x1a\x46\n\x12\x43loudLoggingOption\x12\x30\n#use_generic_task_monitored_resource\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x0b\x44\x65stination\x12\x1b\n\x17\x44\x45STINATION_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_LOGGING\x10\x01\x12\x08\n\x04PATH\x10\x02\"\xae\x07\n\tJobStatus\x12\x35\n\x05state\x18\x01 \x01(\x0e\x32&.google.cloud.batch.v1.JobStatus.State\x12\x39\n\rstatus_events\x18\x02 \x03(\x0b\x32\".google.cloud.batch.v1.StatusEvent\x12\x45\n\x0btask_groups\x18\x04 \x03(\x0b\x32\x30.google.cloud.batch.v1.JobStatus.TaskGroupsEntry\x12/\n\x0crun_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xd1\x01\n\x0eInstanceStatus\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12U\n\x12provisioning_model\x18\x02 \x01(\x0e\x32\x39.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel\x12\x11\n\ttask_pack\x18\x03 \x01(\x03\x12?\n\tboot_disk\x18\x04 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.Disk\x1a\xd2\x01\n\x0fTaskGroupStatus\x12L\n\x06\x63ounts\x18\x01 \x03(\x0b\x32<.google.cloud.batch.v1.JobStatus.TaskGroupStatus.CountsEntry\x12\x42\n\tinstances\x18\x02 \x03(\x0b\x32/.google.cloud.batch.v1.JobStatus.InstanceStatus\x1a-\n\x0b\x43ountsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x63\n\x0fTaskGroupsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.google.cloud.batch.v1.JobStatus.TaskGroupStatus:\x02\x38\x01\"\xa8\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\r\n\tSCHEDULED\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x18\n\x14\x44\x45LETION_IN_PROGRESS\x10\x06\x12\x1c\n\x18\x43\x41NCELLATION_IN_PROGRESS\x10\x07\x12\r\n\tCANCELLED\x10\x08\"\xfc\x02\n\x0fJobNotification\x12\x14\n\x0cpubsub_topic\x18\x01 \x01(\t\x12?\n\x07message\x18\x02 \x01(\x0b\x32..google.cloud.batch.v1.JobNotification.Message\x1a\xc4\x01\n\x07Message\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.google.cloud.batch.v1.JobNotification.Type\x12=\n\rnew_job_state\x18\x02 \x01(\x0e\x32&.google.cloud.batch.v1.JobStatus.State\x12?\n\x0enew_task_state\x18\x03 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\"K\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11JOB_STATE_CHANGED\x10\x01\x12\x16\n\x12TASK_STATE_CHANGED\x10\x02\"\xad\x0f\n\x10\x41llocationPolicy\x12H\n\x08location\x18\x01 \x01(\x0b\x32\x36.google.cloud.batch.v1.AllocationPolicy.LocationPolicy\x12S\n\tinstances\x18\x08 \x03(\x0b\x32@.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate\x12>\n\x0fservice_account\x18\t \x01(\x0b\x32%.google.cloud.batch.v1.ServiceAccount\x12\x43\n\x06labels\x18\x06 \x03(\x0b\x32\x33.google.cloud.batch.v1.AllocationPolicy.LabelsEntry\x12\x46\n\x07network\x18\x07 \x01(\x0b\x32\x35.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy\x12J\n\tplacement\x18\n \x01(\x0b\x32\x37.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy\x12\x11\n\x04tags\x18\x0b \x03(\tB\x03\xe0\x41\x01\x1a+\n\x0eLocationPolicy\x12\x19\n\x11\x61llowed_locations\x18\x01 \x03(\t\x1aq\n\x04\x44isk\x12\x0f\n\x05image\x18\x04 \x01(\tH\x00\x12\x12\n\x08snapshot\x18\x05 \x01(\tH\x00\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07size_gb\x18\x02 \x01(\x03\x12\x16\n\x0e\x64isk_interface\x18\x06 \x01(\tB\r\n\x0b\x64\x61ta_source\x1a\x8a\x01\n\x0c\x41ttachedDisk\x12@\n\x08new_disk\x18\x01 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.DiskH\x00\x12\x17\n\rexisting_disk\x18\x02 \x01(\tH\x00\x12\x13\n\x0b\x64\x65vice_name\x18\x03 \x01(\tB\n\n\x08\x61ttached\x1ah\n\x0b\x41\x63\x63\x65lerator\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\x1f\n\x13install_gpu_drivers\x18\x03 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x0e\x64river_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x82\x03\n\x0eInstancePolicy\x12\x14\n\x0cmachine_type\x18\x02 \x01(\t\x12\x18\n\x10min_cpu_platform\x18\x03 \x01(\t\x12U\n\x12provisioning_model\x18\x04 \x01(\x0e\x32\x39.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel\x12I\n\x0c\x61\x63\x63\x65lerators\x18\x05 \x03(\x0b\x32\x33.google.cloud.batch.v1.AllocationPolicy.Accelerator\x12?\n\tboot_disk\x18\x08 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.Disk\x12\x43\n\x05\x64isks\x18\x06 \x03(\x0b\x32\x34.google.cloud.batch.v1.AllocationPolicy.AttachedDisk\x12\x18\n\x0breservation\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\xf6\x01\n\x18InstancePolicyOrTemplate\x12H\n\x06policy\x18\x01 \x01(\x0b\x32\x36.google.cloud.batch.v1.AllocationPolicy.InstancePolicyH\x00\x12\x1b\n\x11instance_template\x18\x02 \x01(\tH\x00\x12\x1b\n\x13install_gpu_drivers\x18\x03 \x01(\x08\x12\x1e\n\x11install_ops_agent\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x62lock_project_ssh_keys\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x42\x11\n\x0fpolicy_template\x1aW\n\x10NetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\x12\x1e\n\x16no_external_ip_address\x18\x03 \x01(\x08\x1a\x65\n\rNetworkPolicy\x12T\n\x12network_interfaces\x18\x01 \x03(\x0b\x32\x38.google.cloud.batch.v1.AllocationPolicy.NetworkInterface\x1a<\n\x0fPlacementPolicy\x12\x13\n\x0b\x63ollocation\x18\x01 \x01(\t\x12\x14\n\x0cmax_distance\x18\x02 \x01(\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8b\x01\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\x12\x13\n\x0bPREEMPTIBLE\x10\x03\x1a\x02\x08\x01\x12\x15\n\x11RESERVATION_BOUND\x10\x04\x12\x0e\n\nFLEX_START\x10\x05\"\xcb\x04\n\tTaskGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x37\n\ttask_spec\x18\x03 \x01(\x0b\x32\x1f.google.cloud.batch.v1.TaskSpecB\x03\xe0\x41\x02\x12\x12\n\ntask_count\x18\x04 \x01(\x03\x12\x13\n\x0bparallelism\x18\x05 \x01(\x03\x12L\n\x11scheduling_policy\x18\x06 \x01(\x0e\x32\x31.google.cloud.batch.v1.TaskGroup.SchedulingPolicy\x12=\n\x11task_environments\x18\t \x03(\x0b\x32\".google.cloud.batch.v1.Environment\x12\x1b\n\x13task_count_per_node\x18\n \x01(\x03\x12\x1a\n\x12require_hosts_file\x18\x0b \x01(\x08\x12\x16\n\x0epermissive_ssh\x18\x0c \x01(\x08\x12\x1c\n\x0frun_as_non_root\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\"\\\n\x10SchedulingPolicy\x12!\n\x1dSCHEDULING_POLICY_UNSPECIFIED\x10\x00\x12\x17\n\x13\x41S_SOON_AS_POSSIBLE\x10\x01\x12\x0c\n\x08IN_ORDER\x10\x02:o\xea\x41l\n\x1e\x62\x61tch.googleapis.com/TaskGroup\x12Jprojects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}\"/\n\x0eServiceAccount\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x0e\n\x06scopes\x18\x02 \x03(\tB\xa9\x01\n\x19\x63om.google.cloud.batch.v1B\x08JobProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Batch + module V1 + Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Job").msgclass + LogsPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy").msgclass + LogsPolicy::CloudLoggingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy.CloudLoggingOption").msgclass + LogsPolicy::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy.Destination").enummodule + JobStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus").msgclass + JobStatus::InstanceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.InstanceStatus").msgclass + JobStatus::TaskGroupStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.TaskGroupStatus").msgclass + JobStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.State").enummodule + JobNotification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification").msgclass + JobNotification::Message = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification.Message").msgclass + JobNotification::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification.Type").enummodule + AllocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy").msgclass + AllocationPolicy::LocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.LocationPolicy").msgclass + AllocationPolicy::Disk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.Disk").msgclass + AllocationPolicy::AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.AttachedDisk").msgclass + AllocationPolicy::Accelerator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.Accelerator").msgclass + AllocationPolicy::InstancePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicy").msgclass + AllocationPolicy::InstancePolicyOrTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate").msgclass + AllocationPolicy::NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkInterface").msgclass + AllocationPolicy::NetworkPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkPolicy").msgclass + AllocationPolicy::PlacementPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.PlacementPolicy").msgclass + AllocationPolicy::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.ProvisioningModel").enummodule + TaskGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskGroup").msgclass + TaskGroup::SchedulingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskGroup.SchedulingPolicy").enummodule + ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ServiceAccount").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb new file mode 100644 index 000000000000..4c1a51eb92d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/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/batch/v1/batch_service/rest" +require "google/cloud/batch/v1/bindings_override" +require "google/cloud/batch/v1/version" + +module Google + module Cloud + module Batch + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/batch/v1/rest" + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb new file mode 100644 index 000000000000..a3e7ce4ede39 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/batch/v1/task.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/batch/v1/volume_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n google/cloud/batch/v1/task.proto\x12\x15google.cloud.batch.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\"google/cloud/batch/v1/volume.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"O\n\x0f\x43omputeResource\x12\x11\n\tcpu_milli\x18\x01 \x01(\x03\x12\x12\n\nmemory_mib\x18\x02 \x01(\x03\x12\x15\n\rboot_disk_mib\x18\x04 \x01(\x03\"\xdb\x01\n\x0bStatusEvent\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12.\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x0etask_execution\x18\x04 \x01(\x0b\x32$.google.cloud.batch.v1.TaskExecution\x12;\n\ntask_state\x18\x05 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\"\"\n\rTaskExecution\x12\x11\n\texit_code\x18\x01 \x01(\x05\"\xf2\x01\n\nTaskStatus\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\x12\x39\n\rstatus_events\x18\x02 \x03(\x0b\x32\".google.cloud.batch.v1.StatusEvent\"q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x41SSIGNED\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05\x12\x0e\n\nUNEXECUTED\x10\x06\"\x9e\x06\n\x08Runnable\x12>\n\tcontainer\x18\x01 \x01(\x0b\x32).google.cloud.batch.v1.Runnable.ContainerH\x00\x12\x38\n\x06script\x18\x02 \x01(\x0b\x32&.google.cloud.batch.v1.Runnable.ScriptH\x00\x12:\n\x07\x62\x61rrier\x18\x06 \x01(\x0b\x32\'.google.cloud.batch.v1.Runnable.BarrierH\x00\x12\x19\n\x0c\x64isplay_name\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\x12ignore_exit_status\x18\x03 \x01(\x08\x12\x12\n\nbackground\x18\x04 \x01(\x08\x12\x12\n\nalways_run\x18\x05 \x01(\x08\x12\x37\n\x0b\x65nvironment\x18\x07 \x01(\x0b\x32\".google.cloud.batch.v1.Environment\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\x06labels\x18\t \x03(\x0b\x32+.google.cloud.batch.v1.Runnable.LabelsEntry\x1a\xcf\x01\n\tContainer\x12\x11\n\timage_uri\x18\x01 \x01(\t\x12\x10\n\x08\x63ommands\x18\x02 \x03(\t\x12\x12\n\nentrypoint\x18\x03 \x01(\t\x12\x0f\n\x07volumes\x18\x07 \x03(\t\x12\x0f\n\x07options\x18\x08 \x01(\t\x12\x1e\n\x16\x62lock_external_network\x18\t \x01(\x08\x12\x10\n\x08username\x18\n \x01(\t\x12\x10\n\x08password\x18\x0b \x01(\t\x12#\n\x16\x65nable_image_streaming\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a\x33\n\x06Script\x12\x0e\n\x04path\x18\x01 \x01(\tH\x00\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x42\t\n\x07\x63ommand\x1a\x17\n\x07\x42\x61rrier\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\nexecutable\"\xfd\x03\n\x08TaskSpec\x12\x32\n\trunnables\x18\x08 \x03(\x0b\x32\x1f.google.cloud.batch.v1.Runnable\x12@\n\x10\x63ompute_resource\x18\x03 \x01(\x0b\x32&.google.cloud.batch.v1.ComputeResource\x12\x33\n\x10max_run_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fmax_retry_count\x18\x05 \x01(\x05\x12\x42\n\x12lifecycle_policies\x18\t \x03(\x0b\x32&.google.cloud.batch.v1.LifecyclePolicy\x12K\n\x0c\x65nvironments\x18\x06 \x03(\x0b\x32\x31.google.cloud.batch.v1.TaskSpec.EnvironmentsEntryB\x02\x18\x01\x12.\n\x07volumes\x18\x07 \x03(\x0b\x32\x1d.google.cloud.batch.v1.Volume\x12\x37\n\x0b\x65nvironment\x18\n \x01(\x0b\x32\".google.cloud.batch.v1.Environment\x1a\x33\n\x11\x45nvironmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x02\n\x0fLifecyclePolicy\x12=\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32-.google.cloud.batch.v1.LifecyclePolicy.Action\x12P\n\x10\x61\x63tion_condition\x18\x02 \x01(\x0b\x32\x36.google.cloud.batch.v1.LifecyclePolicy.ActionCondition\x1a%\n\x0f\x41\x63tionCondition\x12\x12\n\nexit_codes\x18\x01 \x03(\x05\"?\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x0e\n\nRETRY_TASK\x10\x01\x12\r\n\tFAIL_TASK\x10\x02\"\xc0\x01\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x06status\x18\x02 \x01(\x0b\x32!.google.cloud.batch.v1.TaskStatus:w\xea\x41t\n\x19\x62\x61tch.googleapis.com/Task\x12Wprojects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}\"\x8f\x03\n\x0b\x45nvironment\x12\x44\n\tvariables\x18\x01 \x03(\x0b\x32\x31.google.cloud.batch.v1.Environment.VariablesEntry\x12Q\n\x10secret_variables\x18\x02 \x03(\x0b\x32\x37.google.cloud.batch.v1.Environment.SecretVariablesEntry\x12I\n\x13\x65ncrypted_variables\x18\x03 \x01(\x0b\x32,.google.cloud.batch.v1.Environment.KMSEnvMap\x1a\x32\n\tKMSEnvMap\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x13\n\x0b\x63ipher_text\x18\x02 \x01(\t\x1a\x30\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x36\n\x14SecretVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\xaa\x01\n\x19\x63om.google.cloud.batch.v1B\tTaskProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Batch + module V1 + ComputeResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ComputeResource").msgclass + StatusEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.StatusEvent").msgclass + TaskExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskExecution").msgclass + TaskStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus").msgclass + TaskStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus.State").enummodule + Runnable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable").msgclass + Runnable::Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Container").msgclass + Runnable::Script = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Script").msgclass + Runnable::Barrier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Barrier").msgclass + TaskSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskSpec").msgclass + LifecyclePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy").msgclass + LifecyclePolicy::ActionCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.ActionCondition").msgclass + LifecyclePolicy::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.Action").enummodule + Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Task").msgclass + Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment").msgclass + Environment::KMSEnvMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment.KMSEnvMap").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb new file mode 100644 index 000000000000..01b65f088389 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/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 Batch + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb new file mode 100644 index 000000000000..c4253a7ced01 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/batch/v1/volume.proto + +require 'google/protobuf' + + +descriptor_data = "\n\"google/cloud/batch/v1/volume.proto\x12\x15google.cloud.batch.v1\"\xaa\x01\n\x06Volume\x12)\n\x03nfs\x18\x01 \x01(\x0b\x32\x1a.google.cloud.batch.v1.NFSH\x00\x12)\n\x03gcs\x18\x03 \x01(\x0b\x32\x1a.google.cloud.batch.v1.GCSH\x00\x12\x15\n\x0b\x64\x65vice_name\x18\x06 \x01(\tH\x00\x12\x12\n\nmount_path\x18\x04 \x01(\t\x12\x15\n\rmount_options\x18\x05 \x03(\tB\x08\n\x06source\"*\n\x03NFS\x12\x0e\n\x06server\x18\x01 \x01(\t\x12\x13\n\x0bremote_path\x18\x02 \x01(\t\"\x1a\n\x03GCS\x12\x13\n\x0bremote_path\x18\x01 \x01(\tB\xac\x01\n\x19\x63om.google.cloud.batch.v1B\x0bVolumeProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Batch + module V1 + Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Volume").msgclass + NFS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.NFS").msgclass + GCS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GCS").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb new file mode 100644 index 000000000000..0cf0d5bd1303 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v1/iam_policy" +require "google/cloud/batch/v1/version" + +module Google + module Iam + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/iam/v1" + # client = ::Google::Iam::V1::IAMPolicy::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/iam/v1" + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + module V1 + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/iam/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb new file mode 100644 index 000000000000..9797016a6751 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.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! + +require "gapic/rest" + +module Google + module Iam + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/iam/v1/rest" + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Iam"] + 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 diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..e4bdf8b4e266 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/batch/v1/version" + +require "google/iam/v1/iam_policy/credentials" +require "google/iam/v1/iam_policy/client" +require "google/iam/v1/iam_policy/rest" + +module Google + module Iam + module V1 + ## + # API Overview + # + # Manages Identity and Access Management (IAM) policies. + # + # Any implementation of an API that offers access control features + # implements the google.iam.v1.IAMPolicy interface. + # + # ## Data model + # + # Access control is applied when a principal (user or service account), takes + # some action on a resource exposed by a service. Resources, identified by + # URI-like names, are the unit of access control specification. Service + # implementations can choose the granularity of access control and the + # supported permissions for their resources. + # For example one database service may allow access control to be + # specified only at the Table level, whereas another might allow access control + # to also be specified at the Column level. + # + # ## Policy Structure + # + # See google.iam.v1.Policy + # + # This is intentionally not a CRUD style API because access control policies + # are created and deleted implicitly with the resources to which they are + # attached. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v1/iam_policy" + # client = ::Google::Iam::V1::IAMPolicy::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v1/iam_policy/rest" + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + module IAMPolicy + end + end + end +end + +helper_path = ::File.join __dir__, "iam_policy", "helpers.rb" +require "google/iam/v1/iam_policy/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb new file mode 100644 index 000000000000..d3ee0a26ee84 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb @@ -0,0 +1,729 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/iam/v1/iam_policy_pb" +require "google/cloud/location" + +module Google + module Iam + module V1 + module IAMPolicy + ## + # Client for the IAMPolicy service. + # + # API Overview + # + # Manages Identity and Access Management (IAM) policies. + # + # Any implementation of an API that offers access control features + # implements the google.iam.v1.IAMPolicy interface. + # + # ## Data model + # + # Access control is applied when a principal (user or service account), takes + # some action on a resource exposed by a service. Resources, identified by + # URI-like names, are the unit of access control specification. Service + # implementations can choose the granularity of access control and the + # supported permissions for their resources. + # For example one database service may allow access control to be + # specified only at the Table level, whereas another might allow access control + # to also be specified at the Column level. + # + # ## Policy Structure + # + # See google.iam.v1.Policy + # + # This is intentionally not a CRUD style API because access control policies + # are created and deleted implicitly with the resources to which they are + # attached. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :iam_policy_stub + + ## + # Configure the IAMPolicy Client class. + # + # See {::Google::Iam::V1::IAMPolicy::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IAMPolicy clients + # ::Google::Iam::V1::IAMPolicy::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", "Iam", "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 IAMPolicy 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::Iam::V1::IAMPolicy::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 + @iam_policy_stub.universe_domain + end + + ## + # Create a new IAMPolicy client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V1::IAMPolicy::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IAMPolicy 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/iam/v1/iam_policy_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 + + @iam_policy_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V1::IAMPolicy::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 + ) + + @iam_policy_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @iam_policy_stub.endpoint + config.universe_domain = @iam_policy_stub.universe_domain + config.logger = @iam_policy_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 + @iam_policy_stub.logger + end + + # Service calls + + ## + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + # + # @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/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION + metadata[:"x-goog-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 + + @iam_policy_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 resource. + # Returns an empty policy if the resource 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/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION + metadata[:"x-goog-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 + + @iam_policy_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 on the specified resource. + # If the resource does not exist, this will return 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/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION + metadata[:"x-goog-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 + + @iam_policy_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 IAMPolicy API. + # + # This class represents the configuration for IAMPolicy, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Iam::V1::IAMPolicy::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # set_iam_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V1::IAMPolicy::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.set_iam_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.set_iam_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Iam::V1::IAMPolicy::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 = "iam-meta-api.googleapis.com" + + config_attr :endpoint, nil, ::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 IAMPolicy API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `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 + 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 diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb new file mode 100644 index 000000000000..ae4df78450b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Iam + module V1 + module IAMPolicy + # Credentials for the IAMPolicy API. + class Credentials < ::Google::Auth::Credentials + 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 diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb new file mode 100644 index 000000000000..cd6d6cbdd883 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/batch/v1/version" +require "google/iam/v1/bindings_override" + +require "google/iam/v1/iam_policy/credentials" +require "google/iam/v1/iam_policy/rest/client" + +module Google + module Iam + module V1 + ## + # API Overview + # + # Manages Identity and Access Management (IAM) policies. + # + # Any implementation of an API that offers access control features + # implements the google.iam.v1.IAMPolicy interface. + # + # ## Data model + # + # Access control is applied when a principal (user or service account), takes + # some action on a resource exposed by a service. Resources, identified by + # URI-like names, are the unit of access control specification. Service + # implementations can choose the granularity of access control and the + # supported permissions for their resources. + # For example one database service may allow access control to be + # specified only at the Table level, whereas another might allow access control + # to also be specified at the Column level. + # + # ## Policy Structure + # + # See google.iam.v1.Policy + # + # This is intentionally not a CRUD style API because access control policies + # are created and deleted implicitly with the resources to which they are + # attached. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v1/iam_policy/rest" + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + module IAMPolicy + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v1/iam_policy/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb new file mode 100644 index 000000000000..ce59c5c8c1f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb @@ -0,0 +1,673 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/iam/v1/iam_policy_pb" +require "google/iam/v1/iam_policy/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V1 + module IAMPolicy + module Rest + ## + # REST client for the IAMPolicy service. + # + # API Overview + # + # Manages Identity and Access Management (IAM) policies. + # + # Any implementation of an API that offers access control features + # implements the google.iam.v1.IAMPolicy interface. + # + # ## Data model + # + # Access control is applied when a principal (user or service account), takes + # some action on a resource exposed by a service. Resources, identified by + # URI-like names, are the unit of access control specification. Service + # implementations can choose the granularity of access control and the + # supported permissions for their resources. + # For example one database service may allow access control to be + # specified only at the Table level, whereas another might allow access control + # to also be specified at the Column level. + # + # ## Policy Structure + # + # See google.iam.v1.Policy + # + # This is intentionally not a CRUD style API because access control policies + # are created and deleted implicitly with the resources to which they are + # attached. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :iam_policy_stub + + ## + # Configure the IAMPolicy Client class. + # + # See {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IAMPolicy clients + # ::Google::Iam::V1::IAMPolicy::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", "Iam", "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 IAMPolicy 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::Iam::V1::IAMPolicy::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 + @iam_policy_stub.universe_domain + end + + ## + # Create a new IAMPolicy REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IAMPolicy 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 + + @iam_policy_stub = ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @iam_policy_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @iam_policy_stub.endpoint + config.universe_domain = @iam_policy_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @iam_policy_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 + @iam_policy_stub.logger + end + + # Service calls + + ## + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + # + # @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/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @iam_policy_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 resource. + # Returns an empty policy if the resource 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/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @iam_policy_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 on the specified resource. + # If the resource does not exist, this will return 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/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @iam_policy_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 IAMPolicy REST API. + # + # This class represents the configuration for IAMPolicy 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::Iam::V1::IAMPolicy::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 + # # set_iam_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V1::IAMPolicy::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.set_iam_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.set_iam_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam-meta-api.googleapis.com" + + config_attr :endpoint, nil, ::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 IAMPolicy API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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 `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 + 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-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb new file mode 100644 index 000000000000..913f9d5fd09f --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.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! + +require "google/iam/v1/iam_policy_pb" + +module Google + module Iam + module V1 + module IAMPolicy + module Rest + ## + # REST service stub for the IAMPolicy 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 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 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{^(?<__wildcard__>.*)$}, true] + ] + ) + 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{^(?<__wildcard__>.*)$}, true] + ] + ) + 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{^(?<__wildcard__>.*)$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb new file mode 100644 index 000000000000..548e0e659b74 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.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! + +require "google/iam/v1/iam_policy/rest" +require "google/iam/v1/bindings_override" +require "google/cloud/batch/v1/version" + +module Google + module Iam + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/iam/v1/rest" + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + module V1 + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md new file mode 100644 index 000000000000..40b55bf3d716 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Batch 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-batch-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb new file mode 100644 index 000000000000..2c6e39a147a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb @@ -0,0 +1,246 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Batch + module V1 + # CreateJob Request. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name where the Job will be created. + # Pattern: "projects/\\{project}/locations/\\{location}" + # @!attribute [rw] job_id + # @return [::String] + # ID used to uniquely identify the Job within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and '-' are accepted. + # The '-' character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The job.name field in the request will be ignored and the created resource + # name of the Job will be "\\{parent}/jobs/\\{job_id}". + # @!attribute [rw] job + # @return [::Google::Cloud::Batch::V1::Job] + # Required. The Job to create. + # @!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 CreateJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetJob Request. + # @!attribute [rw] name + # @return [::String] + # Required. Job name. + class GetJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteJob Request. + # @!attribute [rw] name + # @return [::String] + # Job name. + # @!attribute [rw] reason + # @return [::String] + # Optional. Reason for this deletion. + # @!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). + class DeleteJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CancelJob Request. + # @!attribute [rw] name + # @return [::String] + # Required. Job name. + # @!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). + class CancelJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to the CancelJob request. + class CancelJobResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListJob Request. + # @!attribute [rw] parent + # @return [::String] + # Parent path. + # @!attribute [rw] filter + # @return [::String] + # List filter. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Sort results. Supported are "name", "name desc", "create_time", + # and "create_time desc". + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token. + class ListJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListJob Response. + # @!attribute [rw] jobs + # @return [::Array<::Google::Cloud::Batch::V1::Job>] + # Jobs. + # @!attribute [rw] next_page_token + # @return [::String] + # Next page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListTasks Request. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of a TaskGroup from which Tasks are being requested. + # Pattern: + # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" + # @!attribute [rw] filter + # @return [::String] + # Task filter, null filter matches all Tasks. + # Filter string should be of the format State=TaskStatus.State e.g. + # State=RUNNING + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token. + class ListTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListTasks Response. + # @!attribute [rw] tasks + # @return [::Array<::Google::Cloud::Batch::V1::Task>] + # Tasks. + # @!attribute [rw] next_page_token + # @return [::String] + # Next page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for a single Task by name. + # @!attribute [rw] name + # @return [::String] + # Required. Task name. + class GetTaskRequest + 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 diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb new file mode 100644 index 000000000000..3096f4fede93 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb @@ -0,0 +1,801 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Batch + module V1 + # The Cloud Batch Job description. + # @!attribute [r] name + # @return [::String] + # Output only. Job name. + # For example: "projects/123456/locations/us-central1/jobs/job01". + # @!attribute [r] uid + # @return [::String] + # Output only. A system generated unique ID for the Job. + # @!attribute [rw] priority + # @return [::Integer] + # Priority of the Job. + # The valid value range is [0, 100). Default value is 0. + # Higher value indicates higher priority. + # A job with higher priority value is more likely to run earlier if all other + # requirements are satisfied. + # @!attribute [rw] task_groups + # @return [::Array<::Google::Cloud::Batch::V1::TaskGroup>] + # Required. TaskGroups in the Job. Only one TaskGroup is supported now. + # @!attribute [rw] allocation_policy + # @return [::Google::Cloud::Batch::V1::AllocationPolicy] + # Compute resource allocation for all TaskGroups in the Job. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Custom labels to apply to the job and any Cloud Logging + # [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) + # that it generates. + # + # Use labels to group and describe the resources they are applied to. Batch + # automatically applies predefined labels and supports multiple `labels` + # fields for each job, which each let you apply custom labels to various + # resources. Label names that start with "goog-" or "google-" are + # reserved for predefined labels. For more information about labels with + # Batch, see + # [Organize resources using + # labels](https://cloud.google.com/batch/docs/organize-resources-using-labels). + # @!attribute [r] status + # @return [::Google::Cloud::Batch::V1::JobStatus] + # Output only. Job status. It is read only for users. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Job was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time the Job was updated. + # @!attribute [rw] logs_policy + # @return [::Google::Cloud::Batch::V1::LogsPolicy] + # Log preservation policy for the Job. + # @!attribute [rw] notifications + # @return [::Array<::Google::Cloud::Batch::V1::JobNotification>] + # Notification configurations. + class Job + 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 + + # LogsPolicy describes if and how a job's logs are preserved. Logs include + # information that is automatically written by the Batch service agent and any + # information that you configured the job's runnables to write to the `stdout` + # or `stderr` streams. + # @!attribute [rw] destination + # @return [::Google::Cloud::Batch::V1::LogsPolicy::Destination] + # If and where logs should be saved. + # @!attribute [rw] logs_path + # @return [::String] + # When `destination` is set to `PATH`, you must set this field to the path + # where you want logs to be saved. This path can point to a local directory + # on the VM or (if congifured) a directory under the mount path of any + # Cloud Storage bucket, network file system (NFS), or writable persistent + # disk that is mounted to the job. For example, if the job has a bucket with + # `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the + # root directory of the `remotePath` of that bucket by setting this field to + # `/mnt/disks/my-bucket/`. + # @!attribute [rw] cloud_logging_option + # @return [::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption] + # Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally + # set this field to configure additional settings for Cloud Logging. + class LogsPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `CloudLoggingOption` contains additional settings for Cloud Logging logs + # generated by Batch job. + # @!attribute [rw] use_generic_task_monitored_resource + # @return [::Boolean] + # Optional. Set this field to `true` to change the [monitored resource + # type](https://cloud.google.com/monitoring/api/resources) for + # Cloud Logging logs generated by this Batch job from + # the + # [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + # type to the formerly used + # [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + # type. + class CloudLoggingOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The destination (if any) for logs. + module Destination + # (Default) Logs are not preserved. + DESTINATION_UNSPECIFIED = 0 + + # Logs are streamed to Cloud Logging. Optionally, you can configure + # additional settings in the `cloudLoggingOption` field. + CLOUD_LOGGING = 1 + + # Logs are saved to the file path specified in the `logsPath` field. + PATH = 2 + end + end + + # Job status. + # @!attribute [rw] state + # @return [::Google::Cloud::Batch::V1::JobStatus::State] + # Job state + # @!attribute [rw] status_events + # @return [::Array<::Google::Cloud::Batch::V1::StatusEvent>] + # Job status events + # @!attribute [rw] task_groups + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Batch::V1::JobStatus::TaskGroupStatus}] + # Aggregated task status for each TaskGroup in the Job. + # The map key is TaskGroup ID. + # @!attribute [rw] run_duration + # @return [::Google::Protobuf::Duration] + # The duration of time that the Job spent in status RUNNING. + class JobStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VM instance status. + # @!attribute [rw] machine_type + # @return [::String] + # The Compute Engine machine type. + # @!attribute [rw] provisioning_model + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel] + # The VM instance provisioning model. + # @!attribute [rw] task_pack + # @return [::Integer] + # The max number of tasks can be assigned to this instance type. + # @!attribute [rw] boot_disk + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] + # The VM boot disk. + class InstanceStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Aggregated task status for a TaskGroup. + # @!attribute [rw] counts + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # Count of task in each state in the TaskGroup. + # The map key is task state name. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::Batch::V1::JobStatus::InstanceStatus>] + # Status of instances allocated for the TaskGroup. + class TaskGroupStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class CountsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Batch::V1::JobStatus::TaskGroupStatus] + class TaskGroupsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Valid Job states. + module State + # Job state unspecified. + STATE_UNSPECIFIED = 0 + + # Job is admitted (validated and persisted) and waiting for resources. + QUEUED = 1 + + # Job is scheduled to run as soon as resource allocation is ready. + # The resource allocation may happen at a later time but with a high + # chance to succeed. + SCHEDULED = 2 + + # Resource allocation has been successful. At least one Task in the Job is + # RUNNING. + RUNNING = 3 + + # All Tasks in the Job have finished successfully. + SUCCEEDED = 4 + + # At least one Task in the Job has failed. + FAILED = 5 + + # The Job will be deleted, but has not been deleted yet. Typically this is + # because resources used by the Job are still being cleaned up. + DELETION_IN_PROGRESS = 6 + + # The Job cancellation is in progress, this is because the resources used + # by the Job are still being cleaned up. + CANCELLATION_IN_PROGRESS = 7 + + # The Job has been cancelled, the task executions were stopped and the + # resources were cleaned up. + CANCELLED = 8 + end + end + + # Notification configurations. + # @!attribute [rw] pubsub_topic + # @return [::String] + # The Pub/Sub topic where notifications for the job, like state + # changes, will be published. If undefined, no Pub/Sub notifications + # are sent for this job. + # + # Specify the topic using the following format: + # `projects/{project}/topics/{topic}`. + # Notably, if you want to specify a Pub/Sub topic that is in a + # different project than the job, your administrator must grant your + # project's Batch service agent permission to publish to that topic. + # + # For more information about configuring Pub/Sub notifications for + # a job, see + # https://cloud.google.com/batch/docs/enable-notifications. + # @!attribute [rw] message + # @return [::Google::Cloud::Batch::V1::JobNotification::Message] + # The attribute requirements of messages to be sent to this Pub/Sub topic. + # Without this field, no message will be sent. + class JobNotification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message details. + # Describe the conditions under which messages will be sent. + # If no attribute is defined, no message will be sent by default. + # One message should specify either the job or the task level attributes, + # but not both. For example, + # job level: JOB_STATE_CHANGED and/or a specified new_job_state; + # task level: TASK_STATE_CHANGED and/or a specified new_task_state. + # @!attribute [rw] type + # @return [::Google::Cloud::Batch::V1::JobNotification::Type] + # The message type. + # @!attribute [rw] new_job_state + # @return [::Google::Cloud::Batch::V1::JobStatus::State] + # The new job state. + # @!attribute [rw] new_task_state + # @return [::Google::Cloud::Batch::V1::TaskStatus::State] + # The new task state. + class Message + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message type. + module Type + # Unspecified. + TYPE_UNSPECIFIED = 0 + + # Notify users that the job state has changed. + JOB_STATE_CHANGED = 1 + + # Notify users that the task state has changed. + TASK_STATE_CHANGED = 2 + end + end + + # A Job's resource allocation policy describes when, where, and how compute + # resources should be allocated for the Job. + # @!attribute [rw] location + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::LocationPolicy] + # Location where compute resources should be allocated for the Job. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::InstancePolicyOrTemplate>] + # Describe instances that can be created by this AllocationPolicy. + # Only instances[0] is supported now. + # @!attribute [rw] service_account + # @return [::Google::Cloud::Batch::V1::ServiceAccount] + # Defines the service account for Batch-created VMs. If omitted, the [default + # Compute Engine service + # account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + # is used. Must match the service account specified in any used instance + # template configured in the Batch job. + # + # Includes the following fields: + # * email: The service account's email address. If not set, the default + # Compute Engine service account is used. + # * scopes: Additional OAuth scopes to grant the service account, beyond the + # default cloud-platform scope. (list of strings) + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Custom labels to apply to the job and all the Compute Engine resources + # that both are created by this allocation policy and support labels. + # + # Use labels to group and describe the resources they are applied to. Batch + # automatically applies predefined labels and supports multiple `labels` + # fields for each job, which each let you apply custom labels to various + # resources. Label names that start with "goog-" or "google-" are + # reserved for predefined labels. For more information about labels with + # Batch, see + # [Organize resources using + # labels](https://cloud.google.com/batch/docs/organize-resources-using-labels). + # @!attribute [rw] network + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::NetworkPolicy] + # The network policy. + # + # If you define an instance template in the `InstancePolicyOrTemplate` field, + # Batch will use the network settings in the instance template instead of + # this field. + # @!attribute [rw] placement + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::PlacementPolicy] + # The placement policy. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Optional. Tags applied to the VM instances. + # + # The tags identify valid sources or targets for network firewalls. + # Each tag must be 1-63 characters long, and comply with + # [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + class AllocationPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] allowed_locations + # @return [::Array<::String>] + # A list of location names that are allowed for the job's VMs formatted + # as URLs. Each location can be a region or a zone, but you can only + # specify one region or multiple zones in one region per job. For example, + # `["regions/us-central1"]` allow VMs in any zones in region + # `us-central1`, and `["zones/us-central1-a", "zones/us-central1-c"]` + # only allow VMs in zones `us-central1-a` and `us-central1-c`. However, + # `["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + # "zones/us-west1-a"]` causes an error because it contains multiple regions + # (`us-central1` and `us-west1`). + # + # The specified region or zones must be in the same region in + # which the job is created starting on the following dates: + # + # + For projects that have successfully submitted before + # July 31, 2026 at least one job that uses the + # `allowedLocations[]` field with any region or zones + # outside of the job's location, the changes are starting + # on _June 30, 2027_. + # + # + For all other projects, the changes are starting on + # _July 31, 2026_. + # + # For example, for job `projects/123/locations/us-central1/jobs/jobid`, + # the specified region or zones must be in `us-central1`. Using a + # different region (e.g. `regions/us-west1`) or a zone not in + # `us-central1` (e.g. `zones/us-west1-a`) causes an error. + class LocationPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A new persistent disk or a local ssd. + # A VM can only have one local SSD setting but multiple local SSD partitions. + # See https://cloud.google.com/compute/docs/disks#pdspecs and + # https://cloud.google.com/compute/docs/disks#localssds. + # @!attribute [rw] image + # @return [::String] + # URL for a VM image to use as the data source for this disk. + # For example, the following are all valid URLs: + # + # * Specify the image by its family name: + # projects/\\{project}/global/images/family/\\{image_family} + # * Specify the image version: + # projects/\\{project}/global/images/\\{image_version} + # + # You can also use Batch customized image in short names. + # The following image values are supported for a boot disk: + # + # * `batch-debian`: use Batch Debian images. + # * `batch-cos`: use Batch Container-Optimized images. + # * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. + # + # Note: The following fields are mutually exclusive: `image`, `snapshot`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] snapshot + # @return [::String] + # Name of a snapshot used as the data source. + # Snapshot is not supported as boot disk now. + # + # Note: The following fields are mutually exclusive: `snapshot`, `image`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] type + # @return [::String] + # Disk type as shown in `gcloud compute disk-types list`. + # For example, local SSD uses type "local-ssd". + # Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + # or "pd-standard". If not specified, "pd-standard" will be used as the + # default type for non-boot disks, "pd-balanced" will be used as the + # default type for boot disks. + # @!attribute [rw] size_gb + # @return [::Integer] + # Disk size in GB. + # + # **Non-Boot Disk**: + # If the `type` specifies a persistent disk, this field + # is ignored if `data_source` is set as `image` or `snapshot`. + # If the `type` specifies a local SSD, this field should be a multiple of + # 375 GB, otherwise, the final size will be the next greater multiple of + # 375 GB. + # + # **Boot Disk**: + # Batch will calculate the boot disk size based on source + # image and task requirements if you do not speicify the size. + # If both this field and the `boot_disk_mib` field in task spec's + # `compute_resource` are defined, Batch will only honor this field. + # Also, this field should be no smaller than the source disk's + # size when the `data_source` is set as `snapshot` or `image`. + # For example, if you set an image as the `data_source` field and the + # image's default disk size 30 GB, you can only use this field to make the + # disk larger or equal to 30 GB. + # @!attribute [rw] disk_interface + # @return [::String] + # Local SSDs are available through both "SCSI" and "NVMe" interfaces. + # If not indicated, "NVMe" will be the default one for local ssds. + # This field is ignored for persistent disks as the interface is chosen + # automatically. See + # https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + class Disk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A new or an existing persistent disk (PD) or a local ssd attached to a VM + # instance. + # @!attribute [rw] new_disk + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] + # Note: The following fields are mutually exclusive: `new_disk`, `existing_disk`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] existing_disk + # @return [::String] + # Name of an existing PD. + # + # Note: The following fields are mutually exclusive: `existing_disk`, `new_disk`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] device_name + # @return [::String] + # Device name that the guest operating system will see. + # It is used by Runnable.volumes field to mount disks. So please specify + # the device_name if you want Batch to help mount the disk, and it should + # match the device_name field in volumes. + class AttachedDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Accelerator describes Compute Engine accelerators to be attached to the VM. + # @!attribute [rw] type + # @return [::String] + # The accelerator type. For example, "nvidia-tesla-t4". + # See `gcloud compute accelerator-types list`. + # @!attribute [rw] count + # @return [::Integer] + # The number of accelerators of this type. + # @!attribute [rw] install_gpu_drivers + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Deprecated: please use instances[0].install_gpu_drivers instead. + # @!attribute [rw] driver_version + # @return [::String] + # Optional. The NVIDIA GPU driver version that should be installed for this + # type. + # + # You can define the specific driver version such as "470.103.01", + # following the driver version requirements in + # https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + # Batch will install the specific accelerator driver if qualified. + class Accelerator + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # InstancePolicy describes an instance type and resources attached to each VM + # created by this InstancePolicy. + # @!attribute [rw] machine_type + # @return [::String] + # The Compute Engine machine type. + # @!attribute [rw] min_cpu_platform + # @return [::String] + # The minimum CPU platform. + # See + # https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + # @!attribute [rw] provisioning_model + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel] + # The provisioning model. + # @!attribute [rw] accelerators + # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::Accelerator>] + # The accelerators attached to each VM instance. + # @!attribute [rw] boot_disk + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] + # Boot disk to be created and attached to each VM by this InstancePolicy. + # Boot disk will be deleted when the VM is deleted. + # Batch API now only supports booting from image. + # @!attribute [rw] disks + # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::AttachedDisk>] + # Non-boot disks to be attached for each VM created by this InstancePolicy. + # New disks will be deleted when the VM is deleted. + # A non-boot disk is a disk that can be of a device with a + # file system or a raw storage drive that is not ready for data + # storage and accessing. + # @!attribute [rw] reservation + # @return [::String] + # Optional. If not specified (default), VMs will consume any applicable + # reservation. If "NO_RESERVATION" is specified, VMs will not consume any + # reservation. Otherwise, if specified, VMs will consume only the specified + # reservation. + class InstancePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # InstancePolicyOrTemplate lets you define the type of resources to use for + # this job either with an InstancePolicy or an instance template. + # If undefined, Batch picks the type of VM to use and doesn't include + # optional VM resources such as GPUs and extra disks. + # @!attribute [rw] policy + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::InstancePolicy] + # InstancePolicy. + # + # Note: The following fields are mutually exclusive: `policy`, `instance_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] instance_template + # @return [::String] + # Name of an instance template used to create VMs. + # Named the field as 'instance_template' instead of 'template' to avoid + # C++ keyword conflict. + # + # Batch only supports global instance templates from the same project as + # the job. + # You can specify the global instance template as a full or partial URL. + # + # Note: The following fields are mutually exclusive: `instance_template`, `policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] install_gpu_drivers + # @return [::Boolean] + # Set this field true if you want Batch to help fetch drivers from a third + # party location and install them for GPUs specified in + # `policy.accelerators` or `instance_template` on your behalf. Default is + # false. + # + # For Container-Optimized Image cases, Batch will install the + # accelerator driver following milestones of + # https://cloud.google.com/container-optimized-os/docs/release-notes. For + # non Container-Optimized Image cases, following + # https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + # @!attribute [rw] install_ops_agent + # @return [::Boolean] + # Optional. Set this field true if you want Batch to install Ops Agent on + # your behalf. Default is false. + # @!attribute [rw] block_project_ssh_keys + # @return [::Boolean] + # Optional. Set this field to `true` if you want Batch to block + # project-level SSH keys from accessing this job's VMs. Alternatively, you + # can configure the job to specify a VM instance template that blocks + # project-level SSH keys. In either case, Batch blocks project-level SSH + # keys while creating the VMs for this job. + # + # Batch allows project-level SSH keys for a job's VMs only if all + # the following are true: + # + # + This field is undefined or set to `false`. + # + The job's VM instance template (if any) doesn't block project-level + # SSH keys. + # + # Notably, you can override this behavior by manually updating a VM to + # block or allow project-level SSH keys. For more information about + # blocking project-level SSH keys, see the Compute Engine documentation: + # https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys + class InstancePolicyOrTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A network interface. + # @!attribute [rw] network + # @return [::String] + # The URL of an existing network resource. + # You can specify the network as a full or partial URL. + # + # For example, the following are all valid URLs: + # + # * https://www.googleapis.com/compute/v1/projects/\\{project}/global/networks/\\{network} + # * projects/\\{project}/global/networks/\\{network} + # * global/networks/\\{network} + # @!attribute [rw] subnetwork + # @return [::String] + # The URL of an existing subnetwork resource in the network. + # You can specify the subnetwork as a full or partial URL. + # + # For example, the following are all valid URLs: + # + # * https://www.googleapis.com/compute/v1/projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetwork} + # * projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetwork} + # * regions/\\{region}/subnetworks/\\{subnetwork} + # @!attribute [rw] no_external_ip_address + # @return [::Boolean] + # Default is false (with an external IP address). Required if + # no external public IP address is attached to the VM. If no external + # public IP address, additional configuration is required to allow the VM + # to access Google Services. See + # https://cloud.google.com/vpc/docs/configure-private-google-access and + # https://cloud.google.com/nat/docs/gce-example#create-nat for more + # information. + class NetworkInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NetworkPolicy describes VM instance network configurations. + # @!attribute [rw] network_interfaces + # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::NetworkInterface>] + # Network configurations. + class NetworkPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PlacementPolicy describes a group placement policy for the VMs controlled + # by this AllocationPolicy. + # @!attribute [rw] collocation + # @return [::String] + # UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + # want VMs to be located close to each other for low network latency + # between the VMs. No placement policy will be generated when collocation + # is UNSPECIFIED. + # @!attribute [rw] max_distance + # @return [::Integer] + # When specified, causes the job to fail if more than max_distance logical + # switches are required between VMs. Batch uses the most compact possible + # placement of VMs even when max_distance is not specified. An explicit + # max_distance makes that level of compactness a strict requirement. + # Not yet implemented + class PlacementPolicy + 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 + + # Compute Engine VM instance provisioning model. + module ProvisioningModel + # Unspecified. + PROVISIONING_MODEL_UNSPECIFIED = 0 + + # Standard VM. + STANDARD = 1 + + # SPOT VM. + SPOT = 2 + + # Preemptible VM (PVM). + # + # Above SPOT VM is the preferable model for preemptible VM instances: the + # old preemptible VM model (indicated by this field) is the older model, + # and has been migrated to use the SPOT model as the underlying technology. + # This old model will still be supported. + PREEMPTIBLE = 3 + + # Bound to the lifecycle of the reservation in which it is provisioned. + RESERVATION_BOUND = 4 + + # Instance is provisioned with DWS Flex Start and has limited max run + # duration. + FLEX_START = 5 + end + end + + # A TaskGroup defines one or more Tasks that all share the same TaskSpec. + # @!attribute [r] name + # @return [::String] + # Output only. TaskGroup name. + # The system generates this field based on parent Job name. + # For example: + # "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + # @!attribute [rw] task_spec + # @return [::Google::Cloud::Batch::V1::TaskSpec] + # Required. Tasks in the group share the same task spec. + # @!attribute [rw] task_count + # @return [::Integer] + # Number of Tasks in the TaskGroup. + # Default is 1. + # @!attribute [rw] parallelism + # @return [::Integer] + # Max number of tasks that can run in parallel. + # Default to min(task_count, parallel tasks per job limit). + # See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + # Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + # @!attribute [rw] scheduling_policy + # @return [::Google::Cloud::Batch::V1::TaskGroup::SchedulingPolicy] + # Scheduling policy for Tasks in the TaskGroup. + # The default value is AS_SOON_AS_POSSIBLE. + # @!attribute [rw] task_environments + # @return [::Array<::Google::Cloud::Batch::V1::Environment>] + # An array of environment variable mappings, which are passed to Tasks with + # matching indices. If task_environments is used then task_count should + # not be specified in the request (and will be ignored). Task count will be + # the length of task_environments. + # + # Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + # addition to any environment variables set in task_environments, specifying + # the number of Tasks in the Task's parent TaskGroup, and the specific Task's + # index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + # @!attribute [rw] task_count_per_node + # @return [::Integer] + # Max number of tasks that can be run on a VM at the same time. + # If not specified, the system will decide a value based on available + # compute resources on a VM and task requirements. + # @!attribute [rw] require_hosts_file + # @return [::Boolean] + # When true, Batch will populate a file with a list of all VMs assigned to + # the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + # of that file. Defaults to false. The host file supports up to 1000 VMs. + # @!attribute [rw] permissive_ssh + # @return [::Boolean] + # When true, Batch will configure SSH to allow passwordless login between + # VMs running the Batch tasks in the same TaskGroup. + # @!attribute [rw] run_as_non_root + # @return [::Boolean] + # Optional. If not set or set to false, Batch uses the root user to execute + # runnables. If set to true, Batch runs the runnables using a non-root user. + # Currently, the non-root user Batch used is generated by OS Login. For more + # information, see [About OS + # Login](https://cloud.google.com/compute/docs/oslogin). + class TaskGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How Tasks in the TaskGroup should be scheduled relative to each other. + module SchedulingPolicy + # Unspecified. + SCHEDULING_POLICY_UNSPECIFIED = 0 + + # Run Tasks as soon as resources are available. + # + # Tasks might be executed in parallel depending on parallelism and + # task_count values. + AS_SOON_AS_POSSIBLE = 1 + + # Run Tasks sequentially with increased task index. + IN_ORDER = 2 + end + end + + # Carries information about a Google Cloud service account. + # @!attribute [rw] email + # @return [::String] + # Email address of the service account. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # List of scopes to be enabled for this service account. + class ServiceAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb new file mode 100644 index 000000000000..4f4c80930d3c --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb @@ -0,0 +1,547 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Batch + module V1 + # Compute resource requirements. + # + # ComputeResource defines the amount of resources required for each task. + # Make sure your tasks have enough resources to successfully run. + # If you also define the types of resources for a job to use with the + # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + # field, make sure both fields are compatible with each other. + # @!attribute [rw] cpu_milli + # @return [::Integer] + # The milliCPU count. + # + # `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + # For example, `1000` corresponds to 1 vCPU per task. If undefined, the + # default value is `2000`. + # + # If you also define the VM's machine type using the `machineType` in + # [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + # field or inside the `instanceTemplate` in the + # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + # field, make sure the CPU resources for both fields are compatible with each + # other and with how many tasks you want to allow to run on the same VM at + # the same time. + # + # For example, if you specify the `n2-standard-2` machine type, which has 2 + # vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + # you are recommended to run two tasks on the same VM if you set `cpuMilli` + # to `1000` or less. + # @!attribute [rw] memory_mib + # @return [::Integer] + # Memory in MiB. + # + # `memoryMib` defines the amount of memory per task in MiB units. + # If undefined, the default value is `2000`. + # If you also define the VM's machine type using the `machineType` in + # [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + # field or inside the `instanceTemplate` in the + # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + # field, make sure the memory resources for both fields are compatible with + # each other and with how many tasks you want to allow to run on the same VM + # at the same time. + # + # For example, if you specify the `n2-standard-2` machine type, which has 8 + # GiB each, you are recommended to set `memoryMib` to no more than `8192`, + # or you are recommended to run two tasks on the same VM if you set + # `memoryMib` to `4096` or less. + # @!attribute [rw] boot_disk_mib + # @return [::Integer] + # Extra boot disk size in MiB for each task. + class ComputeResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status event. + # @!attribute [rw] type + # @return [::String] + # Type of the event. + # @!attribute [rw] description + # @return [::String] + # Description of the event. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # The time this event occurred. + # @!attribute [rw] task_execution + # @return [::Google::Cloud::Batch::V1::TaskExecution] + # Task Execution. + # This field is only defined for task-level status events where the task + # fails. + # @!attribute [rw] task_state + # @return [::Google::Cloud::Batch::V1::TaskStatus::State] + # Task State. + # This field is only defined for task-level status events. + class StatusEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This Task Execution field includes detail information for + # task execution procedures, based on StatusEvent types. + # @!attribute [rw] exit_code + # @return [::Integer] + # The exit code of a finished task. + # + # If the task succeeded, the exit code will be 0. If the task failed but not + # due to the following reasons, the exit code will be 50000. + # + # Otherwise, it can be from different sources: + # * Batch known failures: + # https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + # * Batch runnable execution failures; you can rely on Batch logs to further + # diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + # there are multiple runnables failures, Batch only exposes the first error. + class TaskExecution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of a task. + # @!attribute [rw] state + # @return [::Google::Cloud::Batch::V1::TaskStatus::State] + # Task state. + # @!attribute [rw] status_events + # @return [::Array<::Google::Cloud::Batch::V1::StatusEvent>] + # Detailed info about why the state is reached. + class TaskStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Task states. + module State + # Unknown state. + STATE_UNSPECIFIED = 0 + + # The Task is created and waiting for resources. + PENDING = 1 + + # The Task is assigned to at least one VM. + ASSIGNED = 2 + + # The Task is running. + RUNNING = 3 + + # The Task has failed. + FAILED = 4 + + # The Task has succeeded. + SUCCEEDED = 5 + + # The Task has not been executed when the Job finishes. + UNEXECUTED = 6 + end + end + + # Runnable describes instructions for executing a specific script or container + # as part of a Task. + # @!attribute [rw] container + # @return [::Google::Cloud::Batch::V1::Runnable::Container] + # Container runnable. + # + # Note: The following fields are mutually exclusive: `container`, `script`, `barrier`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] script + # @return [::Google::Cloud::Batch::V1::Runnable::Script] + # Script runnable. + # + # Note: The following fields are mutually exclusive: `script`, `container`, `barrier`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] barrier + # @return [::Google::Cloud::Batch::V1::Runnable::Barrier] + # Barrier runnable. + # + # Note: The following fields are mutually exclusive: `barrier`, `container`, `script`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] display_name + # @return [::String] + # Optional. DisplayName is an optional field that can be provided by the + # caller. If provided, it will be used in logs and other outputs to identify + # the script, making it easier for users to understand the logs. If not + # provided the index of the runnable will be used for outputs. + # @!attribute [rw] ignore_exit_status + # @return [::Boolean] + # Normally, a runnable that returns a non-zero exit status fails and causes + # the task to fail. However, you can set this field to `true` to allow the + # task to continue executing its other runnables even if this runnable + # fails. + # @!attribute [rw] background + # @return [::Boolean] + # Normally, a runnable that doesn't exit causes its task to fail. However, + # you can set this field to `true` to configure a background runnable. + # Background runnables are allowed continue running in the background while + # the task executes subsequent runnables. For example, background runnables + # are useful for providing services to other runnables or providing + # debugging-support tools like SSH servers. + # + # Specifically, background runnables are killed automatically (if they have + # not already exited) a short time after all foreground runnables have + # completed. Even though this is likely to result in a non-zero exit status + # for the background runnable, these automatic kills are not treated as task + # failures. + # @!attribute [rw] always_run + # @return [::Boolean] + # By default, after a Runnable fails, no further Runnable are executed. This + # flag indicates that this Runnable must be run even if the Task has already + # failed. This is useful for Runnables that copy output files off of the VM + # or for debugging. + # + # The always_run flag does not override the Task's overall max_run_duration. + # If the max_run_duration has expired then no further Runnables will execute, + # not even always_run Runnables. + # @!attribute [rw] environment + # @return [::Google::Cloud::Batch::V1::Environment] + # Environment variables for this Runnable (overrides variables set for the + # whole Task or TaskGroup). + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Timeout for this Runnable. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels for this Runnable. + class Runnable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Container runnable. + # @!attribute [rw] image_uri + # @return [::String] + # Required. The URI to pull the container image from. + # @!attribute [rw] commands + # @return [::Array<::String>] + # Required for some container images. Overrides the `CMD` specified in the + # container. If there is an `ENTRYPOINT` (either in the container image or + # with the `entrypoint` field below) then these commands are appended as + # arguments to the `ENTRYPOINT`. + # @!attribute [rw] entrypoint + # @return [::String] + # Required for some container images. Overrides the `ENTRYPOINT` specified + # in the container. + # @!attribute [rw] volumes + # @return [::Array<::String>] + # Volumes to mount (bind mount) from the host machine files or directories + # into the container, formatted to match `--volume` option for the + # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. + # + # If the `TaskSpec.Volumes` field is specified but this field is not, Batch + # will mount each volume from the host machine to the container with the + # same mount path by default. In this case, the default mount option for + # containers will be read-only (`ro`) for existing persistent disks and + # read-write (`rw`) for other volume types, regardless of the original + # mount options specified in `TaskSpec.Volumes`. If you need different + # mount settings, you can explicitly configure them in this field. + # @!attribute [rw] options + # @return [::String] + # Required for some container images. Arbitrary additional options to + # include in the `docker run` command when running this container—for + # example, `--network host`. For the `--volume` option, use the `volumes` + # field for the container. + # @!attribute [rw] block_external_network + # @return [::Boolean] + # If set to true, external network access to and from container will be + # blocked, containers that are with block_external_network as true can + # still communicate with each other, network cannot be specified in the + # `container.options` field. + # @!attribute [rw] username + # @return [::String] + # Required if the container image is from a private Docker registry. The + # username to login to the Docker registry that contains the image. + # + # You can either specify the username directly by using plain text or + # specify an encrypted username by using a Secret Manager secret: + # `projects/*/secrets/*/versions/*`. However, using a secret is + # recommended for enhanced security. + # + # Caution: If you specify the username using plain text, you risk the + # username being exposed to any users who can view the job or its logs. + # To avoid this risk, specify a secret that contains the username instead. + # + # Learn more about [Secret + # Manager](https://cloud.google.com/secret-manager/docs/) and [using + # Secret Manager with + # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + # @!attribute [rw] password + # @return [::String] + # Required if the container image is from a private Docker registry. The + # password to login to the Docker registry that contains the image. + # + # For security, it is strongly recommended to specify an + # encrypted password by using a Secret Manager secret: + # `projects/*/secrets/*/versions/*`. + # + # Warning: If you specify the password using plain text, you risk the + # password being exposed to any users who can view the job or its logs. + # To avoid this risk, specify a secret that contains the password instead. + # + # Learn more about [Secret + # Manager](https://cloud.google.com/secret-manager/docs/) and [using + # Secret Manager with + # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + # @!attribute [rw] enable_image_streaming + # @return [::Boolean] + # Optional. If set to true, this container runnable uses Image streaming. + # + # Use Image streaming to allow the runnable to initialize without + # waiting for the entire container image to download, which can + # significantly reduce startup time for large container images. + # + # When `enableImageStreaming` is set to true, the container + # runtime is [containerd](https://containerd.io/) instead of Docker. + # Additionally, this container runnable only supports the following + # `container` subfields: `imageUri`, + # `commands[]`, `entrypoint`, and + # `volumes[]`; any other `container` subfields are ignored. + # + # For more information about the requirements and limitations for using + # Image streaming with Batch, see the [`image-streaming` + # sample on + # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + class Container + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Script runnable. + # @!attribute [rw] path + # @return [::String] + # The path to a script file that is accessible from the host VM(s). + # + # Unless the script file supports the default `#!/bin/sh` shell + # interpreter, you must specify an interpreter by including a + # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the + # first line of the file. For example, to execute the script using bash, + # include `#!/bin/bash` as the first line of the file. Alternatively, + # to execute the script using Python3, include `#!/usr/bin/env python3` + # as the first line of the file. + # + # Note: The following fields are mutually exclusive: `path`, `text`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text + # @return [::String] + # The text for a script. + # + # Unless the script text supports the default `#!/bin/sh` shell + # interpreter, you must specify an interpreter by including a + # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the + # beginning of the text. For example, to execute the script using bash, + # include `#!/bin/bash\n` at the beginning of the text. Alternatively, + # to execute the script using Python3, include `#!/usr/bin/env python3\n` + # at the beginning of the text. + # + # Note: The following fields are mutually exclusive: `text`, `path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Script + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A barrier runnable automatically blocks the execution of subsequent + # runnables until all the tasks in the task group reach the barrier. + # @!attribute [rw] name + # @return [::String] + # Barriers are identified by their index in runnable list. + # Names are not required, but if present should be an identifier. + class Barrier + 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 + + # Spec of a task + # @!attribute [rw] runnables + # @return [::Array<::Google::Cloud::Batch::V1::Runnable>] + # Required. The sequence of one or more runnables (executable scripts, + # executable containers, and/or barriers) for each task in this task group to + # run. Each task runs this list of runnables in order. For a task to succeed, + # all of its script and container runnables each must meet at least one of + # the following conditions: + # + # + The runnable exited with a zero status. + # + The runnable didn't finish, but you enabled its `background` subfield. + # + The runnable exited with a non-zero status, but you enabled its + # `ignore_exit_status` subfield. + # @!attribute [rw] compute_resource + # @return [::Google::Cloud::Batch::V1::ComputeResource] + # ComputeResource requirements. + # @!attribute [rw] max_run_duration + # @return [::Google::Protobuf::Duration] + # Maximum duration the task should run before being automatically retried + # (if enabled) or automatically failed. Format the value of this field + # as a time limit in seconds followed by `s`—for example, `3600s` + # for 1 hour. The field accepts any value between 0 and the maximum listed + # for the `Duration` field type at + # https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + # the actual maximum run time for a job will be limited to the maximum run + # time for a job listed at + # https://cloud.google.com/batch/quotas#max-job-duration. + # @!attribute [rw] max_retry_count + # @return [::Integer] + # Maximum number of retries on failures. + # The default, 0, which means never retry. + # The valid value range is [0, 10]. + # @!attribute [rw] lifecycle_policies + # @return [::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>] + # Lifecycle management schema when any task in a task group is failed. + # Currently we only support one lifecycle policy. + # When the lifecycle policy condition is met, + # the action in the policy will execute. + # If task execution result does not meet with the defined lifecycle + # policy, we consider it as the default policy. + # Default policy means if the exit code is 0, exit task. + # If task ends with non-zero exit code, retry the task with max_retry_count. + # @!attribute [rw] environments + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Map{::String => ::String}] + # Deprecated: please use environment(non-plural) instead. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::Batch::V1::Volume>] + # Volumes to mount before running Tasks using this TaskSpec. + # @!attribute [rw] environment + # @return [::Google::Cloud::Batch::V1::Environment] + # Environment variables to set before running the Task. + class TaskSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class EnvironmentsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # LifecyclePolicy describes how to deal with task failures + # based on different conditions. + # @!attribute [rw] action + # @return [::Google::Cloud::Batch::V1::LifecyclePolicy::Action] + # Action to execute when ActionCondition is true. + # When RETRY_TASK is specified, we will retry failed tasks + # if we notice any exit code match and fail tasks if no match is found. + # Likewise, when FAIL_TASK is specified, we will fail tasks + # if we notice any exit code match and retry tasks if no match is found. + # @!attribute [rw] action_condition + # @return [::Google::Cloud::Batch::V1::LifecyclePolicy::ActionCondition] + # Conditions that decide why a task failure is dealt with a specific action. + class LifecyclePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Conditions for actions to deal with task failures. + # @!attribute [rw] exit_codes + # @return [::Array<::Integer>] + # Exit codes of a task execution. + # If there are more than 1 exit codes, + # when task executes with any of the exit code in the list, + # the condition is met and the action will be executed. + class ActionCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action on task failures based on different conditions. + module Action + # Action unspecified. + ACTION_UNSPECIFIED = 0 + + # Action that tasks in the group will be scheduled to re-execute. + RETRY_TASK = 1 + + # Action that tasks in the group will be stopped immediately. + FAIL_TASK = 2 + end + end + + # A Cloud Batch task. + # @!attribute [rw] name + # @return [::String] + # Task name. + # The name is generated from the parent TaskGroup name and 'id' field. + # For example: + # "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + # @!attribute [rw] status + # @return [::Google::Cloud::Batch::V1::TaskStatus] + # Task Status. + class Task + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An Environment describes a collection of environment variables to set when + # executing Tasks. + # @!attribute [rw] variables + # @return [::Google::Protobuf::Map{::String => ::String}] + # A map of environment variable names to values. + # @!attribute [rw] secret_variables + # @return [::Google::Protobuf::Map{::String => ::String}] + # A map of environment variable names to Secret Manager secret names. + # The VM will access the named secrets to set the value of each environment + # variable. + # @!attribute [rw] encrypted_variables + # @return [::Google::Cloud::Batch::V1::Environment::KMSEnvMap] + # An encrypted JSON dictionary where the key/value pairs correspond to + # environment variable names and their values. + class Environment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key_name + # @return [::String] + # The name of the KMS key that will be used to decrypt the cipher text. + # @!attribute [rw] cipher_text + # @return [::String] + # The value of the cipherText response from the `encrypt` method. + class KMSEnvMap + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class VariablesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class SecretVariablesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb new file mode 100644 index 000000000000..5c9f7a233fea --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.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 Batch + module V1 + # Volume describes a volume and parameters for it to be mounted to a VM. + # @!attribute [rw] nfs + # @return [::Google::Cloud::Batch::V1::NFS] + # A Network File System (NFS) volume. For example, a + # Filestore file share. + # + # Note: The following fields are mutually exclusive: `nfs`, `gcs`, `device_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs + # @return [::Google::Cloud::Batch::V1::GCS] + # A Google Cloud Storage (GCS) volume. + # + # Note: The following fields are mutually exclusive: `gcs`, `nfs`, `device_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] device_name + # @return [::String] + # Device name of an attached disk volume, which should align with a + # device_name specified by + # job.allocation_policy.instances[0].policy.disks[i].device_name or + # defined by the given instance template in + # job.allocation_policy.instances[0].instance_template. + # + # Note: The following fields are mutually exclusive: `device_name`, `nfs`, `gcs`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mount_path + # @return [::String] + # The mount path for the volume, e.g. /mnt/disks/share. + # @!attribute [rw] mount_options + # @return [::Array<::String>] + # Mount options vary based on the type of storage volume: + # + # * For a Cloud Storage bucket, all the mount options provided + # by + # the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) + # are supported. + # * For an existing persistent disk, all mount options provided by the + # [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) + # except writing are supported. This is due to restrictions of + # [multi-writer + # mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + # * For any other disk or a Network File System (NFS), all the + # mount options provided by the `mount` command are supported. + class Volume + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an NFS volume. + # @!attribute [rw] server + # @return [::String] + # The IP address of the NFS. + # @!attribute [rw] remote_path + # @return [::String] + # Remote source path exported from the NFS, e.g., "/share". + class NFS + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Google Cloud Storage volume. + # @!attribute [rw] remote_path + # @return [::String] + # Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + # bucket_name, bucket_name/subdirectory/ + class GCS + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile new file mode 100644 index 000000000000..da55e968f9ea --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-batch-v1", path: "../" +else + gem "google-cloud-batch-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-batch-v1/snippets/batch_service/cancel_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb new file mode 100644 index 000000000000..4025c81c42d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.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 batch_v1_generated_BatchService_CancelJob_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the cancel_job call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#cancel_job. +# +def cancel_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::CancelJobRequest.new + + # Call the cancel_job method. + result = client.cancel_job request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END batch_v1_generated_BatchService_CancelJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb new file mode 100644 index 000000000000..2c18c23c163e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_BatchService_CreateJob_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the create_job call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#create_job. +# +def create_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::CreateJobRequest.new + + # Call the create_job method. + result = client.create_job request + + # The returned object is of type Google::Cloud::Batch::V1::Job. + p result +end +# [END batch_v1_generated_BatchService_CreateJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb new file mode 100644 index 000000000000..a4dac580732e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.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 batch_v1_generated_BatchService_DeleteJob_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the delete_job call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#delete_job. +# +def delete_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::DeleteJobRequest.new + + # Call the delete_job method. + result = client.delete_job request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END batch_v1_generated_BatchService_DeleteJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb new file mode 100644 index 000000000000..51b591988ead --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_BatchService_GetJob_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the get_job call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#get_job. +# +def get_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::GetJobRequest.new + + # Call the get_job method. + result = client.get_job request + + # The returned object is of type Google::Cloud::Batch::V1::Job. + p result +end +# [END batch_v1_generated_BatchService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb new file mode 100644 index 000000000000..fb681197281e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_BatchService_GetTask_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the get_task call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#get_task. +# +def get_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::GetTaskRequest.new + + # Call the get_task method. + result = client.get_task request + + # The returned object is of type Google::Cloud::Batch::V1::Task. + p result +end +# [END batch_v1_generated_BatchService_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb new file mode 100644 index 000000000000..27e5f50995a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.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 batch_v1_generated_BatchService_ListJobs_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the list_jobs call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#list_jobs. +# +def list_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::ListJobsRequest.new + + # Call the list_jobs method. + result = client.list_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Batch::V1::Job. + p item + end +end +# [END batch_v1_generated_BatchService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb new file mode 100644 index 000000000000..a94c440293e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.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 batch_v1_generated_BatchService_ListTasks_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the list_tasks call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#list_tasks. +# +def list_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::ListTasksRequest.new + + # Call the list_tasks method. + result = client.list_tasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Batch::V1::Task. + p item + end +end +# [END batch_v1_generated_BatchService_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb new file mode 100644 index 000000000000..1ad5b84a516b --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/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 batch_v1_generated_IAMPolicy_GetIamPolicy_sync] +require "google/iam/v1" + +## +# Snippet for the get_iam_policy call in the IAMPolicy service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V1::IAMPolicy::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V1::IAMPolicy::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 batch_v1_generated_IAMPolicy_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb new file mode 100644 index 000000000000..7fb1c919b8da --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/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 batch_v1_generated_IAMPolicy_SetIamPolicy_sync] +require "google/iam/v1" + +## +# Snippet for the set_iam_policy call in the IAMPolicy service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V1::IAMPolicy::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V1::IAMPolicy::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 batch_v1_generated_IAMPolicy_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb new file mode 100644 index 000000000000..722df828728f --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/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 batch_v1_generated_IAMPolicy_TestIamPermissions_sync] +require "google/iam/v1" + +## +# Snippet for the test_iam_permissions call in the IAMPolicy service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V1::IAMPolicy::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V1::IAMPolicy::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 batch_v1_generated_IAMPolicy_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json new file mode 100644 index 000000000000..53f2a1c4992e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-cloud-batch-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.batch.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "batch_v1_generated_BatchService_CreateJob_sync", + "title": "Snippet for the create_job call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#create_job.", + "file": "batch_service/create_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_job", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#create_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::CreateJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Batch::V1::Job", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "CreateJob", + "full_name": "google.cloud.batch.v1.BatchService.CreateJob", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_GetJob_sync", + "title": "Snippet for the get_job call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#get_job.", + "file": "batch_service/get_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_job", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#get_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::GetJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Batch::V1::Job", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "GetJob", + "full_name": "google.cloud.batch.v1.BatchService.GetJob", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_DeleteJob_sync", + "title": "Snippet for the delete_job call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#delete_job.", + "file": "batch_service/delete_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_job", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#delete_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::DeleteJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "DeleteJob", + "full_name": "google.cloud.batch.v1.BatchService.DeleteJob", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_CancelJob_sync", + "title": "Snippet for the cancel_job call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#cancel_job.", + "file": "batch_service/cancel_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_job", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#cancel_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::CancelJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "CancelJob", + "full_name": "google.cloud.batch.v1.BatchService.CancelJob", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_ListJobs_sync", + "title": "Snippet for the list_jobs call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#list_jobs.", + "file": "batch_service/list_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_jobs", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#list_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::ListJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Batch::V1::ListJobsResponse", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "ListJobs", + "full_name": "google.cloud.batch.v1.BatchService.ListJobs", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_GetTask_sync", + "title": "Snippet for the get_task call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#get_task.", + "file": "batch_service/get_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#get_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::GetTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Batch::V1::Task", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "GetTask", + "full_name": "google.cloud.batch.v1.BatchService.GetTask", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_ListTasks_sync", + "title": "Snippet for the list_tasks call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#list_tasks.", + "file": "batch_service/list_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tasks", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#list_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::ListTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Batch::V1::ListTasksResponse", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "ListTasks", + "full_name": "google.cloud.batch.v1.BatchService.ListTasks", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "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-batch-v1/snippets/snippet_metadata_google.iam.v1.json b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json new file mode 100644 index 000000000000..8e7486b5b5d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-cloud-batch-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.iam.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "batch_v1_generated_IAMPolicy_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the IAMPolicy service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#set_iam_policy.", + "file": "iam_policy/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Iam::V1::IAMPolicy::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "IAMPolicy::Client", + "full_name": "::Google::Iam::V1::IAMPolicy::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.iam.v1.IAMPolicy.SetIamPolicy", + "service": { + "short_name": "IAMPolicy", + "full_name": "google.iam.v1.IAMPolicy" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_IAMPolicy_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the IAMPolicy service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#get_iam_policy.", + "file": "iam_policy/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Iam::V1::IAMPolicy::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "IAMPolicy::Client", + "full_name": "::Google::Iam::V1::IAMPolicy::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.iam.v1.IAMPolicy.GetIamPolicy", + "service": { + "short_name": "IAMPolicy", + "full_name": "google.iam.v1.IAMPolicy" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_IAMPolicy_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the IAMPolicy service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#test_iam_permissions.", + "file": "iam_policy/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Iam::V1::IAMPolicy::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "IAMPolicy::Client", + "full_name": "::Google::Iam::V1::IAMPolicy::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.iam.v1.IAMPolicy.TestIamPermissions", + "service": { + "short_name": "IAMPolicy", + "full_name": "google.iam.v1.IAMPolicy" + } + } + }, + "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-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb new file mode 100644 index 000000000000..a030912c842e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_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/batch/v1/batch_pb" +require "google/cloud/batch/v1/batch_services_pb" +require "google/cloud/batch/v1/batch_service" + +class ::Google::Cloud::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb new file mode 100644 index 000000000000..094400644c40 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/batch/v1/batch_service" + +class ::Google::Cloud::Batch::V1::BatchService::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_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::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.job_path project: "value0", location: "value1", job: "value2" + assert_equal "projects/value0/locations/value1/jobs/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::Batch::V1::BatchService::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_task_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_path project: "value0", location: "value1", job: "value2", task_group: "value3", task: "value4" + assert_equal "projects/value0/locations/value1/jobs/value2/taskGroups/value3/tasks/value4", path + end + end + + def test_task_group_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_group_path project: "value0", location: "value1", job: "value2", task_group: "value3" + assert_equal "projects/value0/locations/value1/jobs/value2/taskGroups/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb new file mode 100644 index 000000000000..12a63083daf3 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb @@ -0,0 +1,490 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/batch/v1/batch_pb" +require "google/cloud/batch/v1/batch_service/rest" + + +class ::Google::Cloud::Batch::V1::BatchService::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_job + # Create test objects. + client_result = ::Google::Cloud::Batch::V1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job_id = "hello world" + job = {} + request_id = "hello world" + + create_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_create_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_job_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_job parent: parent, job_id: job_id, job: job, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_job ::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_job(::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_job_client_stub.call_count + end + end + end + + def test_get_job + # Create test objects. + client_result = ::Google::Cloud::Batch::V1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_job_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_job ::Google::Cloud::Batch::V1::GetJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_job(::Google::Cloud::Batch::V1::GetJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_count + end + end + end + + def test_delete_job + # Create test objects. + 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" + reason = "hello world" + request_id = "hello world" + + delete_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_delete_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_job_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_job({ name: name, reason: reason, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_job name: name, reason: reason, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_job ::Google::Cloud::Batch::V1::DeleteJobRequest.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.delete_job({ 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.delete_job(::Google::Cloud::Batch::V1::DeleteJobRequest.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, delete_job_client_stub.call_count + end + end + end + + def test_cancel_job + # Create test objects. + 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" + + cancel_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_cancel_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_job_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.cancel_job({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.cancel_job name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.cancel_job ::Google::Cloud::Batch::V1::CancelJobRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.cancel_job({ 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.cancel_job(::Google::Cloud::Batch::V1::CancelJobRequest.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, cancel_job_client_stub.call_count + end + end + end + + def test_list_jobs + # Create test objects. + client_result = ::Google::Cloud::Batch::V1::ListJobsResponse.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" + page_size = 42 + page_token = "hello world" + + list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_jobs parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_jobs ::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, 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_jobs({ parent: parent, filter: filter, order_by: order_by, 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_jobs(::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, 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_jobs_client_stub.call_count + end + end + end + + def test_get_task + # Create test objects. + client_result = ::Google::Cloud::Batch::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_task ::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_task(::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_count + end + end + end + + def test_list_tasks + # Create test objects. + client_result = ::Google::Cloud::Batch::V1::ListTasksResponse.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_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_tasks({ 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_tasks 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_tasks ::Google::Cloud::Batch::V1::ListTasksRequest.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_tasks({ 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_tasks(::Google::Cloud::Batch::V1::ListTasksRequest.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_tasks_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::Batch::V1::BatchService::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::Batch::V1::BatchService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb new file mode 100644 index 000000000000..e1a4d725a308 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb @@ -0,0 +1,570 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/batch/v1/batch_pb" +require "google/cloud/batch/v1/batch_service" + +class ::Google::Cloud::Batch::V1::BatchService::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_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Batch::V1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job_id = "hello world" + job = {} + request_id = "hello world" + + create_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_job, name + assert_kind_of ::Google::Cloud::Batch::V1::CreateJobRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["job_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Batch::V1::Job), request["job"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_job_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_job parent: parent, job_id: job_id, job: job, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_job ::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, 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_job({ parent: parent, job_id: job_id, job: job, 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_job(::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, 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_job_client_stub.call_rpc_count + end + end + + def test_get_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Batch::V1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_job, name + assert_kind_of ::Google::Cloud::Batch::V1::GetJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_job_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_job ::Google::Cloud::Batch::V1::GetJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_job({ 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_job(::Google::Cloud::Batch::V1::GetJobRequest.new(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_job_client_stub.call_rpc_count + end + end + + def test_delete_job + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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 = "hello world" + request_id = "hello world" + + delete_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_job, name + assert_kind_of ::Google::Cloud::Batch::V1::DeleteJobRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["reason"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_job_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_job({ name: name, reason: reason, 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_job name: name, reason: reason, 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_job ::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, 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_job({ name: name, reason: reason, 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_job(::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, 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_job_client_stub.call_rpc_count + end + end + + def test_cancel_job + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + cancel_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_job, name + assert_kind_of ::Google::Cloud::Batch::V1::CancelJobRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_job_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_job({ 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.cancel_job 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.cancel_job ::Google::Cloud::Batch::V1::CancelJobRequest.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.cancel_job({ 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.cancel_job(::Google::Cloud::Batch::V1::CancelJobRequest.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, cancel_job_client_stub.call_rpc_count + end + end + + def test_list_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Batch::V1::ListJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + page_size = 42 + page_token = "hello world" + + list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_jobs, name + assert_kind_of ::Google::Cloud::Batch::V1::ListJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_jobs_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: 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_jobs parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: 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_jobs ::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: 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_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_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_jobs(::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_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_jobs_client_stub.call_rpc_count + end + end + + def test_get_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Batch::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task, name + assert_kind_of ::Google::Cloud::Batch::V1::GetTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_task({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_task name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_task ::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_task({ 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_task(::Google::Cloud::Batch::V1::GetTaskRequest.new(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_task_client_stub.call_rpc_count + end + end + + def test_list_tasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Batch::V1::ListTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tasks, name + assert_kind_of ::Google::Cloud::Batch::V1::ListTasksRequest, 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_tasks_client_stub do + # Create client + c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_tasks({ 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_tasks 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_tasks ::Google::Cloud::Batch::V1::ListTasksRequest.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_tasks({ 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_tasks(::Google::Cloud::Batch::V1::ListTasksRequest.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_tasks_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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Batch::V1::BatchService::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::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb new file mode 100644 index 000000000000..d00eb93071e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/iam/v1/iam_policy_pb" +require "google/iam/v1/iam_policy/rest" + + +class ::Google::Iam::V1::IAMPolicy::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_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::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb new file mode 100644 index 000000000000..86b551f1cfd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/iam/v1/iam_policy_pb" +require "google/iam/v1/iam_policy" + +class ::Google::Iam::V1::IAMPolicy::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_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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V1::IAMPolicy::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/helper.rb b/owl-bot-staging/google-cloud-batch-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-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-beyond_corp-app_connections-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json new file mode 100644 index 000000000000..b59fbd964684 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "beyondcorp.googleapis.com", + "api_shortname": "beyondcorp", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connections-v1/latest", + "distribution_name": "google-cloud-beyond_corp-app_connections-v1", + "is_cloud": true, + "language": "ruby", + "name": "beyondcorp", + "name_pretty": "BeyondCorp AppConnections V1 API", + "product_documentation": "https://cloud.google.com/beyondcorp/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connections-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml new file mode 100644 index 000000000000..9a0f1608e53e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts new file mode 100644 index 000000000000..d57ef993f75d --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BeyondCorp AppConnections 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-beyond_corp-app_connections-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..5fb552e9ca72 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-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/beyond_corp/app_connections/v1" + +client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/beyond_corp/app_connections/v1" + +::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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-beyond_corp-app_connections-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/beyond_corp/app_connections/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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-beyond_corp-app_connections-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md new file mode 100644 index 000000000000..7b29871dfed5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the BeyondCorp AppConnections V1 API + +Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BeyondCorp AppConnections V1 API. Most users should consider using +the main client gem, +[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-beyond_corp-app_connections-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/beyondcorp.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/beyond_corp/app_connections/v1" + +client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new +request = ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new # (request fields as keyword arguments...) +response = client.list_app_connections request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connections-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/beyondcorp/) +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/beyond_corp/app_connections/v1" +require "logger" + +client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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-beyond_corp`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-beyond_corp-app_connections-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-beyond_corp`. +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-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile new file mode 100644 index 000000000000..31baa9b2971f --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-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/beyond_corp/app_connections/v1/app_connections_service/credentials" + ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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-beyond_corp-app_connections-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-beyond_corp-app_connections-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-beyond_corp-app_connections-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-beyond_corp-app_connections-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-beyond_corp-app_connections-v1" + header "google-cloud-beyond_corp-app_connections-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-beyond_corp-app_connections-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-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-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json new file mode 100644 index 000000000000..525a196a960a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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.beyondcorp.appconnections.v1", + "libraryPackage": "::Google::Cloud::BeyondCorp::AppConnections::V1", + "services": { + "AppConnectionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client", + "rpcs": { + "ListAppConnections": { + "methods": [ + "list_app_connections" + ] + }, + "GetAppConnection": { + "methods": [ + "get_app_connection" + ] + }, + "CreateAppConnection": { + "methods": [ + "create_app_connection" + ] + }, + "UpdateAppConnection": { + "methods": [ + "update_app_connection" + ] + }, + "DeleteAppConnection": { + "methods": [ + "delete_app_connection" + ] + }, + "ResolveAppConnections": { + "methods": [ + "resolve_app_connections" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec new file mode 100644 index 000000000000..8a9fae867038 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/beyond_corp/app_connections/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-beyond_corp-app_connections-v1" + gem.version = Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connections-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." + gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." + 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-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb new file mode 100644 index 000000000000..1ac7623cc398 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-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/beyond_corp/app_connections/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb new file mode 100644 index 000000000000..bcc50c2b3a0a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" +require "google/cloud/beyond_corp/app_connections/v1/version" + +module Google + module Cloud + module BeyondCorp + module AppConnections + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_connections/v1" + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/beyond_corp/app_connections/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb new file mode 100644 index 000000000000..41f69b3c5f7e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.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! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/beyond_corp/app_connections/v1/version" + +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/client" + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + ## + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectionsService exposes the following resources: + # + # * AppConnections, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. + # + # The AppConnectionsService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnections. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + module AppConnectionsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "app_connections_service", "helpers.rb" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb new file mode 100644 index 000000000000..ae05eeca3f7e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb @@ -0,0 +1,1143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/beyondcorp/appconnections/v1/app_connections_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + module AppConnectionsService + ## + # Client for the AppConnectionsService service. + # + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectionsService exposes the following resources: + # + # * AppConnections, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. + # + # The AppConnectionsService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnections. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_connections_service_stub + + ## + # Configure the AppConnectionsService Client class. + # + # See {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppConnectionsService clients + # ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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", "BeyondCorp", "AppConnections", "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 AppConnectionsService 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::BeyondCorp::AppConnections::V1::AppConnectionsService::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 + @app_connections_service_stub.universe_domain + end + + ## + # Create a new AppConnectionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppConnectionsService 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/beyondcorp/appconnections/v1/app_connections_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 + + @app_connections_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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 + ) + + @app_connections_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 = @app_connections_service_stub.endpoint + config.universe_domain = @app_connections_service_stub.universe_domain + config.logger = @app_connections_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 = @app_connections_service_stub.endpoint + config.universe_domain = @app_connections_service_stub.universe_domain + config.logger = @app_connections_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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 + @app_connections_service_stub.logger + end + + # Service calls + + ## + # Lists AppConnections in a given project and location. + # + # @overload list_app_connections(request, options = nil) + # Pass arguments to `list_app_connections` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_app_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_app_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AppConnection location using the form: + # `projects/{project_id}/locations/{location_id}` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous + # ListAppConnectionsRequest, if any. + # @param filter [::String] + # Optional. A filter specifying constraints of a list operation. + # @param order_by [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new + # + # # Call the list_app_connections method. + # result = client.list_app_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. + # p item + # end + # + def list_app_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_app_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_app_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_app_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :list_app_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_connections_service_stub, :list_app_connections, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AppConnection. + # + # @overload get_app_connection(request, options = nil) + # Pass arguments to `get_app_connection` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_app_connection(name: nil) + # Pass arguments to `get_app_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp AppConnection name using the form: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new + # + # # Call the get_app_connection method. + # result = client.get_app_connection request + # + # # The returned object is of type Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. + # p result + # + def get_app_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_app_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_app_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_app_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :get_app_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new AppConnection in a given project and location. + # + # @overload create_app_connection(request, options = nil) + # Pass arguments to `create_app_connection` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_app_connection(parent: nil, app_connection_id: nil, app_connection: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_app_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource project name of the AppConnection location using the + # form: `projects/{project_id}/locations/{location_id}` + # @param app_connection_id [::String] + # Optional. User-settable AppConnection resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @param app_connection [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash] + # Required. A BeyondCorp AppConnection 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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new + # + # # Call the create_app_connection method. + # result = client.create_app_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_app_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest + + # Converts hash and nil to 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_app_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_app_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_app_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :create_app_connection, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AppConnection. + # + # @overload update_app_connection(request, options = nil) + # Pass arguments to `update_app_connection` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_app_connection(update_mask: nil, app_connection: nil, request_id: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_app_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. The elements of the repeated paths field may only include these + # fields from [BeyondCorp.AppConnection]: + # * `labels` + # * `display_name` + # * `application_endpoint` + # * `connectors` + # @param app_connection [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash] + # Required. AppConnection message with updated fields. Only supported fields + # specified in update_mask are updated. + # @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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # @param allow_missing [::Boolean] + # Optional. If set as true, will create the resource if it is not found. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new + # + # # Call the update_app_connection method. + # result = client.update_app_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_app_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest + + # Converts hash and nil to 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_app_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.app_connection&.name + header_params["app_connection.name"] = request.app_connection.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_app_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_app_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :update_app_connection, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AppConnection. + # + # @overload delete_app_connection(request, options = nil) + # Pass arguments to `delete_app_connection` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_app_connection(name: nil, request_id: nil, validate_only: nil) + # Pass arguments to `delete_app_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp Connector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + # @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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new + # + # # Call the delete_app_connection method. + # result = client.delete_app_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_app_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest + + # Converts hash and nil to 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_app_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_app_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_app_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :delete_app_connection, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resolves AppConnections details for a given AppConnector. + # An internal method called by a connector to find AppConnections to connect + # to. + # + # @overload resolve_app_connections(request, options = nil) + # Pass arguments to `resolve_app_connections` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app_connections(parent: nil, app_connector_id: nil, page_size: nil, page_token: nil) + # Pass arguments to `resolve_app_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AppConnection location using the form: + # `projects/{project_id}/locations/{location_id}` + # @param app_connector_id [::String] + # Required. BeyondCorp Connector name of the connector associated with those + # AppConnections using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous + # ResolveAppConnectionsResponse, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new + # + # # Call the resolve_app_connections method. + # result = client.resolve_app_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails. + # p item + # end + # + def resolve_app_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest + + # Converts hash and nil to 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_app_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_app_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resolve_app_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :resolve_app_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_connections_service_stub, :resolve_app_connections, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AppConnectionsService API. + # + # This class represents the configuration for AppConnectionsService, + # providing control 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::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_app_connections to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_connections.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_connections.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::BeyondCorp::AppConnections::V1::AppConnectionsService::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 = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::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 AppConnectionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_app_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_app_connections + ## + # RPC-specific configuration for `get_app_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_app_connection + ## + # RPC-specific configuration for `create_app_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_app_connection + ## + # RPC-specific configuration for `update_app_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :update_app_connection + ## + # RPC-specific configuration for `delete_app_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_app_connection + ## + # RPC-specific configuration for `resolve_app_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_app_connections + + # @private + def initialize parent_rpcs = nil + list_app_connections_config = parent_rpcs.list_app_connections if parent_rpcs.respond_to? :list_app_connections + @list_app_connections = ::Gapic::Config::Method.new list_app_connections_config + get_app_connection_config = parent_rpcs.get_app_connection if parent_rpcs.respond_to? :get_app_connection + @get_app_connection = ::Gapic::Config::Method.new get_app_connection_config + create_app_connection_config = parent_rpcs.create_app_connection if parent_rpcs.respond_to? :create_app_connection + @create_app_connection = ::Gapic::Config::Method.new create_app_connection_config + update_app_connection_config = parent_rpcs.update_app_connection if parent_rpcs.respond_to? :update_app_connection + @update_app_connection = ::Gapic::Config::Method.new update_app_connection_config + delete_app_connection_config = parent_rpcs.delete_app_connection if parent_rpcs.respond_to? :delete_app_connection + @delete_app_connection = ::Gapic::Config::Method.new delete_app_connection_config + resolve_app_connections_config = parent_rpcs.resolve_app_connections if parent_rpcs.respond_to? :resolve_app_connections + @resolve_app_connections = ::Gapic::Config::Method.new resolve_app_connections_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb new file mode 100644 index 000000000000..d8c727b63578 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + module AppConnectionsService + # Credentials for the AppConnectionsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb new file mode 100644 index 000000000000..b87df03b9fef --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_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 BeyondCorp + module AppConnections + module V1 + module AppConnectionsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppConnectionsService 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 AppConnectionsService 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::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::BeyondCorp::AppConnections::V1::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 = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::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-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb new file mode 100644 index 000000000000..52ef4c16714c --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + module AppConnectionsService + # Path helper methods for the AppConnectionsService API. + module Paths + ## + # Create a fully-qualified AppConnection resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/appConnections/{app_connection}` + # + # @param project [String] + # @param location [String] + # @param app_connection [String] + # + # @return [::String] + def app_connection_path project:, location:, app_connection: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/appConnections/#{app_connection}" + end + + ## + # Create a fully-qualified AppConnector resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/appConnectors/{app_connector}` + # + # @param project [String] + # @param location [String] + # @param app_connector [String] + # + # @return [::String] + def app_connector_path project:, location:, app_connector: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/appConnectors/#{app_connector}" + end + + ## + # Create a fully-qualified AppGateway resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/appGateways/{app_gateway}` + # + # @param project [String] + # @param location [String] + # @param app_gateway [String] + # + # @return [::String] + def app_gateway_path project:, location:, app_gateway: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/appGateways/#{app_gateway}" + 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-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb new file mode 100644 index 000000000000..182a98d114a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/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 BeyondCorp + module AppConnections + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb new file mode 100644 index 000000000000..1446e9c3fde5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/appconnections/v1/app_connections_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/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nGgoogle/cloud/beyondcorp/appconnections/v1/app_connections_service.proto\x12)google.cloud.beyondcorp.appconnections.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 google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x01\n\x19ListAppConnectionsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\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\"\x9d\x01\n\x1aListAppConnectionsResponse\x12Q\n\x0f\x61pp_connections\x18\x01 \x03(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x17GetAppConnectionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/AppConnection\"\x89\x02\n\x1a\x43reateAppConnectionRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\x12\x1e\n\x11\x61pp_connection_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x61pp_connection\x18\x03 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnectionB\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\"\xfa\x01\n\x1aUpdateAppConnectionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12U\n\x0e\x61pp_connection\x18\x02 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnectionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x90\x01\n\x1a\x44\x65leteAppConnectionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/AppConnection\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xda\x01\n\x1cResolveAppConnectionsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\x12H\n\x10\x61pp_connector_id\x18\x02 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\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\"\xcf\x02\n\x1dResolveAppConnectionsResponse\x12}\n\x16\x61pp_connection_details\x18\x01 \x03(\x0b\x32].google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\x1a\x80\x01\n\x14\x41ppConnectionDetails\x12P\n\x0e\x61pp_connection\x18\x01 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\x12\x16\n\x0erecent_mig_vms\x18\x02 \x03(\t\"\x99\n\n\rAppConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x06labels\x18\x04 \x03(\x0b\x32\x44.google.cloud.beyondcorp.appconnections.v1.AppConnection.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12P\n\x04type\x18\x07 \x01(\x0e\x32=.google.cloud.beyondcorp.appconnections.v1.AppConnection.TypeB\x03\xe0\x41\x02\x12o\n\x14\x61pplication_endpoint\x18\x08 \x01(\x0b\x32L.google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpointB\x03\xe0\x41\x02\x12\x17\n\nconnectors\x18\t \x03(\tB\x03\xe0\x41\x01\x12R\n\x05state\x18\n \x01(\x0e\x32>.google.cloud.beyondcorp.appconnections.v1.AppConnection.StateB\x03\xe0\x41\x03\x12V\n\x07gateway\x18\x0b \x01(\x0b\x32@.google.cloud.beyondcorp.appconnections.v1.AppConnection.GatewayB\x03\xe0\x41\x01\x1a;\n\x13\x41pplicationEndpoint\x12\x11\n\x04host\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\x87\x02\n\x07Gateway\x12X\n\x04type\x18\x02 \x01(\x0e\x32\x45.google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.TypeB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cingress_port\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x41\n\x0b\x61pp_gateway\x18\x05 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_REGIONAL_MIG\x10\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\r\n\tTCP_PROXY\x10\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05:u\xea\x41r\n\'beyondcorp.googleapis.com/AppConnection\x12Gprojects/{project}/locations/{location}/appConnections/{app_connection}\"\x8d\x02\n\x1e\x41ppConnectionOperationMetadata\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\xea\x0c\n\x15\x41ppConnectionsService\x12\xe6\x01\n\x12ListAppConnections\x12\x44.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest\x1a\x45.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/appConnections\x12\xd3\x01\n\x10GetAppConnection\x12\x42.google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest\x1a\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/appConnections/*}\x12\xa4\x02\n\x13\x43reateAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41/\n\rAppConnection\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\'parent,app_connection,app_connection_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/appConnections:\x0e\x61pp_connection\x12\xa6\x02\n\x13UpdateAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41/\n\rAppConnection\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\x1a\x61pp_connection,update_mask\x82\xd3\xe4\x93\x02S2A/v1/{app_connection.name=projects/*/locations/*/appConnections/*}:\x0e\x61pp_connection\x12\xf8\x01\n\x13\x44\x65leteAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x37\n\x15google.protobuf.Empty\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/appConnections/*}\x12\xf7\x01\n\x15ResolveAppConnections\x12G.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest\x1aH.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/appConnections:resolve\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8a\x04\n-com.google.cloud.beyondcorp.appconnections.v1B\x1a\x41ppConnectionsServiceProtoP\x01ZUcloud.google.com/go/beyondcorp/appconnections/apiv1/appconnectionspb;appconnectionspb\xaa\x02)Google.Cloud.BeyondCorp.AppConnections.V1\xca\x02)Google\\Cloud\\BeyondCorp\\AppConnections\\V1\xea\x02-Google::Cloud::BeyondCorp::AppConnections::V1\xea\x41o\n&beyondcorp.googleapis.com/AppConnector\x12\x45projects/{project}/locations/{location}/appConnectors/{app_connector}\xea\x41i\n$beyondcorp.googleapis.com/AppGateway\x12\x41projects/{project}/locations/{location}/appGateways/{app_gateway}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + ListAppConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest").msgclass + ListAppConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsResponse").msgclass + GetAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest").msgclass + CreateAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest").msgclass + UpdateAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest").msgclass + DeleteAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest").msgclass + ResolveAppConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest").msgclass + ResolveAppConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse").msgclass + ResolveAppConnectionsResponse::AppConnectionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails").msgclass + AppConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection").msgclass + AppConnection::ApplicationEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint").msgclass + AppConnection::Gateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway").msgclass + AppConnection::Gateway::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type").enummodule + AppConnection::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Type").enummodule + AppConnection::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.State").enummodule + AppConnectionOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnectionOperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb new file mode 100644 index 000000000000..e5383bb39ab7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb @@ -0,0 +1,72 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto for package 'Google.Cloud.BeyondCorp.AppConnections.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/beyondcorp/appconnections/v1/app_connections_service_pb' + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + module AppConnectionsService + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectionsService exposes the following resources: + # + # * AppConnections, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. + # + # The AppConnectionsService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnections. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.beyondcorp.appconnections.v1.AppConnectionsService' + + # Lists AppConnections in a given project and location. + rpc :ListAppConnections, ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse + # Gets details of a single AppConnection. + rpc :GetAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection + # Creates a new AppConnection in a given project and location. + rpc :CreateAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single AppConnection. + rpc :UpdateAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, ::Google::Longrunning::Operation + # Deletes a single AppConnection. + rpc :DeleteAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, ::Google::Longrunning::Operation + # Resolves AppConnections details for a given AppConnector. + # An internal method called by a connector to find AppConnections to connect + # to. + rpc :ResolveAppConnections, ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md new file mode 100644 index 000000000000..0a721b5b0912 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BeyondCorp AppConnections 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-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb new file mode 100644 index 000000000000..9d00efe6f19d --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb @@ -0,0 +1,411 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + # Request message for BeyondCorp.ListAppConnections. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AppConnection location using the form: + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous + # ListAppConnectionsRequest, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter specifying constraints of a list operation. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + class ListAppConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BeyondCorp.ListAppConnections. + # @!attribute [rw] app_connections + # @return [::Array<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] + # A list of BeyondCorp AppConnections in the project. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations that could not be reached. + class ListAppConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.GetAppConnection. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp AppConnection name using the form: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + class GetAppConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.CreateAppConnection. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource project name of the AppConnection location using the + # form: `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] app_connection_id + # @return [::String] + # Optional. User-settable AppConnection resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @!attribute [rw] app_connection + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] + # Required. A BeyondCorp AppConnection 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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class CreateAppConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.UpdateAppConnection. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. The elements of the repeated paths field may only include these + # fields from [BeyondCorp.AppConnection]: + # * `labels` + # * `display_name` + # * `application_endpoint` + # * `connectors` + # @!attribute [rw] app_connection + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] + # Required. AppConnection message with updated fields. Only supported fields + # specified in update_mask are updated. + # @!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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set as true, will create the resource if it is not found. + class UpdateAppConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.DeleteAppConnection. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp Connector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + # @!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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class DeleteAppConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.ResolveAppConnections. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AppConnection location using the form: + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] app_connector_id + # @return [::String] + # Required. BeyondCorp Connector name of the connector associated with those + # AppConnections using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous + # ResolveAppConnectionsResponse, if any. + class ResolveAppConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BeyondCorp.ResolveAppConnections. + # @!attribute [rw] app_connection_details + # @return [::Array<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] + # A list of BeyondCorp AppConnections with details in the project. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations that could not be reached. + class ResolveAppConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details of the AppConnection. + # @!attribute [rw] app_connection + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] + # A BeyondCorp AppConnection in the project. + # @!attribute [rw] recent_mig_vms + # @return [::Array<::String>] + # If type=GCP_REGIONAL_MIG, contains most recent VM instances, like + # `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. + class AppConnectionDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A BeyondCorp AppConnection resource represents a BeyondCorp protected + # AppConnection to a remote application. It creates all the necessary GCP + # components needed for creating a BeyondCorp protected AppConnection. Multiple + # connectors can be authorised for a single AppConnection. + # @!attribute [rw] name + # @return [::String] + # Required. Unique resource name of the AppConnection. + # The name is ignored when creating a AppConnection. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was last modified. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # @!attribute [rw] display_name + # @return [::String] + # Optional. An arbitrary user-provided name for the AppConnection. Cannot + # exceed 64 characters. + # @!attribute [r] uid + # @return [::String] + # Output only. A unique identifier for the instance generated by the + # system. + # @!attribute [rw] type + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Type] + # Required. The type of network connectivity used by the AppConnection. + # @!attribute [rw] application_endpoint + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::ApplicationEndpoint] + # Required. Address of the remote application endpoint for the BeyondCorp + # AppConnection. + # @!attribute [rw] connectors + # @return [::Array<::String>] + # Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are + # authorised to be associated with this AppConnection. + # @!attribute [r] state + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::State] + # Output only. The current state of the AppConnection. + # @!attribute [rw] gateway + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Gateway] + # Optional. Gateway used by the AppConnection. + class AppConnection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # ApplicationEndpoint represents a remote application endpoint. + # @!attribute [rw] host + # @return [::String] + # Required. Hostname or IP address of the remote application endpoint. + # @!attribute [rw] port + # @return [::Integer] + # Required. Port of the remote application endpoint. + class ApplicationEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Gateway represents a user facing component that serves as an entrance to + # enable connectivity. + # @!attribute [rw] type + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Gateway::Type] + # Required. The type of hosting used by the gateway. + # @!attribute [r] uri + # @return [::String] + # Output only. Server-defined URI for this resource. + # @!attribute [r] ingress_port + # @return [::Integer] + # Output only. Ingress port reserved on the gateways for this + # AppConnection, if not specified or zero, the default port is 19443. + # @!attribute [rw] app_gateway + # @return [::String] + # Required. AppGateway name in following format: + # `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` + class Gateway + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum listing possible gateway hosting options. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # Gateway hosted in a GCP regional managed instance group. + GCP_REGIONAL_MIG = 1 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum containing list of all possible network connectivity options + # supported by BeyondCorp AppConnection. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # TCP Proxy based BeyondCorp AppConnection. API will default to this if + # unset. + TCP_PROXY = 1 + end + + # Represents the different states of a AppConnection. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # AppConnection is being created. + CREATING = 1 + + # AppConnection has been created. + CREATED = 2 + + # AppConnection's configuration is being updated. + UPDATING = 3 + + # AppConnection is being deleted. + DELETING = 4 + + # AppConnection is down and may be restored in the future. + # This happens when CCFE sends ProjectState = OFF. + DOWN = 5 + end + 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 AppConnectionOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile new file mode 100644 index 000000000000..50af8c28bf87 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1", path: "../" +else + gem "google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb new file mode 100644 index 000000000000..b4dde20ea729 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the create_app_connection call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection. +# +def create_app_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new + + # Call the create_app_connection method. + result = client.create_app_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb new file mode 100644 index 000000000000..00ee3ec93ef7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the delete_app_connection call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection. +# +def delete_app_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new + + # Call the delete_app_connection method. + result = client.delete_app_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb new file mode 100644 index 000000000000..c7a6da25f24b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the get_app_connection call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection. +# +def get_app_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new + + # Call the get_app_connection method. + result = client.get_app_connection request + + # The returned object is of type Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. + p result +end +# [END beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb new file mode 100644 index 000000000000..89cc6f1a0e02 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the list_app_connections call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections. +# +def list_app_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new + + # Call the list_app_connections method. + result = client.list_app_connections request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. + p item + end +end +# [END beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb new file mode 100644 index 000000000000..a68f644a3648 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the resolve_app_connections call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections. +# +def resolve_app_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new + + # Call the resolve_app_connections method. + result = client.resolve_app_connections request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails. + p item + end +end +# [END beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb new file mode 100644 index 000000000000..66b87a042ff8 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the update_app_connection call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection. +# +def update_app_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new + + # Call the update_app_connection method. + result = client.update_app_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json new file mode 100644 index 000000000000..37d1445fa1d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-cloud-beyond_corp-app_connections-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.beyondcorp.appconnections.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync", + "title": "Snippet for the list_app_connections call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections.", + "file": "app_connections_service/list_app_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_app_connections", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "ListAppConnections", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ListAppConnections", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync", + "title": "Snippet for the get_app_connection call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection.", + "file": "app_connections_service/get_app_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_app_connection", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "GetAppConnection", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.GetAppConnection", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync", + "title": "Snippet for the create_app_connection call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection.", + "file": "app_connections_service/create_app_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_app_connection", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "CreateAppConnection", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.CreateAppConnection", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync", + "title": "Snippet for the update_app_connection call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection.", + "file": "app_connections_service/update_app_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_app_connection", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "UpdateAppConnection", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.UpdateAppConnection", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync", + "title": "Snippet for the delete_app_connection call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection.", + "file": "app_connections_service/delete_app_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_app_connection", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "DeleteAppConnection", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.DeleteAppConnection", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync", + "title": "Snippet for the resolve_app_connections call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections.", + "file": "app_connections_service/resolve_app_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "resolve_app_connections", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "ResolveAppConnections", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ResolveAppConnections", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "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-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb new file mode 100644 index 000000000000..117c58b9ea9e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_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/beyondcorp/appconnections/v1/app_connections_service_pb" +require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" + +class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb new file mode 100644 index 000000000000..8dbd4e5cb9e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" + +class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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_app_connection_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_connection_path project: "value0", location: "value1", app_connection: "value2" + assert_equal "projects/value0/locations/value1/appConnections/value2", path + end + end + + def test_app_connector_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_connector_path project: "value0", location: "value1", app_connector: "value2" + assert_equal "projects/value0/locations/value1/appConnectors/value2", path + end + end + + def test_app_gateway_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_gateway_path project: "value0", location: "value1", app_gateway: "value2" + assert_equal "projects/value0/locations/value1/appGateways/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::BeyondCorp::AppConnections::V1::AppConnectionsService::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-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb new file mode 100644 index 000000000000..51c9b1f4be11 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb @@ -0,0 +1,525 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/beyondcorp/appconnections/v1/app_connections_service_pb" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" + +class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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_app_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_app_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_app_connections, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, 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_app_connections_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_app_connections({ 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_app_connections 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_app_connections ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.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_app_connections({ 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_app_connections(::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.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_app_connections_client_stub.call_rpc_count + end + end + + def test_get_app_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_app_connection, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_app_connection_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_app_connection({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_app_connection name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_app_connection({ 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_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new(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_app_connection_client_stub.call_rpc_count + end + end + + def test_create_app_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + app_connection_id = "hello world" + app_connection = {} + request_id = "hello world" + validate_only = true + + create_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_app_connection, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["app_connection_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection), request["app_connection"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_app_connection_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_app_connection({ parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_app_connection parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new(parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_app_connection({ parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new(parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_app_connection_client_stub.call_rpc_count + end + end + + def test_update_app_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + app_connection = {} + request_id = "hello world" + validate_only = true + allow_missing = true + + update_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_app_connection, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection), request["app_connection"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_app_connection_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_app_connection({ update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, 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.update_app_connection update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, 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.update_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new(update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, 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.update_app_connection({ update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, 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.update_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new(update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, 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, update_app_connection_client_stub.call_rpc_count + end + end + + def test_delete_app_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + + delete_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_app_connection, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_app_connection_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_app_connection({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_app_connection name: name, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_app_connection({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_app_connection_client_stub.call_rpc_count + end + end + + def test_resolve_app_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + app_connector_id = "hello world" + page_size = 42 + page_token = "hello world" + + resolve_app_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resolve_app_connections, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["app_connector_id"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resolve_app_connections_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.resolve_app_connections({ parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.resolve_app_connections parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.resolve_app_connections ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new(parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.resolve_app_connections({ parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.resolve_app_connections(::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new(parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resolve_app_connections_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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connectors-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json new file mode 100644 index 000000000000..8737a08b2ed0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "beyondcorp.googleapis.com", + "api_shortname": "beyondcorp", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connectors-v1/latest", + "distribution_name": "google-cloud-beyond_corp-app_connectors-v1", + "is_cloud": true, + "language": "ruby", + "name": "beyondcorp", + "name_pretty": "BeyondCorp AppConnectors V1 API", + "product_documentation": "https://cloud.google.com/beyondcorp/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connectors-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml new file mode 100644 index 000000000000..7c746abab61f --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts new file mode 100644 index 000000000000..1b1ee4a36299 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BeyondCorp AppConnectors 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-beyond_corp-app_connectors-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..4252892c67b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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/beyond_corp/app_connectors/v1" + +client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/beyond_corp/app_connectors/v1" + +::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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-beyond_corp-app_connectors-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/beyond_corp/app_connectors/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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-beyond_corp-app_connectors-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md new file mode 100644 index 000000000000..6ff15b55eefb --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the BeyondCorp AppConnectors V1 API + +Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BeyondCorp AppConnectors V1 API. Most users should consider using +the main client gem, +[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-beyond_corp-app_connectors-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/beyondcorp.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/beyond_corp/app_connectors/v1" + +client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new +request = ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new # (request fields as keyword arguments...) +response = client.list_app_connectors request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connectors-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/beyondcorp/) +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/beyond_corp/app_connectors/v1" +require "logger" + +client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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-beyond_corp`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-beyond_corp-app_connectors-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-beyond_corp`. +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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile new file mode 100644 index 000000000000..73cfd1f9a5c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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/beyond_corp/app_connectors/v1/app_connectors_service/credentials" + ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-beyond_corp-app_connectors-v1" + header "google-cloud-beyond_corp-app_connectors-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-beyond_corp-app_connectors-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json new file mode 100644 index 000000000000..d617a8d7418e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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.beyondcorp.appconnectors.v1", + "libraryPackage": "::Google::Cloud::BeyondCorp::AppConnectors::V1", + "services": { + "AppConnectorsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client", + "rpcs": { + "ListAppConnectors": { + "methods": [ + "list_app_connectors" + ] + }, + "GetAppConnector": { + "methods": [ + "get_app_connector" + ] + }, + "CreateAppConnector": { + "methods": [ + "create_app_connector" + ] + }, + "UpdateAppConnector": { + "methods": [ + "update_app_connector" + ] + }, + "DeleteAppConnector": { + "methods": [ + "delete_app_connector" + ] + }, + "ReportStatus": { + "methods": [ + "report_status" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec new file mode 100644 index 000000000000..08ec4fe60325 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/beyond_corp/app_connectors/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-beyond_corp-app_connectors-v1" + gem.version = Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connectors-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." + gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." + 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-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb new file mode 100644 index 000000000000..d557f7c0d50f --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-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/beyond_corp/app_connectors/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb new file mode 100644 index 000000000000..96a31864e164 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" +require "google/cloud/beyond_corp/app_connectors/v1/version" + +module Google + module Cloud + module BeyondCorp + module AppConnectors + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_connectors/v1" + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/beyond_corp/app_connectors/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb new file mode 100644 index 000000000000..e9d2c90330e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.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! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/beyond_corp/app_connectors/v1/version" + +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client" + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + ## + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectorsService exposes the following resource: + # + # * AppConnectors, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. + # + # The AppConnectorsService provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnectors. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + module AppConnectorsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "app_connectors_service", "helpers.rb" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb new file mode 100644 index 000000000000..ce6660869d98 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb @@ -0,0 +1,1146 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + module AppConnectorsService + ## + # Client for the AppConnectorsService service. + # + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectorsService exposes the following resource: + # + # * AppConnectors, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. + # + # The AppConnectorsService provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnectors. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_connectors_service_stub + + ## + # Configure the AppConnectorsService Client class. + # + # See {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppConnectorsService clients + # ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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", "BeyondCorp", "AppConnectors", "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 AppConnectorsService 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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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 + @app_connectors_service_stub.universe_domain + end + + ## + # Create a new AppConnectorsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppConnectorsService 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/beyondcorp/appconnectors/v1/app_connectors_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 + + @app_connectors_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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 + ) + + @app_connectors_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 = @app_connectors_service_stub.endpoint + config.universe_domain = @app_connectors_service_stub.universe_domain + config.logger = @app_connectors_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 = @app_connectors_service_stub.endpoint + config.universe_domain = @app_connectors_service_stub.universe_domain + config.logger = @app_connectors_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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 + @app_connectors_service_stub.logger + end + + # Service calls + + ## + # Lists AppConnectors in a given project and location. + # + # @overload list_app_connectors(request, options = nil) + # Pass arguments to `list_app_connectors` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_app_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_app_connectors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 AppConnector location using the form: + # `projects/{project_id}/locations/{location_id}` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous + # ListAppConnectorsRequest, if any. + # @param filter [::String] + # Optional. A filter specifying constraints of a list operation. + # @param order_by [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new + # + # # Call the list_app_connectors method. + # result = client.list_app_connectors request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. + # p item + # end + # + def list_app_connectors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_app_connectors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_app_connectors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_app_connectors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :list_app_connectors, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_connectors_service_stub, :list_app_connectors, request, response, 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 AppConnector. + # + # @overload get_app_connector(request, options = nil) + # Pass arguments to `get_app_connector` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_app_connector(name: nil) + # Pass arguments to `get_app_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp AppConnector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new + # + # # Call the get_app_connector method. + # result = client.get_app_connector request + # + # # The returned object is of type Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. + # p result + # + def get_app_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_app_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_app_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_app_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :get_app_connector, request, 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 AppConnector in a given project and location. + # + # @overload create_app_connector(request, options = nil) + # Pass arguments to `create_app_connector` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_app_connector(parent: nil, app_connector_id: nil, app_connector: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_app_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 project name of the AppConnector location using the + # form: `projects/{project_id}/locations/{location_id}` + # @param app_connector_id [::String] + # Optional. User-settable AppConnector resource ID. + # + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @param app_connector [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash] + # Required. A BeyondCorp AppConnector 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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new + # + # # Call the create_app_connector method. + # result = client.create_app_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_app_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest + + # Converts hash and nil to 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_app_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_app_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_app_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :create_app_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 parameters of a single AppConnector. + # + # @overload update_app_connector(request, options = nil) + # Pass arguments to `update_app_connector` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_app_connector(update_mask: nil, app_connector: nil, request_id: nil, validate_only: nil) + # Pass arguments to `update_app_connector` via keyword arguments. Note that at + # least one keyword argument is 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. Mask of fields to update. At least one path must be supplied in + # this field. The elements of the repeated paths field may only include these + # fields from [BeyondCorp.AppConnector]: + # * `labels` + # * `display_name` + # @param app_connector [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash] + # Required. AppConnector message with updated fields. Only supported fields + # specified in update_mask are updated. + # @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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new + # + # # Call the update_app_connector method. + # result = client.update_app_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_app_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest + + # Converts hash and nil to 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_app_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.app_connector&.name + header_params["app_connector.name"] = request.app_connector.name + end + + request_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_app_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_app_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :update_app_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 AppConnector. + # + # @overload delete_app_connector(request, options = nil) + # Pass arguments to `delete_app_connector` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_app_connector(name: nil, request_id: nil, validate_only: nil) + # Pass arguments to `delete_app_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp AppConnector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + # @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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new + # + # # Call the delete_app_connector method. + # result = client.delete_app_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_app_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest + + # Converts hash and nil to 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_app_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_app_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_app_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :delete_app_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Report status for a given connector. + # + # @overload report_status(request, options = nil) + # Pass arguments to `report_status` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_status(app_connector: nil, resource_info: nil, request_id: nil, validate_only: nil) + # Pass arguments to `report_status` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param app_connector [::String] + # Required. BeyondCorp Connector name using the form: + # `projects/{project_id}/locations/{location_id}/connectors/{connector}` + # @param resource_info [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo, ::Hash] + # Required. Resource info of the connector. + # @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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new + # + # # Call the report_status method. + # result = client.report_status request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def report_status request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest + + # Converts hash and nil to 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_status.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.app_connector + header_params["app_connector"] = request.app_connector + end + + request_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_status.timeout, + metadata: metadata, + retry_policy: @config.rpcs.report_status.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :report_status, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 AppConnectorsService API. + # + # This class represents the configuration for AppConnectorsService, + # providing control 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::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_app_connectors to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_connectors.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_connectors.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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 = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::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 AppConnectorsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_app_connectors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_app_connectors + ## + # RPC-specific configuration for `get_app_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :get_app_connector + ## + # RPC-specific configuration for `create_app_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :create_app_connector + ## + # RPC-specific configuration for `update_app_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :update_app_connector + ## + # RPC-specific configuration for `delete_app_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_app_connector + ## + # RPC-specific configuration for `report_status` + # @return [::Gapic::Config::Method] + # + attr_reader :report_status + + # @private + def initialize parent_rpcs = nil + list_app_connectors_config = parent_rpcs.list_app_connectors if parent_rpcs.respond_to? :list_app_connectors + @list_app_connectors = ::Gapic::Config::Method.new list_app_connectors_config + get_app_connector_config = parent_rpcs.get_app_connector if parent_rpcs.respond_to? :get_app_connector + @get_app_connector = ::Gapic::Config::Method.new get_app_connector_config + create_app_connector_config = parent_rpcs.create_app_connector if parent_rpcs.respond_to? :create_app_connector + @create_app_connector = ::Gapic::Config::Method.new create_app_connector_config + update_app_connector_config = parent_rpcs.update_app_connector if parent_rpcs.respond_to? :update_app_connector + @update_app_connector = ::Gapic::Config::Method.new update_app_connector_config + delete_app_connector_config = parent_rpcs.delete_app_connector if parent_rpcs.respond_to? :delete_app_connector + @delete_app_connector = ::Gapic::Config::Method.new delete_app_connector_config + report_status_config = parent_rpcs.report_status if parent_rpcs.respond_to? :report_status + @report_status = ::Gapic::Config::Method.new report_status_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb new file mode 100644 index 000000000000..8e856ab92cab --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + module AppConnectorsService + # Credentials for the AppConnectorsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb new file mode 100644 index 000000000000..1ba6b0b25b21 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_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 BeyondCorp + module AppConnectors + module V1 + module AppConnectorsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppConnectorsService 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 AppConnectorsService 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::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::BeyondCorp::AppConnectors::V1::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 = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::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-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb new file mode 100644 index 000000000000..dd5a91475be8 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + module AppConnectorsService + # Path helper methods for the AppConnectorsService API. + module Paths + ## + # Create a fully-qualified AppConnector resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/appConnectors/{app_connector}` + # + # @param project [String] + # @param location [String] + # @param app_connector [String] + # + # @return [::String] + def app_connector_path project:, location:, app_connector: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/appConnectors/#{app_connector}" + 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-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb new file mode 100644 index 000000000000..4a35a95f37ea --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/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 BeyondCorp + module AppConnectors + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb new file mode 100644 index 000000000000..3d9532fa3b37 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/any_pb' + + +descriptor_data = "\nLgoogle/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto\x12(google.cloud.beyondcorp.appconnectors.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\"\x91\x02\n\x1a\x41ppConnectorInstanceConfig\x12\x1c\n\x0fsequence_number\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12-\n\x0finstance_config\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any\x12Y\n\x13notification_config\x18\x03 \x01(\x0b\x32<.google.cloud.beyondcorp.appconnectors.v1.NotificationConfig\x12K\n\x0cimage_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.beyondcorp.appconnectors.v1.ImageConfig\"\xd7\x01\n\x12NotificationConfig\x12y\n\x13pubsub_notification\x18\x01 \x01(\x0b\x32Z.google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfigH\x00\x1a<\n\x1d\x43loudPubSubNotificationConfig\x12\x1b\n\x13pubsub_subscription\x18\x01 \x01(\tB\x08\n\x06\x63onfig\"9\n\x0bImageConfig\x12\x14\n\x0ctarget_image\x18\x01 \x01(\t\x12\x14\n\x0cstable_image\x18\x02 \x01(\tB\xaa\x02\n,com.google.cloud.beyondcorp.appconnectors.v1B\x1f\x41ppConnectorInstanceConfigProtoP\x01ZRcloud.google.com/go/beyondcorp/appconnectors/apiv1/appconnectorspb;appconnectorspb\xaa\x02(Google.Cloud.BeyondCorp.AppConnectors.V1\xca\x02(Google\\Cloud\\BeyondCorp\\AppConnectors\\V1\xea\x02,Google::Cloud::BeyondCorp::AppConnectors::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + AppConnectorInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnectorInstanceConfig").msgclass + NotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.NotificationConfig").msgclass + NotificationConfig::CloudPubSubNotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfig").msgclass + ImageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ImageConfig").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb new file mode 100644 index 000000000000..a1ba56613e21 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_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/beyondcorp/appconnectors/v1/app_connector_instance_config_pb' +require 'google/cloud/beyondcorp/appconnectors/v1/resource_info_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nEgoogle/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto\x12(google.cloud.beyondcorp.appconnectors.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aLgoogle/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto\x1a\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&beyondcorp.googleapis.com/AppConnector\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\"\x99\x01\n\x19ListAppConnectorsResponse\x12N\n\x0e\x61pp_connectors\x18\x01 \x03(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"V\n\x16GetAppConnectorRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\"\x83\x02\n\x19\x43reateAppConnectorRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&beyondcorp.googleapis.com/AppConnector\x12\x1d\n\x10\x61pp_connector_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12R\n\rapp_connector\x18\x03 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnectorB\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\"\xda\x01\n\x19UpdateAppConnectorRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12R\n\rapp_connector\x18\x02 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnectorB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8e\x01\n\x19\x44\x65leteAppConnectorRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x01\n\x13ReportStatusRequest\x12\x45\n\rapp_connector\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\x12R\n\rresource_info\x18\x02 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.ResourceInfoB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xcb\x07\n\x0c\x41ppConnector\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\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\x12W\n\x06labels\x18\x04 \x03(\x0b\x32\x42.google.cloud.beyondcorp.appconnectors.v1.AppConnector.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12P\n\x05state\x18\x07 \x01(\x0e\x32<.google.cloud.beyondcorp.appconnectors.v1.AppConnector.StateB\x03\xe0\x41\x03\x12\x61\n\x0eprincipal_info\x18\x08 \x01(\x0b\x32\x44.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfoB\x03\xe0\x41\x02\x12R\n\rresource_info\x18\x0b \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.ResourceInfoB\x03\xe0\x41\x01\x1a\xa8\x01\n\rPrincipalInfo\x12n\n\x0fservice_account\x18\x01 \x01(\x0b\x32S.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccountH\x00\x1a\x1f\n\x0eServiceAccount\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\x06\n\x04type\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\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05:r\xea\x41o\n&beyondcorp.googleapis.com/AppConnector\x12\x45projects/{project}/locations/{location}/appConnectors/{app_connector}\"\x8c\x02\n\x1d\x41ppConnectorOperationMetadata\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\xde\x0c\n\x14\x41ppConnectorsService\x12\xe0\x01\n\x11ListAppConnectors\x12\x42.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest\x1a\x43.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/appConnectors\x12\xcd\x01\n\x0fGetAppConnector\x12@.google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest\x1a\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnector\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/appConnectors/*}\x12\x9b\x02\n\x12\x43reateAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41%parent,app_connector,app_connector_id\x82\xd3\xe4\x93\x02\x42\"1/v1/{parent=projects/*/locations/*}/appConnectors:\rapp_connector\x12\x9d\x02\n\x12UpdateAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x19\x61pp_connector,update_mask\x82\xd3\xe4\x93\x02P2?/v1/{app_connector.name=projects/*/locations/*/appConnectors/*}:\rapp_connector\x12\xf3\x01\n\x12\x44\x65leteAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41\x36\n\x15google.protobuf.Empty\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/appConnectors/*}\x12\x8f\x02\n\x0cReportStatus\x12=.google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x1b\x61pp_connector,resource_info\x82\xd3\xe4\x93\x02L\"G/v1/{app_connector=projects/*/locations/*/appConnectors/*}:reportStatus:\x01*\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa4\x02\n,com.google.cloud.beyondcorp.appconnectors.v1B\x19\x41ppConnectorsServiceProtoP\x01ZRcloud.google.com/go/beyondcorp/appconnectors/apiv1/appconnectorspb;appconnectorspb\xaa\x02(Google.Cloud.BeyondCorp.AppConnectors.V1\xca\x02(Google\\Cloud\\BeyondCorp\\AppConnectors\\V1\xea\x02,Google::Cloud::BeyondCorp::AppConnectors::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + ListAppConnectorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest").msgclass + ListAppConnectorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsResponse").msgclass + GetAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest").msgclass + CreateAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest").msgclass + UpdateAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest").msgclass + DeleteAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest").msgclass + ReportStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest").msgclass + AppConnector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector").msgclass + AppConnector::PrincipalInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo").msgclass + AppConnector::PrincipalInfo::ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccount").msgclass + AppConnector::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.State").enummodule + AppConnectorOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnectorOperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb new file mode 100644 index 000000000000..dfa57a816cd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb @@ -0,0 +1,70 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto for package 'Google.Cloud.BeyondCorp.AppConnectors.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/beyondcorp/appconnectors/v1/app_connectors_service_pb' + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + module AppConnectorsService + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectorsService exposes the following resource: + # + # * AppConnectors, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. + # + # The AppConnectorsService provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnectors. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService' + + # Lists AppConnectors in a given project and location. + rpc :ListAppConnectors, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse + # Gets details of a single AppConnector. + rpc :GetAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector + # Creates a new AppConnector in a given project and location. + rpc :CreateAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single AppConnector. + rpc :UpdateAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, ::Google::Longrunning::Operation + # Deletes a single AppConnector. + rpc :DeleteAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, ::Google::Longrunning::Operation + # Report status for a given connector. + rpc :ReportStatus, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb new file mode 100644 index 000000000000..d3fe1da19670 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/appconnectors/v1/resource_info.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/any_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\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-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb new file mode 100644 index 000000000000..01f0871d5362 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.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 Cloud + module BeyondCorp + module AppConnectors + module V1 + # AppConnectorInstanceConfig defines the instance config of a AppConnector. + # @!attribute [rw] sequence_number + # @return [::Integer] + # Required. A monotonically increasing number generated and maintained + # by the API provider. Every time a config changes in the backend, the + # sequenceNumber should be bumped up to reflect the change. + # @!attribute [rw] instance_config + # @return [::Google::Protobuf::Any] + # The SLM instance agent configuration. + # @!attribute [rw] notification_config + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::NotificationConfig] + # NotificationConfig defines the notification mechanism that the remote + # instance should subscribe to in order to receive notification. + # @!attribute [rw] image_config + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ImageConfig] + # ImageConfig defines the GCR images to run for the remote agent's control + # plane. + class AppConnectorInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NotificationConfig defines the mechanisms to notify instance agent. + # @!attribute [rw] pubsub_notification + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::NotificationConfig::CloudPubSubNotificationConfig] + # Cloud Pub/Sub Configuration to receive notifications. + class NotificationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration for Pub/Sub messaging for the AppConnector. + # @!attribute [rw] pubsub_subscription + # @return [::String] + # The Pub/Sub subscription the AppConnector uses to receive notifications. + class CloudPubSubNotificationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # ImageConfig defines the control plane images to run. + # @!attribute [rw] target_image + # @return [::String] + # The initial image the remote agent will attempt to run for the control + # plane. + # @!attribute [rw] stable_image + # @return [::String] + # The stable image that the remote agent will fallback to if the target image + # fails. + class ImageConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb new file mode 100644 index 000000000000..ec8d597ea2e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb @@ -0,0 +1,341 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + # Request message for BeyondCorp.ListAppConnectors. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AppConnector location using the form: + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous + # ListAppConnectorsRequest, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter specifying constraints of a list operation. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + class ListAppConnectorsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BeyondCorp.ListAppConnectors. + # @!attribute [rw] app_connectors + # @return [::Array<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] + # A list of BeyondCorp AppConnectors in the project. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations that could not be reached. + class ListAppConnectorsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.GetAppConnector. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp AppConnector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + class GetAppConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.CreateAppConnector. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource project name of the AppConnector location using the + # form: `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] app_connector_id + # @return [::String] + # Optional. User-settable AppConnector resource ID. + # + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @!attribute [rw] app_connector + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] + # Required. A BeyondCorp AppConnector 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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class CreateAppConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.UpdateAppConnector. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. The elements of the repeated paths field may only include these + # fields from [BeyondCorp.AppConnector]: + # * `labels` + # * `display_name` + # @!attribute [rw] app_connector + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] + # Required. AppConnector message with updated fields. Only supported fields + # specified in update_mask are updated. + # @!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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class UpdateAppConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.DeleteAppConnector. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp AppConnector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + # @!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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class DeleteAppConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request report the connector status. + # @!attribute [rw] app_connector + # @return [::String] + # Required. BeyondCorp Connector name using the form: + # `projects/{project_id}/locations/{location_id}/connectors/{connector}` + # @!attribute [rw] resource_info + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo] + # Required. Resource info of the connector. + # @!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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class ReportStatusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A BeyondCorp connector resource that represents an application facing + # component deployed proximal to and with direct access to the application + # instances. It is used to establish connectivity between the remote enterprise + # environment and GCP. It initiates connections to the applications and can + # proxy the data from users over the connection. + # @!attribute [rw] name + # @return [::String] + # Required. Unique resource name of the AppConnector. + # The name is ignored when creating a AppConnector. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was last modified. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # @!attribute [rw] display_name + # @return [::String] + # Optional. An arbitrary user-provided name for the AppConnector. Cannot + # exceed 64 characters. + # @!attribute [r] uid + # @return [::String] + # Output only. A unique identifier for the instance generated by the + # system. + # @!attribute [r] state + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::State] + # Output only. The current state of the AppConnector. + # @!attribute [rw] principal_info + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::PrincipalInfo] + # Required. Principal information about the Identity of the AppConnector. + # @!attribute [rw] resource_info + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo] + # Optional. Resource info of the connector. + class AppConnector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # PrincipalInfo represents an Identity oneof. + # @!attribute [rw] service_account + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::PrincipalInfo::ServiceAccount] + # A GCP service account. + class PrincipalInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # ServiceAccount represents a GCP service account. + # @!attribute [rw] email + # @return [::String] + # Email address of the service account. + class ServiceAccount + 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 + + # Represents the different states of a AppConnector. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # AppConnector is being created. + CREATING = 1 + + # AppConnector has been created. + CREATED = 2 + + # AppConnector's configuration is being updated. + UPDATING = 3 + + # AppConnector is being deleted. + DELETING = 4 + + # AppConnector is down and may be restored in the future. + # This happens when CCFE sends ProjectState = OFF. + DOWN = 5 + end + 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 AppConnectorOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb new file mode 100644 index 000000000000..044fddd4161e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + # ResourceInfo represents the information/status of an app connector resource. + # Such as: + # - remote_agent + # - container + # - runtime + # - appgateway + # - appconnector + # - appconnection + # - tunnel + # - logagent + # @!attribute [rw] id + # @return [::String] + # Required. Unique Id for the resource. + # @!attribute [rw] status + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::HealthStatus] + # Overall health status. Overall status is derived based on the status of + # each sub level resources. + # @!attribute [rw] resource + # @return [::Google::Protobuf::Any] + # Specific details for the resource. This is for internal use only. + # @!attribute [rw] time + # @return [::Google::Protobuf::Timestamp] + # The timestamp to collect the info. It is suggested to be set by + # the topmost level resource only. + # @!attribute [rw] sub + # @return [::Array<::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo>] + # List of Info for the sub level resources. + class ResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # HealthStatus represents the health status. + module HealthStatus + # Health status is unknown: not initialized or failed to retrieve. + HEALTH_STATUS_UNSPECIFIED = 0 + + # The resource is healthy. + HEALTHY = 1 + + # The resource is unhealthy. + UNHEALTHY = 2 + + # The resource is unresponsive. + UNRESPONSIVE = 3 + + # Some sub-resources are UNHEALTHY. + DEGRADED = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile new file mode 100644 index 000000000000..43e9ab898138 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1", path: "../" +else + gem "google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb new file mode 100644 index 000000000000..70f0d140058b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.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 beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the create_app_connector call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector. +# +def create_app_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new + + # Call the create_app_connector method. + result = client.create_app_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb new file mode 100644 index 000000000000..b3a1d87b3402 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.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 beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the delete_app_connector call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector. +# +def delete_app_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new + + # Call the delete_app_connector method. + result = client.delete_app_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb new file mode 100644 index 000000000000..1edebaac1f69 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the get_app_connector call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector. +# +def get_app_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new + + # Call the get_app_connector method. + result = client.get_app_connector request + + # The returned object is of type Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. + p result +end +# [END beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb new file mode 100644 index 000000000000..259b2f32126e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.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 beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the list_app_connectors call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors. +# +def list_app_connectors + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new + + # Call the list_app_connectors method. + result = client.list_app_connectors request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. + p item + end +end +# [END beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb new file mode 100644 index 000000000000..fb94bff32e92 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.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 beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the report_status call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status. +# +def report_status + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new + + # Call the report_status method. + result = client.report_status request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb new file mode 100644 index 000000000000..cccaafa23d82 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.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 beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the update_app_connector call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector. +# +def update_app_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new + + # Call the update_app_connector method. + result = client.update_app_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json new file mode 100644 index 000000000000..0eee27e39078 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-cloud-beyond_corp-app_connectors-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.beyondcorp.appconnectors.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync", + "title": "Snippet for the list_app_connectors call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors.", + "file": "app_connectors_service/list_app_connectors.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_app_connectors", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "ListAppConnectors", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ListAppConnectors", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync", + "title": "Snippet for the get_app_connector call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector.", + "file": "app_connectors_service/get_app_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_app_connector", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "GetAppConnector", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.GetAppConnector", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync", + "title": "Snippet for the create_app_connector call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector.", + "file": "app_connectors_service/create_app_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_app_connector", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "CreateAppConnector", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.CreateAppConnector", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync", + "title": "Snippet for the update_app_connector call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector.", + "file": "app_connectors_service/update_app_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_app_connector", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "UpdateAppConnector", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.UpdateAppConnector", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync", + "title": "Snippet for the delete_app_connector call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector.", + "file": "app_connectors_service/delete_app_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_app_connector", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "DeleteAppConnector", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.DeleteAppConnector", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync", + "title": "Snippet for the report_status call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status.", + "file": "app_connectors_service/report_status.rb", + "language": "RUBY", + "client_method": { + "short_name": "report_status", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "ReportStatus", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ReportStatus", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "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-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb new file mode 100644 index 000000000000..e42ccbf0dca8 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_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/beyondcorp/appconnectors/v1/app_connectors_service_pb" +require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" + +class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb new file mode 100644 index 000000000000..ccd8bc1d885a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" + +class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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_app_connector_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_connector_path project: "value0", location: "value1", app_connector: "value2" + assert_equal "projects/value0/locations/value1/appConnectors/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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb new file mode 100644 index 000000000000..777295b263b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb @@ -0,0 +1,523 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" + +class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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_app_connectors + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_app_connectors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_app_connectors, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, 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_app_connectors_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_app_connectors({ 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_app_connectors 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_app_connectors ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.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_app_connectors({ 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_app_connectors(::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.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_app_connectors_client_stub.call_rpc_count + end + end + + def test_get_app_connector + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_app_connector, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_app_connector_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_app_connector({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_app_connector name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_app_connector({ 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_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new(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_app_connector_client_stub.call_rpc_count + end + end + + def test_create_app_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + app_connector_id = "hello world" + app_connector = {} + request_id = "hello world" + validate_only = true + + create_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_app_connector, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["app_connector_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector), request["app_connector"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_app_connector_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_app_connector({ parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_app_connector parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new(parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_app_connector({ parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new(parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_app_connector_client_stub.call_rpc_count + end + end + + def test_update_app_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + app_connector = {} + request_id = "hello world" + validate_only = true + + update_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_app_connector, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector), request["app_connector"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_app_connector_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_app_connector({ update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_app_connector update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new(update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_app_connector({ update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new(update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_app_connector_client_stub.call_rpc_count + end + end + + def test_delete_app_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + validate_only = true + + delete_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_app_connector, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_app_connector_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_app_connector({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_app_connector name: name, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_app_connector({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_app_connector_client_stub.call_rpc_count + end + end + + def test_report_status + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + app_connector = "hello world" + resource_info = {} + request_id = "hello world" + validate_only = true + + report_status_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :report_status, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, request + assert_equal "hello world", request["app_connector"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo), request["resource_info"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, report_status_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.report_status({ app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.report_status app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.report_status ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new(app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.report_status({ app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.report_status(::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new(app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, report_status_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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_gateways-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json new file mode 100644 index 000000000000..a3c9b3754a0a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "beyondcorp.googleapis.com", + "api_shortname": "beyondcorp", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_gateways-v1/latest", + "distribution_name": "google-cloud-beyond_corp-app_gateways-v1", + "is_cloud": true, + "language": "ruby", + "name": "beyondcorp", + "name_pretty": "BeyondCorp AppGateways V1 API", + "product_documentation": "https://cloud.google.com/beyondcorp/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml new file mode 100644 index 000000000000..3c939b74dcc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts new file mode 100644 index 000000000000..63cdf671ee4a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BeyondCorp AppGateways 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-beyond_corp-app_gateways-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..7b47d23a035b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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/beyond_corp/app_gateways/v1" + +client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/beyond_corp/app_gateways/v1" + +::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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-beyond_corp-app_gateways-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/beyond_corp/app_gateways/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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-beyond_corp-app_gateways-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md new file mode 100644 index 000000000000..14377edd1df6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the BeyondCorp AppGateways V1 API + +Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BeyondCorp AppGateways V1 API. Most users should consider using +the main client gem, +[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-beyond_corp-app_gateways-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/beyondcorp.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/beyond_corp/app_gateways/v1" + +client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new +request = ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new # (request fields as keyword arguments...) +response = client.list_app_gateways request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_gateways-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/beyondcorp/) +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/beyond_corp/app_gateways/v1" +require "logger" + +client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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-beyond_corp`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-beyond_corp-app_gateways-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-beyond_corp`. +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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile new file mode 100644 index 000000000000..d8cc75327511 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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/beyond_corp/app_gateways/v1/app_gateways_service/credentials" + ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-beyond_corp-app_gateways-v1" + header "google-cloud-beyond_corp-app_gateways-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-beyond_corp-app_gateways-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json new file mode 100644 index 000000000000..4d35336a7930 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json @@ -0,0 +1,38 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.beyondcorp.appgateways.v1", + "libraryPackage": "::Google::Cloud::BeyondCorp::AppGateways::V1", + "services": { + "AppGatewaysService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client", + "rpcs": { + "ListAppGateways": { + "methods": [ + "list_app_gateways" + ] + }, + "GetAppGateway": { + "methods": [ + "get_app_gateway" + ] + }, + "CreateAppGateway": { + "methods": [ + "create_app_gateway" + ] + }, + "DeleteAppGateway": { + "methods": [ + "delete_app_gateway" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec new file mode 100644 index 000000000000..06cb22acafd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/beyond_corp/app_gateways/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-beyond_corp-app_gateways-v1" + gem.version = Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." + gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." + 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-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb new file mode 100644 index 000000000000..ea08e44ab15a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-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/beyond_corp/app_gateways/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb new file mode 100644 index 000000000000..735979b372cd --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" +require "google/cloud/beyond_corp/app_gateways/v1/version" + +module Google + module Cloud + module BeyondCorp + module AppGateways + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_gateways/v1" + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/beyond_corp/app_gateways/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb new file mode 100644 index 000000000000..2c44fc4c710b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.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! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/beyond_corp/app_gateways/v1/version" + +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client" + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + ## + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppGatewaysService exposes the following resources: + # + # * AppGateways, named as follows: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. + # + # The AppGatewaysService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppGateways. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + module AppGatewaysService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "app_gateways_service", "helpers.rb" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb new file mode 100644 index 000000000000..3ca0ea7ef22f --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb @@ -0,0 +1,899 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/beyondcorp/appgateways/v1/app_gateways_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + module AppGatewaysService + ## + # Client for the AppGatewaysService service. + # + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppGatewaysService exposes the following resources: + # + # * AppGateways, named as follows: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. + # + # The AppGatewaysService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppGateways. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_gateways_service_stub + + ## + # Configure the AppGatewaysService Client class. + # + # See {::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppGatewaysService clients + # ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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", "BeyondCorp", "AppGateways", "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 AppGatewaysService 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::BeyondCorp::AppGateways::V1::AppGatewaysService::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 + @app_gateways_service_stub.universe_domain + end + + ## + # Create a new AppGatewaysService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppGatewaysService 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/beyondcorp/appgateways/v1/app_gateways_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 + + @app_gateways_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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 + ) + + @app_gateways_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 = @app_gateways_service_stub.endpoint + config.universe_domain = @app_gateways_service_stub.universe_domain + config.logger = @app_gateways_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 = @app_gateways_service_stub.endpoint + config.universe_domain = @app_gateways_service_stub.universe_domain + config.logger = @app_gateways_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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 + @app_gateways_service_stub.logger + end + + # Service calls + + ## + # Lists AppGateways in a given project and location. + # + # @overload list_app_gateways(request, options = nil) + # Pass arguments to `list_app_gateways` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_app_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_app_gateways` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 AppGateway location using the form: + # `projects/{project_id}/locations/{location_id}` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous + # ListAppGatewaysRequest, if any. + # @param filter [::String] + # Optional. A filter specifying constraints of a list operation. + # @param order_by [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new + # + # # Call the list_app_gateways method. + # result = client.list_app_gateways request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. + # p item + # end + # + def list_app_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_app_gateways.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_app_gateways.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_app_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_gateways_service_stub.call_rpc :list_app_gateways, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_gateways_service_stub, :list_app_gateways, request, response, 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 AppGateway. + # + # @overload get_app_gateway(request, options = nil) + # Pass arguments to `get_app_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_app_gateway(name: nil) + # Pass arguments to `get_app_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp AppGateway name using the form: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new + # + # # Call the get_app_gateway method. + # result = client.get_app_gateway request + # + # # The returned object is of type Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. + # p result + # + def get_app_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_app_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_app_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_app_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_gateways_service_stub.call_rpc :get_app_gateway, request, 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 AppGateway in a given project and location. + # + # @overload create_app_gateway(request, options = nil) + # Pass arguments to `create_app_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_app_gateway(parent: nil, app_gateway_id: nil, app_gateway: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_app_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 project name of the AppGateway location using the + # form: `projects/{project_id}/locations/{location_id}` + # @param app_gateway_id [::String] + # Optional. User-settable AppGateway resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @param app_gateway [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway, ::Hash] + # Required. A BeyondCorp AppGateway 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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new + # + # # Call the create_app_gateway method. + # result = client.create_app_gateway request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_app_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest + + # Converts hash and nil to 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_app_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_app_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_app_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_gateways_service_stub.call_rpc :create_app_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 AppGateway. + # + # @overload delete_app_gateway(request, options = nil) + # Pass arguments to `delete_app_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_app_gateway(name: nil, request_id: nil, validate_only: nil) + # Pass arguments to `delete_app_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp AppGateway name using the form: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + # @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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new + # + # # Call the delete_app_gateway method. + # result = client.delete_app_gateway request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_app_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest + + # Converts hash and nil to 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_app_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_app_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_app_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_gateways_service_stub.call_rpc :delete_app_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 AppGatewaysService API. + # + # This class represents the configuration for AppGatewaysService, + # providing control 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::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_app_gateways to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_gateways.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_gateways.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::BeyondCorp::AppGateways::V1::AppGatewaysService::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 = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::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 AppGatewaysService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_app_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_app_gateways + ## + # RPC-specific configuration for `get_app_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_app_gateway + ## + # RPC-specific configuration for `create_app_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_app_gateway + ## + # RPC-specific configuration for `delete_app_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_app_gateway + + # @private + def initialize parent_rpcs = nil + list_app_gateways_config = parent_rpcs.list_app_gateways if parent_rpcs.respond_to? :list_app_gateways + @list_app_gateways = ::Gapic::Config::Method.new list_app_gateways_config + get_app_gateway_config = parent_rpcs.get_app_gateway if parent_rpcs.respond_to? :get_app_gateway + @get_app_gateway = ::Gapic::Config::Method.new get_app_gateway_config + create_app_gateway_config = parent_rpcs.create_app_gateway if parent_rpcs.respond_to? :create_app_gateway + @create_app_gateway = ::Gapic::Config::Method.new create_app_gateway_config + delete_app_gateway_config = parent_rpcs.delete_app_gateway if parent_rpcs.respond_to? :delete_app_gateway + @delete_app_gateway = ::Gapic::Config::Method.new delete_app_gateway_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb new file mode 100644 index 000000000000..26871bd26e4d --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + module AppGatewaysService + # Credentials for the AppGatewaysService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb new file mode 100644 index 000000000000..0ca22508a12e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_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 BeyondCorp + module AppGateways + module V1 + module AppGatewaysService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppGatewaysService 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 AppGatewaysService 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::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::BeyondCorp::AppGateways::V1::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 = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::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-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb new file mode 100644 index 000000000000..820a03051f4e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + module AppGatewaysService + # Path helper methods for the AppGatewaysService API. + module Paths + ## + # Create a fully-qualified AppGateway resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/appGateways/{app_gateway}` + # + # @param project [String] + # @param location [String] + # @param app_gateway [String] + # + # @return [::String] + def app_gateway_path project:, location:, app_gateway: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/appGateways/#{app_gateway}" + 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-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb new file mode 100644 index 000000000000..58c711433662 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/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 BeyondCorp + module AppGateways + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb new file mode 100644 index 000000000000..8ffa165f3267 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/appgateways/v1/app_gateways_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/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nAgoogle/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto\x12&google.cloud.beyondcorp.appgateways.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\x01\n\x16ListAppGatewaysRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$beyondcorp.googleapis.com/AppGateway\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\"\x91\x01\n\x17ListAppGatewaysResponse\x12H\n\x0c\x61pp_gateways\x18\x01 \x03(\x0b\x32\x32.google.cloud.beyondcorp.appgateways.v1.AppGateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"R\n\x14GetAppGatewayRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\"\xf7\x01\n\x17\x43reateAppGatewayRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$beyondcorp.googleapis.com/AppGateway\x12\x1b\n\x0e\x61pp_gateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12L\n\x0b\x61pp_gateway\x18\x03 \x01(\x0b\x32\x32.google.cloud.beyondcorp.appgateways.v1.AppGatewayB\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\"\x8a\x01\n\x17\x44\x65leteAppGatewayRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xaa\x08\n\nAppGateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12S\n\x06labels\x18\x04 \x03(\x0b\x32>.google.cloud.beyondcorp.appgateways.v1.AppGateway.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12J\n\x04type\x18\x07 \x01(\x0e\x32\x37.google.cloud.beyondcorp.appgateways.v1.AppGateway.TypeB\x03\xe0\x41\x02\x12L\n\x05state\x18\x08 \x01(\x0e\x32\x38.google.cloud.beyondcorp.appgateways.v1.AppGateway.StateB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12j\n\x15\x61llocated_connections\x18\n \x03(\x0b\x32\x46.google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnectionB\x03\xe0\x41\x03\x12S\n\thost_type\x18\x0b \x01(\x0e\x32;.google.cloud.beyondcorp.appgateways.v1.AppGateway.HostTypeB\x03\xe0\x41\x02\x1a\x46\n\x13\x41llocatedConnection\x12\x14\n\x07psc_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cingress_port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tTCP_PROXY\x10\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05\";\n\x08HostType\x12\x19\n\x15HOST_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_REGIONAL_MIG\x10\x01:l\xea\x41i\n$beyondcorp.googleapis.com/AppGateway\x12\x41projects/{project}/locations/{location}/appGateways/{app_gateway}\"\x8a\x02\n\x1b\x41ppGatewayOperationMetadata\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\xf6\x07\n\x12\x41ppGatewaysService\x12\xd4\x01\n\x0fListAppGateways\x12>.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest\x1a?.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/appGateways\x12\xc1\x01\n\rGetAppGateway\x12<.google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest\x1a\x32.google.cloud.beyondcorp.appgateways.v1.AppGateway\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/appGateways/*}\x12\x89\x02\n\x10\x43reateAppGateway\x12?.google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41)\n\nAppGateway\x12\x1b\x41ppGatewayOperationMetadata\xda\x41!parent,app_gateway,app_gateway_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/appGateways:\x0b\x61pp_gateway\x12\xe9\x01\n\x10\x44\x65leteAppGateway\x12?.google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x34\n\x15google.protobuf.Empty\x12\x1b\x41ppGatewayOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/appGateways/*}\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x94\x02\n*com.google.cloud.beyondcorp.appgateways.v1B\x17\x41ppGatewaysServiceProtoP\x01ZLcloud.google.com/go/beyondcorp/appgateways/apiv1/appgatewayspb;appgatewayspb\xaa\x02&Google.Cloud.BeyondCorp.AppGateways.V1\xca\x02&Google\\Cloud\\BeyondCorp\\AppGateways\\V1\xea\x02*Google::Cloud::BeyondCorp::AppGateways::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + ListAppGatewaysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest").msgclass + ListAppGatewaysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysResponse").msgclass + GetAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest").msgclass + CreateAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest").msgclass + DeleteAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest").msgclass + AppGateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway").msgclass + AppGateway::AllocatedConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection").msgclass + AppGateway::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.Type").enummodule + AppGateway::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.State").enummodule + AppGateway::HostType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType").enummodule + AppGatewayOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGatewayOperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb new file mode 100644 index 000000000000..d3df1c0984d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto for package 'Google.Cloud.BeyondCorp.AppGateways.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/beyondcorp/appgateways/v1/app_gateways_service_pb' + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + module AppGatewaysService + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppGatewaysService exposes the following resources: + # + # * AppGateways, named as follows: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. + # + # The AppGatewaysService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppGateways. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.beyondcorp.appgateways.v1.AppGatewaysService' + + # Lists AppGateways in a given project and location. + rpc :ListAppGateways, ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse + # Gets details of a single AppGateway. + rpc :GetAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway + # Creates a new AppGateway in a given project and location. + rpc :CreateAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, ::Google::Longrunning::Operation + # Deletes a single AppGateway. + rpc :DeleteAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md new file mode 100644 index 000000000000..ff3f6683cb37 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BeyondCorp AppGateways 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-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb new file mode 100644 index 000000000000..94e62975802d --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb @@ -0,0 +1,291 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + # Request message for BeyondCorp.ListAppGateways. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AppGateway location using the form: + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous + # ListAppGatewaysRequest, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter specifying constraints of a list operation. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + class ListAppGatewaysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BeyondCorp.ListAppGateways. + # @!attribute [rw] app_gateways + # @return [::Array<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] + # A list of BeyondCorp AppGateways in the project. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations that could not be reached. + class ListAppGatewaysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.GetAppGateway. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp AppGateway name using the form: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + class GetAppGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.CreateAppGateway. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource project name of the AppGateway location using the + # form: `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] app_gateway_id + # @return [::String] + # Optional. User-settable AppGateway resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @!attribute [rw] app_gateway + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] + # Required. A BeyondCorp AppGateway 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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class CreateAppGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.DeleteAppGateway. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp AppGateway name using the form: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + # @!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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class DeleteAppGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway + # to a remote application. It creates all the necessary GCP components needed + # for creating a BeyondCorp protected AppGateway. Multiple connectors can be + # authorised for a single AppGateway. + # @!attribute [rw] name + # @return [::String] + # Required. Unique resource name of the AppGateway. + # The name is ignored when creating an AppGateway. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was last modified. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # @!attribute [rw] display_name + # @return [::String] + # Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed + # 64 characters. + # @!attribute [r] uid + # @return [::String] + # Output only. A unique identifier for the instance generated by the + # system. + # @!attribute [rw] type + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::Type] + # Required. The type of network connectivity used by the AppGateway. + # @!attribute [r] state + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::State] + # Output only. The current state of the AppGateway. + # @!attribute [r] uri + # @return [::String] + # Output only. Server-defined URI for this resource. + # @!attribute [r] allocated_connections + # @return [::Array<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::AllocatedConnection>] + # Output only. A list of connections allocated for the Gateway + # @!attribute [rw] host_type + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::HostType] + # Required. The type of hosting used by the AppGateway. + class AppGateway + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Allocated connection of the AppGateway. + # @!attribute [rw] psc_uri + # @return [::String] + # Required. The PSC uri of an allocated connection + # @!attribute [rw] ingress_port + # @return [::Integer] + # Required. The ingress port of an allocated connection + class AllocatedConnection + 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 + + # Enum containing list of all possible network connectivity options + # supported by BeyondCorp AppGateway. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # TCP Proxy based BeyondCorp Connection. API will default to this if unset. + TCP_PROXY = 1 + end + + # Represents the different states of an AppGateway. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # AppGateway is being created. + CREATING = 1 + + # AppGateway has been created. + CREATED = 2 + + # AppGateway's configuration is being updated. + UPDATING = 3 + + # AppGateway is being deleted. + DELETING = 4 + + # AppGateway is down and may be restored in the future. + # This happens when CCFE sends ProjectState = OFF. + DOWN = 5 + end + + # Enum containing list of all possible host types supported by BeyondCorp + # Connection. + module HostType + # Default value. This value is unused. + HOST_TYPE_UNSPECIFIED = 0 + + # AppGateway hosted in a GCP regional managed instance group. + GCP_REGIONAL_MIG = 1 + end + 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 AppGatewayOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile new file mode 100644 index 000000000000..885230800eb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1", path: "../" +else + gem "google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb new file mode 100644 index 000000000000..d219a1bc69bf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.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 beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] +require "google/cloud/beyond_corp/app_gateways/v1" + +## +# Snippet for the create_app_gateway call in the AppGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway. +# +def create_app_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new + + # Call the create_app_gateway method. + result = client.create_app_gateway request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb new file mode 100644 index 000000000000..f68a23b0f94b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.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 beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] +require "google/cloud/beyond_corp/app_gateways/v1" + +## +# Snippet for the delete_app_gateway call in the AppGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway. +# +def delete_app_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new + + # Call the delete_app_gateway method. + result = client.delete_app_gateway request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb new file mode 100644 index 000000000000..a733a0e2c1ab --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] +require "google/cloud/beyond_corp/app_gateways/v1" + +## +# Snippet for the get_app_gateway call in the AppGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway. +# +def get_app_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new + + # Call the get_app_gateway method. + result = client.get_app_gateway request + + # The returned object is of type Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. + p result +end +# [END beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb new file mode 100644 index 000000000000..5f5e6577f4a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.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 beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] +require "google/cloud/beyond_corp/app_gateways/v1" + +## +# Snippet for the list_app_gateways call in the AppGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways. +# +def list_app_gateways + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new + + # Call the list_app_gateways method. + result = client.list_app_gateways request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. + p item + end +end +# [END beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json new file mode 100644 index 000000000000..8a34973ba430 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-cloud-beyond_corp-app_gateways-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.beyondcorp.appgateways.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync", + "title": "Snippet for the list_app_gateways call in the AppGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways.", + "file": "app_gateways_service/list_app_gateways.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_app_gateways", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse", + "client": { + "short_name": "AppGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" + }, + "method": { + "short_name": "ListAppGateways", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.ListAppGateways", + "service": { + "short_name": "AppGatewaysService", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync", + "title": "Snippet for the get_app_gateway call in the AppGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway.", + "file": "app_gateways_service/get_app_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_app_gateway", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway", + "client": { + "short_name": "AppGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" + }, + "method": { + "short_name": "GetAppGateway", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.GetAppGateway", + "service": { + "short_name": "AppGatewaysService", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync", + "title": "Snippet for the create_app_gateway call in the AppGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway.", + "file": "app_gateways_service/create_app_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_app_gateway", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" + }, + "method": { + "short_name": "CreateAppGateway", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.CreateAppGateway", + "service": { + "short_name": "AppGatewaysService", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync", + "title": "Snippet for the delete_app_gateway call in the AppGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway.", + "file": "app_gateways_service/delete_app_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_app_gateway", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" + }, + "method": { + "short_name": "DeleteAppGateway", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.DeleteAppGateway", + "service": { + "short_name": "AppGatewaysService", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "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-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb new file mode 100644 index 000000000000..cb69006d8cf2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_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/beyondcorp/appgateways/v1/app_gateways_service_pb" +require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" + +class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb new file mode 100644 index 000000000000..e122fab5a1b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" + +class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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_app_gateway_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_gateway_path project: "value0", location: "value1", app_gateway: "value2" + assert_equal "projects/value0/locations/value1/appGateways/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::BeyondCorp::AppGateways::V1::AppGatewaysService::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-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb new file mode 100644 index 000000000000..b9f624cfdb32 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb @@ -0,0 +1,385 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/beyondcorp/appgateways/v1/app_gateways_service_pb" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" + +class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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_app_gateways + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_app_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_app_gateways, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, 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_app_gateways_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_app_gateways({ 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_app_gateways 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_app_gateways ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.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_app_gateways({ 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_app_gateways(::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.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_app_gateways_client_stub.call_rpc_count + end + end + + def test_get_app_gateway + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_app_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_app_gateway_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_app_gateway({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_app_gateway name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_app_gateway({ 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_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new(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_app_gateway_client_stub.call_rpc_count + end + end + + def test_create_app_gateway + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + app_gateway_id = "hello world" + app_gateway = {} + request_id = "hello world" + validate_only = true + + create_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_app_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["app_gateway_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway), request["app_gateway"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_app_gateway_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_app_gateway({ parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_app_gateway parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new(parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_app_gateway({ parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new(parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_app_gateway_client_stub.call_rpc_count + end + end + + def test_delete_app_gateway + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + validate_only = true + + delete_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_app_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_app_gateway_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_app_gateway({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_app_gateway name: name, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_app_gateway({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_app_gateway_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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-client_gateways-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json new file mode 100644 index 000000000000..c457c36b7285 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "beyondcorp.googleapis.com", + "api_shortname": "beyondcorp", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest", + "distribution_name": "google-cloud-beyond_corp-client_gateways-v1", + "is_cloud": true, + "language": "ruby", + "name": "beyondcorp", + "name_pretty": "BeyondCorp ClientGateways V1 API", + "product_documentation": "https://cloud.google.com/beyondcorp/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-client_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml new file mode 100644 index 000000000000..2d6e3497728d --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts new file mode 100644 index 000000000000..631aaf95922e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BeyondCorp ClientGateways 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-beyond_corp-client_gateways-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..531d6dc3f6d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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/beyond_corp/client_gateways/v1" + +client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/beyond_corp/client_gateways/v1" + +::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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-beyond_corp-client_gateways-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/beyond_corp/client_gateways/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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-beyond_corp-client_gateways-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md new file mode 100644 index 000000000000..fe954d4cccff --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the BeyondCorp ClientGateways V1 API + +Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BeyondCorp ClientGateways V1 API. Most users should consider using +the main client gem, +[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-beyond_corp-client_gateways-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/beyondcorp.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/beyond_corp/client_gateways/v1" + +client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new +request = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new # (request fields as keyword arguments...) +response = client.list_client_gateways request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/beyondcorp/) +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/beyond_corp/client_gateways/v1" +require "logger" + +client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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-beyond_corp`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-beyond_corp-client_gateways-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-beyond_corp`. +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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile new file mode 100644 index 000000000000..7797016444d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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/beyond_corp/client_gateways/v1/client_gateways_service/credentials" + ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-beyond_corp-client_gateways-v1" + header "google-cloud-beyond_corp-client_gateways-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-beyond_corp-client_gateways-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json new file mode 100644 index 000000000000..adefe2e55503 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json @@ -0,0 +1,38 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.beyondcorp.clientgateways.v1", + "libraryPackage": "::Google::Cloud::BeyondCorp::ClientGateways::V1", + "services": { + "ClientGatewaysService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client", + "rpcs": { + "ListClientGateways": { + "methods": [ + "list_client_gateways" + ] + }, + "GetClientGateway": { + "methods": [ + "get_client_gateway" + ] + }, + "CreateClientGateway": { + "methods": [ + "create_client_gateway" + ] + }, + "DeleteClientGateway": { + "methods": [ + "delete_client_gateway" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec new file mode 100644 index 000000000000..06a7318bb3d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/beyond_corp/client_gateways/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-beyond_corp-client_gateways-v1" + gem.version = Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-client_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." + gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." + 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-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb new file mode 100644 index 000000000000..8df80233c89e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-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/beyond_corp/client_gateways/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb new file mode 100644 index 000000000000..c271d92c8367 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" +require "google/cloud/beyond_corp/client_gateways/v1/version" + +module Google + module Cloud + module BeyondCorp + module ClientGateways + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/client_gateways/v1" + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/beyond_corp/client_gateways/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb new file mode 100644 index 000000000000..56ca51678808 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_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/beyond_corp/client_gateways/v1/version" + +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client" + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + ## + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The ClientGatewaysService exposes the following resources: + # + # * Client Gateways, named as follows: + # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + module ClientGatewaysService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "client_gateways_service", "helpers.rb" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb new file mode 100644 index 000000000000..94bf30c36760 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb @@ -0,0 +1,884 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/beyondcorp/clientgateways/v1/client_gateways_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + module ClientGatewaysService + ## + # Client for the ClientGatewaysService service. + # + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The ClientGatewaysService exposes the following resources: + # + # * Client Gateways, named as follows: + # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :client_gateways_service_stub + + ## + # Configure the ClientGatewaysService Client class. + # + # See {::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ClientGatewaysService clients + # ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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", "BeyondCorp", "ClientGateways", "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 ClientGatewaysService 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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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 + @client_gateways_service_stub.universe_domain + end + + ## + # Create a new ClientGatewaysService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ClientGatewaysService 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/beyondcorp/clientgateways/v1/client_gateways_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 + + @client_gateways_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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 + ) + + @client_gateways_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 = @client_gateways_service_stub.endpoint + config.universe_domain = @client_gateways_service_stub.universe_domain + config.logger = @client_gateways_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 = @client_gateways_service_stub.endpoint + config.universe_domain = @client_gateways_service_stub.universe_domain + config.logger = @client_gateways_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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 + @client_gateways_service_stub.logger + end + + # Service calls + + ## + # Lists ClientGateways in a given project and location. + # + # @overload list_client_gateways(request, options = nil) + # Pass arguments to `list_client_gateways` via a request object, either of type + # {::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_client_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_client_gateways` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 ListClientGatewaysRequest. + # @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. 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::BeyondCorp::ClientGateways::V1::ClientGateway>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/client_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new + # + # # Call the list_client_gateways method. + # result = client.list_client_gateways request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. + # p item + # end + # + def list_client_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_client_gateways.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_client_gateways.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_client_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @client_gateways_service_stub.call_rpc :list_client_gateways, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @client_gateways_service_stub, :list_client_gateways, request, response, 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 ClientGateway. + # + # @overload get_client_gateway(request, options = nil) + # Pass arguments to `get_client_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_client_gateway(name: nil) + # Pass arguments to `get_client_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::BeyondCorp::ClientGateways::V1::ClientGateway] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/client_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new + # + # # Call the get_client_gateway method. + # result = client.get_client_gateway request + # + # # The returned object is of type Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. + # p result + # + def get_client_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_client_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_client_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_client_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @client_gateways_service_stub.call_rpc :get_client_gateway, request, 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 ClientGateway in a given project and location. + # + # @overload create_client_gateway(request, options = nil) + # Pass arguments to `create_client_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_client_gateway(parent: nil, client_gateway_id: nil, client_gateway: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_client_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 client_gateway_id [::String] + # Optional. User-settable client gateway resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @param client_gateway [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway, ::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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/client_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new + # + # # Call the create_client_gateway method. + # result = client.create_client_gateway request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_client_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest + + # Converts hash and nil to 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_client_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_client_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_client_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @client_gateways_service_stub.call_rpc :create_client_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 ClientGateway. + # + # @overload delete_client_gateway(request, options = nil) + # Pass arguments to `delete_client_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_client_gateway(name: nil, request_id: nil, validate_only: nil) + # Pass arguments to `delete_client_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 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). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/client_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new + # + # # Call the delete_client_gateway method. + # result = client.delete_client_gateway request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_client_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest + + # Converts hash and nil to 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_client_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_client_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_client_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @client_gateways_service_stub.call_rpc :delete_client_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 ClientGatewaysService API. + # + # This class represents the configuration for ClientGatewaysService, + # providing control 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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_client_gateways to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_client_gateways.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_client_gateways.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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 = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::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 ClientGatewaysService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of 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_client_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_client_gateways + ## + # RPC-specific configuration for `get_client_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_client_gateway + ## + # RPC-specific configuration for `create_client_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_client_gateway + ## + # RPC-specific configuration for `delete_client_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_client_gateway + + # @private + def initialize parent_rpcs = nil + list_client_gateways_config = parent_rpcs.list_client_gateways if parent_rpcs.respond_to? :list_client_gateways + @list_client_gateways = ::Gapic::Config::Method.new list_client_gateways_config + get_client_gateway_config = parent_rpcs.get_client_gateway if parent_rpcs.respond_to? :get_client_gateway + @get_client_gateway = ::Gapic::Config::Method.new get_client_gateway_config + create_client_gateway_config = parent_rpcs.create_client_gateway if parent_rpcs.respond_to? :create_client_gateway + @create_client_gateway = ::Gapic::Config::Method.new create_client_gateway_config + delete_client_gateway_config = parent_rpcs.delete_client_gateway if parent_rpcs.respond_to? :delete_client_gateway + @delete_client_gateway = ::Gapic::Config::Method.new delete_client_gateway_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb new file mode 100644 index 000000000000..3fce6bd8e91e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + module ClientGatewaysService + # Credentials for the ClientGatewaysService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb new file mode 100644 index 000000000000..082176491bbe --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_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 BeyondCorp + module ClientGateways + module V1 + module ClientGatewaysService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ClientGatewaysService 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 ClientGatewaysService 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::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::BeyondCorp::ClientGateways::V1::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 = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::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-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb new file mode 100644 index 000000000000..e1051c10e318 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + module ClientGatewaysService + # Path helper methods for the ClientGatewaysService API. + module Paths + ## + # Create a fully-qualified ClientGateway resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/clientGateways/{client_gateway}` + # + # @param project [String] + # @param location [String] + # @param client_gateway [String] + # + # @return [::String] + def client_gateway_path project:, location:, client_gateway: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/clientGateways/#{client_gateway}" + 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-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb new file mode 100644 index 000000000000..8e4f4f6207b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/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 BeyondCorp + module ClientGateways + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb new file mode 100644 index 000000000000..48725cc2cbcd --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/clientgateways/v1/client_gateways_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/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nGgoogle/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto\x12)google.cloud.beyondcorp.clientgateways.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\"\xfd\x03\n\rClientGateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\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\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.beyondcorp.clientgateways.v1.ClientGateway.StateB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18\x63lient_connector_service\x18\x06 \x01(\tB\x03\xe0\x41\x03\"j\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0c\n\x08UPDATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05\x12\t\n\x05\x45RROR\x10\x06:u\xea\x41r\n\'beyondcorp.googleapis.com/ClientGateway\x12Gprojects/{project}/locations/{location}/clientGateways/{client_gateway}\"\xb9\x01\n\x19ListClientGatewaysRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/ClientGateway\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\"\x9d\x01\n\x1aListClientGatewaysResponse\x12Q\n\x0f\x63lient_gateways\x18\x01 \x03(\x0b\x32\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x17GetClientGatewayRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/ClientGateway\"\x89\x02\n\x1a\x43reateClientGatewayRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/ClientGateway\x12\x1e\n\x11\x63lient_gateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x63lient_gateway\x18\x03 \x01(\x0b\x32\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGatewayB\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\"\x90\x01\n\x1a\x44\x65leteClientGatewayRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/ClientGateway\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x8d\x02\n\x1e\x43lientGatewayOperationMetadata\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\xc7\x08\n\x15\x43lientGatewaysService\x12\xe6\x01\n\x12ListClientGateways\x12\x44.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest\x1a\x45.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/clientGateways\x12\xd3\x01\n\x10GetClientGateway\x12\x42.google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest\x1a\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGateway\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/clientGateways/*}\x12\xa4\x02\n\x13\x43reateClientGateway\x12\x45.google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41/\n\rClientGateway\x12\x1e\x43lientGatewayOperationMetadata\xda\x41\'parent,client_gateway,client_gateway_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/clientGateways:\x0e\x63lient_gateway\x12\xf8\x01\n\x13\x44\x65leteClientGateway\x12\x45.google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x37\n\x15google.protobuf.Empty\x12\x1e\x43lientGatewayOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/clientGateways/*}\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xac\x02\n-com.google.cloud.beyondcorp.clientgateways.v1B\x1a\x43lientGatewaysServiceProtoP\x01ZUcloud.google.com/go/beyondcorp/clientgateways/apiv1/clientgatewayspb;clientgatewayspb\xaa\x02)Google.Cloud.BeyondCorp.ClientGateways.V1\xca\x02)Google\\Cloud\\BeyondCorp\\ClientGateways\\V1\xea\x02-Google::Cloud::BeyondCorp::ClientGateways::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + ClientGateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGateway").msgclass + ClientGateway::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State").enummodule + ListClientGatewaysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest").msgclass + ListClientGatewaysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse").msgclass + GetClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest").msgclass + CreateClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest").msgclass + DeleteClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest").msgclass + ClientGatewayOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGatewayOperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb new file mode 100644 index 000000000000..95cc1f1b36c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto for package 'Google.Cloud.BeyondCorp.ClientGateways.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/beyondcorp/clientgateways/v1/client_gateways_service_pb' + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + module ClientGatewaysService + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The ClientGatewaysService exposes the following resources: + # + # * Client Gateways, named as follows: + # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService' + + # Lists ClientGateways in a given project and location. + rpc :ListClientGateways, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse + # Gets details of a single ClientGateway. + rpc :GetClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway + # Creates a new ClientGateway in a given project and location. + rpc :CreateClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, ::Google::Longrunning::Operation + # Deletes a single ClientGateway. + rpc :DeleteClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md new file mode 100644 index 000000000000..2aa673a2c9ee --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BeyondCorp ClientGateways 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-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb new file mode 100644 index 000000000000..a78c841fea07 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb @@ -0,0 +1,221 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + # Message describing ClientGateway object. + # @!attribute [rw] name + # @return [::String] + # Required. name of resource. The name is ignored during creation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Create time stamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Update time stamp. + # @!attribute [r] state + # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway::State] + # Output only. The operational state of the gateway. + # @!attribute [r] id + # @return [::String] + # Output only. A unique identifier for the instance generated by the system. + # @!attribute [r] client_connector_service + # @return [::String] + # Output only. The client connector service name that the client gateway is + # associated to. Client Connector Services, named as follows: + # `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. + class ClientGateway + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the different states of a gateway. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # Gateway is being created. + CREATING = 1 + + # Gateway is being updated. + UPDATING = 2 + + # Gateway is being deleted. + DELETING = 3 + + # Gateway is running. + RUNNING = 4 + + # Gateway is down and may be restored in the future. + # This happens when CCFE sends ProjectState = OFF. + DOWN = 5 + + # ClientGateway encountered an error and is in indeterministic state. + ERROR = 6 + end + end + + # Message for requesting list of ClientGateways. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListClientGatewaysRequest. + # @!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. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListClientGatewaysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing ClientGateways. + # @!attribute [rw] client_gateways + # @return [::Array<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>] + # The list of ClientGateway. + # @!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 ListClientGatewaysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a ClientGateway. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetClientGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a ClientGateway. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] client_gateway_id + # @return [::String] + # Optional. User-settable client gateway resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @!attribute [rw] client_gateway + # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway] + # 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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class CreateClientGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a ClientGateway + # @!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 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class DeleteClientGatewayRequest + 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 been cancelled successfully + # 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 ClientGatewayOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile new file mode 100644 index 000000000000..d1f6da5a786b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1", path: "../" +else + gem "google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb new file mode 100644 index 000000000000..2ab90c3ca3f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.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 beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] +require "google/cloud/beyond_corp/client_gateways/v1" + +## +# Snippet for the create_client_gateway call in the ClientGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway. +# +def create_client_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new + + # Call the create_client_gateway method. + result = client.create_client_gateway request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb new file mode 100644 index 000000000000..b7bb4a3cbfbe --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.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 beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] +require "google/cloud/beyond_corp/client_gateways/v1" + +## +# Snippet for the delete_client_gateway call in the ClientGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway. +# +def delete_client_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new + + # Call the delete_client_gateway method. + result = client.delete_client_gateway request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb new file mode 100644 index 000000000000..c4c652903450 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] +require "google/cloud/beyond_corp/client_gateways/v1" + +## +# Snippet for the get_client_gateway call in the ClientGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway. +# +def get_client_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new + + # Call the get_client_gateway method. + result = client.get_client_gateway request + + # The returned object is of type Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. + p result +end +# [END beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb new file mode 100644 index 000000000000..129dd2041739 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.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 beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] +require "google/cloud/beyond_corp/client_gateways/v1" + +## +# Snippet for the list_client_gateways call in the ClientGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways. +# +def list_client_gateways + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new + + # Call the list_client_gateways method. + result = client.list_client_gateways request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. + p item + end +end +# [END beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json new file mode 100644 index 000000000000..e3f0d79256e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-cloud-beyond_corp-client_gateways-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.beyondcorp.clientgateways.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync", + "title": "Snippet for the list_client_gateways call in the ClientGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways.", + "file": "client_gateways_service/list_client_gateways.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_client_gateways", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse", + "client": { + "short_name": "ClientGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" + }, + "method": { + "short_name": "ListClientGateways", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.ListClientGateways", + "service": { + "short_name": "ClientGatewaysService", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync", + "title": "Snippet for the get_client_gateway call in the ClientGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway.", + "file": "client_gateways_service/get_client_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_client_gateway", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway", + "client": { + "short_name": "ClientGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" + }, + "method": { + "short_name": "GetClientGateway", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.GetClientGateway", + "service": { + "short_name": "ClientGatewaysService", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync", + "title": "Snippet for the create_client_gateway call in the ClientGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway.", + "file": "client_gateways_service/create_client_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_client_gateway", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ClientGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" + }, + "method": { + "short_name": "CreateClientGateway", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.CreateClientGateway", + "service": { + "short_name": "ClientGatewaysService", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync", + "title": "Snippet for the delete_client_gateway call in the ClientGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway.", + "file": "client_gateways_service/delete_client_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_client_gateway", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ClientGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" + }, + "method": { + "short_name": "DeleteClientGateway", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.DeleteClientGateway", + "service": { + "short_name": "ClientGatewaysService", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "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-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb new file mode 100644 index 000000000000..6800c3abb49c --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_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/beyondcorp/clientgateways/v1/client_gateways_service_pb" +require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" + +class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb new file mode 100644 index 000000000000..07d42d2a5895 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" + +class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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_client_gateway_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.client_gateway_path project: "value0", location: "value1", client_gateway: "value2" + assert_equal "projects/value0/locations/value1/clientGateways/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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb new file mode 100644 index 000000000000..bac47122b4d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb @@ -0,0 +1,385 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/beyondcorp/clientgateways/v1/client_gateways_service_pb" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" + +class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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_client_gateways + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_client_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_client_gateways, name + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, 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_client_gateways_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_client_gateways({ 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_client_gateways 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_client_gateways ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.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_client_gateways({ 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_client_gateways(::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.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_client_gateways_client_stub.call_rpc_count + end + end + + def test_get_client_gateway + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_client_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_client_gateway_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_client_gateway({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_client_gateway name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_client_gateway({ 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_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new(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_client_gateway_client_stub.call_rpc_count + end + end + + def test_create_client_gateway + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + client_gateway_id = "hello world" + client_gateway = {} + request_id = "hello world" + validate_only = true + + create_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_client_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["client_gateway_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway), request["client_gateway"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_client_gateway_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_client_gateway({ parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_client_gateway parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new(parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_client_gateway({ parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new(parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_client_gateway_client_stub.call_rpc_count + end + end + + def test_delete_client_gateway + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + validate_only = true + + delete_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_client_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_client_gateway_client_stub do + # Create client + c = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_client_gateway({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_client_gateway name: name, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_client_gateway({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_client_gateway_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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-bigquery-analytics_hub-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json new file mode 100644 index 000000000000..3411b1f1a8d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "analyticshub.googleapis.com", + "api_shortname": "analyticshub", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/latest", + "distribution_name": "google-cloud-bigquery-analytics_hub-v1", + "is_cloud": true, + "language": "ruby", + "name": "analyticshub", + "name_pretty": "Analytics Hub V1 API", + "product_documentation": "https://cloud.google.com/bigquery/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. Note that google-cloud-bigquery-analytics_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-analytics_hub instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml new file mode 100644 index 000000000000..2f4c3e44583c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-analytics_hub-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-bigquery-analytics_hub-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts new file mode 100644 index 000000000000..ebe913609764 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Analytics Hub V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1f50655d512b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-analytics_hub-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-bigquery-analytics_hub-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/bigquery/analytics_hub/v1" + +client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/analytics_hub/v1" + +::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-bigquery-analytics_hub-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/bigquery/analytics_hub/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md new file mode 100644 index 000000000000..1caa91058c4b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Analytics Hub V1 API + +Exchange data and analytics assets securely and efficiently. + +Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Analytics Hub V1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-analytics_hub](https://rubygems.org/gems/google-cloud-bigquery-analytics_hub). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-analytics_hub-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/analyticshub.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/analytics_hub/v1" + +client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new +request = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new # (request fields as keyword arguments...) +response = client.list_data_exchanges request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/docs) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/bigquery/analytics_hub/v1" +require "logger" + +client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.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-bigquery-analytics_hub`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-analytics_hub-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-bigquery-analytics_hub`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-bigquery-analytics_hub-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile new file mode 100644 index 000000000000..8e449aebabe6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-bigquery-analytics_hub-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-analytics_hub-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-analytics_hub-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-analytics_hub-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bigquery-analytics_hub-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-analytics_hub-v1" + header "google-cloud-bigquery-analytics_hub-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-analytics_hub-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-analytics_hub-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-analytics_hub-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-analytics_hub-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json new file mode 100644 index 000000000000..e7a68c8e3121 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json @@ -0,0 +1,163 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.analyticshub.v1", + "libraryPackage": "::Google::Cloud::Bigquery::AnalyticsHub::V1", + "services": { + "AnalyticsHubService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client", + "rpcs": { + "ListDataExchanges": { + "methods": [ + "list_data_exchanges" + ] + }, + "ListOrgDataExchanges": { + "methods": [ + "list_org_data_exchanges" + ] + }, + "GetDataExchange": { + "methods": [ + "get_data_exchange" + ] + }, + "CreateDataExchange": { + "methods": [ + "create_data_exchange" + ] + }, + "UpdateDataExchange": { + "methods": [ + "update_data_exchange" + ] + }, + "DeleteDataExchange": { + "methods": [ + "delete_data_exchange" + ] + }, + "ListListings": { + "methods": [ + "list_listings" + ] + }, + "GetListing": { + "methods": [ + "get_listing" + ] + }, + "CreateListing": { + "methods": [ + "create_listing" + ] + }, + "UpdateListing": { + "methods": [ + "update_listing" + ] + }, + "DeleteListing": { + "methods": [ + "delete_listing" + ] + }, + "SubscribeListing": { + "methods": [ + "subscribe_listing" + ] + }, + "SubscribeDataExchange": { + "methods": [ + "subscribe_data_exchange" + ] + }, + "RefreshSubscription": { + "methods": [ + "refresh_subscription" + ] + }, + "GetSubscription": { + "methods": [ + "get_subscription" + ] + }, + "ListSubscriptions": { + "methods": [ + "list_subscriptions" + ] + }, + "ListSharedResourceSubscriptions": { + "methods": [ + "list_shared_resource_subscriptions" + ] + }, + "RevokeSubscription": { + "methods": [ + "revoke_subscription" + ] + }, + "DeleteSubscription": { + "methods": [ + "delete_subscription" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "CreateQueryTemplate": { + "methods": [ + "create_query_template" + ] + }, + "GetQueryTemplate": { + "methods": [ + "get_query_template" + ] + }, + "ListQueryTemplates": { + "methods": [ + "list_query_templates" + ] + }, + "UpdateQueryTemplate": { + "methods": [ + "update_query_template" + ] + }, + "DeleteQueryTemplate": { + "methods": [ + "delete_query_template" + ] + }, + "SubmitQueryTemplate": { + "methods": [ + "submit_query_template" + ] + }, + "ApproveQueryTemplate": { + "methods": [ + "approve_query_template" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec new file mode 100644 index 000000000000..bd8a6a00031d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/analytics_hub/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-analytics_hub-v1" + gem.version = Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. Note that google-cloud-bigquery-analytics_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-analytics_hub instead. See the readme for more details." + gem.summary = "Exchange data and analytics assets securely and efficiently." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.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-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb new file mode 100644 index 000000000000..deca319c25cf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/bigquery/analytics_hub/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb new file mode 100644 index 000000000000..b6966426b9a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" +require "google/cloud/bigquery/analytics_hub/v1/version" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/analytics_hub/v1" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/analytics_hub/v1" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/bigquery/analytics_hub/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb new file mode 100644 index 000000000000..7454ae504b54 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/analytics_hub/v1/version" + +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + ## + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + module AnalyticsHubService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "analytics_hub_service", "helpers.rb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb new file mode 100644 index 000000000000..31225b25b7ce --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb @@ -0,0 +1,3312 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + ## + # Client for the AnalyticsHubService service. + # + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :analytics_hub_service_stub + + ## + # Configure the AnalyticsHubService Client class. + # + # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AnalyticsHubService clients + # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "AnalyticsHub", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AnalyticsHubService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @analytics_hub_service_stub.universe_domain + end + + ## + # Create a new AnalyticsHubService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AnalyticsHubService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/bigquery/analyticshub/v1/analyticshub_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 + + @analytics_hub_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @analytics_hub_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @analytics_hub_service_stub.logger + end + + # Service calls + + ## + # Lists all data exchanges in a given project and location. + # + # @overload list_data_exchanges(request, options = nil) + # Pass arguments to `list_data_exchanges` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_exchanges(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the data exchanges. + # e.g. `projects/myproject/locations/us`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new + # + # # Call the list_data_exchanges method. + # result = client.list_data_exchanges request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p item + # end + # + def list_data_exchanges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_exchanges.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_exchanges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_data_exchanges, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all data exchanges from projects in a given organization and + # location. + # + # @overload list_org_data_exchanges(request, options = nil) + # Pass arguments to `list_org_data_exchanges` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_org_data_exchanges(organization: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization [::String] + # Required. The organization resource path of the projects containing + # DataExchanges. e.g. `organizations/myorg/locations/us`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new + # + # # Call the list_org_data_exchanges method. + # result = client.list_org_data_exchanges request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p item + # end + # + def list_org_data_exchanges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_org_data_exchanges.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.organization + header_params["organization"] = request.organization + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_org_data_exchanges.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_org_data_exchanges, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a data exchange. + # + # @overload get_data_exchange(request, options = nil) + # Pass arguments to `get_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_exchange(name: nil) + # Pass arguments to `get_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the data exchange. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new + # + # # Call the get_data_exchange method. + # result = client.get_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def get_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new data exchange. + # + # @overload create_data_exchange(request, options = nil) + # Pass arguments to `create_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil) + # Pass arguments to `create_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the data exchange. + # e.g. `projects/myproject/locations/us`. + # @param data_exchange_id [::String] + # Required. The ID of the data exchange. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] + # Required. The data exchange to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new + # + # # Call the create_data_exchange method. + # result = client.create_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def create_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :create_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing data exchange. + # + # @overload update_data_exchange(request, options = nil) + # Pass arguments to `update_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_exchange(update_mask: nil, data_exchange: nil) + # Pass arguments to `update_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask specifies the fields to update in the data exchange + # resource. The fields specified in the + # `updateMask` are relative to the resource and are not a full request. + # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] + # Required. The data exchange to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new + # + # # Call the update_data_exchange method. + # result = client.update_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def update_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_exchange&.name + header_params["data_exchange.name"] = request.data_exchange.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :update_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing data exchange. + # + # @overload delete_data_exchange(request, options = nil) + # Pass arguments to `delete_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_exchange(name: nil) + # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full name of the data exchange resource that you want to + # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new + # + # # Call the delete_data_exchange method. + # result = client.delete_data_exchange request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :delete_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all listings in a given project and location. + # + # @overload list_listings(request, options = nil) + # Pass arguments to `list_listings` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_listings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_listings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new + # + # # Call the list_listings method. + # result = client.list_listings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p item + # end + # + def list_listings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_listings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_listings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_listings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_listings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a listing. + # + # @overload get_listing(request, options = nil) + # Pass arguments to `get_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_listing(name: nil) + # Pass arguments to `get_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new + # + # # Call the get_listing method. + # result = client.get_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def get_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new listing. + # + # @overload create_listing(request, options = nil) + # Pass arguments to `create_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_listing(parent: nil, listing_id: nil, listing: nil) + # Pass arguments to `create_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param listing_id [::String] + # Required. The ID of the listing to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] + # Required. The listing to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new + # + # # Call the create_listing method. + # result = client.create_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def create_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :create_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing listing. + # + # @overload update_listing(request, options = nil) + # Pass arguments to `update_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_listing(update_mask: nil, listing: nil) + # Pass arguments to `update_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask specifies the fields to update in the listing + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] + # Required. The listing to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new + # + # # Call the update_listing method. + # result = client.update_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def update_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.listing&.name + header_params["listing.name"] = request.listing.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :update_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a listing. + # + # @overload delete_listing(request, options = nil) + # Pass arguments to `delete_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_listing(name: nil, delete_commercial: nil) + # Pass arguments to `delete_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the listing to delete. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # @param delete_commercial [::Boolean] + # Optional. If the listing is commercial then this field must be set to true, + # otherwise a failure is thrown. This acts as a safety guard to avoid + # deleting commercial listings accidentally. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new + # + # # Call the delete_listing method. + # result = client.delete_listing request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :delete_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Subscribes to a listing. + # + # Currently, with Analytics Hub, you can create listings that + # reference only BigQuery datasets. + # Upon subscription to a listing for a BigQuery dataset, Analytics Hub + # creates a linked dataset in the subscriber's project. + # + # @overload subscribe_listing(request, options = nil) + # Pass arguments to `subscribe_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload subscribe_listing(destination_dataset: nil, destination_pubsub_subscription: nil, name: nil) + # Pass arguments to `subscribe_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] + # Input only. BigQuery destination dataset to create for the subscriber. + # + # Note: The following parameters are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. 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 destination_pubsub_subscription [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription, ::Hash] + # Input only. Destination Pub/Sub subscription to create for the + # subscriber. + # + # Note: The following parameters are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. 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 name [::String] + # Required. Resource name of the listing that you want to subscribe to. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new + # + # # Call the subscribe_listing method. + # result = client.subscribe_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. + # p result + # + def subscribe_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.subscribe_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.subscribe_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :subscribe_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Subscription to a Data Clean Room. This is a + # long-running operation as it will create one or more linked datasets. + # Throws a Bad Request error if the Data Exchange does not contain any + # listings. + # + # @overload subscribe_data_exchange(request, options = nil) + # Pass arguments to `subscribe_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload subscribe_data_exchange(name: nil, destination: nil, destination_dataset: nil, subscription: nil, subscriber_contact: nil) + # Pass arguments to `subscribe_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Data Exchange. + # e.g. `projects/publisherproject/locations/us/dataExchanges/123` + # @param destination [::String] + # Required. The parent resource path of the Subscription. + # e.g. `projects/subscriberproject/locations/us` + # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] + # Optional. BigQuery destination dataset to create for the subscriber. + # @param subscription [::String] + # Required. Name of the subscription to create. + # e.g. `subscription1` + # @param subscriber_contact [::String] + # Email of the subscriber. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new + # + # # Call the subscribe_data_exchange method. + # result = client.subscribe_data_exchange request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def subscribe_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.subscribe_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.subscribe_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.subscribe_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :subscribe_data_exchange, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Refreshes a Subscription to a Data Exchange. A Data Exchange can become + # stale when a publisher adds or removes data. This is a long-running + # operation as it may create many linked datasets. + # + # @overload refresh_subscription(request, options = nil) + # Pass arguments to `refresh_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload refresh_subscription(name: nil) + # Pass arguments to `refresh_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Subscription to refresh. + # e.g. `projects/subscriberproject/locations/us/subscriptions/123` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new + # + # # Call the refresh_subscription method. + # result = client.refresh_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def refresh_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.refresh_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.refresh_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.refresh_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :refresh_subscription, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 details of a Subscription. + # + # @overload get_subscription(request, options = nil) + # Pass arguments to `get_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_subscription(name: nil) + # Pass arguments to `get_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription. + # e.g. projects/123/locations/us/subscriptions/456 + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new + # + # # Call the get_subscription method. + # result = client.get_subscription request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p result + # + def get_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_subscription, request, 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 subscriptions in a given project and location. + # + # @overload list_subscriptions(request, options = nil) + # Pass arguments to `list_subscriptions` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_subscriptions(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the subscription. + # e.g. projects/myproject/locations/us + # @param filter [::String] + # An expression for filtering the results of the request. Eligible + # fields for filtering are: + # + # + `listing` + # + `data_exchange` + # + # Alternatively, a literal wrapped in double quotes may be provided. + # This will be checked for an exact match against both fields above. + # + # In all cases, the full Data Exchange or Listing resource name must + # be provided. Some example of using filters: + # + # + data_exchange="projects/myproject/locations/us/dataExchanges/123" + # + listing="projects/123/locations/us/dataExchanges/456/listings/789" + # + "projects/myproject/locations/us/dataExchanges/123" + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. + # @param page_token [::String] + # Page token, returned by a previous call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new + # + # # Call the list_subscriptions method. + # result = client.list_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p item + # end + # + def list_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_subscriptions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_subscriptions, request, response, 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 subscriptions on a given Data Exchange or Listing. + # + # @overload list_shared_resource_subscriptions(request, options = nil) + # Pass arguments to `list_shared_resource_subscriptions` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_shared_resource_subscriptions(resource: nil, include_deleted_subscriptions: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_shared_resource_subscriptions` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the requested target. This resource may be + # either a Listing or a DataExchange. e.g. + # projects/123/locations/us/dataExchanges/456 OR e.g. + # projects/123/locations/us/dataExchanges/456/listings/789 + # @param include_deleted_subscriptions [::Boolean] + # If selected, includes deleted subscriptions in the response + # (up to 63 days after deletion). + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. + # @param page_token [::String] + # Page token, returned by a previous call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new + # + # # Call the list_shared_resource_subscriptions method. + # result = client.list_shared_resource_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p item + # end + # + def list_shared_resource_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_shared_resource_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-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.list_shared_resource_subscriptions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_shared_resource_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_shared_resource_subscriptions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_shared_resource_subscriptions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Revokes a given subscription. + # + # @overload revoke_subscription(request, options = nil) + # Pass arguments to `revoke_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_subscription(name: nil, revoke_commercial: nil) + # Pass arguments to `revoke_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription to revoke. + # e.g. projects/123/locations/us/subscriptions/456 + # @param revoke_commercial [::Boolean] + # Optional. If the subscription is commercial then this field must be set to + # true, otherwise a failure is thrown. This acts as a safety guard to avoid + # revoking commercial subscriptions accidentally. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new + # + # # Call the revoke_subscription method. + # result = client.revoke_subscription request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. + # p result + # + def revoke_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest + + # Converts hash and nil to 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_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.revoke_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :revoke_subscription, request, 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 subscription. + # + # @overload delete_subscription(request, options = nil) + # Pass arguments to `delete_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_subscription(name: nil) + # Pass arguments to `delete_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription to delete. + # e.g. projects/123/locations/us/subscriptions/456 + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new + # + # # Call the delete_subscription method. + # result = client.delete_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest + + # Converts hash and nil to 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_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :delete_subscription, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 IAM policy. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new QueryTemplate + # + # @overload create_query_template(request, options = nil) + # Pass arguments to `create_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_query_template(parent: nil, query_template_id: nil, query_template: nil) + # Pass arguments to `create_query_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 parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. + # @param query_template_id [::String] + # Required. The ID of the QueryTemplate to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] + # Required. The QueryTemplate to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new + # + # # Call the create_query_template method. + # result = client.create_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def create_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest + + # Converts hash and nil to 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_query_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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :create_query_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 + + ## + # Gets a QueryTemplate + # + # @overload get_query_template(request, options = nil) + # Pass arguments to `get_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_query_template(name: nil) + # Pass arguments to `get_query_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 parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new + # + # # Call the get_query_template method. + # result = client.get_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def get_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_query_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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_query_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 all QueryTemplates in a given project and location. + # + # @overload list_query_templates(request, options = nil) + # Pass arguments to `list_query_templates` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_query_templates(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_query_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 parent resource path of the QueryTemplates. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response + # page. Leverage the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Optional. Page token, returned by a previous call, to request the next page + # of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new + # + # # Call the list_query_templates method. + # result = client.list_query_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::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p item + # end + # + def list_query_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_query_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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_query_templates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_query_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_query_templates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_query_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 + + ## + # Updates an existing QueryTemplate + # + # @overload update_query_template(request, options = nil) + # Pass arguments to `update_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_query_template(update_mask: nil, query_template: nil) + # Pass arguments to `update_query_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask specifies the fields to update in the query template + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] + # Required. The QueryTemplate to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new + # + # # Call the update_query_template method. + # result = client.update_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def update_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest + + # Converts hash and nil to 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_query_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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.query_template&.name + header_params["query_template.name"] = request.query_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_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :update_query_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 + + ## + # Deletes a query template. + # + # @overload delete_query_template(request, options = nil) + # Pass arguments to `delete_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_query_template(name: nil) + # Pass arguments to `delete_query_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 path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new + # + # # Call the delete_query_template method. + # result = client.delete_query_template request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest + + # Converts hash and nil to 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_query_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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :delete_query_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 + + ## + # Submits a query template for approval. + # + # @overload submit_query_template(request, options = nil) + # Pass arguments to `submit_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_query_template(name: nil) + # Pass arguments to `submit_query_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 path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new + # + # # Call the submit_query_template method. + # result = client.submit_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def submit_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest + + # Converts hash and nil to 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_query_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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.submit_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :submit_query_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 + + ## + # Approves a query template. + # + # @overload approve_query_template(request, options = nil) + # Pass arguments to `approve_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload approve_query_template(name: nil) + # Pass arguments to `approve_query_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 path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new + # + # # Call the approve_query_template method. + # result = client.approve_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def approve_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.approve_query_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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.approve_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.approve_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :approve_query_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 + + ## + # Configuration class for the AnalyticsHubService API. + # + # This class represents the configuration for AnalyticsHubService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_data_exchanges to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_exchanges.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_exchanges.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "analyticshub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AnalyticsHubService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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_data_exchanges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_exchanges + ## + # RPC-specific configuration for `list_org_data_exchanges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_org_data_exchanges + ## + # RPC-specific configuration for `get_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_exchange + ## + # RPC-specific configuration for `create_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_exchange + ## + # RPC-specific configuration for `update_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_exchange + ## + # RPC-specific configuration for `delete_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_exchange + ## + # RPC-specific configuration for `list_listings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_listings + ## + # RPC-specific configuration for `get_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :get_listing + ## + # RPC-specific configuration for `create_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :create_listing + ## + # RPC-specific configuration for `update_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :update_listing + ## + # RPC-specific configuration for `delete_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_listing + ## + # RPC-specific configuration for `subscribe_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :subscribe_listing + ## + # RPC-specific configuration for `subscribe_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :subscribe_data_exchange + ## + # RPC-specific configuration for `refresh_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :refresh_subscription + ## + # RPC-specific configuration for `get_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_subscription + ## + # RPC-specific configuration for `list_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subscriptions + ## + # RPC-specific configuration for `list_shared_resource_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_shared_resource_subscriptions + ## + # RPC-specific configuration for `revoke_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :revoke_subscription + ## + # RPC-specific configuration for `delete_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_subscription + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_query_template + ## + # RPC-specific configuration for `get_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_query_template + ## + # RPC-specific configuration for `list_query_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_query_templates + ## + # RPC-specific configuration for `update_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :update_query_template + ## + # RPC-specific configuration for `delete_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_query_template + ## + # RPC-specific configuration for `submit_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_query_template + ## + # RPC-specific configuration for `approve_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_query_template + + # @private + def initialize parent_rpcs = nil + list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges + @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config + list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges + @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config + get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange + @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config + create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange + @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config + update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange + @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config + delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange + @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config + list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings + @list_listings = ::Gapic::Config::Method.new list_listings_config + get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing + @get_listing = ::Gapic::Config::Method.new get_listing_config + create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing + @create_listing = ::Gapic::Config::Method.new create_listing_config + update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing + @update_listing = ::Gapic::Config::Method.new update_listing_config + delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing + @delete_listing = ::Gapic::Config::Method.new delete_listing_config + subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing + @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config + subscribe_data_exchange_config = parent_rpcs.subscribe_data_exchange if parent_rpcs.respond_to? :subscribe_data_exchange + @subscribe_data_exchange = ::Gapic::Config::Method.new subscribe_data_exchange_config + refresh_subscription_config = parent_rpcs.refresh_subscription if parent_rpcs.respond_to? :refresh_subscription + @refresh_subscription = ::Gapic::Config::Method.new refresh_subscription_config + get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription + @get_subscription = ::Gapic::Config::Method.new get_subscription_config + list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions + @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config + list_shared_resource_subscriptions_config = parent_rpcs.list_shared_resource_subscriptions if parent_rpcs.respond_to? :list_shared_resource_subscriptions + @list_shared_resource_subscriptions = ::Gapic::Config::Method.new list_shared_resource_subscriptions_config + revoke_subscription_config = parent_rpcs.revoke_subscription if parent_rpcs.respond_to? :revoke_subscription + @revoke_subscription = ::Gapic::Config::Method.new revoke_subscription_config + delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription + @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_query_template_config = parent_rpcs.create_query_template if parent_rpcs.respond_to? :create_query_template + @create_query_template = ::Gapic::Config::Method.new create_query_template_config + get_query_template_config = parent_rpcs.get_query_template if parent_rpcs.respond_to? :get_query_template + @get_query_template = ::Gapic::Config::Method.new get_query_template_config + list_query_templates_config = parent_rpcs.list_query_templates if parent_rpcs.respond_to? :list_query_templates + @list_query_templates = ::Gapic::Config::Method.new list_query_templates_config + update_query_template_config = parent_rpcs.update_query_template if parent_rpcs.respond_to? :update_query_template + @update_query_template = ::Gapic::Config::Method.new update_query_template_config + delete_query_template_config = parent_rpcs.delete_query_template if parent_rpcs.respond_to? :delete_query_template + @delete_query_template = ::Gapic::Config::Method.new delete_query_template_config + submit_query_template_config = parent_rpcs.submit_query_template if parent_rpcs.respond_to? :submit_query_template + @submit_query_template = ::Gapic::Config::Method.new submit_query_template_config + approve_query_template_config = parent_rpcs.approve_query_template if parent_rpcs.respond_to? :approve_query_template + @approve_query_template = ::Gapic::Config::Method.new approve_query_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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb new file mode 100644 index 000000000000..e332f7d1ae56 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + # Credentials for the AnalyticsHubService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb new file mode 100644 index 000000000000..b71c5314e7d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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 Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AnalyticsHubService 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 AnalyticsHubService 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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Bigquery::AnalyticsHub::V1::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 = "analyticshub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the 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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb new file mode 100644 index 000000000000..b65b9b2e215e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.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 Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + # Path helper methods for the AnalyticsHubService API. + module Paths + ## + # Create a fully-qualified DataExchange resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}` + # + # @param project [String] + # @param location [String] + # @param data_exchange [String] + # + # @return [::String] + def data_exchange_path project:, location:, data_exchange: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}` + # + # @param project [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}" + end + + ## + # Create a fully-qualified Listing resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}` + # + # @param project [String] + # @param location [String] + # @param data_exchange [String] + # @param listing [String] + # + # @return [::String] + def listing_path project:, location:, data_exchange:, listing: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_exchange cannot contain /" if data_exchange.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}/listings/#{listing}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified ManagedService resource string. + # + # The resource will be in the following format: + # + # `services/{service}` + # + # @param service [String] + # + # @return [::String] + def managed_service_path service: + "services/#{service}" + end + + ## + # Create a fully-qualified QueryTemplate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}/queryTemplates/{query_template}` + # + # @param project [String] + # @param location [String] + # @param data_exchange [String] + # @param query_template [String] + # + # @return [::String] + def query_template_path project:, location:, data_exchange:, query_template: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_exchange cannot contain /" if data_exchange.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}/queryTemplates/#{query_template}" + end + + ## + # Create a fully-qualified Routine resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}/routines/{routine}` + # + # @param project [String] + # @param dataset [String] + # @param routine [String] + # + # @return [::String] + def routine_path project:, dataset:, routine: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}/routines/#{routine}" + end + + ## + # Create a fully-qualified Subscription resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/subscriptions/{subscription}` + # + # @param project [String] + # @param location [String] + # @param subscription [String] + # + # @return [::String] + def subscription_path project:, location:, subscription: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/subscriptions/#{subscription}" + end + + ## + # Create a fully-qualified Table resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}/tables/{table}` + # + # @param project [String] + # @param dataset [String] + # @param table [String] + # + # @return [::String] + def table_path project:, dataset:, table: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}/tables/#{table}" + end + + ## + # 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 +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb new file mode 100644 index 000000000000..e28b43473888 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/analytics_hub/v1/version" + +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + ## + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + module AnalyticsHubService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb new file mode 100644 index 000000000000..e10fc4ef219f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb @@ -0,0 +1,3066 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + module Rest + ## + # REST client for the AnalyticsHubService service. + # + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :analytics_hub_service_stub + + ## + # Configure the AnalyticsHubService Client class. + # + # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AnalyticsHubService clients + # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "AnalyticsHub", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AnalyticsHubService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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 + @analytics_hub_service_stub.universe_domain + end + + ## + # Create a new AnalyticsHubService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AnalyticsHubService 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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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 + + @analytics_hub_service_stub = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @analytics_hub_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @analytics_hub_service_stub.logger + end + + # Service calls + + ## + # Lists all data exchanges in a given project and location. + # + # @overload list_data_exchanges(request, options = nil) + # Pass arguments to `list_data_exchanges` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_exchanges(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the data exchanges. + # e.g. `projects/myproject/locations/us`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new + # + # # Call the list_data_exchanges method. + # result = client.list_data_exchanges request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p item + # end + # + def list_data_exchanges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_exchanges.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_exchanges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_data_exchanges request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, "data_exchanges", request, result, 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 data exchanges from projects in a given organization and + # location. + # + # @overload list_org_data_exchanges(request, options = nil) + # Pass arguments to `list_org_data_exchanges` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_org_data_exchanges(organization: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization [::String] + # Required. The organization resource path of the projects containing + # DataExchanges. e.g. `organizations/myorg/locations/us`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new + # + # # Call the list_org_data_exchanges method. + # result = client.list_org_data_exchanges request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p item + # end + # + def list_org_data_exchanges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_org_data_exchanges.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_org_data_exchanges.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_org_data_exchanges request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, "data_exchanges", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a data exchange. + # + # @overload get_data_exchange(request, options = nil) + # Pass arguments to `get_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_exchange(name: nil) + # Pass arguments to `get_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the data exchange. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new + # + # # Call the get_data_exchange method. + # result = client.get_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def get_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.get_data_exchange request, 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 data exchange. + # + # @overload create_data_exchange(request, options = nil) + # Pass arguments to `create_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil) + # Pass arguments to `create_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the data exchange. + # e.g. `projects/myproject/locations/us`. + # @param data_exchange_id [::String] + # Required. The ID of the data exchange. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] + # Required. The data exchange to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new + # + # # Call the create_data_exchange method. + # result = client.create_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def create_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.create_data_exchange request, 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 data exchange. + # + # @overload update_data_exchange(request, options = nil) + # Pass arguments to `update_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_exchange(update_mask: nil, data_exchange: nil) + # Pass arguments to `update_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask specifies the fields to update in the data exchange + # resource. The fields specified in the + # `updateMask` are relative to the resource and are not a full request. + # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] + # Required. The data exchange to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new + # + # # Call the update_data_exchange method. + # result = client.update_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def update_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_exchange.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.update_data_exchange request, 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 data exchange. + # + # @overload delete_data_exchange(request, options = nil) + # Pass arguments to `delete_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_exchange(name: nil) + # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full name of the data exchange resource that you want to + # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new + # + # # Call the delete_data_exchange method. + # result = client.delete_data_exchange request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.delete_data_exchange request, 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 listings in a given project and location. + # + # @overload list_listings(request, options = nil) + # Pass arguments to `list_listings` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_listings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_listings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new + # + # # Call the list_listings method. + # result = client.list_listings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p item + # end + # + def list_listings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_listings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_listings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_listings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_listings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, "listings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a listing. + # + # @overload get_listing(request, options = nil) + # Pass arguments to `get_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_listing(name: nil) + # Pass arguments to `get_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new + # + # # Call the get_listing method. + # result = client.get_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def get_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_listing.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.get_listing request, 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 listing. + # + # @overload create_listing(request, options = nil) + # Pass arguments to `create_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_listing(parent: nil, listing_id: nil, listing: nil) + # Pass arguments to `create_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param listing_id [::String] + # Required. The ID of the listing to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] + # Required. The listing to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new + # + # # Call the create_listing method. + # result = client.create_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def create_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_listing.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.create_listing request, 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 listing. + # + # @overload update_listing(request, options = nil) + # Pass arguments to `update_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_listing(update_mask: nil, listing: nil) + # Pass arguments to `update_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask specifies the fields to update in the listing + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] + # Required. The listing to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new + # + # # Call the update_listing method. + # result = client.update_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def update_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_listing.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.update_listing request, 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 listing. + # + # @overload delete_listing(request, options = nil) + # Pass arguments to `delete_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_listing(name: nil, delete_commercial: nil) + # Pass arguments to `delete_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the listing to delete. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # @param delete_commercial [::Boolean] + # Optional. If the listing is commercial then this field must be set to true, + # otherwise a failure is thrown. This acts as a safety guard to avoid + # deleting commercial listings accidentally. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new + # + # # Call the delete_listing method. + # result = client.delete_listing request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_listing.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.delete_listing request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Subscribes to a listing. + # + # Currently, with Analytics Hub, you can create listings that + # reference only BigQuery datasets. + # Upon subscription to a listing for a BigQuery dataset, Analytics Hub + # creates a linked dataset in the subscriber's project. + # + # @overload subscribe_listing(request, options = nil) + # Pass arguments to `subscribe_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload subscribe_listing(destination_dataset: nil, destination_pubsub_subscription: nil, name: nil) + # Pass arguments to `subscribe_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] + # Input only. BigQuery destination dataset to create for the subscriber. + # + # Note: The following parameters are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. 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 destination_pubsub_subscription [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription, ::Hash] + # Input only. Destination Pub/Sub subscription to create for the + # subscriber. + # + # Note: The following parameters are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. 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 name [::String] + # Required. Resource name of the listing that you want to subscribe to. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new + # + # # Call the subscribe_listing method. + # result = client.subscribe_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. + # p result + # + def subscribe_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.subscribe_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.subscribe_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.subscribe_listing request, 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 Subscription to a Data Clean Room. This is a + # long-running operation as it will create one or more linked datasets. + # Throws a Bad Request error if the Data Exchange does not contain any + # listings. + # + # @overload subscribe_data_exchange(request, options = nil) + # Pass arguments to `subscribe_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload subscribe_data_exchange(name: nil, destination: nil, destination_dataset: nil, subscription: nil, subscriber_contact: nil) + # Pass arguments to `subscribe_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Data Exchange. + # e.g. `projects/publisherproject/locations/us/dataExchanges/123` + # @param destination [::String] + # Required. The parent resource path of the Subscription. + # e.g. `projects/subscriberproject/locations/us` + # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] + # Optional. BigQuery destination dataset to create for the subscriber. + # @param subscription [::String] + # Required. Name of the subscription to create. + # e.g. `subscription1` + # @param subscriber_contact [::String] + # Email of the subscriber. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new + # + # # Call the subscribe_data_exchange method. + # result = client.subscribe_data_exchange request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def subscribe_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.subscribe_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.subscribe_data_exchange.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.subscribe_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.subscribe_data_exchange request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Refreshes a Subscription to a Data Exchange. A Data Exchange can become + # stale when a publisher adds or removes data. This is a long-running + # operation as it may create many linked datasets. + # + # @overload refresh_subscription(request, options = nil) + # Pass arguments to `refresh_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload refresh_subscription(name: nil) + # Pass arguments to `refresh_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Subscription to refresh. + # e.g. `projects/subscriberproject/locations/us/subscriptions/123` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new + # + # # Call the refresh_subscription method. + # result = client.refresh_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def refresh_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.refresh_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.refresh_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.refresh_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.refresh_subscription request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a Subscription. + # + # @overload get_subscription(request, options = nil) + # Pass arguments to `get_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_subscription(name: nil) + # Pass arguments to `get_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription. + # e.g. projects/123/locations/us/subscriptions/456 + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new + # + # # Call the get_subscription method. + # result = client.get_subscription request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p result + # + def get_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.get_subscription request, 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 subscriptions in a given project and location. + # + # @overload list_subscriptions(request, options = nil) + # Pass arguments to `list_subscriptions` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_subscriptions(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the subscription. + # e.g. projects/myproject/locations/us + # @param filter [::String] + # An expression for filtering the results of the request. Eligible + # fields for filtering are: + # + # + `listing` + # + `data_exchange` + # + # Alternatively, a literal wrapped in double quotes may be provided. + # This will be checked for an exact match against both fields above. + # + # In all cases, the full Data Exchange or Listing resource name must + # be provided. Some example of using filters: + # + # + data_exchange="projects/myproject/locations/us/dataExchanges/123" + # + listing="projects/123/locations/us/dataExchanges/456/listings/789" + # + "projects/myproject/locations/us/dataExchanges/123" + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. + # @param page_token [::String] + # Page token, returned by a previous call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new + # + # # Call the list_subscriptions method. + # result = client.list_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p item + # end + # + def list_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_subscriptions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_subscriptions, "subscriptions", request, result, 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 subscriptions on a given Data Exchange or Listing. + # + # @overload list_shared_resource_subscriptions(request, options = nil) + # Pass arguments to `list_shared_resource_subscriptions` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_shared_resource_subscriptions(resource: nil, include_deleted_subscriptions: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_shared_resource_subscriptions` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the requested target. This resource may be + # either a Listing or a DataExchange. e.g. + # projects/123/locations/us/dataExchanges/456 OR e.g. + # projects/123/locations/us/dataExchanges/456/listings/789 + # @param include_deleted_subscriptions [::Boolean] + # If selected, includes deleted subscriptions in the response + # (up to 63 days after deletion). + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. + # @param page_token [::String] + # Page token, returned by a previous call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new + # + # # Call the list_shared_resource_subscriptions method. + # result = client.list_shared_resource_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p item + # end + # + def list_shared_resource_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_shared_resource_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_shared_resource_subscriptions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_shared_resource_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_shared_resource_subscriptions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_shared_resource_subscriptions, "shared_resource_subscriptions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Revokes a given subscription. + # + # @overload revoke_subscription(request, options = nil) + # Pass arguments to `revoke_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_subscription(name: nil, revoke_commercial: nil) + # Pass arguments to `revoke_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription to revoke. + # e.g. projects/123/locations/us/subscriptions/456 + # @param revoke_commercial [::Boolean] + # Optional. If the subscription is commercial then this field must be set to + # true, otherwise a failure is thrown. This acts as a safety guard to avoid + # revoking commercial subscriptions accidentally. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new + # + # # Call the revoke_subscription method. + # result = client.revoke_subscription request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. + # p result + # + def revoke_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest + + # Converts hash and nil to an 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_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.revoke_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.revoke_subscription request, 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 subscription. + # + # @overload delete_subscription(request, options = nil) + # Pass arguments to `delete_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_subscription(name: nil) + # Pass arguments to `delete_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription to delete. + # e.g. projects/123/locations/us/subscriptions/456 + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new + # + # # Call the delete_subscription method. + # result = client.delete_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest + + # Converts hash and nil to an 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_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.delete_subscription request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @analytics_hub_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. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @analytics_hub_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @analytics_hub_service_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new QueryTemplate + # + # @overload create_query_template(request, options = nil) + # Pass arguments to `create_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_query_template(parent: nil, query_template_id: nil, query_template: nil) + # Pass arguments to `create_query_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 parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. + # @param query_template_id [::String] + # Required. The ID of the QueryTemplate to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] + # Required. The QueryTemplate to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new + # + # # Call the create_query_template method. + # result = client.create_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def create_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest + + # Converts hash and nil to an 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_query_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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.create_query_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 + + ## + # Gets a QueryTemplate + # + # @overload get_query_template(request, options = nil) + # Pass arguments to `get_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_query_template(name: nil) + # Pass arguments to `get_query_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 parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new + # + # # Call the get_query_template method. + # result = client.get_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def get_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_query_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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.get_query_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 all QueryTemplates in a given project and location. + # + # @overload list_query_templates(request, options = nil) + # Pass arguments to `list_query_templates` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_query_templates(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_query_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 parent resource path of the QueryTemplates. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response + # page. Leverage the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Optional. Page token, returned by a previous call, to request the next page + # of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new + # + # # Call the list_query_templates method. + # result = client.list_query_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::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p item + # end + # + def list_query_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_query_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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_query_templates.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_query_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_query_templates request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_query_templates, "query_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 + + ## + # Updates an existing QueryTemplate + # + # @overload update_query_template(request, options = nil) + # Pass arguments to `update_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_query_template(update_mask: nil, query_template: nil) + # Pass arguments to `update_query_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask specifies the fields to update in the query template + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] + # Required. The QueryTemplate to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new + # + # # Call the update_query_template method. + # result = client.update_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def update_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest + + # Converts hash and nil to an 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_query_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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.update_query_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 + + ## + # Deletes a query template. + # + # @overload delete_query_template(request, options = nil) + # Pass arguments to `delete_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_query_template(name: nil) + # Pass arguments to `delete_query_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 path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new + # + # # Call the delete_query_template method. + # result = client.delete_query_template request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest + + # Converts hash and nil to an 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_query_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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.delete_query_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 + + ## + # Submits a query template for approval. + # + # @overload submit_query_template(request, options = nil) + # Pass arguments to `submit_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_query_template(name: nil) + # Pass arguments to `submit_query_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 path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new + # + # # Call the submit_query_template method. + # result = client.submit_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def submit_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest + + # Converts hash and nil to an 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_query_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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.submit_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.submit_query_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 + + ## + # Approves a query template. + # + # @overload approve_query_template(request, options = nil) + # Pass arguments to `approve_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload approve_query_template(name: nil) + # Pass arguments to `approve_query_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 path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new + # + # # Call the approve_query_template method. + # result = client.approve_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def approve_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.approve_query_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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.approve_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.approve_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.approve_query_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 + + ## + # Configuration class for the AnalyticsHubService REST API. + # + # This class represents the configuration for AnalyticsHubService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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_data_exchanges to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_exchanges.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_exchanges.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`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 = "analyticshub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + 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 AnalyticsHubService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental 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_data_exchanges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_exchanges + ## + # RPC-specific configuration for `list_org_data_exchanges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_org_data_exchanges + ## + # RPC-specific configuration for `get_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_exchange + ## + # RPC-specific configuration for `create_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_exchange + ## + # RPC-specific configuration for `update_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_exchange + ## + # RPC-specific configuration for `delete_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_exchange + ## + # RPC-specific configuration for `list_listings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_listings + ## + # RPC-specific configuration for `get_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :get_listing + ## + # RPC-specific configuration for `create_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :create_listing + ## + # RPC-specific configuration for `update_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :update_listing + ## + # RPC-specific configuration for `delete_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_listing + ## + # RPC-specific configuration for `subscribe_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :subscribe_listing + ## + # RPC-specific configuration for `subscribe_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :subscribe_data_exchange + ## + # RPC-specific configuration for `refresh_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :refresh_subscription + ## + # RPC-specific configuration for `get_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_subscription + ## + # RPC-specific configuration for `list_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subscriptions + ## + # RPC-specific configuration for `list_shared_resource_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_shared_resource_subscriptions + ## + # RPC-specific configuration for `revoke_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :revoke_subscription + ## + # RPC-specific configuration for `delete_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_subscription + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_query_template + ## + # RPC-specific configuration for `get_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_query_template + ## + # RPC-specific configuration for `list_query_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_query_templates + ## + # RPC-specific configuration for `update_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :update_query_template + ## + # RPC-specific configuration for `delete_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_query_template + ## + # RPC-specific configuration for `submit_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_query_template + ## + # RPC-specific configuration for `approve_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_query_template + + # @private + def initialize parent_rpcs = nil + list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges + @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config + list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges + @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config + get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange + @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config + create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange + @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config + update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange + @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config + delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange + @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config + list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings + @list_listings = ::Gapic::Config::Method.new list_listings_config + get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing + @get_listing = ::Gapic::Config::Method.new get_listing_config + create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing + @create_listing = ::Gapic::Config::Method.new create_listing_config + update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing + @update_listing = ::Gapic::Config::Method.new update_listing_config + delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing + @delete_listing = ::Gapic::Config::Method.new delete_listing_config + subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing + @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config + subscribe_data_exchange_config = parent_rpcs.subscribe_data_exchange if parent_rpcs.respond_to? :subscribe_data_exchange + @subscribe_data_exchange = ::Gapic::Config::Method.new subscribe_data_exchange_config + refresh_subscription_config = parent_rpcs.refresh_subscription if parent_rpcs.respond_to? :refresh_subscription + @refresh_subscription = ::Gapic::Config::Method.new refresh_subscription_config + get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription + @get_subscription = ::Gapic::Config::Method.new get_subscription_config + list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions + @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config + list_shared_resource_subscriptions_config = parent_rpcs.list_shared_resource_subscriptions if parent_rpcs.respond_to? :list_shared_resource_subscriptions + @list_shared_resource_subscriptions = ::Gapic::Config::Method.new list_shared_resource_subscriptions_config + revoke_subscription_config = parent_rpcs.revoke_subscription if parent_rpcs.respond_to? :revoke_subscription + @revoke_subscription = ::Gapic::Config::Method.new revoke_subscription_config + delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription + @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_query_template_config = parent_rpcs.create_query_template if parent_rpcs.respond_to? :create_query_template + @create_query_template = ::Gapic::Config::Method.new create_query_template_config + get_query_template_config = parent_rpcs.get_query_template if parent_rpcs.respond_to? :get_query_template + @get_query_template = ::Gapic::Config::Method.new get_query_template_config + list_query_templates_config = parent_rpcs.list_query_templates if parent_rpcs.respond_to? :list_query_templates + @list_query_templates = ::Gapic::Config::Method.new list_query_templates_config + update_query_template_config = parent_rpcs.update_query_template if parent_rpcs.respond_to? :update_query_template + @update_query_template = ::Gapic::Config::Method.new update_query_template_config + delete_query_template_config = parent_rpcs.delete_query_template if parent_rpcs.respond_to? :delete_query_template + @delete_query_template = ::Gapic::Config::Method.new delete_query_template_config + submit_query_template_config = parent_rpcs.submit_query_template if parent_rpcs.respond_to? :submit_query_template + @submit_query_template = ::Gapic::Config::Method.new submit_query_template_config + approve_query_template_config = parent_rpcs.approve_query_template if parent_rpcs.respond_to? :approve_query_template + @approve_query_template = ::Gapic::Config::Method.new approve_query_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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb new file mode 100644 index 000000000000..65ac6b2da261 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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 Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AnalyticsHubService 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 AnalyticsHubService 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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "analyticshub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + 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 +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb new file mode 100644 index 000000000000..eb7052b18758 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb @@ -0,0 +1,1914 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + module Rest + ## + # REST service stub for the AnalyticsHubService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: false, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_data_exchanges REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse] + # A result object deserialized from the server's reply + def list_data_exchanges request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_exchanges_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_exchanges", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.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_org_data_exchanges REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse] + # A result object deserialized from the server's reply + def list_org_data_exchanges request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_org_data_exchanges_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_org_data_exchanges", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # A result object deserialized from the server's reply + def get_data_exchange request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_exchange_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_exchange", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # A result object deserialized from the server's reply + def create_data_exchange request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_exchange_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_data_exchange", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # A result object deserialized from the server's reply + def update_data_exchange request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_exchange_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_exchange", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_data_exchange request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_exchange_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_data_exchange", + 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_listings REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse] + # A result object deserialized from the server's reply + def list_listings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_listings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_listings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # A result object deserialized from the server's reply + def get_listing request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_listing_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_listing", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.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_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # A result object deserialized from the server's reply + def create_listing request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_listing_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_listing", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.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_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # A result object deserialized from the server's reply + def update_listing request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_listing_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_listing", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.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_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_listing request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_listing_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_listing", + 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 subscribe_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # A result object deserialized from the server's reply + def subscribe_listing request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_listing_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "subscribe_listing", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the subscribe_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def subscribe_data_exchange request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_data_exchange_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "subscribe_data_exchange", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the refresh_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def refresh_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_refresh_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "refresh_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # A result object deserialized from the server's reply + def get_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.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_subscriptions REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse] + # A result object deserialized from the server's reply + def list_subscriptions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_subscriptions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_subscriptions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.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_shared_resource_subscriptions REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse] + # A result object deserialized from the server's reply + def list_shared_resource_subscriptions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_shared_resource_subscriptions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_shared_resource_subscriptions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.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_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # A result object deserialized from the server's reply + def revoke_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_revoke_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.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_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # A result object deserialized from the server's reply + def create_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_query_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_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # A result object deserialized from the server's reply + def get_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_query_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_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.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_query_templates REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse] + # A result object deserialized from the server's reply + def list_query_templates request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_query_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_query_templates", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.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_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # A result object deserialized from the server's reply + def update_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_query_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_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.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_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_query_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_query_template", + 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 submit_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # A result object deserialized from the server's reply + def submit_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_submit_query_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: "submit_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the approve_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # A result object deserialized from the server's reply + def approve_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_approve_query_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: "approve_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.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_data_exchanges REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_exchanges_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataExchanges", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_org_data_exchanges REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_org_data_exchanges_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{organization}/dataExchanges", + matches: [ + ["organization", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_exchange_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_exchange_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataExchanges", + body: "data_exchange", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_exchange_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_exchange.name}", + body: "data_exchange", + matches: [ + ["data_exchange.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_exchange_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_listings REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_listings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/listings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_listing_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest] + # 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_listing_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/listings", + body: "listing", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest] + # 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_listing_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{listing.name}", + body: "listing", + matches: [ + ["listing.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest] + # 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_listing_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the subscribe_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_subscribe_listing_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:subscribe", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the subscribe_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_subscribe_data_exchange_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:subscribe", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the refresh_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_refresh_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:refresh", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_subscriptions REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_subscriptions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/subscriptions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_shared_resource_subscriptions REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_shared_resource_subscriptions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:listSubscriptions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:listSubscriptions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the revoke_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest] + # 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_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:revoke", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest] + # 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_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest] + # 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_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/queryTemplates", + body: "query_template", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_query_templates REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_query_templates_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/queryTemplates", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest] + # 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_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{query_template.name}", + body: "query_template", + matches: [ + ["query_template.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest] + # 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_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the submit_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest] + # 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_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:submit", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the approve_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_approve_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:approve", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb new file mode 100644 index 000000000000..956e85f4e541 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" +require "google/cloud/bigquery/analytics_hub/v1/version" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/analytics_hub/v1/rest" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb new file mode 100644 index 000000000000..e4441834988c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb new file mode 100644 index 000000000000..15eaaf36c9dd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/bigquery/analyticshub/v1/pubsub_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/protobuf/wrappers_pb' + + +descriptor_data = "\n8google/cloud/bigquery/analyticshub/v1/analyticshub.proto\x12%google.cloud.bigquery.analyticshub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/bigquery/analyticshub/v1/pubsub.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\x1egoogle/protobuf/wrappers.proto\"\xe9\x04\n\x0c\x44\x61taExchange\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlisting_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01\x12h\n\x1asharing_environment_config\x18\x08 \x01(\x0b\x32?.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfigB\x03\xe0\x41\x01\x12V\n\x0e\x64iscovery_type\x18\t \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.DiscoveryTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x35\n#log_linked_dataset_query_user_email\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01:t\xea\x41q\n(analyticshub.googleapis.com/DataExchange\x12\x45projects/{project}/locations/{location}/dataExchanges/{data_exchange}B\x11\n\x0f_discovery_typeB&\n$_log_linked_dataset_query_user_email\"\xb7\x05\n\rQueryTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08proposer\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12N\n\x05state\x18\x06 \x01(\x0e\x32:.google.cloud.bigquery.analyticshub.v1.QueryTemplate.StateB\x03\xe0\x41\x03\x12\x44\n\x07routine\x18\x07 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.RoutineB\x03\xe0\x41\x01\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\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44RAFTED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x0c\n\x08\x41PPROVED\x10\x04:\xb5\x01\xea\x41\xb1\x01\n)analyticshub.googleapis.com/QueryTemplate\x12\x65projects/{project}/locations/{location}/dataExchanges/{data_exchange}/queryTemplates/{query_template}*\x0equeryTemplates2\rqueryTemplate\"\xc6\x01\n\x07Routine\x12U\n\x0croutine_type\x18\x01 \x01(\x0e\x32:.google.cloud.bigquery.analyticshub.v1.Routine.RoutineTypeB\x03\xe0\x41\x02\x12\x1c\n\x0f\x64\x65\x66inition_body\x18\x02 \x01(\tB\x03\xe0\x41\x01\"F\n\x0bRoutineType\x12\x1c\n\x18ROUTINE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15TABLE_VALUED_FUNCTION\x10\x01\"\xd1\x01\n\x1a\x43reateQueryTemplateRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x1e\n\x11query_template_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x0equery_template\x18\x03 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplateB\x03\xe0\x41\x02\"Z\n\x17GetQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"\x8e\x01\n\x19ListQueryTemplatesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\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\"\x84\x01\n\x1aListQueryTemplatesResponse\x12M\n\x0fquery_templates\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa5\x01\n\x1aUpdateQueryTemplateRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12Q\n\x0equery_template\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplateB\x03\xe0\x41\x02\"]\n\x1a\x44\x65leteQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"]\n\x1aSubmitQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"^\n\x1b\x41pproveQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"\x94\x04\n\x18SharingEnvironmentConfig\x12x\n\x17\x64\x65\x66\x61ult_exchange_config\x18\x01 \x01(\x0b\x32U.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfigH\x00\x12p\n\x13\x64\x63r_exchange_config\x18\x02 \x01(\x0b\x32Q.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfigH\x00\x1a\x17\n\x15\x44\x65\x66\x61ultExchangeConfig\x1a\xe3\x01\n\x11\x44\x63rExchangeConfig\x12>\n,single_selected_resource_sharing_restriction\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x35\n#single_linked_dataset_per_cleanroom\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42/\n-_single_selected_resource_sharing_restrictionB&\n$_single_linked_dataset_per_cleanroomB\r\n\x0b\x65nvironment\"?\n\x0c\x44\x61taProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"<\n\tPublisher\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"O\n\x1b\x44\x65stinationDatasetReference\x12\x17\n\ndataset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xac\x03\n\x12\x44\x65stinationDataset\x12\x62\n\x11\x64\x61taset_reference\x18\x01 \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceB\x03\xe0\x41\x02\x12\x38\n\rfriendly_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12\x36\n\x0b\x64\x65scription\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12Z\n\x06labels\x18\x04 \x03(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.DestinationDataset.LabelsEntryB\x03\xe0\x41\x01\x12\x15\n\x08location\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11replica_locations\x18\x06 \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\x1d\x44\x65stinationPubSubSubscription\x12[\n\x13pubsub_subscription\x18\x01 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.PubSubSubscriptionB\x03\xe0\x41\x02\"\x87!\n\x07Listing\x12`\n\x10\x62igquery_dataset\x18\x06 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceH\x00\x12X\n\x0cpubsub_topic\x18\x10 \x01(\x0b\x32@.google.cloud.bigquery.analyticshub.v1.Listing.PubSubTopicSourceH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12H\n\x05state\x18\x07 \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.Listing.StateB\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12O\n\rdata_provider\x18\t \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataProviderB\x03\xe0\x41\x01\x12P\n\ncategories\x18\n \x03(\x0e\x32\x37.google.cloud.bigquery.analyticshub.v1.Listing.CategoryB\x03\xe0\x41\x01\x12H\n\tpublisher\x18\x0b \x01(\x0b\x32\x30.google.cloud.bigquery.analyticshub.v1.PublisherB\x03\xe0\x41\x01\x12\x1b\n\x0erequest_access\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12l\n\x18restricted_export_config\x18\r \x01(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfigB\x03\xe0\x41\x01\x12\x62\n\x17stored_procedure_config\x18\x14 \x01(\x0b\x32<.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfigB\x03\xe0\x41\x01\x12V\n\x0e\x64iscovery_type\x18\x0e \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.DiscoveryTypeB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12U\n\rresource_type\x18\x0f \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.SharedResourceTypeB\x03\xe0\x41\x03\x12`\n\x0f\x63ommercial_info\x18\x11 \x01(\x0b\x32=.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfoB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x35\n#log_linked_dataset_query_user_email\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x61llow_only_metadata_sharing\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x1a\x84\n\n\x15\x42igQueryDatasetSource\x12\x38\n\x07\x64\x61taset\x18\x01 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x62igquery.googleapis.com/Dataset\x12v\n\x12selected_resources\x18\x02 \x03(\x0b\x32U.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResourceB\x03\xe0\x41\x01\x12\x82\x01\n\x18restricted_export_policy\x18\x03 \x01(\x0b\x32[.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicyB\x03\xe0\x41\x01\x12\x1e\n\x11replica_locations\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12m\n\x12\x65\x66\x66\x65\x63tive_replicas\x18\x06 \x03(\x0b\x32L.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.ReplicaB\x03\xe0\x41\x03\x1a\x92\x01\n\x10SelectedResource\x12\x36\n\x05table\x18\x01 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/TableH\x00\x12:\n\x07routine\x18\x02 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x62igquery.googleapis.com/RoutineH\x00\x42\n\n\x08resource\x1a\xd1\x01\n\x16RestrictedExportPolicy\x12\x30\n\x07\x65nabled\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12\x45\n\x1crestrict_direct_table_access\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12>\n\x15restrict_query_result\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x1a\xbb\x03\n\x07Replica\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12u\n\rreplica_state\x18\x02 \x01(\x0e\x32Y.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.ReplicaStateB\x03\xe0\x41\x03\x12z\n\rprimary_state\x18\x03 \x01(\x0e\x32Y.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.PrimaryStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\"P\n\x0cReplicaState\x12\x1d\n\x19REPLICA_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cREADY_TO_USE\x10\x01\x12\x0f\n\x0bUNAVAILABLE\x10\x02\"B\n\x0cPrimaryState\x12\x1d\n\x19PRIMARY_STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fPRIMARY_REPLICA\x10\x01\x42\x10\n\x0e_primary_state\x1ak\n\x11PubSubTopicSource\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\"\n\x15\x64\x61ta_affinity_regions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a}\n\x16RestrictedExportConfig\x12\x14\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1crestrict_direct_table_access\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12\"\n\x15restrict_query_result\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x94\x04\n\x0e\x43ommercialInfo\x12}\n\x11\x63loud_marketplace\x18\x01 \x01(\x0b\x32X.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfoB\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\xec\x02\n\x1aGoogleCloudMarketplaceInfo\x12M\n\x07service\x18\x01 \x01(\tB7\xe0\x41\x03\xfa\x41\x31\n/servicemanagement.googleapis.com/ManagedServiceH\x00\x88\x01\x01\x12\x8c\x01\n\x10\x63ommercial_state\x18\x03 \x01(\x0e\x32h.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo.CommercialStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\"O\n\x0f\x43ommercialState\x12 \n\x1c\x43OMMERCIAL_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nONBOARDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x42\n\n\x08_serviceB\x13\n\x11_commercial_stateB\x14\n\x12_cloud_marketplace\"*\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\"\xd9\x04\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43\x41TEGORY_OTHERS\x10\x01\x12&\n\"CATEGORY_ADVERTISING_AND_MARKETING\x10\x02\x12\x15\n\x11\x43\x41TEGORY_COMMERCE\x10\x03\x12$\n CATEGORY_CLIMATE_AND_ENVIRONMENT\x10\x04\x12\x19\n\x15\x43\x41TEGORY_DEMOGRAPHICS\x10\x05\x12\x16\n\x12\x43\x41TEGORY_ECONOMICS\x10\x06\x12\x16\n\x12\x43\x41TEGORY_EDUCATION\x10\x07\x12\x13\n\x0f\x43\x41TEGORY_ENERGY\x10\x08\x12\x16\n\x12\x43\x41TEGORY_FINANCIAL\x10\t\x12\x13\n\x0f\x43\x41TEGORY_GAMING\x10\n\x12\x17\n\x13\x43\x41TEGORY_GEOSPATIAL\x10\x0b\x12(\n$CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE\x10\x0c\x12\x12\n\x0e\x43\x41TEGORY_MEDIA\x10\r\x12\x1a\n\x16\x43\x41TEGORY_PUBLIC_SECTOR\x10\x0e\x12\x13\n\x0f\x43\x41TEGORY_RETAIL\x10\x0f\x12\x13\n\x0f\x43\x41TEGORY_SPORTS\x10\x10\x12!\n\x1d\x43\x41TEGORY_SCIENCE_AND_RESEARCH\x10\x11\x12)\n%CATEGORY_TRANSPORTATION_AND_LOGISTICS\x10\x12\x12\x1f\n\x1b\x43\x41TEGORY_TRAVEL_AND_TOURISM\x10\x13\x12 \n\x1c\x43\x41TEGORY_GOOGLE_EARTH_ENGINE\x10\x14:\x82\x01\xea\x41\x7f\n#analyticshub.googleapis.com/Listing\x12Xprojects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}B\x08\n\x06sourceB\x11\n\x0f_discovery_typeB\x12\n\x10_commercial_infoB&\n$_log_linked_dataset_query_user_emailB\x1e\n\x1c_allow_only_metadata_sharing\"\xfd\x01\n\x15StoredProcedureConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12}\n\x1e\x61llowed_stored_procedure_types\x18\x02 \x03(\x0e\x32P.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureTypeB\x03\xe0\x41\x03\"O\n\x13StoredProcedureType\x12%\n!STORED_PROCEDURE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSQL_PROCEDURE\x10\x01\"\x98\r\n\x0cSubscription\x12\x16\n\x07listing\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1c\n\rdata_exchange\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rcreation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_modify_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19organization_display_name\x18\n \x01(\tB\x03\xe0\x41\x03\x12M\n\x05state\x18\x07 \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.Subscription.StateB\x03\xe0\x41\x03\x12j\n\x12linked_dataset_map\x18\x08 \x03(\x0b\x32I.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedDatasetMapEntryB\x03\xe0\x41\x03\x12\x1f\n\x12subscriber_contact\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x61\n\x10linked_resources\x18\x0b \x03(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResourceB\x03\xe0\x41\x03\x12U\n\rresource_type\x18\x0c \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.SharedResourceTypeB\x03\xe0\x41\x03\x12`\n\x0f\x63ommercial_info\x18\r \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfoB\x03\xe0\x41\x03\x12\x35\n#log_linked_dataset_query_user_email\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12[\n\x13\x64\x65stination_dataset\x18\x0f \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x01\x1a}\n\x0eLinkedResource\x12\x1d\n\x0elinked_dataset\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x12)\n\x1alinked_pubsub_subscription\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x14\n\x07listing\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42\x0b\n\treference\x1a\xf8\x01\n\x0e\x43ommercialInfo\x12}\n\x11\x63loud_marketplace\x18\x01 \x01(\x0b\x32].google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo.GoogleCloudMarketplaceInfoB\x03\xe0\x41\x03\x1ag\n\x1aGoogleCloudMarketplaceInfo\x12I\n\x05order\x18\x01 \x01(\tB:\xfa\x41\x37\n5cloudcommerceconsumerprocurement.googleapis.com/Order\x1a{\n\x15LinkedDatasetMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource:\x02\x38\x01\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATE_ACTIVE\x10\x01\x12\x0f\n\x0bSTATE_STALE\x10\x02\x12\x12\n\x0eSTATE_INACTIVE\x10\x03:s\xea\x41p\n(analyticshub.googleapis.com/Subscription\x12\x44projects/{project}/locations/{location}/subscriptions/{subscription}B\x0f\n\rresource_nameB&\n$_log_linked_dataset_query_user_email\"\x83\x01\n\x18ListDataExchangesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/DataExchange\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x19ListDataExchangesResponse\x12K\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x1bListOrgDataExchangesRequest\x12\x19\n\x0corganization\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1cListOrgDataExchangesResponse\x12K\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x16GetDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"\xcd\x01\n\x19\x43reateDataExchangeRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/DataExchange\x12\x1d\n\x10\x64\x61ta_exchange_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\rdata_exchange\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchangeB\x03\xe0\x41\x02\"\xa2\x01\n\x19UpdateDataExchangeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12O\n\rdata_exchange\x18\x02 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchangeB\x03\xe0\x41\x02\"[\n\x19\x44\x65leteDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"~\n\x13ListListingsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"q\n\x14ListListingsResponse\x12@\n\x08listings\x18\x01 \x03(\x0b\x32..google.cloud.bigquery.analyticshub.v1.Listing\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x11GetListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\"\xb7\x01\n\x14\x43reateListingRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x17\n\nlisting_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x07listing\x18\x03 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.ListingB\x03\xe0\x41\x02\"\x92\x01\n\x14UpdateListingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\x07listing\x18\x02 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.ListingB\x03\xe0\x41\x02\"q\n\x14\x44\x65leteListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\x12\x1e\n\x11\x64\x65lete_commercial\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x02\n\x17SubscribeListingRequest\x12]\n\x13\x64\x65stination_dataset\x18\x03 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x04H\x00\x12t\n\x1f\x64\x65stination_pubsub_subscription\x18\x05 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.DestinationPubSubSubscriptionB\x03\xe0\x41\x04H\x00\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/ListingB\r\n\x0b\x64\x65stination\"e\n\x18SubscribeListingResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"\xb2\x02\n\x1cSubscribeDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12>\n\x0b\x64\x65stination\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12[\n\x13\x64\x65stination_dataset\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x01\x12\x19\n\x0csubscription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x12subscriber_contact\x18\x03 \x01(\t\"j\n\x1dSubscribeDataExchangeResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"\\\n\x1aRefreshSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"h\n\x1bRefreshSubscriptionResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"X\n\x16GetSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"\x93\x01\n\x18ListSubscriptionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/Subscription\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\"\x80\x01\n\x19ListSubscriptionsResponse\x12J\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x93\x01\n&ListSharedResourceSubscriptionsRequest\x12\x1b\n\x08resource\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12%\n\x1dinclude_deleted_subscriptions\x18\x02 \x01(\x08\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x9e\x01\n\'ListSharedResourceSubscriptionsResponse\x12Z\n\x1dshared_resource_subscriptions\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"{\n\x19RevokeSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\x12\x1e\n\x11revoke_commercial\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x1c\n\x1aRevokeSubscriptionResponse\"[\n\x19\x44\x65leteSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"\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*f\n\rDiscoveryType\x12\x1e\n\x1a\x44ISCOVERY_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x44ISCOVERY_TYPE_PRIVATE\x10\x01\x12\x19\n\x15\x44ISCOVERY_TYPE_PUBLIC\x10\x02*b\n\x12SharedResourceType\x12$\n SHARED_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42IGQUERY_DATASET\x10\x01\x12\x10\n\x0cPUBSUB_TOPIC\x10\x02\x32\x80\x38\n\x13\x41nalyticsHubService\x12\xda\x01\n\x11ListDataExchanges\x12?.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest\x1a@.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/dataExchanges\x12\xf4\x01\n\x14ListOrgDataExchanges\x12\x42.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest\x1a\x43.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse\"S\xda\x41\x0corganization\x82\xd3\xe4\x93\x02>\x12\x12\x12*.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest\x1a?.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\"F/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe:\x01*\x12\x80\x02\n\x15SubscribeDataExchange\x12\x43.google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x32\n\x1dSubscribeDataExchangeResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/locations/*/dataExchanges/*}:subscribe:\x01*\x12\xf7\x01\n\x13RefreshSubscription\x12\x41.google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x30\n\x1bRefreshSubscriptionResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v1/{name=projects/*/locations/*/subscriptions/*}:refresh:\x01*\x12\xc7\x01\n\x0fGetSubscription\x12=.google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest\x1a\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/subscriptions/*}\x12\xda\x01\n\x11ListSubscriptions\x12?.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest\x1a@.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/subscriptions\x12\xf4\x02\n\x1fListSharedResourceSubscriptions\x12M.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest\x1aN.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsResponse\"\xb1\x01\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x9f\x01\x12G/v1/{resource=projects/*/locations/*/dataExchanges/*}:listSubscriptionsZT\x12R/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:listSubscriptions\x12\xe5\x01\n\x12RevokeSubscription\x12@.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest\x1a\x41.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionResponse\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v1/{name=projects/*/locations/*/subscriptions/*}:revoke:\x01*\x12\xe4\x01\n\x12\x44\x65leteSubscription\x12@.google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/subscriptions/*}\x12\xb7\x02\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xeb\x01\x82\xd3\xe4\x93\x02\xe4\x01\"B/v1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy:\x01*ZR\"M/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy:\x01*ZG\"B/v1/{resource=projects/*/locations/*/subscriptions/*}:getIamPolicy:\x01*\x12\xb7\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xeb\x01\x82\xd3\xe4\x93\x02\xe4\x01\"B/v1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy:\x01*ZR\"M/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy:\x01*ZG\"B/v1/{resource=projects/*/locations/*/subscriptions/*}:setIamPolicy:\x01*\x12\x9a\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xae\x01\x82\xd3\xe4\x93\x02\xa7\x01\"H/v1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions:\x01*ZX\"S/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions:\x01*\x12\x95\x02\n\x13\x43reateQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.CreateQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\x84\x01\xda\x41\'parent,query_template,query_template_id\x82\xd3\xe4\x93\x02T\"B/v1/{parent=projects/*/locations/*/dataExchanges/*}/queryTemplates:\x0equery_template\x12\xdb\x01\n\x10GetQueryTemplate\x12>.google.cloud.bigquery.analyticshub.v1.GetQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}\x12\xee\x01\n\x12ListQueryTemplates\x12@.google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesRequest\x1a\x41.google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/dataExchanges/*}/queryTemplates\x12\x97\x02\n\x13UpdateQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.UpdateQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\x86\x01\xda\x41\x1aquery_template,update_mask\x82\xd3\xe4\x93\x02\x63\x32Q/v1/{query_template.name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:\x0equery_template\x12\xc3\x01\n\x13\x44\x65leteQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.DeleteQueryTemplateRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}\x12\xeb\x01\n\x13SubmitQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.SubmitQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\"I/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:submit:\x01*\x12\xee\x01\n\x14\x41pproveQueryTemplate\x12\x42.google.cloud.bigquery.analyticshub.v1.ApproveQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\"J/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:approve:\x01*\x1ax\xca\x41\x1b\x61nalyticshub.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xf4\x05\n)com.google.cloud.bigquery.analyticshub.v1B\x11\x41nalyticsHubProtoP\x01ZMcloud.google.com/go/bigquery/analyticshub/apiv1/analyticshubpb;analyticshubpb\xaa\x02%Google.Cloud.BigQuery.AnalyticsHub.V1\xca\x02%Google\\Cloud\\BigQuery\\AnalyticsHub\\V1\xea\x02)Google::Cloud::Bigquery::AnalyticsHub::V1\xea\x41H\n\x1f\x62igquery.googleapis.com/Dataset\x12%projects/{project}/datasets/{dataset}\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\xea\x41[\n\x1f\x62igquery.googleapis.com/Routine\x12\x38projects/{project}/datasets/{dataset}/routines/{routine}\xea\x41\x45\n/servicemanagement.googleapis.com/ManagedService\x12\x12services/{service}\xea\x41Z\n5cloudcommerceconsumerprocurement.googleapis.com/Order\x12!projects/{project}/orders/{order}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + DataExchange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DataExchange").msgclass + QueryTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.QueryTemplate").msgclass + QueryTemplate::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.QueryTemplate.State").enummodule + Routine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Routine").msgclass + Routine::RoutineType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Routine.RoutineType").enummodule + CreateQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateQueryTemplateRequest").msgclass + GetQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetQueryTemplateRequest").msgclass + ListQueryTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesRequest").msgclass + ListQueryTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesResponse").msgclass + UpdateQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateQueryTemplateRequest").msgclass + DeleteQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteQueryTemplateRequest").msgclass + SubmitQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubmitQueryTemplateRequest").msgclass + ApproveQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ApproveQueryTemplateRequest").msgclass + SharingEnvironmentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig").msgclass + SharingEnvironmentConfig::DefaultExchangeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfig").msgclass + SharingEnvironmentConfig::DcrExchangeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfig").msgclass + DataProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DataProvider").msgclass + Publisher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Publisher").msgclass + DestinationDatasetReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference").msgclass + DestinationDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationDataset").msgclass + DestinationPubSubSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationPubSubSubscription").msgclass + Listing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing").msgclass + Listing::BigQueryDatasetSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource").msgclass + Listing::BigQueryDatasetSource::SelectedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource").msgclass + Listing::BigQueryDatasetSource::RestrictedExportPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy").msgclass + Listing::BigQueryDatasetSource::Replica = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica").msgclass + Listing::BigQueryDatasetSource::Replica::ReplicaState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.ReplicaState").enummodule + Listing::BigQueryDatasetSource::Replica::PrimaryState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.PrimaryState").enummodule + Listing::PubSubTopicSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.PubSubTopicSource").msgclass + Listing::RestrictedExportConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig").msgclass + Listing::CommercialInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo").msgclass + Listing::CommercialInfo::GoogleCloudMarketplaceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo").msgclass + Listing::CommercialInfo::GoogleCloudMarketplaceInfo::CommercialState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo.CommercialState").enummodule + Listing::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.State").enummodule + Listing::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.Category").enummodule + StoredProcedureConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig").msgclass + StoredProcedureConfig::StoredProcedureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureType").enummodule + Subscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription").msgclass + Subscription::LinkedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource").msgclass + Subscription::CommercialInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo").msgclass + Subscription::CommercialInfo::GoogleCloudMarketplaceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo.GoogleCloudMarketplaceInfo").msgclass + Subscription::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.State").enummodule + ListDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest").msgclass + ListDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse").msgclass + ListOrgDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest").msgclass + ListOrgDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse").msgclass + GetDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest").msgclass + CreateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest").msgclass + UpdateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest").msgclass + DeleteDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest").msgclass + ListListingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListListingsRequest").msgclass + ListListingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListListingsResponse").msgclass + GetListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetListingRequest").msgclass + CreateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateListingRequest").msgclass + UpdateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateListingRequest").msgclass + DeleteListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteListingRequest").msgclass + SubscribeListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest").msgclass + SubscribeListingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse").msgclass + SubscribeDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest").msgclass + SubscribeDataExchangeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeResponse").msgclass + RefreshSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest").msgclass + RefreshSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionResponse").msgclass + GetSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest").msgclass + ListSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest").msgclass + ListSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSubscriptionsResponse").msgclass + ListSharedResourceSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest").msgclass + ListSharedResourceSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsResponse").msgclass + RevokeSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest").msgclass + RevokeSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionResponse").msgclass + DeleteSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.OperationMetadata").msgclass + DiscoveryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DiscoveryType").enummodule + SharedResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharedResourceType").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb new file mode 100644 index 000000000000..4b03fbc5f859 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb @@ -0,0 +1,119 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto for package 'Google.Cloud.Bigquery.AnalyticsHub.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/bigquery/analyticshub/v1/analyticshub_pb' + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.analyticshub.v1.AnalyticsHubService' + + # Lists all data exchanges in a given project and location. + rpc :ListDataExchanges, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse + # Lists all data exchanges from projects in a given organization and + # location. + rpc :ListOrgDataExchanges, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse + # Gets the details of a data exchange. + rpc :GetDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange + # Creates a new data exchange. + rpc :CreateDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange + # Updates an existing data exchange. + rpc :UpdateDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange + # Deletes an existing data exchange. + rpc :DeleteDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Google::Protobuf::Empty + # Lists all listings in a given project and location. + rpc :ListListings, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse + # Gets the details of a listing. + rpc :GetListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing + # Creates a new listing. + rpc :CreateListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing + # Updates an existing listing. + rpc :UpdateListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing + # Deletes a listing. + rpc :DeleteListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Google::Protobuf::Empty + # Subscribes to a listing. + # + # Currently, with Analytics Hub, you can create listings that + # reference only BigQuery datasets. + # Upon subscription to a listing for a BigQuery dataset, Analytics Hub + # creates a linked dataset in the subscriber's project. + rpc :SubscribeListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse + # Creates a Subscription to a Data Clean Room. This is a + # long-running operation as it will create one or more linked datasets. + # Throws a Bad Request error if the Data Exchange does not contain any + # listings. + rpc :SubscribeDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Google::Longrunning::Operation + # Refreshes a Subscription to a Data Exchange. A Data Exchange can become + # stale when a publisher adds or removes data. This is a long-running + # operation as it may create many linked datasets. + rpc :RefreshSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Google::Longrunning::Operation + # Gets the details of a Subscription. + rpc :GetSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription + # Lists all subscriptions in a given project and location. + rpc :ListSubscriptions, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse + # Lists all subscriptions on a given Data Exchange or Listing. + rpc :ListSharedResourceSubscriptions, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse + # Revokes a given subscription. + rpc :RevokeSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse + # Deletes a subscription. + rpc :DeleteSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Google::Longrunning::Operation + # Gets the IAM policy. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the IAM policy. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns the permissions that a caller has. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Creates a new QueryTemplate + rpc :CreateQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate + # Gets a QueryTemplate + rpc :GetQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate + # Lists all QueryTemplates in a given project and location. + rpc :ListQueryTemplates, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse + # Updates an existing QueryTemplate + rpc :UpdateQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate + # Deletes a query template. + rpc :DeleteQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Google::Protobuf::Empty + # Submits a query template for approval. + rpc :SubmitQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate + # Approves a query template. + rpc :ApproveQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb new file mode 100644 index 000000000000..f72ac6bfc9fc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/analyticshub/v1/pubsub.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n2google/cloud/bigquery/analyticshub/v1/pubsub.proto\x12%google.cloud.bigquery.analyticshub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\"\xa1\t\n\x12PubSubSubscription\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x0bpush_config\x18\x04 \x01(\x0b\x32\x31.google.cloud.bigquery.analyticshub.v1.PushConfigB\x03\xe0\x41\x01\x12S\n\x0f\x62igquery_config\x18\x12 \x01(\x0b\x32\x35.google.cloud.bigquery.analyticshub.v1.BigQueryConfigB\x03\xe0\x41\x01\x12\\\n\x14\x63loud_storage_config\x18\x16 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.CloudStorageConfigB\x03\xe0\x41\x01\x12!\n\x14\x61\x63k_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x15retain_acked_messages\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12Z\n\x06labels\x18\t \x03(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.PubSubSubscription.LabelsEntryB\x03\xe0\x41\x01\x12$\n\x17\x65nable_message_ordering\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12W\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.ExpirationPolicyB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12X\n\x12\x64\x65\x61\x64_letter_policy\x18\r \x01(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.DeadLetterPolicyB\x03\xe0\x41\x01\x12M\n\x0cretry_policy\x18\x0e \x01(\x0b\x32\x32.google.cloud.bigquery.analyticshub.v1.RetryPolicyB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65tached\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_exactly_once_delivery\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12X\n\x12message_transforms\x18\x19 \x03(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.MessageTransformB\x03\xe0\x41\x01\x12\\\n\x04tags\x18\x1a \x03(\x0b\x32\x43.google.cloud.bigquery.analyticshub.v1.PubSubSubscription.TagsEntryB\t\xe0\x41\x04\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\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x7f\n\x0bRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"V\n\x10\x44\x65\x61\x64LetterPolicy\x12\x1e\n\x11\x64\x65\x61\x64_letter_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15max_delivery_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"?\n\x10\x45xpirationPolicy\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xee\x04\n\nPushConfig\x12V\n\noidc_token\x18\x03 \x01(\x0b\x32;.google.cloud.bigquery.analyticshub.v1.PushConfig.OidcTokenB\x03\xe0\x41\x01H\x00\x12^\n\x0epubsub_wrapper\x18\x04 \x01(\x0b\x32?.google.cloud.bigquery.analyticshub.v1.PushConfig.PubsubWrapperB\x03\xe0\x41\x01H\x01\x12V\n\nno_wrapper\x18\x05 \x01(\x0b\x32;.google.cloud.bigquery.analyticshub.v1.PushConfig.NoWrapperB\x03\xe0\x41\x01H\x01\x12\x1a\n\rpush_endpoint\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12Z\n\nattributes\x18\x02 \x03(\x0b\x32\x41.google.cloud.bigquery.analyticshub.v1.PushConfig.AttributesEntryB\x03\xe0\x41\x01\x1a\x46\n\tOidcToken\x12\"\n\x15service_account_email\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61udience\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x0f\n\rPubsubWrapper\x1a(\n\tNoWrapper\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15\x61uthentication_methodB\t\n\x07wrapper\"\xc5\x01\n\x0e\x42igQueryConfig\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0ewrite_metadata\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13\x64rop_unknown_fields\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_table_schema\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xc6\x04\n\x12\x43loudStorageConfig\x12`\n\x0btext_config\x18\x04 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.TextConfigB\x03\xe0\x41\x01H\x00\x12`\n\x0b\x61vro_config\x18\x05 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.AvroConfigB\x03\xe0\x41\x01H\x00\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x66ilename_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66ilename_suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x66ilename_datetime_format\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0cmax_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tmax_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1a\x0c\n\nTextConfig\x1aH\n\nAvroConfig\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0f\n\routput_format\"\xa3\x01\n\x10MessageTransform\x12S\n\x0ejavascript_udf\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.JavaScriptUDFB\x03\xe0\x41\x01H\x00\x12\x16\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0b\n\ttransform\">\n\rJavaScriptUDF\x12\x1a\n\rfunction_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x85\x02\n)com.google.cloud.bigquery.analyticshub.v1B\x0bPubsubProtoP\x01ZMcloud.google.com/go/bigquery/analyticshub/apiv1/analyticshubpb;analyticshubpb\xaa\x02%Google.Cloud.BigQuery.AnalyticsHub.V1\xca\x02%Google\\Cloud\\BigQuery\\AnalyticsHub\\V1\xea\x02)Google::Cloud::Bigquery::AnalyticsHub::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + PubSubSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PubSubSubscription").msgclass + RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RetryPolicy").msgclass + DeadLetterPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeadLetterPolicy").msgclass + ExpirationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ExpirationPolicy").msgclass + PushConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig").msgclass + PushConfig::OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.OidcToken").msgclass + PushConfig::PubsubWrapper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.PubsubWrapper").msgclass + PushConfig::NoWrapper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.NoWrapper").msgclass + BigQueryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.BigQueryConfig").msgclass + CloudStorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig").msgclass + CloudStorageConfig::TextConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.TextConfig").msgclass + CloudStorageConfig::AvroConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.AvroConfig").msgclass + MessageTransform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.MessageTransform").msgclass + JavaScriptUDF = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.JavaScriptUDF").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md new file mode 100644 index 000000000000..99ecfbc53cb9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Analytics Hub V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb new file mode 100644 index 000000000000..981ea58df2f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb @@ -0,0 +1,1364 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + # A data exchange is a container that lets you share data. Along with the + # descriptive information about the data exchange, it contains listings that + # reference shared datasets. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the data exchange. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @!attribute [rw] display_name + # @return [::String] + # Required. Human-readable display name of the data exchange. The display + # name must contain only Unicode letters, numbers (0-9), underscores (_), + # dashes (-), spaces ( ), ampersands (&) and must not start or end with + # spaces. Default value is an empty string. Max length: 63 bytes. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the data exchange. The description must not + # contain Unicode non-characters as well as C0 and C1 control codes except + # tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). + # Default value is an empty string. + # Max length: 2000 bytes. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the primary point of contact of the data + # exchange. Max Length: 1000 bytes. + # @!attribute [rw] documentation + # @return [::String] + # Optional. Documentation describing the data exchange. + # @!attribute [r] listing_count + # @return [::Integer] + # Output only. Number of listings contained in the data exchange. + # @!attribute [rw] icon + # @return [::String] + # Optional. Base64 encoded image representing the data exchange. Max + # Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API + # only performs validation on size of the encoded data. Note: For byte + # fields, the content of the fields are base64-encoded (which increases the + # size of the data by 33-36%) when using JSON on the wire. + # @!attribute [rw] sharing_environment_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig] + # Optional. Configurable data sharing environment option for a data exchange. + # @!attribute [rw] discovery_type + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DiscoveryType] + # Optional. Type of discovery on the discovery page for all the listings + # under this exchange. Updating this field also updates (overwrites) the + # discovery_type field for all the listings under this exchange. + # @!attribute [rw] log_linked_dataset_query_user_email + # @return [::Boolean] + # Optional. By default, false. + # If true, the DataExchange has an email sharing mandate enabled. + class DataExchange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A query template is a container for sharing table-valued functions defined by + # contributors in a data clean room. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the QueryTemplate. + # e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/456` + # @!attribute [rw] display_name + # @return [::String] + # Required. Human-readable display name of the QueryTemplate. The display + # name must contain only Unicode letters, numbers (0-9), underscores (_), + # dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. + # Default value is an empty string. Max length: 63 bytes. + # @!attribute [rw] description + # @return [::String] + # Optional. Short description of the QueryTemplate. The description must not + # contain Unicode non-characters and C0 and C1 control codes except tabs + # (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default + # value is an empty string. Max length: 2000 bytes. + # @!attribute [rw] proposer + # @return [::String] + # Optional. Will be deprecated. + # Email or URL of the primary point of contact of the QueryTemplate. + # Max Length: 1000 bytes. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the primary point of contact of the + # QueryTemplate. Max Length: 1000 bytes. + # @!attribute [rw] documentation + # @return [::String] + # Optional. Documentation describing the QueryTemplate. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate::State] + # Output only. The QueryTemplate lifecycle state. + # @!attribute [rw] routine + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Routine] + # Optional. The routine associated with the QueryTemplate. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the QueryTemplate was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the QueryTemplate was last modified. + class QueryTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The QueryTemplate lifecycle state. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The QueryTemplate is in draft state. + DRAFTED = 1 + + # The QueryTemplate is in pending state. + PENDING = 2 + + # The QueryTemplate is in deleted state. + DELETED = 3 + + # The QueryTemplate is in approved state. + APPROVED = 4 + end + end + + # Represents a bigquery routine. + # @!attribute [rw] routine_type + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Routine::RoutineType] + # Required. The type of routine. + # @!attribute [rw] definition_body + # @return [::String] + # Optional. The definition body of the routine. + class Routine + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the type of a given routine. + module RoutineType + # Default value. + ROUTINE_TYPE_UNSPECIFIED = 0 + + # Non-built-in persistent TVF. + TABLE_VALUED_FUNCTION = 1 + end + end + + # Message for creating a QueryTemplate. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. + # @!attribute [rw] query_template_id + # @return [::String] + # Required. The ID of the QueryTemplate to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @!attribute [rw] query_template + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # Required. The QueryTemplate to create. + class CreateQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a QueryTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. The parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + class GetQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the list of QueryTemplates. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the QueryTemplates. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return in a single response + # page. Leverage the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token, returned by a previous call, to request the next page + # of results. + class ListQueryTemplatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the list of QueryTemplates. + # @!attribute [rw] query_templates + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] + # The list of QueryTemplates. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListQueryTemplatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a QueryTemplate. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask specifies the fields to update in the query template + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @!attribute [rw] query_template + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # Required. The QueryTemplate to update. + class UpdateQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a QueryTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + class DeleteQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for submitting a QueryTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + class SubmitQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for approving a QueryTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + class ApproveQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sharing environment is a behavior model for sharing data within a + # data exchange. This option is configurable for a data exchange. + # @!attribute [rw] default_exchange_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig::DefaultExchangeConfig] + # Default Analytics Hub data exchange, used for secured data sharing. + # + # Note: The following fields are mutually exclusive: `default_exchange_config`, `dcr_exchange_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] dcr_exchange_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig::DcrExchangeConfig] + # Data Clean Room (DCR), used for privacy-safe and secured data sharing. + # + # Note: The following fields are mutually exclusive: `dcr_exchange_config`, `default_exchange_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SharingEnvironmentConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Default Analytics Hub data exchange, used for secured data sharing. + class DefaultExchangeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data Clean Room (DCR), used for privacy-safe and secured data sharing. + # @!attribute [r] single_selected_resource_sharing_restriction + # @return [::Boolean] + # Output only. If True, this DCR restricts the contributors to sharing + # only a single resource in a Listing. And no two resources should have the + # same IDs. So if a contributor adds a view with a conflicting name, the + # CreateListing API will reject the request. if False, the data contributor + # can publish an entire dataset (as before). This is not configurable, and + # by default, all new DCRs will have the restriction set to True. + # @!attribute [r] single_linked_dataset_per_cleanroom + # @return [::Boolean] + # Output only. If True, when subscribing to this DCR, it will create only + # one linked dataset containing all resources shared within the + # cleanroom. If False, when subscribing to this DCR, it will + # create 1 linked dataset per listing. This is not configurable, and by + # default, all new DCRs will have the restriction set to True. + class DcrExchangeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Contains details of the data provider. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the data provider. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the data provider. + # Max Length: 1000 bytes. + class DataProvider + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains details of the listing publisher. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the listing publisher. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the listing publisher. + # Max Length: 1000 bytes. + class Publisher + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] dataset_id + # @return [::String] + # Required. A unique ID for this dataset, without the project name. The ID + # must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + # The maximum length is 1,024 characters. + # @!attribute [rw] project_id + # @return [::String] + # Required. The ID of the project containing this dataset. + class DestinationDatasetReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the destination bigquery dataset. + # @!attribute [rw] dataset_reference + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDatasetReference] + # Required. A reference that identifies the destination dataset. + # @!attribute [rw] friendly_name + # @return [::Google::Protobuf::StringValue] + # Optional. A descriptive name for the dataset. + # @!attribute [rw] description + # @return [::Google::Protobuf::StringValue] + # Optional. A user-friendly description of the dataset. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels associated with this dataset. You can use these + # to organize and group your datasets. + # You can set this property when inserting or updating a dataset. + # See https://cloud.google.com/resource-manager/docs/creating-managing-labels + # for more information. + # @!attribute [rw] location + # @return [::String] + # Required. The geographic location where the dataset should reside. See + # https://cloud.google.com/bigquery/docs/locations for supported + # locations. + # @!attribute [rw] replica_locations + # @return [::Array<::String>] + # Optional. The geographic locations where the dataset should be replicated. + # See [BigQuery locations](https://cloud.google.com/bigquery/docs/locations) + # for supported locations. + class DestinationDataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Defines the destination Pub/Sub subscription. + # @!attribute [rw] pubsub_subscription + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PubSubSubscription] + # Required. Destination Pub/Sub subscription resource. + class DestinationPubSubSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A listing is what gets published into a data exchange that a subscriber can + # subscribe to. It contains a reference to the data source along with + # descriptive information that will help subscribers find and subscribe the + # data. + # @!attribute [rw] bigquery_dataset + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource] + # Shared dataset i.e. BigQuery dataset source. + # + # Note: The following fields are mutually exclusive: `bigquery_dataset`, `pubsub_topic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pubsub_topic + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::PubSubTopicSource] + # Pub/Sub topic source. + # + # Note: The following fields are mutually exclusive: `pubsub_topic`, `bigquery_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456` + # @!attribute [rw] display_name + # @return [::String] + # Required. Human-readable display name of the listing. The display name must + # contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + # spaces ( ), ampersands (&) and can't start or end with spaces. Default + # value is an empty string. Max length: 63 bytes. + # @!attribute [rw] description + # @return [::String] + # Optional. Short description of the listing. The description must not + # contain Unicode non-characters and C0 and C1 control codes except tabs + # (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default + # value is an empty string. Max length: 2000 bytes. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the primary point of contact of the listing. + # Max Length: 1000 bytes. + # @!attribute [rw] documentation + # @return [::String] + # Optional. Documentation describing the listing. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::State] + # Output only. Current state of the listing. + # @!attribute [rw] icon + # @return [::String] + # Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + # Expected image dimensions are 512x512 pixels, however the API only + # performs validation on size of the encoded data. + # Note: For byte fields, the contents of the field are base64-encoded (which + # increases the size of the data by 33-36%) when using JSON on the wire. + # @!attribute [rw] data_provider + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataProvider] + # Optional. Details of the data provider who owns the source data. + # @!attribute [rw] categories + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::Category>] + # Optional. Categories of the listing. Up to five categories are allowed. + # @!attribute [rw] publisher + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Publisher] + # Optional. Details of the publisher who owns the listing and who can share + # the source data. + # @!attribute [rw] request_access + # @return [::String] + # Optional. Email or URL of the request access of the listing. + # Subscribers can use this reference to request access. + # Max Length: 1000 bytes. + # @!attribute [rw] restricted_export_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::RestrictedExportConfig] + # Optional. If set, restricted export configuration will be propagated and + # enforced on the linked dataset. + # @!attribute [rw] stored_procedure_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::StoredProcedureConfig] + # Optional. If set, stored procedure configuration will be propagated and + # enforced on the linked dataset. + # @!attribute [rw] discovery_type + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DiscoveryType] + # Optional. Type of discovery of the listing on the discovery page. + # @!attribute [r] resource_type + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharedResourceType] + # Output only. Listing shared asset type. + # @!attribute [r] commercial_info + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo] + # Output only. Commercial info contains the information about the commercial + # data products associated with the listing. + # @!attribute [rw] log_linked_dataset_query_user_email + # @return [::Boolean] + # Optional. By default, false. + # If true, the Listing has an email sharing mandate enabled. + # @!attribute [rw] allow_only_metadata_sharing + # @return [::Boolean] + # Optional. If true, the listing is only available to get the resource + # metadata. Listing is non subscribable. + class Listing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A reference to a shared dataset. It is an existing BigQuery dataset with a + # collection of objects such as tables and views that you want to share + # with subscribers. + # When subscriber's subscribe to a listing, Analytics Hub creates a linked + # dataset in + # the subscriber's project. A Linked dataset is an opaque, read-only BigQuery + # dataset that serves as a _symbolic link_ to a shared dataset. + # @!attribute [rw] dataset + # @return [::String] + # Optional. Resource name of the dataset source for this listing. + # e.g. `projects/myproject/datasets/123` + # @!attribute [rw] selected_resources + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::SelectedResource>] + # Optional. Resource in this dataset that is selectively shared. + # This field is required for data clean room exchanges. + # @!attribute [rw] restricted_export_policy + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::RestrictedExportPolicy] + # Optional. If set, restricted export policy will be propagated and + # enforced on the linked dataset. + # @!attribute [rw] replica_locations + # @return [::Array<::String>] + # Optional. A list of regions where the publisher has created shared + # dataset replicas. + # @!attribute [r] effective_replicas + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica>] + # Output only. Server-owned effective state of replicas. + # Contains both primary and secondary replicas. + # Each replica includes a system-computed (output-only) state and primary + # designation. + class BigQueryDatasetSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Resource in this dataset that is selectively shared. + # @!attribute [rw] table + # @return [::String] + # Optional. Format: + # For table: + # `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + # Example:"projects/test_project/datasets/test_dataset/tables/test_table" + # + # Note: The following fields are mutually exclusive: `table`, `routine`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] routine + # @return [::String] + # Optional. Format: + # For routine: + # `projects/{projectId}/datasets/{datasetId}/routines/{routineId}` + # Example:"projects/test_project/datasets/test_dataset/routines/test_routine" + # + # Note: The following fields are mutually exclusive: `routine`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SelectedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Restricted export policy used to configure restricted export on linked + # dataset. + # @!attribute [rw] enabled + # @return [::Google::Protobuf::BoolValue] + # Optional. If true, enable restricted export. + # @!attribute [rw] restrict_direct_table_access + # @return [::Google::Protobuf::BoolValue] + # Optional. If true, restrict direct table access (read + # api/tabledata.list) on linked table. + # @!attribute [rw] restrict_query_result + # @return [::Google::Protobuf::BoolValue] + # Optional. If true, restrict export of query result derived from + # restricted linked dataset table. + class RestrictedExportPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the state of a replica of a shared dataset. + # It includes the geographic location of the replica and + # system-computed, output-only fields indicating its replication state and + # whether it is the primary replica. + # @!attribute [r] location + # @return [::String] + # Output only. The geographic location where the replica resides. See + # [BigQuery locations](https://cloud.google.com/bigquery/docs/locations) + # for supported locations. Eg. "us-central1". + # @!attribute [r] replica_state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica::ReplicaState] + # Output only. Assigned by Analytics Hub based on real BigQuery + # replication state. + # @!attribute [r] primary_state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica::PrimaryState] + # Output only. Indicates that this replica is the primary replica. + class Replica + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Replica state of the shared dataset. + module ReplicaState + # Default value. This value is unused. + REPLICA_STATE_UNSPECIFIED = 0 + + # The replica is backfilled and ready to use. + READY_TO_USE = 1 + + # The replica is unavailable, does not exist, or has not been + # backfilled yet. + UNAVAILABLE = 2 + end + + # Primary state of the replica. Set only for the primary replica. + module PrimaryState + # Default value. This value is unused. + PRIMARY_STATE_UNSPECIFIED = 0 + + # The replica is the primary replica. + PRIMARY_REPLICA = 1 + end + end + end + + # Pub/Sub topic source. + # @!attribute [rw] topic + # @return [::String] + # Required. Resource name of the Pub/Sub topic source for this listing. + # e.g. projects/myproject/topics/topicId + # @!attribute [rw] data_affinity_regions + # @return [::Array<::String>] + # Optional. Region hint on where the data might be published. Data affinity + # regions are modifiable. See https://cloud.google.com/about/locations for + # full listing of possible Cloud regions. + class PubSubTopicSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Restricted export config, used to configure restricted export on linked + # dataset. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. If true, enable restricted export. + # @!attribute [r] restrict_direct_table_access + # @return [::Boolean] + # Output only. If true, restrict direct table access(read + # api/tabledata.list) on linked table. + # @!attribute [rw] restrict_query_result + # @return [::Boolean] + # Optional. If true, restrict export of query result derived from + # restricted linked dataset table. + class RestrictedExportConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Commercial info contains the information about the commercial data products + # associated with the listing. + # @!attribute [r] cloud_marketplace + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo::GoogleCloudMarketplaceInfo] + # Output only. Details of the Marketplace Data Product associated with the + # Listing. + class CommercialInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the details of the Marketplace Data Product associated with the + # Listing. + # @!attribute [r] service + # @return [::String] + # Output only. Resource name of the commercial service associated with + # the Marketplace Data Product. e.g. example.com + # @!attribute [r] commercial_state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo::GoogleCloudMarketplaceInfo::CommercialState] + # Output only. Commercial state of the Marketplace Data Product. + class GoogleCloudMarketplaceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates whether this commercial access is currently active. + module CommercialState + # Commercialization is incomplete and cannot be used. + COMMERCIAL_STATE_UNSPECIFIED = 0 + + # Commercialization has been initialized. + ONBOARDING = 1 + + # Commercialization is complete and available for use. + ACTIVE = 2 + end + end + end + + # State of the listing. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # Subscribable state. Users with dataexchange.listings.subscribe permission + # can subscribe to this listing. + ACTIVE = 1 + end + + # Listing categories. + module Category + CATEGORY_UNSPECIFIED = 0 + + CATEGORY_OTHERS = 1 + + CATEGORY_ADVERTISING_AND_MARKETING = 2 + + CATEGORY_COMMERCE = 3 + + CATEGORY_CLIMATE_AND_ENVIRONMENT = 4 + + CATEGORY_DEMOGRAPHICS = 5 + + CATEGORY_ECONOMICS = 6 + + CATEGORY_EDUCATION = 7 + + CATEGORY_ENERGY = 8 + + CATEGORY_FINANCIAL = 9 + + CATEGORY_GAMING = 10 + + CATEGORY_GEOSPATIAL = 11 + + CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12 + + CATEGORY_MEDIA = 13 + + CATEGORY_PUBLIC_SECTOR = 14 + + CATEGORY_RETAIL = 15 + + CATEGORY_SPORTS = 16 + + CATEGORY_SCIENCE_AND_RESEARCH = 17 + + CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18 + + CATEGORY_TRAVEL_AND_TOURISM = 19 + + CATEGORY_GOOGLE_EARTH_ENGINE = 20 + end + end + + # Stored procedure configuration, used to configure stored procedure sharing + # on linked dataset. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. If true, enable sharing of stored procedure. + # @!attribute [r] allowed_stored_procedure_types + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::StoredProcedureConfig::StoredProcedureType>] + # Output only. Types of stored procedure supported to share. + class StoredProcedureConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum to specify the type of stored procedure to share. + module StoredProcedureType + # Default value. This value is unused. + STORED_PROCEDURE_TYPE_UNSPECIFIED = 0 + + # SQL stored procedure. + SQL_PROCEDURE = 1 + end + end + + # A subscription represents a subscribers' access to a particular set of + # published data. It contains references to associated listings, + # data exchanges, and linked datasets. + # @!attribute [r] listing + # @return [::String] + # Output only. Resource name of the source Listing. + # e.g. projects/123/locations/us/dataExchanges/456/listings/789 + # + # Note: The following fields are mutually exclusive: `listing`, `data_exchange`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_exchange + # @return [::String] + # Output only. Resource name of the source Data Exchange. + # e.g. projects/123/locations/us/dataExchanges/456 + # + # Note: The following fields are mutually exclusive: `data_exchange`, `listing`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the subscription. + # e.g. `projects/myproject/locations/us/subscriptions/123`. + # @!attribute [r] creation_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the subscription was created. + # @!attribute [r] last_modify_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the subscription was last modified. + # @!attribute [r] organization_id + # @return [::String] + # Output only. Organization of the project this subscription belongs to. + # @!attribute [r] organization_display_name + # @return [::String] + # Output only. Display name of the project of this subscription. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::State] + # Output only. Current state of the subscription. + # @!attribute [r] linked_dataset_map + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource}] + # Output only. Map of listing resource names to associated linked resource, + # e.g. projects/123/locations/us/dataExchanges/456/listings/789 + # -> + # projects/123/datasets/my_dataset + # + # For listing-level subscriptions, this is a map of size 1. + # Only contains values if state == STATE_ACTIVE. + # @!attribute [r] subscriber_contact + # @return [::String] + # Output only. Email of the subscriber. + # @!attribute [r] linked_resources + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource>] + # Output only. Linked resources created in the subscription. Only contains + # values if state = STATE_ACTIVE. + # @!attribute [r] resource_type + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharedResourceType] + # Output only. Listing shared asset type. + # @!attribute [r] commercial_info + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::CommercialInfo] + # Output only. This is set if this is a commercial subscription i.e. if this + # subscription was created from subscribing to a commercial listing. + # @!attribute [r] log_linked_dataset_query_user_email + # @return [::Boolean] + # Output only. By default, false. + # If true, the Subscriber agreed to the email sharing mandate + # that is enabled for DataExchange/Listing. + # @!attribute [rw] destination_dataset + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] + # Optional. BigQuery destination dataset to create for the subscriber. + class Subscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reference to a linked resource tracked by this Subscription. + # @!attribute [r] linked_dataset + # @return [::String] + # Output only. Name of the linked dataset, e.g. + # projects/subscriberproject/datasets/linked_dataset + # + # Note: The following fields are mutually exclusive: `linked_dataset`, `linked_pubsub_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] linked_pubsub_subscription + # @return [::String] + # Output only. Name of the Pub/Sub subscription, e.g. + # projects/subscriberproject/subscriptions/subscriptions/sub_id + # + # Note: The following fields are mutually exclusive: `linked_pubsub_subscription`, `linked_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] listing + # @return [::String] + # Output only. Listing for which linked resource is created. + class LinkedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Commercial info metadata for this subscription. + # @!attribute [r] cloud_marketplace + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::CommercialInfo::GoogleCloudMarketplaceInfo] + # Output only. This is set when the subscription is commercialised via + # Cloud Marketplace. + class CommercialInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Cloud Marketplace commercial metadata for this subscription. + # @!attribute [rw] order + # @return [::String] + # Resource name of the Marketplace Order. + class GoogleCloudMarketplaceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource] + class LinkedDatasetMapEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of the subscription. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # This subscription is active and the data is accessible. + STATE_ACTIVE = 1 + + # The data referenced by this subscription is out of date and should be + # refreshed. This can happen when a data provider adds or removes datasets. + STATE_STALE = 2 + + # This subscription has been cancelled or revoked and the data is no longer + # accessible. + STATE_INACTIVE = 3 + end + end + + # Message for requesting the list of data exchanges. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the data exchanges. + # e.g. `projects/myproject/locations/us`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call, to request the next page of + # results. + class ListDataExchangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the list of data exchanges. + # @!attribute [rw] data_exchanges + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # The list of data exchanges. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListDataExchangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the list of data exchanges from projects in an + # organization and location. + # @!attribute [rw] organization + # @return [::String] + # Required. The organization resource path of the projects containing + # DataExchanges. e.g. `organizations/myorg/locations/us`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call, to request the next page of + # results. + class ListOrgDataExchangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing data exchanges in an organization and + # location. + # @!attribute [rw] data_exchanges + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # The list of data exchanges. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListOrgDataExchangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a data exchange. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data exchange. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + class GetDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a data exchange. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the data exchange. + # e.g. `projects/myproject/locations/us`. + # @!attribute [rw] data_exchange_id + # @return [::String] + # Required. The ID of the data exchange. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @!attribute [rw] data_exchange + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # Required. The data exchange to create. + class CreateDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a data exchange. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask specifies the fields to update in the data exchange + # resource. The fields specified in the + # `updateMask` are relative to the resource and are not a full request. + # @!attribute [rw] data_exchange + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # Required. The data exchange to update. + class UpdateDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a data exchange. + # @!attribute [rw] name + # @return [::String] + # Required. The full name of the data exchange resource that you want to + # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. + class DeleteDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the list of listings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call, to request the next page of + # results. + class ListListingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the list of Listings. + # @!attribute [rw] listings + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] + # The list of Listing. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListListingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a listing. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + class GetListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a listing. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @!attribute [rw] listing_id + # @return [::String] + # Required. The ID of the listing to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @!attribute [rw] listing + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # Required. The listing to create. + class CreateListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a Listing. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask specifies the fields to update in the listing + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @!attribute [rw] listing + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # Required. The listing to update. + class UpdateListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a listing. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the listing to delete. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # @!attribute [rw] delete_commercial + # @return [::Boolean] + # Optional. If the listing is commercial then this field must be set to true, + # otherwise a failure is thrown. This acts as a safety guard to avoid + # deleting commercial listings accidentally. + class DeleteListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for subscribing to a listing. + # @!attribute [rw] destination_dataset + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] + # Input only. BigQuery destination dataset to create for the subscriber. + # + # Note: The following fields are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] destination_pubsub_subscription + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription] + # Input only. Destination Pub/Sub subscription to create for the + # subscriber. + # + # Note: The following fields are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the listing that you want to subscribe to. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + class SubscribeListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response when you subscribe to a listing. + # @!attribute [rw] subscription + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # Subscription object created from this subscribe action. + class SubscribeListingResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for subscribing to a Data Exchange. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the Data Exchange. + # e.g. `projects/publisherproject/locations/us/dataExchanges/123` + # @!attribute [rw] destination + # @return [::String] + # Required. The parent resource path of the Subscription. + # e.g. `projects/subscriberproject/locations/us` + # @!attribute [rw] destination_dataset + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] + # Optional. BigQuery destination dataset to create for the subscriber. + # @!attribute [rw] subscription + # @return [::String] + # Required. Name of the subscription to create. + # e.g. `subscription1` + # @!attribute [rw] subscriber_contact + # @return [::String] + # Email of the subscriber. + class SubscribeDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response when you subscribe to a Data Exchange. + # @!attribute [rw] subscription + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # Subscription object created from this subscribe action. + class SubscribeDataExchangeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for refreshing a subscription. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the Subscription to refresh. + # e.g. `projects/subscriberproject/locations/us/subscriptions/123` + class RefreshSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response when you refresh a subscription. + # @!attribute [rw] subscription + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # The refreshed subscription resource. + class RefreshSubscriptionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a subscription. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the subscription. + # e.g. projects/123/locations/us/subscriptions/456 + class GetSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for listing subscriptions. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the subscription. + # e.g. projects/myproject/locations/us + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. Eligible + # fields for filtering are: + # + # + `listing` + # + `data_exchange` + # + # Alternatively, a literal wrapped in double quotes may be provided. + # This will be checked for an exact match against both fields above. + # + # In all cases, the full Data Exchange or Listing resource name must + # be provided. Some example of using filters: + # + # + data_exchange="projects/myproject/locations/us/dataExchanges/123" + # + listing="projects/123/locations/us/dataExchanges/456/listings/789" + # + "projects/myproject/locations/us/dataExchanges/123" + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call. + class ListSubscriptionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the listing of subscriptions. + # @!attribute [rw] subscriptions + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # The list of subscriptions. + # @!attribute [rw] next_page_token + # @return [::String] + # Next page token. + class ListSubscriptionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for listing subscriptions of a shared resource. + # @!attribute [rw] resource + # @return [::String] + # Required. Resource name of the requested target. This resource may be + # either a Listing or a DataExchange. e.g. + # projects/123/locations/us/dataExchanges/456 OR e.g. + # projects/123/locations/us/dataExchanges/456/listings/789 + # @!attribute [rw] include_deleted_subscriptions + # @return [::Boolean] + # If selected, includes deleted subscriptions in the response + # (up to 63 days after deletion). + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call. + class ListSharedResourceSubscriptionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the listing of shared resource subscriptions. + # @!attribute [rw] shared_resource_subscriptions + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # The list of subscriptions. + # @!attribute [rw] next_page_token + # @return [::String] + # Next page token. + class ListSharedResourceSubscriptionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for revoking a subscription. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the subscription to revoke. + # e.g. projects/123/locations/us/subscriptions/456 + # @!attribute [rw] revoke_commercial + # @return [::Boolean] + # Optional. If the subscription is commercial then this field must be set to + # true, otherwise a failure is thrown. This acts as a safety guard to avoid + # revoking commercial subscriptions accidentally. + class RevokeSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response when you revoke a subscription. + # Empty for now. + class RevokeSubscriptionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a subscription. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the subscription to delete. + # e.g. projects/123/locations/us/subscriptions/456 + class DeleteSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of a long-running operation in Analytics Hub. + # @!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 + + # Specifies the type of discovery on the discovery page. Note that + # this does not control the visibility of the exchange/listing which is + # defined by IAM permission. + module DiscoveryType + # Unspecified. Defaults to DISCOVERY_TYPE_PRIVATE. + DISCOVERY_TYPE_UNSPECIFIED = 0 + + # The Data exchange/listing can be discovered in the 'Private' results + # list. + DISCOVERY_TYPE_PRIVATE = 1 + + # The Data exchange/listing can be discovered in the 'Public' results + # list. + DISCOVERY_TYPE_PUBLIC = 2 + end + + # The underlying shared asset type shared in a listing by a publisher. + module SharedResourceType + # Not specified. + SHARED_RESOURCE_TYPE_UNSPECIFIED = 0 + + # BigQuery Dataset Asset. + BIGQUERY_DATASET = 1 + + # Pub/Sub Topic Asset. + PUBSUB_TOPIC = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb new file mode 100644 index 000000000000..e75b3b67c28e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb @@ -0,0 +1,559 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + # Defines the destination Pub/Sub subscription. + # If none of `push_config`, `bigquery_config`, `cloud_storage_config`, + # `pubsub_export_config`, or `pubsublite_export_config` + # is set, then the subscriber will pull and ack messages using API methods. At + # most one of these fields may be set. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the subscription. + # Format is `projects/{project}/subscriptions/{sub}`. + # @!attribute [rw] push_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig] + # Optional. If push delivery is used with this subscription, this field is + # used to configure it. + # @!attribute [rw] bigquery_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::BigQueryConfig] + # Optional. If delivery to BigQuery is used with this subscription, this + # field is used to configure it. + # @!attribute [rw] cloud_storage_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig] + # Optional. If delivery to Google Cloud Storage is used with this + # subscription, this field is used to configure it. + # @!attribute [rw] ack_deadline_seconds + # @return [::Integer] + # Optional. The approximate amount of time (on a best-effort basis) Pub/Sub + # waits for the subscriber to acknowledge receipt before resending the + # message. In the interval after the message is delivered and before it is + # acknowledged, it is considered to be _outstanding_. During that time + # period, the message will not be redelivered (on a best-effort basis). + # + # For pull subscriptions, this value is used as the initial value for the ack + # deadline. To override this value for a given message, call + # `ModifyAckDeadline` with the corresponding `ack_id` if using + # non-streaming pull or send the `ack_id` in a + # `StreamingModifyAckDeadlineRequest` if using streaming pull. + # The minimum custom deadline you can specify is 10 seconds. + # The maximum custom deadline you can specify is 600 seconds (10 minutes). + # If this parameter is 0, a default value of 10 seconds is used. + # + # For push delivery, this value is also used to set the request timeout for + # the call to the push endpoint. + # + # If the subscriber never acknowledges the message, the Pub/Sub + # system will eventually redeliver the message. + # @!attribute [rw] retain_acked_messages + # @return [::Boolean] + # Optional. Indicates whether to retain acknowledged messages. If true, then + # messages are not expunged from the subscription's backlog, even if they are + # acknowledged, until they fall out of the `message_retention_duration` + # window. This must be true if you would like to [`Seek` to a timestamp] + # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in + # the past to replay previously-acknowledged messages. + # @!attribute [rw] message_retention_duration + # @return [::Google::Protobuf::Duration] + # Optional. How long to retain unacknowledged messages in the subscription's + # backlog, from the moment a message is published. If `retain_acked_messages` + # is true, then this also configures the retention of acknowledged messages, + # and thus configures how far back in time a `Seek` can be done. Defaults to + # 7 days. Cannot be more than 31 days or less than 10 minutes. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. See [Creating and managing + # labels](https://cloud.google.com/pubsub/docs/labels). + # @!attribute [rw] enable_message_ordering + # @return [::Boolean] + # Optional. If true, messages published with the same `ordering_key` in + # `PubsubMessage` will be delivered to the subscribers in the order in which + # they are received by the Pub/Sub system. Otherwise, they may be delivered + # in any order. + # @!attribute [rw] expiration_policy + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ExpirationPolicy] + # Optional. A policy that specifies the conditions for this subscription's + # expiration. A subscription is considered active as long as any connected + # subscriber is successfully consuming messages from the subscription or is + # issuing operations on the subscription. If `expiration_policy` is not set, + # a *default policy* with `ttl` of 31 days will be used. The minimum allowed + # value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set, + # but `expiration_policy.ttl` is not set, the subscription never expires. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression written in the Pub/Sub [filter + # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, + # then only `PubsubMessage`s whose `attributes` field matches the filter are + # delivered on this subscription. If empty, then no messages are filtered + # out. + # @!attribute [rw] dead_letter_policy + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeadLetterPolicy] + # Optional. A policy that specifies the conditions for dead lettering + # messages in this subscription. If dead_letter_policy is not set, dead + # lettering is disabled. + # + # The Pub/Sub service account associated with this subscriptions's + # parent project (i.e., + # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have + # permission to Acknowledge() messages on this subscription. + # @!attribute [rw] retry_policy + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RetryPolicy] + # Optional. A policy that specifies how Pub/Sub retries message delivery for + # this subscription. + # + # If not set, the default retry policy is applied. This generally implies + # that messages will be retried as soon as possible for healthy subscribers. + # RetryPolicy will be triggered on NACKs or acknowledgement deadline + # exceeded events for a given message. + # @!attribute [rw] detached + # @return [::Boolean] + # Optional. Indicates whether the subscription is detached from its topic. + # Detached subscriptions don't receive messages from their topic and don't + # retain any backlog. `Pull` and `StreamingPull` requests will return + # FAILED_PRECONDITION. If the subscription is a push subscription, pushes to + # the endpoint will not be made. + # @!attribute [rw] enable_exactly_once_delivery + # @return [::Boolean] + # Optional. If true, Pub/Sub provides the following guarantees for the + # delivery of a message with a given value of `message_id` on this + # subscription: + # + # * The message sent to a subscriber is guaranteed not to be resent + # before the message's acknowledgement deadline expires. + # * An acknowledged message will not be resent to a subscriber. + # + # Note that subscribers may still receive multiple copies of a message + # when `enable_exactly_once_delivery` is true if the message was published + # multiple times by a publisher client. These copies are considered distinct + # by Pub/Sub and have distinct `message_id` values. + # @!attribute [rw] message_transforms + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::MessageTransform>] + # Optional. Transforms to be applied to messages before they are delivered to + # subscribers. Transforms are applied in the order specified. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Tag keys/values directly bound to this + # resource. For example: + # "123/environment": "production", + # "123/costCenter": "marketing" + class PubSubSubscription + 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 TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A policy that specifies how Pub/Sub retries message delivery. + # + # Retry delay will be exponential based on provided minimum and maximum + # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. + # + # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded + # events for a given message. + # + # Retry Policy is implemented on a best effort basis. At times, the delay + # between consecutive deliveries may not match the configuration. That is, + # delay can be more or less than configured backoff. + # @!attribute [rw] minimum_backoff + # @return [::Google::Protobuf::Duration] + # Optional. The minimum delay between consecutive deliveries of a given + # message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. + # @!attribute [rw] maximum_backoff + # @return [::Google::Protobuf::Duration] + # Optional. The maximum delay between consecutive deliveries of a given + # message. Value should be between 0 and 600 seconds. Defaults to 600 + # seconds. + class RetryPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dead lettering is done on a best effort basis. The same message might be + # dead lettered multiple times. + # + # If validation on any of the fields fails at subscription creation/updation, + # the create/update subscription request will fail. + # @!attribute [rw] dead_letter_topic + # @return [::String] + # Optional. The name of the topic to which dead letter messages should be + # published. Format is `projects/{project}/topics/{topic}`.The Pub/Sub + # service account associated with the enclosing subscription's parent project + # (i.e., service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must + # have permission to Publish() to this topic. + # + # The operation will fail if the topic does not exist. + # Users should ensure that there is a subscription attached to this topic + # since messages published to a topic with no subscriptions are lost. + # @!attribute [rw] max_delivery_attempts + # @return [::Integer] + # Optional. The maximum number of delivery attempts for any message. The + # value must be between 5 and 100. + # + # The number of delivery attempts is defined as 1 + (the sum of number of + # NACKs and number of times the acknowledgement deadline has been exceeded + # for the message). + # + # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that + # client libraries may automatically extend ack_deadlines. + # + # This field will be honored on a best effort basis. + # + # If this parameter is 0, a default value of 5 is used. + class DeadLetterPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A policy that specifies the conditions for resource expiration (i.e., + # automatic resource deletion). + # @!attribute [rw] ttl + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the "time-to-live" duration for an associated resource. + # The resource expires if it is not active for a period of `ttl`. The + # definition of "activity" depends on the type of the associated resource. + # The minimum and maximum allowed values for `ttl` depend on the type of the + # associated resource, as well. If `ttl` is not set, the associated resource + # never expires. + class ExpirationPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a push delivery endpoint. + # @!attribute [rw] oidc_token + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::OidcToken] + # Optional. If specified, Pub/Sub will generate and attach an OIDC JWT + # token as an `Authorization` header in the HTTP request for every pushed + # message. + # @!attribute [rw] pubsub_wrapper + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::PubsubWrapper] + # Optional. When set, the payload to the push endpoint is in the form of + # the JSON representation of a PubsubMessage + # (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). + # + # Note: The following fields are mutually exclusive: `pubsub_wrapper`, `no_wrapper`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] no_wrapper + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::NoWrapper] + # Optional. When set, the payload to the push endpoint is not wrapped. + # + # Note: The following fields are mutually exclusive: `no_wrapper`, `pubsub_wrapper`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] push_endpoint + # @return [::String] + # Optional. A URL locating the endpoint to which messages should be pushed. + # For example, a Webhook endpoint might use `https://example.com/push`. + # @!attribute [rw] attributes + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Endpoint configuration attributes that can be used to control + # different aspects of the message delivery. + # + # The only currently supported attribute is `x-goog-version`, which you can + # use to change the format of the pushed message. This attribute + # indicates the version of the data expected by the endpoint. This + # controls the shape of the pushed message (i.e., its fields and metadata). + # + # If not present during the `CreateSubscription` call, it will default to + # the version of the Pub/Sub API used to make such call. If not present in a + # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` + # calls will always return a valid version, even if the subscription was + # created without this attribute. + # + # The only supported values for the `x-goog-version` attribute are: + # + # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. + # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. + # + # For example: + # `attributes { "x-goog-version": "v1" }` + class PushConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains information needed for generating an + # [OpenID Connect + # token](https://developers.google.com/identity/protocols/OpenIDConnect). + # @!attribute [rw] service_account_email + # @return [::String] + # Optional. [Service account + # email](https://cloud.google.com/iam/docs/service-accounts) + # used for generating the OIDC token. For more information + # on setting up authentication, see + # [Push subscriptions](https://cloud.google.com/pubsub/docs/push). + # @!attribute [rw] audience + # @return [::String] + # Optional. Audience to be used when generating OIDC token. The audience + # claim identifies the recipients that the JWT is intended for. The + # audience value is a single case-sensitive string. Having multiple values + # (array) for the audience field is not supported. More info about the OIDC + # JWT token audience here: + # https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, + # the Push endpoint URL will be used. + class OidcToken + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payload to the push endpoint is in the form of the JSON representation + # of a PubsubMessage + # (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). + class PubsubWrapper + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sets the `data` field as the HTTP body for delivery. + # @!attribute [rw] write_metadata + # @return [::Boolean] + # Optional. When true, writes the Pub/Sub message metadata to + # `x-goog-pubsub-:` headers of the HTTP request. Writes the + # Pub/Sub message attributes to `:` headers of the HTTP request. + class NoWrapper + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AttributesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for a BigQuery subscription. + # @!attribute [rw] table + # @return [::String] + # Optional. The name of the table to which to write data, of the form + # \\{projectId}.\\{datasetId}.\\{tableId} + # @!attribute [rw] use_topic_schema + # @return [::Boolean] + # Optional. When true, use the topic's schema as the columns to write to in + # BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be + # enabled at the same time. + # @!attribute [rw] write_metadata + # @return [::Boolean] + # Optional. When true, write the subscription name, message_id, publish_time, + # attributes, and ordering_key to additional columns in the table. The + # subscription name, message_id, and publish_time fields are put in their own + # columns while all other message properties (other than data) are written to + # a JSON object in the attributes column. + # @!attribute [rw] drop_unknown_fields + # @return [::Boolean] + # Optional. When true and use_topic_schema is true, any fields that are a + # part of the topic schema that are not part of the BigQuery table schema are + # dropped when writing to BigQuery. Otherwise, the schemas must be kept in + # sync and any messages with extra fields are not written and remain in the + # subscription's backlog. + # @!attribute [rw] use_table_schema + # @return [::Boolean] + # Optional. When true, use the BigQuery table's schema as the columns to + # write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be + # enabled at the same time. + # @!attribute [rw] service_account_email + # @return [::String] + # Optional. The service account to use to write to BigQuery. The subscription + # creator or updater that specifies this field must have + # `iam.serviceAccounts.actAs` permission on the service account. If not + # specified, the Pub/Sub [service + # agent](https://cloud.google.com/iam/docs/service-agents), + # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + class BigQueryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a Cloud Storage subscription. + # @!attribute [rw] text_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig::TextConfig] + # Optional. If set, message data will be written to Cloud Storage in text + # format. + # + # Note: The following fields are mutually exclusive: `text_config`, `avro_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] avro_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig::AvroConfig] + # Optional. If set, message data will be written to Cloud Storage in Avro + # format. + # + # Note: The following fields are mutually exclusive: `avro_config`, `text_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bucket + # @return [::String] + # Required. User-provided name for the Cloud Storage bucket. + # The bucket must be created by the user. The bucket name must be without + # any prefix like "gs://". See the [bucket naming + # requirements] (https://cloud.google.com/storage/docs/buckets#naming). + # @!attribute [rw] filename_prefix + # @return [::String] + # Optional. User-provided prefix for Cloud Storage filename. See the [object + # naming requirements](https://cloud.google.com/storage/docs/objects#naming). + # @!attribute [rw] filename_suffix + # @return [::String] + # Optional. User-provided suffix for Cloud Storage filename. See the [object + # naming requirements](https://cloud.google.com/storage/docs/objects#naming). + # Must not end in "/". + # @!attribute [rw] filename_datetime_format + # @return [::String] + # Optional. User-provided format string specifying how to represent datetimes + # in Cloud Storage filenames. See the [datetime format + # guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names). + # @!attribute [rw] max_duration + # @return [::Google::Protobuf::Duration] + # Optional. File batching settings. + # If no max_duration setting is specified, a max_duration of 5 minutes will + # be set by default. max_duration is required regardless of whether other + # file batching settings are specified. + # + # The maximum duration that can elapse before a new Cloud Storage file is + # created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed + # the subscription's acknowledgement deadline. + # @!attribute [rw] max_bytes + # @return [::Integer] + # Optional. The maximum bytes that can be written to a Cloud Storage file + # before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may + # be exceeded in cases where messages are larger than the limit. + # @!attribute [rw] max_messages + # @return [::Integer] + # Optional. The maximum number of messages that can be written to a Cloud + # Storage file before a new file is created. Min 1000 messages. + # @!attribute [rw] service_account_email + # @return [::String] + # Optional. The service account to use to write to Cloud Storage. The + # subscription creator or updater that specifies this field must have + # `iam.serviceAccounts.actAs` permission on the service account. If not + # specified, the Pub/Sub + # [service agent](https://cloud.google.com/iam/docs/service-agents), + # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + class CloudStorageConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for writing message data in text format. + # Message payloads will be written to files as raw text, separated by a + # newline. + class TextConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for writing message data in Avro format. + # Message payloads and metadata will be written to files as an Avro binary. + # @!attribute [rw] write_metadata + # @return [::Boolean] + # Optional. When true, write the subscription name, message_id, + # publish_time, attributes, and ordering_key as additional fields in the + # output. The subscription name, message_id, and publish_time fields are + # put in their own fields while all other message properties other than + # data (for example, an ordering_key, if present) are added as entries in + # the attributes map. + # @!attribute [rw] use_topic_schema + # @return [::Boolean] + # Optional. When true, the output Cloud Storage file will be serialized + # using the topic schema, if it exists. + class AvroConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # All supported message transforms types. + # @!attribute [rw] javascript_udf + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::JavaScriptUDF] + # Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's + # are specified on a resource, each must have a unique `function_name`. + # @!attribute [rw] enabled + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Optional. This field is deprecated, use the `disabled` field to disable + # transforms. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. If true, the transform is disabled and will not be applied to + # messages. Defaults to `false`. + class MessageTransform + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User-defined JavaScript function that can transform or filter a Pub/Sub + # message. + # @!attribute [rw] function_name + # @return [::String] + # Required. Name of the JavasScript function that should applied to Pub/Sub + # messages. + # @!attribute [rw] code + # @return [::String] + # Required. JavaScript code that contains a function `function_name` with the + # below signature: + # + # ``` + # /** + # * Transforms a Pub/Sub message. + # + # * @return \\{(Object)>|null)} - To + # * filter a message, return `null`. To transform a message return a map + # * with the following keys: + # * - (required) 'data' : \\{string} + # * - (optional) 'attributes' : \\{Object} + # * Returning empty `attributes` will remove all attributes from the + # * message. + # * + # * @param \\{(Object)>} Pub/Sub + # * message. Keys: + # * - (required) 'data' : \\{string} + # * - (required) 'attributes' : \\{Object} + # * + # * @param \\{Object} metadata - Pub/Sub message metadata. + # * Keys: + # * - (required) 'message_id' : \\{string} + # * - (optional) 'publish_time': \\{string} YYYY-MM-DDTHH:MM:SSZ format + # * - (optional) 'ordering_key': \\{string} + # */ + # + # function (message, metadata) { + # } + # ``` + class JavaScriptUDF + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile new file mode 100644 index 000000000000..cf511377acd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-bigquery-analytics_hub-v1", path: "../" +else + gem "google-cloud-bigquery-analytics_hub-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb new file mode 100644 index 000000000000..0a39e6316666 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_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 analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the approve_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template. +# +def approve_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new + + # Call the approve_query_template method. + result = client.approve_query_template request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb new file mode 100644 index 000000000000..2a8628d7604c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the create_data_exchange call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange. +# +def create_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new + + # Call the create_data_exchange method. + result = client.create_data_exchange request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb new file mode 100644 index 000000000000..d1a606f4b1cd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the create_listing call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing. +# +def create_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new + + # Call the create_listing method. + result = client.create_listing request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb new file mode 100644 index 000000000000..9c25b4f508b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_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 analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the create_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template. +# +def create_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new + + # Call the create_query_template method. + result = client.create_query_template request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb new file mode 100644 index 000000000000..5952012c10af --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the delete_data_exchange call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange. +# +def delete_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new + + # Call the delete_data_exchange method. + result = client.delete_data_exchange request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb new file mode 100644 index 000000000000..f649ca2e5739 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the delete_listing call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing. +# +def delete_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new + + # Call the delete_listing method. + result = client.delete_listing request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb new file mode 100644 index 000000000000..ade5d81b6792 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_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 analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the delete_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template. +# +def delete_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new + + # Call the delete_query_template method. + result = client.delete_query_template request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb new file mode 100644 index 000000000000..be4fcc5a0ef2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.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 analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the delete_subscription call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription. +# +def delete_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new + + # Call the delete_subscription method. + result = client.delete_subscription request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb new file mode 100644 index 000000000000..7c5f0f889dca --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the get_data_exchange call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange. +# +def get_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new + + # Call the get_data_exchange method. + result = client.get_data_exchange request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb new file mode 100644 index 000000000000..41e6e64e7742 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the get_iam_policy call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb new file mode 100644 index 000000000000..6bf1cd0ebe75 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_GetListing_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the get_listing call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing. +# +def get_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new + + # Call the get_listing method. + result = client.get_listing request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_GetListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb new file mode 100644 index 000000000000..94f813894a65 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_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 analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the get_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template. +# +def get_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new + + # Call the get_query_template method. + result = client.get_query_template request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb new file mode 100644 index 000000000000..1f80e69970ce --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the get_subscription call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription. +# +def get_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new + + # Call the get_subscription method. + result = client.get_subscription request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb new file mode 100644 index 000000000000..1fcb44b39af1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_data_exchanges call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges. +# +def list_data_exchanges + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new + + # Call the list_data_exchanges method. + result = client.list_data_exchanges request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb new file mode 100644 index 000000000000..0a7a606ae5f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListListings_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_listings call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings. +# +def list_listings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new + + # Call the list_listings method. + result = client.list_listings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListListings_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb new file mode 100644 index 000000000000..b6f2cb9a9187 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_org_data_exchanges call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges. +# +def list_org_data_exchanges + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new + + # Call the list_org_data_exchanges method. + result = client.list_org_data_exchanges request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb new file mode 100644 index 000000000000..485a075ad969 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_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 analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_query_templates call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates. +# +def list_query_templates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new + + # Call the list_query_templates method. + result = client.list_query_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::Bigquery::AnalyticsHub::V1::QueryTemplate. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb new file mode 100644 index 000000000000..eb88901d590b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_shared_resource_subscriptions call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions. +# +def list_shared_resource_subscriptions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new + + # Call the list_shared_resource_subscriptions method. + result = client.list_shared_resource_subscriptions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb new file mode 100644 index 000000000000..83a559cfd40e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_subscriptions call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions. +# +def list_subscriptions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new + + # Call the list_subscriptions method. + result = client.list_subscriptions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb new file mode 100644 index 000000000000..6f0d8291ad7a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.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 analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the refresh_subscription call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription. +# +def refresh_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new + + # Call the refresh_subscription method. + result = client.refresh_subscription request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb new file mode 100644 index 000000000000..79f5d7d7fd2e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the revoke_subscription call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription. +# +def revoke_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new + + # Call the revoke_subscription method. + result = client.revoke_subscription request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb new file mode 100644 index 000000000000..e90e15b23996 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the set_iam_policy call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb new file mode 100644 index 000000000000..0853f509ac77 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_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 analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the submit_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template. +# +def submit_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new + + # Call the submit_query_template method. + result = client.submit_query_template request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb new file mode 100644 index 000000000000..4b8d255e1cb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.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 analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the subscribe_data_exchange call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange. +# +def subscribe_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new + + # Call the subscribe_data_exchange method. + result = client.subscribe_data_exchange request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb new file mode 100644 index 000000000000..9d570b4f1d94 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the subscribe_listing call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing. +# +def subscribe_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new + + # Call the subscribe_listing method. + result = client.subscribe_listing request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb new file mode 100644 index 000000000000..8d57f424d123 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the test_iam_permissions call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb new file mode 100644 index 000000000000..8736361663e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the update_data_exchange call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange. +# +def update_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new + + # Call the update_data_exchange method. + result = client.update_data_exchange request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb new file mode 100644 index 000000000000..8c5f1849b359 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the update_listing call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing. +# +def update_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new + + # Call the update_listing method. + result = client.update_listing request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb new file mode 100644 index 000000000000..880478732dd5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_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 analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the update_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template. +# +def update_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new + + # Call the update_query_template method. + result = client.update_query_template request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json new file mode 100644 index 000000000000..d27ae7dab1ab --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json @@ -0,0 +1,1175 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-analytics_hub-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.analyticshub.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync", + "title": "Snippet for the list_data_exchanges call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges.", + "file": "analytics_hub_service/list_data_exchanges.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_exchanges", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListDataExchanges", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListDataExchanges", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync", + "title": "Snippet for the list_org_data_exchanges call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges.", + "file": "analytics_hub_service/list_org_data_exchanges.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_org_data_exchanges", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListOrgDataExchanges", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListOrgDataExchanges", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync", + "title": "Snippet for the get_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange.", + "file": "analytics_hub_service/get_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_exchange", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetDataExchange", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync", + "title": "Snippet for the create_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange.", + "file": "analytics_hub_service/create_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_exchange", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "CreateDataExchange", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync", + "title": "Snippet for the update_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange.", + "file": "analytics_hub_service/update_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_exchange", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "UpdateDataExchange", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync", + "title": "Snippet for the delete_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange.", + "file": "analytics_hub_service/delete_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_exchange", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "DeleteDataExchange", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListListings_sync", + "title": "Snippet for the list_listings call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings.", + "file": "analytics_hub_service/list_listings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_listings", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListListings", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListListings", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetListing_sync", + "title": "Snippet for the get_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing.", + "file": "analytics_hub_service/get_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_listing", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetListing", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync", + "title": "Snippet for the create_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing.", + "file": "analytics_hub_service/create_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_listing", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "CreateListing", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync", + "title": "Snippet for the update_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing.", + "file": "analytics_hub_service/update_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_listing", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "UpdateListing", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync", + "title": "Snippet for the delete_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing.", + "file": "analytics_hub_service/delete_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_listing", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "DeleteListing", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync", + "title": "Snippet for the subscribe_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing.", + "file": "analytics_hub_service/subscribe_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "subscribe_listing", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "SubscribeListing", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubscribeListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync", + "title": "Snippet for the subscribe_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange.", + "file": "analytics_hub_service/subscribe_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "subscribe_data_exchange", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "SubscribeDataExchange", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubscribeDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync", + "title": "Snippet for the refresh_subscription call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription.", + "file": "analytics_hub_service/refresh_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "refresh_subscription", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "RefreshSubscription", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.RefreshSubscription", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync", + "title": "Snippet for the get_subscription call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription.", + "file": "analytics_hub_service/get_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_subscription", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetSubscription", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetSubscription", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync", + "title": "Snippet for the list_subscriptions call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions.", + "file": "analytics_hub_service/list_subscriptions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_subscriptions", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListSubscriptions", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListSubscriptions", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync", + "title": "Snippet for the list_shared_resource_subscriptions call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions.", + "file": "analytics_hub_service/list_shared_resource_subscriptions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_shared_resource_subscriptions", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListSharedResourceSubscriptions", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListSharedResourceSubscriptions", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync", + "title": "Snippet for the revoke_subscription call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription.", + "file": "analytics_hub_service/revoke_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "revoke_subscription", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "RevokeSubscription", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.RevokeSubscription", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync", + "title": "Snippet for the delete_subscription call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription.", + "file": "analytics_hub_service/delete_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_subscription", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "DeleteSubscription", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteSubscription", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy.", + "file": "analytics_hub_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetIamPolicy", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy.", + "file": "analytics_hub_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SetIamPolicy", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions.", + "file": "analytics_hub_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.TestIamPermissions", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync", + "title": "Snippet for the create_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template.", + "file": "analytics_hub_service/create_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "CreateQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync", + "title": "Snippet for the get_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template.", + "file": "analytics_hub_service/get_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync", + "title": "Snippet for the list_query_templates call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates.", + "file": "analytics_hub_service/list_query_templates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_query_templates", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListQueryTemplates", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListQueryTemplates", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync", + "title": "Snippet for the update_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template.", + "file": "analytics_hub_service/update_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "UpdateQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync", + "title": "Snippet for the delete_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template.", + "file": "analytics_hub_service/delete_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "DeleteQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync", + "title": "Snippet for the submit_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template.", + "file": "analytics_hub_service/submit_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "submit_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "SubmitQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubmitQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync", + "title": "Snippet for the approve_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template.", + "file": "analytics_hub_service/approve_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "approve_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ApproveQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ApproveQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb new file mode 100644 index 000000000000..dc1543dc3010 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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/bigquery/analyticshub/v1/analyticshub_pb" +require "google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" + +class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb new file mode 100644 index 000000000000..bda4e477568d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb @@ -0,0 +1,163 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" + +class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_data_exchange_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_exchange_path project: "value0", location: "value1", data_exchange: "value2" + assert_equal "projects/value0/locations/value1/dataExchanges/value2", path + end + end + + def test_dataset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project: "value0", dataset: "value1" + assert_equal "projects/value0/datasets/value1", path + end + end + + def test_listing_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.listing_path project: "value0", location: "value1", data_exchange: "value2", listing: "value3" + assert_equal "projects/value0/locations/value1/dataExchanges/value2/listings/value3", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_managed_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.managed_service_path service: "value0" + assert_equal "services/value0", path + end + end + + def test_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.query_template_path project: "value0", location: "value1", data_exchange: "value2", query_template: "value3" + assert_equal "projects/value0/locations/value1/dataExchanges/value2/queryTemplates/value3", path + end + end + + def test_routine_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.routine_path project: "value0", dataset: "value1", routine: "value2" + assert_equal "projects/value0/datasets/value1/routines/value2", path + end + end + + def test_subscription_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.subscription_path project: "value0", location: "value1", subscription: "value2" + assert_equal "projects/value0/locations/value1/subscriptions/value2", path + end + end + + def test_table_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_path project: "value0", dataset: "value1", table: "value2" + assert_equal "projects/value0/datasets/value1/tables/value2", path + end + end + + def test_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb new file mode 100644 index 000000000000..17161e9f3671 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb @@ -0,0 +1,1699 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" + + +class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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_data_exchanges + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.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_data_exchanges_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_data_exchanges_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_exchanges_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_data_exchanges({ 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_data_exchanges 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_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.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_data_exchanges({ 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_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.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_data_exchanges_client_stub.call_count + end + end + end + + def test_list_org_data_exchanges + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + organization = "hello world" + page_size = 42 + page_token = "hello world" + + list_org_data_exchanges_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_org_data_exchanges_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_org_data_exchanges_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_org_data_exchanges organization: organization, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_org_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, 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_org_data_exchanges({ organization: organization, 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_org_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, 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_org_data_exchanges_client_stub.call_count + end + end + end + + def test_get_data_exchange + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_data_exchange_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_exchange_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_data_exchange({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_data_exchange name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_data_exchange({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_exchange_client_stub.call_count + end + end + end + + def test_create_data_exchange + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_exchange_id = "hello world" + data_exchange = {} + + create_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_data_exchange_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_exchange_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_data_exchange parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_exchange_client_stub.call_count + end + end + end + + def test_update_data_exchange + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_exchange = {} + + update_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_data_exchange_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_exchange_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_data_exchange update_mask: update_mask, data_exchange: data_exchange do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_exchange_client_stub.call_count + end + end + end + + def test_delete_data_exchange + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_data_exchange_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_exchange_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_data_exchange({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_data_exchange name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_data_exchange({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_exchange_client_stub.call_count + end + end + end + + def test_list_listings + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.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_listings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_listings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_listings_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_listings({ 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_listings 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_listings ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.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_listings({ 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_listings(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.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_listings_client_stub.call_count + end + end + end + + def test_get_listing + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_listing_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_listing_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_listing({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_listing name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_listing({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_listing_client_stub.call_count + end + end + end + + def test_create_listing + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + listing_id = "hello world" + listing = {} + + create_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_listing_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_listing_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_listing({ parent: parent, listing_id: listing_id, listing: listing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_listing parent: parent, listing_id: listing_id, listing: listing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_listing({ parent: parent, listing_id: listing_id, listing: listing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_listing_client_stub.call_count + end + end + end + + def test_update_listing + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + listing = {} + + update_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_listing_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_listing_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_listing({ update_mask: update_mask, listing: listing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_listing update_mask: update_mask, listing: listing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_listing({ update_mask: update_mask, listing: listing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_listing_client_stub.call_count + end + end + end + + def test_delete_listing + # 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_commercial = true + + delete_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_listing_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_listing_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_listing({ name: name, delete_commercial: delete_commercial }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_listing name: name, delete_commercial: delete_commercial do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_listing({ name: name, delete_commercial: delete_commercial }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_listing_client_stub.call_count + end + end + end + + def test_subscribe_listing + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + destination_dataset = {} + name = "hello world" + + subscribe_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_subscribe_listing_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, subscribe_listing_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.subscribe_listing({ destination_dataset: destination_dataset, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.subscribe_listing destination_dataset: destination_dataset, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.subscribe_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.subscribe_listing({ destination_dataset: destination_dataset, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.subscribe_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, subscribe_listing_client_stub.call_count + end + end + end + + def test_subscribe_data_exchange + # Create test objects. + 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" + destination = "hello world" + destination_dataset = {} + subscription = "hello world" + subscriber_contact = "hello world" + + subscribe_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_subscribe_data_exchange_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, subscribe_data_exchange_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.subscribe_data_exchange name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.subscribe_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.subscribe_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, subscribe_data_exchange_client_stub.call_count + end + end + end + + def test_refresh_subscription + # Create test objects. + 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" + + refresh_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_refresh_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, refresh_subscription_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.refresh_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.refresh_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.refresh_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.refresh_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.refresh_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, refresh_subscription_client_stub.call_count + end + end + end + + def test_get_subscription + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_subscription_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_subscription_client_stub.call_count + end + end + end + + def test_list_subscriptions + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.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_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_subscriptions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_subscriptions_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_subscriptions({ 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_subscriptions 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_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.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_subscriptions({ 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_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.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_subscriptions_client_stub.call_count + end + end + end + + def test_list_shared_resource_subscriptions + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + include_deleted_subscriptions = true + page_size = 42 + page_token = "hello world" + + list_shared_resource_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_shared_resource_subscriptions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_shared_resource_subscriptions_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_shared_resource_subscriptions resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_shared_resource_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, 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_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, 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_shared_resource_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, 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_shared_resource_subscriptions_client_stub.call_count + end + end + end + + def test_revoke_subscription + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + revoke_commercial = true + + revoke_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_revoke_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, revoke_subscription_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.revoke_subscription name: name, revoke_commercial: revoke_commercial do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.revoke_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.revoke_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, revoke_subscription_client_stub.call_count + end + end + end + + def test_delete_subscription + # Create test objects. + 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_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_subscription_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_subscription_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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_query_template + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query_template_id = "hello world" + query_template = {} + + create_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_query_template parent: parent, query_template_id: query_template_id, query_template: query_template do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_query_template_client_stub.call_count + end + end + end + + def test_get_query_template + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_query_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_query_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_query_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_query_template_client_stub.call_count + end + end + end + + def test_list_query_templates + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.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_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_query_templates_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_query_templates_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_query_templates({ 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_query_templates 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_query_templates ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.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_query_templates({ 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_query_templates(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.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_query_templates_client_stub.call_count + end + end + end + + def test_update_query_template + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + query_template = {} + + update_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_query_template({ update_mask: update_mask, query_template: query_template }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_query_template update_mask: update_mask, query_template: query_template do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_query_template({ update_mask: update_mask, query_template: query_template }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_query_template_client_stub.call_count + end + end + end + + def test_delete_query_template + # 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_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_query_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_query_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_query_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_query_template_client_stub.call_count + end + end + end + + def test_submit_query_template + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + submit_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_submit_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, submit_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.submit_query_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.submit_query_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.submit_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.submit_query_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.submit_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, submit_query_template_client_stub.call_count + end + end + end + + def test_approve_query_template + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + approve_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_approve_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, approve_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.approve_query_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.approve_query_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.approve_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.approve_query_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.approve_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, approve_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb new file mode 100644 index 000000000000..717c81a3d52c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb @@ -0,0 +1,1914 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" + +class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_data_exchanges + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_exchanges, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_exchanges_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_data_exchanges parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_exchanges_client_stub.call_rpc_count + end + end + + def test_list_org_data_exchanges + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + organization = "hello world" + page_size = 42 + page_token = "hello world" + + list_org_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_org_data_exchanges, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, request + assert_equal "hello world", request["organization"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_org_data_exchanges_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_org_data_exchanges organization: organization, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_org_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_org_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_org_data_exchanges_client_stub.call_rpc_count + end + end + + def test_get_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_exchange_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_data_exchange({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_data_exchange name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_data_exchange({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_exchange_client_stub.call_rpc_count + end + end + + def test_create_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_exchange_id = "hello world" + data_exchange = {} + + create_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_exchange_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange), request["data_exchange"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_exchange_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_data_exchange parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_exchange_client_stub.call_rpc_count + end + end + + def test_update_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_exchange = {} + + update_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange), request["data_exchange"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_exchange_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_data_exchange update_mask: update_mask, data_exchange: data_exchange do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_exchange_client_stub.call_rpc_count + end + end + + def test_delete_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_exchange_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_data_exchange({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_data_exchange name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_data_exchange({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_exchange_client_stub.call_rpc_count + end + end + + def test_list_listings + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_listings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_listings, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_listings_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_listings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_listings parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_listings ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_listings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_listings(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_listings_client_stub.call_rpc_count + end + end + + def test_get_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_listing, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_listing_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_listing({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_listing name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_listing({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_listing_client_stub.call_rpc_count + end + end + + def test_create_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + listing_id = "hello world" + listing = {} + + create_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_listing, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["listing_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing), request["listing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_listing_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_listing({ parent: parent, listing_id: listing_id, listing: listing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_listing parent: parent, listing_id: listing_id, listing: listing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_listing({ parent: parent, listing_id: listing_id, listing: listing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_listing_client_stub.call_rpc_count + end + end + + def test_update_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + listing = {} + + update_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_listing, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing), request["listing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_listing_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_listing({ update_mask: update_mask, listing: listing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_listing update_mask: update_mask, listing: listing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_listing({ update_mask: update_mask, listing: listing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_listing_client_stub.call_rpc_count + end + end + + def test_delete_listing + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delete_commercial = true + + delete_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_listing, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["delete_commercial"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_listing_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_listing({ name: name, delete_commercial: delete_commercial }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_listing name: name, delete_commercial: delete_commercial do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_listing({ name: name, delete_commercial: delete_commercial }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_listing_client_stub.call_rpc_count + end + end + + def test_subscribe_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + destination_dataset = {} + name = "hello world" + + subscribe_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :subscribe_listing, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset), request["destination_dataset"] + assert_equal :destination_dataset, request.destination + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, subscribe_listing_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.subscribe_listing({ destination_dataset: destination_dataset, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.subscribe_listing destination_dataset: destination_dataset, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.subscribe_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.subscribe_listing({ destination_dataset: destination_dataset, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.subscribe_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, subscribe_listing_client_stub.call_rpc_count + end + end + + def test_subscribe_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination = "hello world" + destination_dataset = {} + subscription = "hello world" + subscriber_contact = "hello world" + + subscribe_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :subscribe_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["destination"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset), request["destination_dataset"] + assert_equal "hello world", request["subscription"] + assert_equal "hello world", request["subscriber_contact"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, subscribe_data_exchange_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }) do |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.subscribe_data_exchange name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact do |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.subscribe_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact) do |response, operation| + 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.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }, grpc_options) do |response, operation| + 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.subscribe_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, subscribe_data_exchange_client_stub.call_rpc_count + end + end + + def test_refresh_subscription + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + refresh_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :refresh_subscription, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, refresh_subscription_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.refresh_subscription({ 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.refresh_subscription 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.refresh_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.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.refresh_subscription({ 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.refresh_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.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, refresh_subscription_client_stub.call_rpc_count + end + end + + def test_get_subscription + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_subscription, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_subscription_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_subscription({ 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_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(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_subscription_client_stub.call_rpc_count + end + end + + def test_list_subscriptions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_subscriptions, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, 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_subscriptions_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_subscriptions({ 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_subscriptions 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_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.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_subscriptions({ 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_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.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_subscriptions_client_stub.call_rpc_count + end + end + + def test_list_shared_resource_subscriptions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + include_deleted_subscriptions = true + page_size = 42 + page_token = "hello world" + + list_shared_resource_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_shared_resource_subscriptions, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal true, request["include_deleted_subscriptions"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_shared_resource_subscriptions_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: 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_shared_resource_subscriptions resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: 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_shared_resource_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: 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_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_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_shared_resource_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_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_shared_resource_subscriptions_client_stub.call_rpc_count + end + end + + def test_revoke_subscription + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + revoke_commercial = true + + revoke_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :revoke_subscription, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["revoke_commercial"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, revoke_subscription_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.revoke_subscription name: name, revoke_commercial: revoke_commercial do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.revoke_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.revoke_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, revoke_subscription_client_stub.call_rpc_count + end + end + + def test_delete_subscription + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_subscription, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_subscription_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_subscription({ 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_subscription 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_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.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_subscription({ 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_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.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_subscription_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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_query_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query_template_id = "hello world" + query_template = {} + + create_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query_template_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate), request["query_template"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_query_template parent: parent, query_template_id: query_template_id, query_template: query_template do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_query_template_client_stub.call_rpc_count + end + end + + def test_get_query_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_query_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_query_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_query_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_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(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_query_template_client_stub.call_rpc_count + end + end + + def test_list_query_templates + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_query_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_query_templates, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, 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_query_templates_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_query_templates({ parent: parent, page_size: page_size, page_token: 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_query_templates parent: parent, page_size: page_size, page_token: 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_query_templates ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.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_query_templates({ 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_query_templates(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.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_query_templates_client_stub.call_rpc_count + end + end + + def test_update_query_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + query_template = {} + + update_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate), request["query_template"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_query_template({ update_mask: update_mask, query_template: query_template }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_query_template update_mask: update_mask, query_template: query_template do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_query_template({ update_mask: update_mask, query_template: query_template }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_query_template_client_stub.call_rpc_count + end + end + + def test_delete_query_template + # 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_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_query_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_query_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_query_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.delete_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(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_query_template_client_stub.call_rpc_count + end + end + + def test_submit_query_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + submit_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :submit_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, submit_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.submit_query_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.submit_query_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.submit_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.submit_query_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.submit_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, submit_query_template_client_stub.call_rpc_count + end + end + + def test_approve_query_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + approve_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :approve_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, approve_query_template_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.approve_query_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.approve_query_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.approve_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.approve_query_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.approve_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, approve_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-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-bigquery-data_transfer-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json new file mode 100644 index 000000000000..682905e95539 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "bigquerydatatransfer.googleapis.com", + "api_shortname": "bigquerydatatransfer", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_transfer-v1/latest", + "distribution_name": "google-cloud-bigquery-data_transfer-v1", + "is_cloud": true, + "language": "ruby", + "name": "bigquerydatatransfer", + "name_pretty": "BigQuery Data Transfer Service V1 API", + "product_documentation": "https://cloud.google.com/bigquery/transfer", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. Note that google-cloud-bigquery-data_transfer-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_transfer instead. See the readme for more details.", + "ruby-cloud-env-prefix": "DATA_TRANSFER", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/transfer", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml new file mode 100644 index 000000000000..6f5635fddf0e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-data_transfer-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-bigquery-data_transfer-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts new file mode 100644 index 000000000000..304c3609fa4b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Data Transfer Service V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..4740aa501122 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-data_transfer-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-bigquery-data_transfer-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/bigquery/data_transfer/v1" + +client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/data_transfer/v1" + +::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-bigquery-data_transfer-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/bigquery/data_transfer/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md new file mode 100644 index 000000000000..b0f8075cecec --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Data Transfer Service V1 API + +Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis. + +Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Data Transfer Service V1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-data_transfer](https://rubygems.org/gems/google-cloud-bigquery-data_transfer). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-data_transfer-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/bigquerydatatransfer.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/data_transfer/v1" + +client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new +request = ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new # (request fields as keyword arguments...) +response = client.get_data_source request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_transfer-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/transfer) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/bigquery/data_transfer/v1" +require "logger" + +client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.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-bigquery-data_transfer`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-data_transfer-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-bigquery-data_transfer`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-bigquery-data_transfer-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile new file mode 100644 index 000000000000..0be31481319e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-bigquery-data_transfer-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["DATA_TRANSFER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["DATA_TRANSFER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["DATA_TRANSFER_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or DATA_TRANSFER_TEST_PROJECT=test123 DATA_TRANSFER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["DATA_TRANSFER_PROJECT"] = project + ENV["DATA_TRANSFER_TEST_PROJECT"] = project + ENV["DATA_TRANSFER_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-data_transfer-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-data_transfer-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-data_transfer-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bigquery-data_transfer-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-data_transfer-v1" + header "google-cloud-bigquery-data_transfer-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-data_transfer-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-data_transfer-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-data_transfer-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-data_transfer-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json new file mode 100644 index 000000000000..7ae4ebcd10a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json @@ -0,0 +1,98 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.datatransfer.v1", + "libraryPackage": "::Google::Cloud::Bigquery::DataTransfer::V1", + "services": { + "DataTransferService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client", + "rpcs": { + "GetDataSource": { + "methods": [ + "get_data_source" + ] + }, + "ListDataSources": { + "methods": [ + "list_data_sources" + ] + }, + "CreateTransferConfig": { + "methods": [ + "create_transfer_config" + ] + }, + "UpdateTransferConfig": { + "methods": [ + "update_transfer_config" + ] + }, + "DeleteTransferConfig": { + "methods": [ + "delete_transfer_config" + ] + }, + "GetTransferConfig": { + "methods": [ + "get_transfer_config" + ] + }, + "ListTransferConfigs": { + "methods": [ + "list_transfer_configs" + ] + }, + "ScheduleTransferRuns": { + "methods": [ + "schedule_transfer_runs" + ] + }, + "StartManualTransferRuns": { + "methods": [ + "start_manual_transfer_runs" + ] + }, + "GetTransferRun": { + "methods": [ + "get_transfer_run" + ] + }, + "DeleteTransferRun": { + "methods": [ + "delete_transfer_run" + ] + }, + "ListTransferRuns": { + "methods": [ + "list_transfer_runs" + ] + }, + "ListTransferLogs": { + "methods": [ + "list_transfer_logs" + ] + }, + "CheckValidCreds": { + "methods": [ + "check_valid_creds" + ] + }, + "EnrollDataSources": { + "methods": [ + "enroll_data_sources" + ] + }, + "UnenrollDataSources": { + "methods": [ + "unenroll_data_sources" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec new file mode 100644 index 000000000000..cae36345fcbd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/data_transfer/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-data_transfer-v1" + gem.version = Google::Cloud::Bigquery::DataTransfer::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. Note that google-cloud-bigquery-data_transfer-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_transfer instead. See the readme for more details." + gem.summary = "Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.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-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb new file mode 100644 index 000000000000..78206ec74e36 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/bigquery/data_transfer/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb new file mode 100644 index 000000000000..3d075d750da4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" +require "google/cloud/bigquery/data_transfer/v1/version" + +module Google + module Cloud + module Bigquery + module DataTransfer + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/data_transfer/v1" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/data_transfer/v1" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/bigquery/data_transfer/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb new file mode 100644 index 000000000000..40a072a3828e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module Bigquery + module DataTransfer + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/bigquery/data_transfer/v1/rest" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "DataTransfer"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb new file mode 100644 index 000000000000..6800f1bff3af --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/data_transfer/v1/version" + +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/client" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + ## + # This API allows users to manage their data transfers into BigQuery. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + module DataTransferService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_transfer_service", "helpers.rb" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb new file mode 100644 index 000000000000..f854007058a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb @@ -0,0 +1,2172 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" +require "google/cloud/location" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + ## + # Client for the DataTransferService service. + # + # This API allows users to manage their data transfers into BigQuery. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatatransfer.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_transfer_service_stub + + ## + # Configure the DataTransferService Client class. + # + # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTransferService clients + # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "DataTransfer", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_data_source.timeout = 20.0 + default_config.rpcs.get_data_source.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_data_sources.timeout = 20.0 + default_config.rpcs.list_data_sources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_transfer_config.timeout = 30.0 + + default_config.rpcs.update_transfer_config.timeout = 30.0 + + default_config.rpcs.delete_transfer_config.timeout = 20.0 + default_config.rpcs.delete_transfer_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_transfer_config.timeout = 20.0 + default_config.rpcs.get_transfer_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_configs.timeout = 20.0 + default_config.rpcs.list_transfer_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.schedule_transfer_runs.timeout = 30.0 + + default_config.rpcs.get_transfer_run.timeout = 20.0 + default_config.rpcs.get_transfer_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_transfer_run.timeout = 20.0 + default_config.rpcs.delete_transfer_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_runs.timeout = 20.0 + default_config.rpcs.list_transfer_runs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_logs.timeout = 20.0 + default_config.rpcs.list_transfer_logs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.check_valid_creds.timeout = 20.0 + default_config.rpcs.check_valid_creds.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTransferService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_transfer_service_stub.universe_domain + end + + ## + # Create a new DataTransferService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTransferService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @data_transfer_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @data_transfer_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_transfer_service_stub.endpoint + config.universe_domain = @data_transfer_service_stub.universe_domain + config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_transfer_service_stub.logger + end + + # Service calls + + ## + # Retrieves a supported data source and returns its settings. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :get_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists supported data sources and returns their settings. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The BigQuery project id for which data sources should be + # returned. Must be in the form: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListDataSourcesRequest` list results. For multiple-page + # results, `ListDataSourcesResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_data_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new data transfer configuration. + # + # @overload create_transfer_config(request, options = nil) + # Pass arguments to `create_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil) + # Pass arguments to `create_transfer_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The BigQuery project id where the transfer configuration should + # be created. Must be in the format + # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If + # specified location and location of the destination bigquery dataset do not + # match - the request will fail. + # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] + # Required. Data transfer configuration to create. + # @param authorization_code [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+              #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @param version_info [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+              #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @param service_account_name [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new + # + # # Call the create_transfer_config method. + # result = client.create_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def create_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_transfer_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_transfer_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :create_transfer_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a data transfer configuration. + # All fields must be set, even if they are not updated. + # + # @overload update_transfer_config(request, options = nil) + # Pass arguments to `update_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil) + # Pass arguments to `update_transfer_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] + # Required. Data transfer configuration to create. + # @param authorization_code [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+              #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Required list of fields to be updated in this request. + # @param version_info [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+              #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @param service_account_name [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new + # + # # Call the update_transfer_config method. + # result = client.update_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def update_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_transfer_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.transfer_config&.name + header_params["transfer_config.name"] = request.transfer_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_transfer_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :update_transfer_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a data transfer configuration, including any associated transfer + # runs and logs. + # + # @overload delete_transfer_config(request, options = nil) + # Pass arguments to `delete_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_transfer_config(name: nil) + # Pass arguments to `delete_transfer_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new + # + # # Call the delete_transfer_config method. + # result = client.delete_transfer_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_transfer_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_transfer_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :delete_transfer_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about a data transfer config. + # + # @overload get_transfer_config(request, options = nil) + # Pass arguments to `get_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_transfer_config(name: nil) + # Pass arguments to `get_transfer_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new + # + # # Call the get_transfer_config method. + # result = client.get_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def get_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_transfer_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_transfer_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :get_transfer_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about all transfer configs owned by a project in the + # specified location. + # + # @overload list_transfer_configs(request, options = nil) + # Pass arguments to `list_transfer_configs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_transfer_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The BigQuery project id for which transfer configs + # should be returned: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @param data_source_ids [::Array<::String>] + # When specified, only configurations of requested data sources are returned. + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransfersRequest` list results. For multiple-page + # results, `ListTransfersResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new + # + # # Call the list_transfer_configs method. + # result = client.list_transfer_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p item + # end + # + def list_transfer_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_transfer_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_transfer_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_transfer_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :list_transfer_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates transfer runs for a time range [start_time, end_time]. + # For each date - or whatever granularity the data source supports - in the + # range, one transfer run is created. + # Note that runs are created per UTC time in the time range. + # DEPRECATED: use StartManualTransferRuns instead. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload schedule_transfer_runs(request, options = nil) + # Pass arguments to `schedule_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) + # Pass arguments to `schedule_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. Start time of the range of transfer runs. For example, + # `"2017-05-25T00:00:00+00:00"`. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. End time of the range of transfer runs. For example, + # `"2017-05-30T00:00:00+00:00"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new + # + # # Call the schedule_transfer_runs method. + # result = client.schedule_transfer_runs request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. + # p result + # + def schedule_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.schedule_transfer_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.schedule_transfer_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.schedule_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :schedule_transfer_runs, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Start manual transfer runs to be executed now with schedule_time equal to + # current time. The transfer runs can be created for a time range where the + # run_time is between start_time (inclusive) and end_time (exclusive), or for + # a specific run_time. + # + # @overload start_manual_transfer_runs(request, options = nil) + # Pass arguments to `start_manual_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil) + # Pass arguments to `start_manual_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param requested_time_range [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange, ::Hash] + # A time_range start and end timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_time_range must be a past time and cannot include future time + # values. + # + # Note: The following parameters are mutually exclusive: `requested_time_range`, `requested_run_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param requested_run_time [::Google::Protobuf::Timestamp, ::Hash] + # A run_time timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_run_time must be a past time and cannot include future time + # values. + # + # Note: The following parameters are mutually exclusive: `requested_run_time`, `requested_time_range`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new + # + # # Call the start_manual_transfer_runs method. + # result = client.start_manual_transfer_runs request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. + # p result + # + def start_manual_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_manual_transfer_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_manual_transfer_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_manual_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :start_manual_transfer_runs, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about the particular transfer run. + # + # @overload get_transfer_run(request, options = nil) + # Pass arguments to `get_transfer_run` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_transfer_run(name: nil) + # Pass arguments to `get_transfer_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new + # + # # Call the get_transfer_run method. + # result = client.get_transfer_run request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. + # p result + # + def get_transfer_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_transfer_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_transfer_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_transfer_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :get_transfer_run, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified transfer run. + # + # @overload delete_transfer_run(request, options = nil) + # Pass arguments to `delete_transfer_run` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_transfer_run(name: nil) + # Pass arguments to `delete_transfer_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new + # + # # Call the delete_transfer_run method. + # result = client.delete_transfer_run request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_transfer_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_transfer_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_transfer_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_transfer_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :delete_transfer_run, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about running and completed transfer runs. + # + # @overload list_transfer_runs(request, options = nil) + # Pass arguments to `list_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) + # Pass arguments to `list_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of transfer configuration for which transfer runs should be + # retrieved. Format of transfer configuration resource name is: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param states [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] + # When specified, only transfer runs with requested states are returned. + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferRunsRequest` list results. For multiple-page + # results, `ListTransferRunsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @param run_attempt [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] + # Indicates how run attempts are to be pulled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new + # + # # Call the list_transfer_runs method. + # result = client.list_transfer_runs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. + # p item + # end + # + def list_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_transfer_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_transfer_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :list_transfer_runs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_runs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns log messages for the transfer run. + # + # @overload list_transfer_logs(request, options = nil) + # Pass arguments to `list_transfer_logs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) + # Pass arguments to `list_transfer_logs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Transfer run name in the form: + # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferLogsRequest` list results. For multiple-page + # results, `ListTransferLogsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @param message_types [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] + # Message types to return. If not populated - INFO, WARNING and ERROR + # messages are returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new + # + # # Call the list_transfer_logs method. + # result = client.list_transfer_logs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage. + # p item + # end + # + def list_transfer_logs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_transfer_logs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_transfer_logs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_transfer_logs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :list_transfer_logs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_logs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns true if valid credentials exist for the given data source and + # requesting user. + # + # @overload check_valid_creds(request, options = nil) + # Pass arguments to `check_valid_creds` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload check_valid_creds(name: nil) + # Pass arguments to `check_valid_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The data source in the form: + # `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new + # + # # Call the check_valid_creds method. + # result = client.check_valid_creds request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. + # p result + # + def check_valid_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.check_valid_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.check_valid_creds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.check_valid_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :check_valid_creds, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enroll data sources in a user project. This allows users to create transfer + # configurations for these data sources. They will also appear in the + # ListDataSources RPC and as such, will appear in the + # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents + # can be found in the public guide for + # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and + # [Data Transfer + # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). + # + # @overload enroll_data_sources(request, options = nil) + # Pass arguments to `enroll_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enroll_data_sources(name: nil, data_source_ids: nil) + # Pass arguments to `enroll_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @param data_source_ids [::Array<::String>] + # Data sources that are enrolled. It is required to provide at least one + # data source id. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new + # + # # Call the enroll_data_sources method. + # result = client.enroll_data_sources request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def enroll_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enroll_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enroll_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enroll_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :enroll_data_sources, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unenroll data sources in a user project. This allows users to remove + # transfer configurations for these data sources. They will no longer appear + # in the ListDataSources RPC and will also no longer appear in the [BigQuery + # UI](https://console.cloud.google.com/bigquery). Data transfers + # configurations of unenrolled data sources will not be scheduled. + # + # @overload unenroll_data_sources(request, options = nil) + # Pass arguments to `unenroll_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload unenroll_data_sources(name: nil, data_source_ids: nil) + # Pass arguments to `unenroll_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @param data_source_ids [::Array<::String>] + # Data sources that are unenrolled. It is required to provide at least one + # data source id. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new + # + # # Call the unenroll_data_sources method. + # result = client.unenroll_data_sources request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def unenroll_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.unenroll_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.unenroll_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unenroll_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :unenroll_data_sources, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataTransferService API. + # + # This class represents the configuration for DataTransferService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_data_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "bigquerydatatransfer.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DataTransferService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `create_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_transfer_config + ## + # RPC-specific configuration for `update_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_transfer_config + ## + # RPC-specific configuration for `delete_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_transfer_config + ## + # RPC-specific configuration for `get_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_transfer_config + ## + # RPC-specific configuration for `list_transfer_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_configs + ## + # RPC-specific configuration for `schedule_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :schedule_transfer_runs + ## + # RPC-specific configuration for `start_manual_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :start_manual_transfer_runs + ## + # RPC-specific configuration for `get_transfer_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_transfer_run + ## + # RPC-specific configuration for `delete_transfer_run` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_transfer_run + ## + # RPC-specific configuration for `list_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_runs + ## + # RPC-specific configuration for `list_transfer_logs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_logs + ## + # RPC-specific configuration for `check_valid_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :check_valid_creds + ## + # RPC-specific configuration for `enroll_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :enroll_data_sources + ## + # RPC-specific configuration for `unenroll_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :unenroll_data_sources + + # @private + def initialize parent_rpcs = nil + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + create_transfer_config_config = parent_rpcs.create_transfer_config if parent_rpcs.respond_to? :create_transfer_config + @create_transfer_config = ::Gapic::Config::Method.new create_transfer_config_config + update_transfer_config_config = parent_rpcs.update_transfer_config if parent_rpcs.respond_to? :update_transfer_config + @update_transfer_config = ::Gapic::Config::Method.new update_transfer_config_config + delete_transfer_config_config = parent_rpcs.delete_transfer_config if parent_rpcs.respond_to? :delete_transfer_config + @delete_transfer_config = ::Gapic::Config::Method.new delete_transfer_config_config + get_transfer_config_config = parent_rpcs.get_transfer_config if parent_rpcs.respond_to? :get_transfer_config + @get_transfer_config = ::Gapic::Config::Method.new get_transfer_config_config + list_transfer_configs_config = parent_rpcs.list_transfer_configs if parent_rpcs.respond_to? :list_transfer_configs + @list_transfer_configs = ::Gapic::Config::Method.new list_transfer_configs_config + schedule_transfer_runs_config = parent_rpcs.schedule_transfer_runs if parent_rpcs.respond_to? :schedule_transfer_runs + @schedule_transfer_runs = ::Gapic::Config::Method.new schedule_transfer_runs_config + start_manual_transfer_runs_config = parent_rpcs.start_manual_transfer_runs if parent_rpcs.respond_to? :start_manual_transfer_runs + @start_manual_transfer_runs = ::Gapic::Config::Method.new start_manual_transfer_runs_config + get_transfer_run_config = parent_rpcs.get_transfer_run if parent_rpcs.respond_to? :get_transfer_run + @get_transfer_run = ::Gapic::Config::Method.new get_transfer_run_config + delete_transfer_run_config = parent_rpcs.delete_transfer_run if parent_rpcs.respond_to? :delete_transfer_run + @delete_transfer_run = ::Gapic::Config::Method.new delete_transfer_run_config + list_transfer_runs_config = parent_rpcs.list_transfer_runs if parent_rpcs.respond_to? :list_transfer_runs + @list_transfer_runs = ::Gapic::Config::Method.new list_transfer_runs_config + list_transfer_logs_config = parent_rpcs.list_transfer_logs if parent_rpcs.respond_to? :list_transfer_logs + @list_transfer_logs = ::Gapic::Config::Method.new list_transfer_logs_config + check_valid_creds_config = parent_rpcs.check_valid_creds if parent_rpcs.respond_to? :check_valid_creds + @check_valid_creds = ::Gapic::Config::Method.new check_valid_creds_config + enroll_data_sources_config = parent_rpcs.enroll_data_sources if parent_rpcs.respond_to? :enroll_data_sources + @enroll_data_sources = ::Gapic::Config::Method.new enroll_data_sources_config + unenroll_data_sources_config = parent_rpcs.unenroll_data_sources if parent_rpcs.respond_to? :unenroll_data_sources + @unenroll_data_sources = ::Gapic::Config::Method.new unenroll_data_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb new file mode 100644 index 000000000000..bc7f9b48f764 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + # Credentials for the DataTransferService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "DATA_TRANSFER_CREDENTIALS", + "DATA_TRANSFER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "DATA_TRANSFER_CREDENTIALS_JSON", + "DATA_TRANSFER_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb new file mode 100644 index 000000000000..ad6b7baec0f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb @@ -0,0 +1,193 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + # Path helper methods for the DataTransferService API. + module Paths + ## + # Create a fully-qualified DataSource resource string. + # + # @overload data_source_path(project:, data_source:) + # The resource will be in the following format: + # + # `projects/{project}/dataSources/{data_source}` + # + # @param project [String] + # @param data_source [String] + # + # @overload data_source_path(project:, location:, data_source:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataSources/{data_source}` + # + # @param project [String] + # @param location [String] + # @param data_source [String] + # + # @return [::String] + def data_source_path **args + resources = { + "data_source:project" => (proc do |project:, data_source:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/dataSources/#{data_source}" + end), + "data_source:location:project" => (proc do |project:, location:, data_source:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataSources/#{data_source}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified Run resource string. + # + # @overload run_path(project:, transfer_config:, run:) + # The resource will be in the following format: + # + # `projects/{project}/transferConfigs/{transfer_config}/runs/{run}` + # + # @param project [String] + # @param transfer_config [String] + # @param run [String] + # + # @overload run_path(project:, location:, transfer_config:, run:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}` + # + # @param project [String] + # @param location [String] + # @param transfer_config [String] + # @param run [String] + # + # @return [::String] + def run_path **args + resources = { + "project:run:transfer_config" => (proc do |project:, transfer_config:, run:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "transfer_config cannot contain /" if transfer_config.to_s.include? "/" + + "projects/#{project}/transferConfigs/#{transfer_config}/runs/#{run}" + end), + "location:project:run:transfer_config" => (proc do |project:, location:, transfer_config:, run:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "transfer_config cannot contain /" if transfer_config.to_s.include? "/" + + "projects/#{project}/locations/#{location}/transferConfigs/#{transfer_config}/runs/#{run}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified TransferConfig resource string. + # + # @overload transfer_config_path(project:, transfer_config:) + # The resource will be in the following format: + # + # `projects/{project}/transferConfigs/{transfer_config}` + # + # @param project [String] + # @param transfer_config [String] + # + # @overload transfer_config_path(project:, location:, transfer_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/transferConfigs/{transfer_config}` + # + # @param project [String] + # @param location [String] + # @param transfer_config [String] + # + # @return [::String] + def transfer_config_path **args + resources = { + "project:transfer_config" => (proc do |project:, transfer_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/transferConfigs/#{transfer_config}" + end), + "location:project:transfer_config" => (proc do |project:, location:, transfer_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/transferConfigs/#{transfer_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb new file mode 100644 index 000000000000..542bca69647b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/data_transfer/v1/version" +require "google/cloud/bigquery/data_transfer/v1/bindings_override" + +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + ## + # This API allows users to manage their data transfers into BigQuery. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + module DataTransferService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb new file mode 100644 index 000000000000..182ea44165f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb @@ -0,0 +1,2023 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + module Rest + ## + # REST client for the DataTransferService service. + # + # This API allows users to manage their data transfers into BigQuery. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatatransfer.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_transfer_service_stub + + ## + # Configure the DataTransferService Client class. + # + # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTransferService clients + # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "DataTransfer", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_data_source.timeout = 20.0 + default_config.rpcs.get_data_source.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_data_sources.timeout = 20.0 + default_config.rpcs.list_data_sources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_transfer_config.timeout = 30.0 + + default_config.rpcs.update_transfer_config.timeout = 30.0 + + default_config.rpcs.delete_transfer_config.timeout = 20.0 + default_config.rpcs.delete_transfer_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_transfer_config.timeout = 20.0 + default_config.rpcs.get_transfer_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_configs.timeout = 20.0 + default_config.rpcs.list_transfer_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.schedule_transfer_runs.timeout = 30.0 + + default_config.rpcs.get_transfer_run.timeout = 20.0 + default_config.rpcs.get_transfer_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_transfer_run.timeout = 20.0 + default_config.rpcs.delete_transfer_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_runs.timeout = 20.0 + default_config.rpcs.list_transfer_runs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_logs.timeout = 20.0 + default_config.rpcs.list_transfer_logs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.check_valid_creds.timeout = 20.0 + default_config.rpcs.check_valid_creds.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTransferService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_transfer_service_stub.universe_domain + end + + ## + # Create a new DataTransferService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTransferService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @data_transfer_service_stub = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_transfer_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_transfer_service_stub.endpoint + config.universe_domain = @data_transfer_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_transfer_service_stub.logger + end + + # Service calls + + ## + # Retrieves a supported data source and returns its settings. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.get_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists supported data sources and returns their settings. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The BigQuery project id for which data sources should be + # returned. Must be in the form: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListDataSourcesRequest` list results. For multiple-page + # results, `ListDataSourcesResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.list_data_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_data_sources, "data_sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new data transfer configuration. + # + # @overload create_transfer_config(request, options = nil) + # Pass arguments to `create_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil) + # Pass arguments to `create_transfer_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The BigQuery project id where the transfer configuration should + # be created. Must be in the format + # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If + # specified location and location of the destination bigquery dataset do not + # match - the request will fail. + # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] + # Required. Data transfer configuration to create. + # @param authorization_code [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+                #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @param version_info [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+                #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @param service_account_name [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new + # + # # Call the create_transfer_config method. + # result = client.create_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def create_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_transfer_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_transfer_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.create_transfer_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a data transfer configuration. + # All fields must be set, even if they are not updated. + # + # @overload update_transfer_config(request, options = nil) + # Pass arguments to `update_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil) + # Pass arguments to `update_transfer_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] + # Required. Data transfer configuration to create. + # @param authorization_code [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+                #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Required list of fields to be updated in this request. + # @param version_info [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+                #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @param service_account_name [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new + # + # # Call the update_transfer_config method. + # result = client.update_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def update_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_transfer_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_transfer_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.update_transfer_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a data transfer configuration, including any associated transfer + # runs and logs. + # + # @overload delete_transfer_config(request, options = nil) + # Pass arguments to `delete_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_transfer_config(name: nil) + # Pass arguments to `delete_transfer_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new + # + # # Call the delete_transfer_config method. + # result = client.delete_transfer_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_transfer_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_transfer_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.delete_transfer_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about a data transfer config. + # + # @overload get_transfer_config(request, options = nil) + # Pass arguments to `get_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_transfer_config(name: nil) + # Pass arguments to `get_transfer_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new + # + # # Call the get_transfer_config method. + # result = client.get_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def get_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_transfer_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_transfer_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.get_transfer_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about all transfer configs owned by a project in the + # specified location. + # + # @overload list_transfer_configs(request, options = nil) + # Pass arguments to `list_transfer_configs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_transfer_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The BigQuery project id for which transfer configs + # should be returned: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @param data_source_ids [::Array<::String>] + # When specified, only configurations of requested data sources are returned. + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransfersRequest` list results. For multiple-page + # results, `ListTransfersResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new + # + # # Call the list_transfer_configs method. + # result = client.list_transfer_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p item + # end + # + def list_transfer_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_transfer_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_transfer_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_transfer_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.list_transfer_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_configs, "transfer_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates transfer runs for a time range [start_time, end_time]. + # For each date - or whatever granularity the data source supports - in the + # range, one transfer run is created. + # Note that runs are created per UTC time in the time range. + # DEPRECATED: use StartManualTransferRuns instead. + # + # @overload schedule_transfer_runs(request, options = nil) + # Pass arguments to `schedule_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) + # Pass arguments to `schedule_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. Start time of the range of transfer runs. For example, + # `"2017-05-25T00:00:00+00:00"`. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. End time of the range of transfer runs. For example, + # `"2017-05-30T00:00:00+00:00"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new + # + # # Call the schedule_transfer_runs method. + # result = client.schedule_transfer_runs request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. + # p result + # + def schedule_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.schedule_transfer_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.schedule_transfer_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.schedule_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.schedule_transfer_runs request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Start manual transfer runs to be executed now with schedule_time equal to + # current time. The transfer runs can be created for a time range where the + # run_time is between start_time (inclusive) and end_time (exclusive), or for + # a specific run_time. + # + # @overload start_manual_transfer_runs(request, options = nil) + # Pass arguments to `start_manual_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil) + # Pass arguments to `start_manual_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param requested_time_range [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange, ::Hash] + # A time_range start and end timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_time_range must be a past time and cannot include future time + # values. + # + # Note: The following parameters are mutually exclusive: `requested_time_range`, `requested_run_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param requested_run_time [::Google::Protobuf::Timestamp, ::Hash] + # A run_time timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_run_time must be a past time and cannot include future time + # values. + # + # Note: The following parameters are mutually exclusive: `requested_run_time`, `requested_time_range`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new + # + # # Call the start_manual_transfer_runs method. + # result = client.start_manual_transfer_runs request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. + # p result + # + def start_manual_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.start_manual_transfer_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_manual_transfer_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_manual_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.start_manual_transfer_runs request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about the particular transfer run. + # + # @overload get_transfer_run(request, options = nil) + # Pass arguments to `get_transfer_run` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_transfer_run(name: nil) + # Pass arguments to `get_transfer_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new + # + # # Call the get_transfer_run method. + # result = client.get_transfer_run request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. + # p result + # + def get_transfer_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_transfer_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_transfer_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_transfer_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.get_transfer_run request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified transfer run. + # + # @overload delete_transfer_run(request, options = nil) + # Pass arguments to `delete_transfer_run` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_transfer_run(name: nil) + # Pass arguments to `delete_transfer_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new + # + # # Call the delete_transfer_run method. + # result = client.delete_transfer_run request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_transfer_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_transfer_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_transfer_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_transfer_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.delete_transfer_run request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about running and completed transfer runs. + # + # @overload list_transfer_runs(request, options = nil) + # Pass arguments to `list_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) + # Pass arguments to `list_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of transfer configuration for which transfer runs should be + # retrieved. Format of transfer configuration resource name is: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param states [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] + # When specified, only transfer runs with requested states are returned. + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferRunsRequest` list results. For multiple-page + # results, `ListTransferRunsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @param run_attempt [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] + # Indicates how run attempts are to be pulled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new + # + # # Call the list_transfer_runs method. + # result = client.list_transfer_runs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. + # p item + # end + # + def list_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_transfer_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_transfer_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.list_transfer_runs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_runs, "transfer_runs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns log messages for the transfer run. + # + # @overload list_transfer_logs(request, options = nil) + # Pass arguments to `list_transfer_logs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) + # Pass arguments to `list_transfer_logs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Transfer run name in the form: + # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferLogsRequest` list results. For multiple-page + # results, `ListTransferLogsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @param message_types [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] + # Message types to return. If not populated - INFO, WARNING and ERROR + # messages are returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new + # + # # Call the list_transfer_logs method. + # result = client.list_transfer_logs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage. + # p item + # end + # + def list_transfer_logs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_transfer_logs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_transfer_logs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_transfer_logs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.list_transfer_logs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_logs, "transfer_messages", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns true if valid credentials exist for the given data source and + # requesting user. + # + # @overload check_valid_creds(request, options = nil) + # Pass arguments to `check_valid_creds` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload check_valid_creds(name: nil) + # Pass arguments to `check_valid_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The data source in the form: + # `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new + # + # # Call the check_valid_creds method. + # result = client.check_valid_creds request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. + # p result + # + def check_valid_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.check_valid_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.check_valid_creds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.check_valid_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.check_valid_creds request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enroll data sources in a user project. This allows users to create transfer + # configurations for these data sources. They will also appear in the + # ListDataSources RPC and as such, will appear in the + # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents + # can be found in the public guide for + # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and + # [Data Transfer + # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). + # + # @overload enroll_data_sources(request, options = nil) + # Pass arguments to `enroll_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enroll_data_sources(name: nil, data_source_ids: nil) + # Pass arguments to `enroll_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @param data_source_ids [::Array<::String>] + # Data sources that are enrolled. It is required to provide at least one + # data source id. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new + # + # # Call the enroll_data_sources method. + # result = client.enroll_data_sources request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def enroll_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enroll_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enroll_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enroll_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.enroll_data_sources request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unenroll data sources in a user project. This allows users to remove + # transfer configurations for these data sources. They will no longer appear + # in the ListDataSources RPC and will also no longer appear in the [BigQuery + # UI](https://console.cloud.google.com/bigquery). Data transfers + # configurations of unenrolled data sources will not be scheduled. + # + # @overload unenroll_data_sources(request, options = nil) + # Pass arguments to `unenroll_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload unenroll_data_sources(name: nil, data_source_ids: nil) + # Pass arguments to `unenroll_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @param data_source_ids [::Array<::String>] + # Data sources that are unenrolled. It is required to provide at least one + # data source id. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new + # + # # Call the unenroll_data_sources method. + # result = client.unenroll_data_sources request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def unenroll_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.unenroll_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.unenroll_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unenroll_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.unenroll_data_sources request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataTransferService REST API. + # + # This class represents the configuration for DataTransferService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_data_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "bigquerydatatransfer.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DataTransferService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `create_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_transfer_config + ## + # RPC-specific configuration for `update_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_transfer_config + ## + # RPC-specific configuration for `delete_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_transfer_config + ## + # RPC-specific configuration for `get_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_transfer_config + ## + # RPC-specific configuration for `list_transfer_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_configs + ## + # RPC-specific configuration for `schedule_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :schedule_transfer_runs + ## + # RPC-specific configuration for `start_manual_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :start_manual_transfer_runs + ## + # RPC-specific configuration for `get_transfer_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_transfer_run + ## + # RPC-specific configuration for `delete_transfer_run` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_transfer_run + ## + # RPC-specific configuration for `list_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_runs + ## + # RPC-specific configuration for `list_transfer_logs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_logs + ## + # RPC-specific configuration for `check_valid_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :check_valid_creds + ## + # RPC-specific configuration for `enroll_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :enroll_data_sources + ## + # RPC-specific configuration for `unenroll_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :unenroll_data_sources + + # @private + def initialize parent_rpcs = nil + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + create_transfer_config_config = parent_rpcs.create_transfer_config if parent_rpcs.respond_to? :create_transfer_config + @create_transfer_config = ::Gapic::Config::Method.new create_transfer_config_config + update_transfer_config_config = parent_rpcs.update_transfer_config if parent_rpcs.respond_to? :update_transfer_config + @update_transfer_config = ::Gapic::Config::Method.new update_transfer_config_config + delete_transfer_config_config = parent_rpcs.delete_transfer_config if parent_rpcs.respond_to? :delete_transfer_config + @delete_transfer_config = ::Gapic::Config::Method.new delete_transfer_config_config + get_transfer_config_config = parent_rpcs.get_transfer_config if parent_rpcs.respond_to? :get_transfer_config + @get_transfer_config = ::Gapic::Config::Method.new get_transfer_config_config + list_transfer_configs_config = parent_rpcs.list_transfer_configs if parent_rpcs.respond_to? :list_transfer_configs + @list_transfer_configs = ::Gapic::Config::Method.new list_transfer_configs_config + schedule_transfer_runs_config = parent_rpcs.schedule_transfer_runs if parent_rpcs.respond_to? :schedule_transfer_runs + @schedule_transfer_runs = ::Gapic::Config::Method.new schedule_transfer_runs_config + start_manual_transfer_runs_config = parent_rpcs.start_manual_transfer_runs if parent_rpcs.respond_to? :start_manual_transfer_runs + @start_manual_transfer_runs = ::Gapic::Config::Method.new start_manual_transfer_runs_config + get_transfer_run_config = parent_rpcs.get_transfer_run if parent_rpcs.respond_to? :get_transfer_run + @get_transfer_run = ::Gapic::Config::Method.new get_transfer_run_config + delete_transfer_run_config = parent_rpcs.delete_transfer_run if parent_rpcs.respond_to? :delete_transfer_run + @delete_transfer_run = ::Gapic::Config::Method.new delete_transfer_run_config + list_transfer_runs_config = parent_rpcs.list_transfer_runs if parent_rpcs.respond_to? :list_transfer_runs + @list_transfer_runs = ::Gapic::Config::Method.new list_transfer_runs_config + list_transfer_logs_config = parent_rpcs.list_transfer_logs if parent_rpcs.respond_to? :list_transfer_logs + @list_transfer_logs = ::Gapic::Config::Method.new list_transfer_logs_config + check_valid_creds_config = parent_rpcs.check_valid_creds if parent_rpcs.respond_to? :check_valid_creds + @check_valid_creds = ::Gapic::Config::Method.new check_valid_creds_config + enroll_data_sources_config = parent_rpcs.enroll_data_sources if parent_rpcs.respond_to? :enroll_data_sources + @enroll_data_sources = ::Gapic::Config::Method.new enroll_data_sources_config + unenroll_data_sources_config = parent_rpcs.unenroll_data_sources if parent_rpcs.respond_to? :unenroll_data_sources + @unenroll_data_sources = ::Gapic::Config::Method.new unenroll_data_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb new file mode 100644 index 000000000000..0683fbfed415 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb @@ -0,0 +1,1177 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + module Rest + ## + # REST service stub for the DataTransferService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_data_source REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # A result object deserialized from the server's reply + def get_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse] + # A result object deserialized from the server's reply + def list_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # A result object deserialized from the server's reply + def create_transfer_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_transfer_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_transfer_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # A result object deserialized from the server's reply + def update_transfer_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_transfer_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_transfer_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_transfer_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_transfer_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_transfer_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # A result object deserialized from the server's reply + def get_transfer_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_transfer_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_transfer_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_transfer_configs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse] + # A result object deserialized from the server's reply + def list_transfer_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_transfer_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the schedule_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # A result object deserialized from the server's reply + def schedule_transfer_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_schedule_transfer_runs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "schedule_transfer_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the start_manual_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # A result object deserialized from the server's reply + def start_manual_transfer_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_manual_transfer_runs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "start_manual_transfer_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_transfer_run REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # A result object deserialized from the server's reply + def get_transfer_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_transfer_run_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_transfer_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_transfer_run REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_transfer_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_transfer_run_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_transfer_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse] + # A result object deserialized from the server's reply + def list_transfer_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_runs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_transfer_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_transfer_logs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse] + # A result object deserialized from the server's reply + def list_transfer_logs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_logs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_transfer_logs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the check_valid_creds REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # A result object deserialized from the server's reply + def check_valid_creds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_check_valid_creds_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "check_valid_creds", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enroll_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def enroll_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enroll_data_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enroll_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the unenroll_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def unenroll_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unenroll_data_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "unenroll_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_source REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSources", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSources", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_transfer_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/transferConfigs", + body: "transfer_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/transferConfigs", + body: "transfer_config", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_transfer_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{transfer_config.name}", + body: "transfer_config", + matches: [ + ["transfer_config.name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{transfer_config.name}", + body: "transfer_config", + matches: [ + ["transfer_config.name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_transfer_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_transfer_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_transfer_configs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_transfer_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/transferConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/transferConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the schedule_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_schedule_transfer_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:scheduleRuns", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:scheduleRuns", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_manual_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_manual_transfer_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:startManualRuns", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:startManualRuns", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_transfer_run REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_transfer_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_transfer_run REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_transfer_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_transfer_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/runs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/runs", + matches: [ + ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_transfer_logs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_transfer_logs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/transferLogs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/transferLogs", + matches: [ + ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the check_valid_creds REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_check_valid_creds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:checkValidCreds", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:checkValidCreds", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enroll_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enroll_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:enrollDataSources", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:enrollDataSources", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the unenroll_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_unenroll_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:unenrollDataSources", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb new file mode 100644 index 000000000000..f6e1e405ec02 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" +require "google/cloud/bigquery/data_transfer/v1/bindings_override" +require "google/cloud/bigquery/data_transfer/v1/version" + +module Google + module Cloud + module Bigquery + module DataTransfer + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/data_transfer/v1/rest" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb new file mode 100644 index 000000000000..048f745f46a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb new file mode 100644 index 000000000000..2e3350ee7636 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/bigquery/datatransfer/v1/transfer_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n8google/cloud/bigquery/datatransfer/v1/datatransfer.proto\x12%google.cloud.bigquery.datatransfer.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/bigquery/datatransfer/v1/transfer.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x8f\x05\n\x13\x44\x61taSourceParameter\x12\x10\n\x08param_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12M\n\x04type\x18\x04 \x01(\x0e\x32?.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type\x12\x10\n\x08required\x18\x05 \x01(\x08\x12\x10\n\x08repeated\x18\x06 \x01(\x08\x12\x18\n\x10validation_regex\x18\x07 \x01(\t\x12\x16\n\x0e\x61llowed_values\x18\x08 \x03(\t\x12/\n\tmin_value\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\tmax_value\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12J\n\x06\x66ields\x18\x0b \x03(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.DataSourceParameter\x12\x1e\n\x16validation_description\x18\x0c \x01(\t\x12\x1b\n\x13validation_help_url\x18\r \x01(\t\x12\x11\n\timmutable\x18\x0e \x01(\x08\x12\x0f\n\x07recurse\x18\x0f \x01(\x08\x12\x12\n\ndeprecated\x18\x14 \x01(\x08\"s\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\n\n\x06RECORD\x10\x05\x12\r\n\tPLUS_PAGE\x10\x06\x12\x08\n\x04LIST\x10\x07\"\x9c\t\n\nDataSource\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x0e\x64\x61ta_source_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x11\n\tclient_id\x18\x05 \x01(\t\x12\x0e\n\x06scopes\x18\x06 \x03(\t\x12N\n\rtransfer_type\x18\x07 \x01(\x0e\x32\x33.google.cloud.bigquery.datatransfer.v1.TransferTypeB\x02\x18\x01\x12\'\n\x1bsupports_multiple_transfers\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1f\n\x17update_deadline_seconds\x18\t \x01(\x05\x12\x18\n\x10\x64\x65\x66\x61ult_schedule\x18\n \x01(\t\x12 \n\x18supports_custom_schedule\x18\x0b \x01(\x08\x12N\n\nparameters\x18\x0c \x03(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.DataSourceParameter\x12\x10\n\x08help_url\x18\r \x01(\t\x12_\n\x12\x61uthorization_type\x18\x0e \x01(\x0e\x32\x43.google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType\x12\\\n\x11\x64\x61ta_refresh_type\x18\x0f \x01(\x0e\x32\x41.google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType\x12(\n default_data_refresh_window_days\x18\x10 \x01(\x05\x12\x1c\n\x14manual_runs_disabled\x18\x11 \x01(\x08\x12<\n\x19minimum_schedule_interval\x18\x12 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8a\x01\n\x11\x41uthorizationType\x12\"\n\x1e\x41UTHORIZATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41UTHORIZATION_CODE\x10\x01\x12\"\n\x1eGOOGLE_PLUS_AUTHORIZATION_CODE\x10\x02\x12\x15\n\x11\x46IRST_PARTY_OAUTH\x10\x03\"c\n\x0f\x44\x61taRefreshType\x12!\n\x1d\x44\x41TA_REFRESH_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSLIDING_WINDOW\x10\x01\x12\x19\n\x15\x43USTOM_SLIDING_WINDOW\x10\x02:\xa5\x01\xea\x41\xa1\x01\n.bigquerydatatransfer.googleapis.com/DataSource\x12,projects/{project}/dataSources/{data_source}\x12\x41projects/{project}/locations/{location}/dataSources/{data_source}\"\\\n\x14GetDataSourceRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigquerydatatransfer.googleapis.com/DataSource\"\x87\x01\n\x16ListDataSourcesRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigquerydatatransfer.googleapis.com/DataSource\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"\x80\x01\n\x17ListDataSourcesResponse\x12G\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.datatransfer.v1.DataSource\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x92\x02\n\x1b\x43reateTransferConfigRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32\x62igquerydatatransfer.googleapis.com/TransferConfig\x12S\n\x0ftransfer_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x02\x12\x1e\n\x12\x61uthorization_code\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x0cversion_info\x18\x05 \x01(\t\x12\x1c\n\x14service_account_name\x18\x06 \x01(\t\"\xfc\x01\n\x1bUpdateTransferConfigRequest\x12S\n\x0ftransfer_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x02\x12\x1e\n\x12\x61uthorization_code\x18\x03 \x01(\tB\x02\x18\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x14\n\x0cversion_info\x18\x05 \x01(\t\x12\x1c\n\x14service_account_name\x18\x06 \x01(\t\"d\n\x18GetTransferConfigRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\"g\n\x1b\x44\x65leteTransferConfigRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\"V\n\x15GetTransferRunRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\"Y\n\x18\x44\x65leteTransferRunRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\"\xa8\x01\n\x1aListTransferConfigsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32\x62igquerydatatransfer.googleapis.com/TransferConfig\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"\x91\x01\n\x1bListTransferConfigsResponse\x12T\n\x10transfer_configs\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xde\x02\n\x17ListTransferRunsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'bigquerydatatransfer.googleapis.com/Run\x12\x44\n\x06states\x18\x02 \x03(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferState\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12^\n\x0brun_attempt\x18\x05 \x01(\x0e\x32I.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt\"5\n\nRunAttempt\x12\x1b\n\x17RUN_ATTEMPT_UNSPECIFIED\x10\x00\x12\n\n\x06LATEST\x10\x01\"\x88\x01\n\x18ListTransferRunsResponse\x12N\n\rtransfer_runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRunB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xe0\x01\n\x17ListTransferLogsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12]\n\rmessage_types\x18\x06 \x03(\x0e\x32\x46.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity\"\x90\x01\n\x18ListTransferLogsResponse\x12V\n\x11transfer_messages\x18\x01 \x03(\x0b\x32\x36.google.cloud.bigquery.datatransfer.v1.TransferMessageB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"^\n\x16\x43heckValidCredsRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigquerydatatransfer.googleapis.com/DataSource\"2\n\x17\x43heckValidCredsResponse\x12\x17\n\x0fhas_valid_creds\x18\x01 \x01(\x08\"\xd1\x01\n\x1bScheduleTransferRunsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"`\n\x1cScheduleTransferRunsResponse\x12@\n\x04runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"\x8a\x03\n\x1eStartManualTransferRunsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12o\n\x14requested_time_range\x18\x03 \x01(\x0b\x32O.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRangeH\x00\x12\x38\n\x12requested_run_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x1ai\n\tTimeRange\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\n\x04time\"c\n\x1fStartManualTransferRunsResponse\x12@\n\x04runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"F\n\x18\x45nrollDataSourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t\"H\n\x1aUnenrollDataSourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t2\xd5\"\n\x13\x44\x61taTransferService\x12\xe6\x01\n\rGetDataSource\x12;.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest\x1a\x31.google.cloud.bigquery.datatransfer.v1.DataSource\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X\x12//v1/{name=projects/*/locations/*/dataSources/*}Z%\x12#/v1/{name=projects/*/dataSources/*}\x12\xf9\x01\n\x0fListDataSources\x12=.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest\x1a>.google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse\"g\xda\x41\x06parent\x82\xd3\xe4\x93\x02X\x12//v1/{parent=projects/*/locations/*}/dataSourcesZ%\x12#/v1/{parent=projects/*}/dataSources\x12\xb6\x02\n\x14\x43reateTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"\xa2\x01\xda\x41\x16parent,transfer_config\x82\xd3\xe4\x93\x02\x82\x01\"3/v1/{parent=projects/*/locations/*}/transferConfigs:\x0ftransfer_configZ:\"\'/v1/{parent=projects/*}/transferConfigs:\x0ftransfer_config\x12\xdb\x02\n\x14UpdateTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"\xc7\x01\xda\x41\x1btransfer_config,update_mask\x82\xd3\xe4\x93\x02\xa2\x01\x32\x43/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}:\x0ftransfer_configZJ27/v1/{transfer_config.name=projects/*/transferConfigs/*}:\x0ftransfer_config\x12\xe1\x01\n\x14\x44\x65leteTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest\x1a\x16.google.protobuf.Empty\"m\xda\x41\x04name\x82\xd3\xe4\x93\x02`*3/v1/{name=projects/*/locations/*/transferConfigs/*}Z)*\'/v1/{name=projects/*/transferConfigs/*}\x12\xfa\x01\n\x11GetTransferConfig\x12?.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"m\xda\x41\x04name\x82\xd3\xe4\x93\x02`\x12\x33/v1/{name=projects/*/locations/*/transferConfigs/*}Z)\x12\'/v1/{name=projects/*/transferConfigs/*}\x12\x8d\x02\n\x13ListTransferConfigs\x12\x41.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest\x1a\x42.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse\"o\xda\x41\x06parent\x82\xd3\xe4\x93\x02`\x12\x33/v1/{parent=projects/*/locations/*}/transferConfigsZ)\x12\'/v1/{parent=projects/*}/transferConfigs\x12\xcd\x02\n\x14ScheduleTransferRuns\x12\x42.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest\x1a\x43.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse\"\xab\x01\x88\x02\x01\xda\x41\x1aparent,start_time,end_time\x82\xd3\xe4\x93\x02\x84\x01\"B/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns:\x01*Z;\"6/v1/{parent=projects/*/transferConfigs/*}:scheduleRuns:\x01*\x12\xbc\x02\n\x17StartManualTransferRuns\x12\x45.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest\x1a\x46.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse\"\x91\x01\x82\xd3\xe4\x93\x02\x8a\x01\"E/v1/{parent=projects/*/locations/*/transferConfigs/*}:startManualRuns:\x01*Z>\"9/v1/{parent=projects/*/transferConfigs/*}:startManualRuns:\x01*\x12\xff\x01\n\x0eGetTransferRun\x12<.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest\x1a\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"{\xda\x41\x04name\x82\xd3\xe4\x93\x02n\x12:/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}Z0\x12./v1/{name=projects/*/transferConfigs/*/runs/*}\x12\xe9\x01\n\x11\x44\x65leteTransferRun\x12?.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest\x1a\x16.google.protobuf.Empty\"{\xda\x41\x04name\x82\xd3\xe4\x93\x02n*:/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}Z0*./v1/{name=projects/*/transferConfigs/*/runs/*}\x12\x92\x02\n\x10ListTransferRuns\x12>.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest\x1a?.google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse\"}\xda\x41\x06parent\x82\xd3\xe4\x93\x02n\x12:/v1/{parent=projects/*/locations/*/transferConfigs/*}/runsZ0\x12./v1/{parent=projects/*/transferConfigs/*}/runs\x12\xb2\x02\n\x10ListTransferLogs\x12>.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest\x1a?.google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse\"\x9c\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8c\x01\x12I/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/transferLogsZ?\x12=/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs\x12\x9e\x02\n\x0f\x43heckValidCreds\x12=.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest\x1a>.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse\"\x8b\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02~\"?/v1/{name=projects/*/locations/*/dataSources/*}:checkValidCreds:\x01*Z8\"3/v1/{name=projects/*/dataSources/*}:checkValidCreds:\x01*\x12\xda\x01\n\x11\x45nrollDataSources\x12?.google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest\x1a\x16.google.protobuf.Empty\"l\x82\xd3\xe4\x93\x02\x66\"3/v1/{name=projects/*/locations/*}:enrollDataSources:\x01*Z,\"\'/v1/{name=projects/*}:enrollDataSources:\x01*\x12\xb2\x01\n\x13UnenrollDataSources\x12\x41.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest\x1a\x16.google.protobuf.Empty\"@\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*}:unenrollDataSources:\x01*\x1aW\xca\x41#bigquerydatatransfer.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8b\x02\n)com.google.cloud.bigquery.datatransfer.v1B\x11\x44\x61taTransferProtoP\x01ZMcloud.google.com/go/bigquery/datatransfer/apiv1/datatransferpb;datatransferpb\xaa\x02%Google.Cloud.BigQuery.DataTransfer.V1\xca\x02%Google\\Cloud\\BigQuery\\DataTransfer\\V1\xea\x02)Google::Cloud::Bigquery::DataTransfer::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + DataSourceParameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSourceParameter").msgclass + DataSourceParameter::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type").enummodule + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource").msgclass + DataSource::AuthorizationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType").enummodule + DataSource::DataRefreshType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType").enummodule + GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest").msgclass + ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest").msgclass + ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse").msgclass + CreateTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest").msgclass + UpdateTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest").msgclass + GetTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest").msgclass + DeleteTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest").msgclass + GetTransferRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest").msgclass + DeleteTransferRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest").msgclass + ListTransferConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest").msgclass + ListTransferConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse").msgclass + ListTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest").msgclass + ListTransferRunsRequest::RunAttempt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt").enummodule + ListTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse").msgclass + ListTransferLogsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest").msgclass + ListTransferLogsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse").msgclass + CheckValidCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest").msgclass + CheckValidCredsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse").msgclass + ScheduleTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest").msgclass + ScheduleTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse").msgclass + StartManualTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest").msgclass + StartManualTransferRunsRequest::TimeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange").msgclass + StartManualTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse").msgclass + EnrollDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest").msgclass + UnenrollDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb new file mode 100644 index 000000000000..87f710bad15b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb @@ -0,0 +1,99 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto for package 'Google.Cloud.Bigquery.DataTransfer.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/bigquery/datatransfer/v1/datatransfer_pb' + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + # This API allows users to manage their data transfers into BigQuery. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.datatransfer.v1.DataTransferService' + + # Retrieves a supported data source and returns its settings. + rpc :GetDataSource, ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource + # Lists supported data sources and returns their settings. + rpc :ListDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse + # Creates a new data transfer configuration. + rpc :CreateTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig + # Updates a data transfer configuration. + # All fields must be set, even if they are not updated. + rpc :UpdateTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig + # Deletes a data transfer configuration, including any associated transfer + # runs and logs. + rpc :DeleteTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Google::Protobuf::Empty + # Returns information about a data transfer config. + rpc :GetTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig + # Returns information about all transfer configs owned by a project in the + # specified location. + rpc :ListTransferConfigs, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse + # Creates transfer runs for a time range [start_time, end_time]. + # For each date - or whatever granularity the data source supports - in the + # range, one transfer run is created. + # Note that runs are created per UTC time in the time range. + # DEPRECATED: use StartManualTransferRuns instead. + rpc :ScheduleTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse + # Start manual transfer runs to be executed now with schedule_time equal to + # current time. The transfer runs can be created for a time range where the + # run_time is between start_time (inclusive) and end_time (exclusive), or for + # a specific run_time. + rpc :StartManualTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse + # Returns information about the particular transfer run. + rpc :GetTransferRun, ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun + # Deletes the specified transfer run. + rpc :DeleteTransferRun, ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Google::Protobuf::Empty + # Returns information about running and completed transfer runs. + rpc :ListTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse + # Returns log messages for the transfer run. + rpc :ListTransferLogs, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse + # Returns true if valid credentials exist for the given data source and + # requesting user. + rpc :CheckValidCreds, ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse + # Enroll data sources in a user project. This allows users to create transfer + # configurations for these data sources. They will also appear in the + # ListDataSources RPC and as such, will appear in the + # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents + # can be found in the public guide for + # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and + # [Data Transfer + # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). + rpc :EnrollDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Google::Protobuf::Empty + # Unenroll data sources in a user project. This allows users to remove + # transfer configurations for these data sources. They will no longer appear + # in the ListDataSources RPC and will also no longer appear in the [BigQuery + # UI](https://console.cloud.google.com/bigquery). Data transfers + # configurations of unenrolled data sources will not be scheduled. + rpc :UnenrollDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb new file mode 100644 index 000000000000..6e1bfea6e14f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/datatransfer/v1/transfer.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n4google/cloud/bigquery/datatransfer/v1/transfer.proto\x12%google.cloud.bigquery.datatransfer.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"0\n\x10\x45mailPreferences\x12\x1c\n\x14\x65nable_failure_email\x18\x01 \x01(\x08\"\x90\x01\n\x0fScheduleOptions\x12\x1f\n\x17\x64isable_auto_scheduling\x18\x03 \x01(\x08\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa7\x02\n\x11ScheduleOptionsV2\x12W\n\x13time_based_schedule\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.datatransfer.v1.TimeBasedScheduleH\x00\x12P\n\x0fmanual_schedule\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.ManualScheduleH\x00\x12[\n\x15\x65vent_driven_schedule\x18\x03 \x01(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.EventDrivenScheduleH\x00\x42\n\n\x08schedule\"\x83\x01\n\x11TimeBasedSchedule\x12\x10\n\x08schedule\x18\x01 \x01(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x10\n\x0eManualSchedule\"2\n\x13\x45ventDrivenSchedule\x12\x1b\n\x13pubsub_subscription\x18\x01 \x01(\t\"(\n\x08UserInfo\x12\x12\n\x05\x65mail\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_email\"\x9b\t\n\x0eTransferConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12 \n\x16\x64\x65stination_dataset_id\x18\x02 \x01(\tH\x00\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x16\n\x0e\x64\x61ta_source_id\x18\x05 \x01(\t\x12\'\n\x06params\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08schedule\x18\x07 \x01(\t\x12P\n\x10schedule_options\x18\x18 \x01(\x0b\x32\x36.google.cloud.bigquery.datatransfer.v1.ScheduleOptions\x12U\n\x13schedule_options_v2\x18\x1f \x01(\x0b\x32\x38.google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2\x12 \n\x18\x64\x61ta_refresh_window_days\x18\x0c \x01(\x05\x12\x10\n\x08\x64isabled\x18\r \x01(\x08\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rnext_run_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x05state\x18\n \x01(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferStateB\x03\xe0\x41\x03\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\x12\x1b\n\x0e\x64\x61taset_region\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12!\n\x19notification_pubsub_topic\x18\x0f \x01(\t\x12R\n\x11\x65mail_preferences\x18\x12 \x01(\x0b\x32\x37.google.cloud.bigquery.datatransfer.v1.EmailPreferences\x12M\n\nowner_info\x18\x1b \x01(\x0b\x32/.google.cloud.bigquery.datatransfer.v1.UserInfoB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12`\n\x18\x65ncryption_configuration\x18\x1c \x01(\x0b\x32>.google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration\x12&\n\x05\x65rror\x18 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03:\xb9\x01\xea\x41\xb5\x01\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12\x34projects/{project}/transferConfigs/{transfer_config}\x12Iprojects/{project}/locations/{location}/transferConfigs/{transfer_config}B\r\n\x0b\x64\x65stinationB\r\n\x0b_owner_info\"M\n\x17\x45ncryptionConfiguration\x12\x32\n\x0ckms_key_name\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValue\"\xff\x06\n\x0bTransferRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x31\n\rschedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08run_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12(\n\x0c\x65rror_status\x18\x15 \x01(\x0b\x32\x12.google.rpc.Status\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12,\n\x06params\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12%\n\x16\x64\x65stination_dataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1b\n\x0e\x64\x61ta_source_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x43\n\x05state\x18\x08 \x01(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferState\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\x12\x15\n\x08schedule\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12&\n\x19notification_pubsub_topic\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12W\n\x11\x65mail_preferences\x18\x19 \x01(\x0b\x32\x37.google.cloud.bigquery.datatransfer.v1.EmailPreferencesB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n\'bigquerydatatransfer.googleapis.com/Run\x12?projects/{project}/transferConfigs/{transfer_config}/runs/{run}\x12Tprojects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}B\r\n\x0b\x64\x65stination\"\x8a\x02\n\x0fTransferMessage\x12\x30\n\x0cmessage_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x08severity\x18\x02 \x01(\x0e\x32\x46.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity\x12\x14\n\x0cmessage_text\x18\x03 \x01(\t\"U\n\x0fMessageSeverity\x12 \n\x1cMESSAGE_SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03*K\n\x0cTransferType\x12\x1d\n\x19TRANSFER_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41TCH\x10\x01\x12\r\n\tSTREAMING\x10\x02\x1a\x02\x18\x01*s\n\rTransferState\x12\x1e\n\x1aTRANSFER_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\r\n\tCANCELLED\x10\x06\x42\x8f\x02\n)com.google.cloud.bigquery.datatransfer.v1B\rTransferProtoP\x01ZMcloud.google.com/go/bigquery/datatransfer/apiv1/datatransferpb;datatransferpb\xa2\x02\x05GCBDT\xaa\x02%Google.Cloud.BigQuery.DataTransfer.V1\xca\x02%Google\\Cloud\\BigQuery\\DataTransfer\\V1\xea\x02)Google::Cloud::Bigquery::DataTransfer::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EmailPreferences").msgclass + ScheduleOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleOptions").msgclass + ScheduleOptionsV2 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2").msgclass + TimeBasedSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TimeBasedSchedule").msgclass + ManualSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ManualSchedule").msgclass + EventDrivenSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule").msgclass + UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UserInfo").msgclass + TransferConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferConfig").msgclass + EncryptionConfiguration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration").msgclass + TransferRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferRun").msgclass + TransferMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferMessage").msgclass + TransferMessage::MessageSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity").enummodule + TransferType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferType").enummodule + TransferState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferState").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md new file mode 100644 index 000000000000..614f3cdea732 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Data Transfer Service V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb new file mode 100644 index 000000000000..8aee7c146a1f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb @@ -0,0 +1,726 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + # A parameter used to define custom fields in a data source definition. + # @!attribute [rw] param_id + # @return [::String] + # Parameter identifier. + # @!attribute [rw] display_name + # @return [::String] + # Parameter display name in the user interface. + # @!attribute [rw] description + # @return [::String] + # Parameter description. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter::Type] + # Parameter type. + # @!attribute [rw] required + # @return [::Boolean] + # Is parameter required. + # @!attribute [rw] repeated + # @return [::Boolean] + # Deprecated. This field has no effect. + # @!attribute [rw] validation_regex + # @return [::String] + # Regular expression which can be used for parameter validation. + # @!attribute [rw] allowed_values + # @return [::Array<::String>] + # All possible values for the parameter. + # @!attribute [rw] min_value + # @return [::Google::Protobuf::DoubleValue] + # For integer and double values specifies minimum allowed value. + # @!attribute [rw] max_value + # @return [::Google::Protobuf::DoubleValue] + # For integer and double values specifies maximum allowed value. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>] + # Deprecated. This field has no effect. + # @!attribute [rw] validation_description + # @return [::String] + # Description of the requirements for this field, in case the user input does + # not fulfill the regex pattern or min/max values. + # @!attribute [rw] validation_help_url + # @return [::String] + # URL to a help document to further explain the naming requirements. + # @!attribute [rw] immutable + # @return [::Boolean] + # Cannot be changed after initial creation. + # @!attribute [rw] recurse + # @return [::Boolean] + # Deprecated. This field has no effect. + # @!attribute [rw] deprecated + # @return [::Boolean] + # If true, it should not be used in new transfers, and it should not be + # visible to users. + class DataSourceParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Parameter type. + module Type + # Type unspecified. + TYPE_UNSPECIFIED = 0 + + # String parameter. + STRING = 1 + + # Integer parameter (64-bits). + # Will be serialized to json as string. + INTEGER = 2 + + # Double precision floating point parameter. + DOUBLE = 3 + + # Boolean parameter. + BOOLEAN = 4 + + # Deprecated. This field has no effect. + RECORD = 5 + + # Page ID for a Google+ Page. + PLUS_PAGE = 6 + + # List of strings parameter. + LIST = 7 + end + end + + # Defines the properties and custom parameters for a data source. + # @!attribute [r] name + # @return [::String] + # Output only. Data source resource name. + # @!attribute [rw] data_source_id + # @return [::String] + # Data source id. + # @!attribute [rw] display_name + # @return [::String] + # User friendly data source name. + # @!attribute [rw] description + # @return [::String] + # User friendly data source description string. + # @!attribute [rw] client_id + # @return [::String] + # Data source client id which should be used to receive refresh token. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Api auth scopes for which refresh token needs to be obtained. These are + # scopes needed by a data source to prepare data and ingest them into + # BigQuery, e.g., https://www.googleapis.com/auth/bigquery + # @!attribute [rw] transfer_type + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferType] + # Deprecated. This field has no effect. + # @!attribute [rw] supports_multiple_transfers + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Deprecated. This field has no effect. + # @!attribute [rw] update_deadline_seconds + # @return [::Integer] + # The number of seconds to wait for an update from the data source + # before the Data Transfer Service marks the transfer as FAILED. + # @!attribute [rw] default_schedule + # @return [::String] + # Default data transfer schedule. + # Examples of valid schedules include: + # `1st,3rd monday of month 15:30`, + # `every wed,fri of jan,jun 13:15`, and + # `first sunday of quarter 00:00`. + # @!attribute [rw] supports_custom_schedule + # @return [::Boolean] + # Specifies whether the data source supports a user defined schedule, or + # operates on the default schedule. + # When set to `true`, user can override default schedule. + # @!attribute [rw] parameters + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>] + # Data source parameters. + # @!attribute [rw] help_url + # @return [::String] + # Url for the help document for this data source. + # @!attribute [rw] authorization_type + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource::AuthorizationType] + # Indicates the type of authorization. + # @!attribute [rw] data_refresh_type + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource::DataRefreshType] + # Specifies whether the data source supports automatic data refresh for the + # past few days, and how it's supported. + # For some data sources, data might not be complete until a few days later, + # so it's useful to refresh data automatically. + # @!attribute [rw] default_data_refresh_window_days + # @return [::Integer] + # Default data refresh window on days. + # Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. + # @!attribute [rw] manual_runs_disabled + # @return [::Boolean] + # Disables backfilling and manual run scheduling + # for the data source. + # @!attribute [rw] minimum_schedule_interval + # @return [::Google::Protobuf::Duration] + # The minimum interval for scheduler to schedule runs. + class DataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of authorization needed for this data source. + module AuthorizationType + # Type unspecified. + AUTHORIZATION_TYPE_UNSPECIFIED = 0 + + # Use OAuth 2 authorization codes that can be exchanged + # for a refresh token on the backend. + AUTHORIZATION_CODE = 1 + + # Return an authorization code for a given Google+ page that can then be + # exchanged for a refresh token on the backend. + GOOGLE_PLUS_AUTHORIZATION_CODE = 2 + + # Use First Party OAuth. + FIRST_PARTY_OAUTH = 3 + end + + # Represents how the data source supports data auto refresh. + module DataRefreshType + # The data source won't support data auto refresh, which is default value. + DATA_REFRESH_TYPE_UNSPECIFIED = 0 + + # The data source supports data auto refresh, and runs will be scheduled + # for the past few days. Does not allow custom values to be set for each + # transfer config. + SLIDING_WINDOW = 1 + + # The data source supports data auto refresh, and runs will be scheduled + # for the past few days. Allows custom values to be set for each transfer + # config. + CUSTOM_SLIDING_WINDOW = 2 + end + end + + # A request to get data source info. + # @!attribute [rw] name + # @return [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` + class GetDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list supported data sources and their data transfer settings. + # @!attribute [rw] parent + # @return [::String] + # Required. The BigQuery project id for which data sources should be + # returned. Must be in the form: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] page_token + # @return [::String] + # Pagination token, which can be used to request a specific page + # of `ListDataSourcesRequest` list results. For multiple-page + # results, `ListDataSourcesResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + class ListDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Returns list of supported data sources and their metadata. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] + # List of supported data sources and their transfer settings. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The next-pagination token. For multiple-page list results, + # this token can be used as the + # `ListDataSourcesRequest.page_token` + # to request the next page of list results. + class ListDataSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a data transfer configuration. If new credentials are + # needed for this transfer configuration, authorization info must be provided. + # If authorization info is provided, the transfer configuration will be + # associated with the user id corresponding to the authorization info. + # Otherwise, the transfer configuration will be associated with the calling + # user. + # + # When using a cross project service account for creating a transfer config, + # you must enable cross project service account usage. For more information, + # see [Disable attachment of service accounts to resources in other + # projects](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts#disable_cross_project_service_accounts). + # @!attribute [rw] parent + # @return [::String] + # Required. The BigQuery project id where the transfer configuration should + # be created. Must be in the format + # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If + # specified location and location of the destination bigquery dataset do not + # match - the request will fail. + # @!attribute [rw] transfer_config + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # Required. Data transfer configuration to create. + # @!attribute [rw] authorization_code + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+          #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @!attribute [rw] version_info + # @return [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+          #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @!attribute [rw] service_account_name + # @return [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + class CreateTransferConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a transfer configuration. To update the user id of the + # transfer configuration, authorization info needs to be provided. + # + # When using a cross project service account for updating a transfer config, + # you must enable cross project service account usage. For more information, + # see [Disable attachment of service accounts to resources in other + # projects](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts#disable_cross_project_service_accounts). + # @!attribute [rw] transfer_config + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # Required. Data transfer configuration to create. + # @!attribute [rw] authorization_code + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+          #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Required list of fields to be updated in this request. + # @!attribute [rw] version_info + # @return [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+          #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @!attribute [rw] service_account_name + # @return [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + class UpdateTransferConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get data transfer information. + # @!attribute [rw] name + # @return [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + class GetTransferConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete data transfer information. All associated transfer runs + # and log messages will be deleted as well. + # @!attribute [rw] name + # @return [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + class DeleteTransferConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get data transfer run information. + # @!attribute [rw] name + # @return [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + class GetTransferRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete data transfer run information. + # @!attribute [rw] name + # @return [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + class DeleteTransferRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list data transfers configured for a BigQuery project. + # @!attribute [rw] parent + # @return [::String] + # Required. The BigQuery project id for which transfer configs + # should be returned: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] data_source_ids + # @return [::Array<::String>] + # When specified, only configurations of requested data sources are returned. + # @!attribute [rw] page_token + # @return [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransfersRequest` list results. For multiple-page + # results, `ListTransfersResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + class ListTransferConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The returned list of pipelines in the project. + # @!attribute [r] transfer_configs + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] + # Output only. The stored pipeline transfer configurations. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The next-pagination token. For multiple-page list results, + # this token can be used as the + # `ListTransferConfigsRequest.page_token` + # to request the next page of list results. + class ListTransferConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list data transfer runs. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of transfer configuration for which transfer runs should be + # retrieved. Format of transfer configuration resource name is: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @!attribute [rw] states + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] + # When specified, only transfer runs with requested states are returned. + # @!attribute [rw] page_token + # @return [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferRunsRequest` list results. For multiple-page + # results, `ListTransferRunsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @!attribute [rw] run_attempt + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] + # Indicates how run attempts are to be pulled. + class ListTransferRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents which runs should be pulled. + module RunAttempt + # All runs should be returned. + RUN_ATTEMPT_UNSPECIFIED = 0 + + # Only latest run per day should be returned. + LATEST = 1 + end + end + + # The returned list of pipelines in the project. + # @!attribute [r] transfer_runs + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # Output only. The stored pipeline transfer runs. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The next-pagination token. For multiple-page list results, + # this token can be used as the + # `ListTransferRunsRequest.page_token` + # to request the next page of list results. + class ListTransferRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get user facing log messages associated with data transfer run. + # @!attribute [rw] parent + # @return [::String] + # Required. Transfer run name in the form: + # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # @!attribute [rw] page_token + # @return [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferLogsRequest` list results. For multiple-page + # results, `ListTransferLogsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @!attribute [rw] message_types + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] + # Message types to return. If not populated - INFO, WARNING and ERROR + # messages are returned. + class ListTransferLogsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The returned list transfer run messages. + # @!attribute [r] transfer_messages + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] + # Output only. The stored pipeline transfer messages. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The next-pagination token. For multiple-page list results, + # this token can be used as the + # `GetTransferRunLogRequest.page_token` + # to request the next page of list results. + class ListTransferLogsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to determine whether the user has valid credentials. This method + # is used to limit the number of OAuth popups in the user interface. The + # user id is inferred from the API call context. + # If the data source has the Google+ authorization type, this method + # returns false, as it cannot be determined whether the credentials are + # already valid merely based on the user id. + # @!attribute [rw] name + # @return [::String] + # Required. The data source in the form: + # `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. + class CheckValidCredsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response indicating whether the credentials exist and are valid. + # @!attribute [rw] has_valid_creds + # @return [::Boolean] + # If set to `true`, the credentials exist and are valid. + class CheckValidCredsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to schedule transfer runs for a time range. + # @!attribute [rw] parent + # @return [::String] + # Required. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Required. Start time of the range of transfer runs. For example, + # `"2017-05-25T00:00:00+00:00"`. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. End time of the range of transfer runs. For example, + # `"2017-05-30T00:00:00+00:00"`. + class ScheduleTransferRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to schedule transfer runs for a time range. + # @!attribute [rw] runs + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # The transfer runs that were scheduled. + class ScheduleTransferRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to start manual transfer runs. + # @!attribute [rw] parent + # @return [::String] + # Required. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @!attribute [rw] requested_time_range + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange] + # A time_range start and end timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_time_range must be a past time and cannot include future time + # values. + # + # Note: The following fields are mutually exclusive: `requested_time_range`, `requested_run_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] requested_run_time + # @return [::Google::Protobuf::Timestamp] + # A run_time timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_run_time must be a past time and cannot include future time + # values. + # + # Note: The following fields are mutually exclusive: `requested_run_time`, `requested_time_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class StartManualTransferRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A specification for a time range, this will request transfer runs with + # run_time between start_time (inclusive) and end_time (exclusive). + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Start time of the range of transfer runs. For example, + # `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than + # the end_time. Creates transfer runs where run_time is in the range + # between start_time (inclusive) and end_time (exclusive). + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # End time of the range of transfer runs. For example, + # `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. + # Creates transfer runs where run_time is in the range between start_time + # (inclusive) and end_time (exclusive). + class TimeRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A response to start manual transfer runs. + # @!attribute [rw] runs + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # The transfer runs that were created. + class StartManualTransferRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to enroll a set of data sources so they are visible in the + # BigQuery UI's `Transfer` tab. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @!attribute [rw] data_source_ids + # @return [::Array<::String>] + # Data sources that are enrolled. It is required to provide at least one + # data source id. + class EnrollDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to unenroll a set of data sources so they are no longer visible in + # the BigQuery UI's `Transfer` tab. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @!attribute [rw] data_source_ids + # @return [::Array<::String>] + # Data sources that are unenrolled. It is required to provide at least one + # data source id. + class UnenrollDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb new file mode 100644 index 000000000000..f655c166e495 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb @@ -0,0 +1,411 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + # Represents preferences for sending email notifications for transfer run + # events. + # @!attribute [rw] enable_failure_email + # @return [::Boolean] + # If true, email notifications will be sent on transfer run failures. + class EmailPreferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options customizing the data transfer schedule. + # @!attribute [rw] disable_auto_scheduling + # @return [::Boolean] + # If true, automatic scheduling of data transfer runs for this configuration + # will be disabled. The runs can be started on ad-hoc basis using + # StartManualTransferRuns API. When automatic scheduling is disabled, the + # TransferConfig.schedule field will be ignored. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Specifies time to start scheduling transfer runs. The first run will be + # scheduled at or after the start time according to a recurrence pattern + # defined in the schedule string. The start time can be changed at any + # moment. The time when a data transfer can be triggered manually is not + # limited by this option. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Defines time to stop scheduling transfer runs. A transfer run cannot be + # scheduled at or after the end time. The end time can be changed at any + # moment. The time when a data transfer can be triggered manually is not + # limited by this option. + class ScheduleOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # V2 options customizing different types of data transfer schedule. + # This field supports existing time-based and manual transfer schedule. Also + # supports Event-Driven transfer schedule. ScheduleOptionsV2 cannot be used + # together with ScheduleOptions/Schedule. + # @!attribute [rw] time_based_schedule + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TimeBasedSchedule] + # Time based transfer schedule options. This is the default schedule + # option. + # + # Note: The following fields are mutually exclusive: `time_based_schedule`, `manual_schedule`, `event_driven_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] manual_schedule + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ManualSchedule] + # Manual transfer schedule. If set, the transfer run will not be + # auto-scheduled by the system, unless the client invokes + # StartManualTransferRuns. This is equivalent to + # disable_auto_scheduling = true. + # + # Note: The following fields are mutually exclusive: `manual_schedule`, `time_based_schedule`, `event_driven_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] event_driven_schedule + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EventDrivenSchedule] + # Event driven transfer schedule options. If set, the transfer will be + # scheduled upon events arrial. + # + # Note: The following fields are mutually exclusive: `event_driven_schedule`, `time_based_schedule`, `manual_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ScheduleOptionsV2 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options customizing the time based transfer schedule. + # Options are migrated from the original ScheduleOptions message. + # @!attribute [rw] schedule + # @return [::String] + # Data transfer schedule. + # If the data source does not support a custom schedule, this should be + # empty. If it is empty, the default value for the data source will be used. + # The specified times are in UTC. + # Examples of valid format: + # `1st,3rd monday of month 15:30`, + # `every wed,fri of jan,jun 13:15`, and + # `first sunday of quarter 00:00`. + # See more explanation about the format here: + # https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + # + # NOTE: The minimum interval time between recurring transfers depends on the + # data source; refer to the documentation for your data source. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Specifies time to start scheduling transfer runs. The first run will be + # scheduled at or after the start time according to a recurrence pattern + # defined in the schedule string. The start time can be changed at any + # moment. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Defines time to stop scheduling transfer runs. A transfer run cannot be + # scheduled at or after the end time. The end time can be changed at any + # moment. + class TimeBasedSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options customizing manual transfers schedule. + class ManualSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options customizing EventDriven transfers schedule. + # @!attribute [rw] pubsub_subscription + # @return [::String] + # Pub/Sub subscription name used to receive events. + # Only Google Cloud Storage data source support this option. + # Format: projects/\\{project}/subscriptions/\\{subscription} + class EventDrivenSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about a user. + # @!attribute [rw] email + # @return [::String] + # E-mail address of the user. + class UserInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a data transfer configuration. A transfer configuration + # contains all metadata needed to perform a data transfer. For example, + # `destination_dataset_id` specifies where data should be stored. + # When a new transfer configuration is created, the specified + # `destination_dataset_id` is created when needed and shared with the + # appropriate data source service account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the transfer config. + # Transfer config names have the form either + # `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or + # `projects/{project_id}/transferConfigs/{config_id}`, + # where `config_id` is usually a UUID, even though it is not + # guaranteed or required. The name is ignored when creating a transfer + # config. + # @!attribute [rw] destination_dataset_id + # @return [::String] + # The BigQuery target dataset id. + # @!attribute [rw] display_name + # @return [::String] + # User specified display name for the data transfer. + # @!attribute [rw] data_source_id + # @return [::String] + # Data source ID. This cannot be changed once data transfer is created. The + # full list of available data source IDs can be returned through an API call: + # https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list + # @!attribute [rw] params + # @return [::Google::Protobuf::Struct] + # Parameters specific to each data source. For more information see the + # bq tab in the 'Setting up a data transfer' section for each data source. + # For example the parameters for Cloud Storage transfers are listed here: + # https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + # @!attribute [rw] schedule + # @return [::String] + # Data transfer schedule. + # If the data source does not support a custom schedule, this should be + # empty. If it is empty, the default value for the data source will be used. + # The specified times are in UTC. + # Examples of valid format: + # `1st,3rd monday of month 15:30`, + # `every wed,fri of jan,jun 13:15`, and + # `first sunday of quarter 00:00`. + # See more explanation about the format here: + # https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + # + # NOTE: The minimum interval time between recurring transfers depends on the + # data source; refer to the documentation for your data source. + # @!attribute [rw] schedule_options + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleOptions] + # Options customizing the data transfer schedule. + # @!attribute [rw] schedule_options_v2 + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleOptionsV2] + # Options customizing different types of data transfer schedule. + # This field replaces "schedule" and "schedule_options" fields. + # ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. + # @!attribute [rw] data_refresh_window_days + # @return [::Integer] + # The number of days to look back to automatically refresh the data. + # For example, if `data_refresh_window_days = 10`, then every day + # BigQuery reingests data for [today-10, today-1], rather than ingesting data + # for just [today-1]. + # Only valid if the data source supports the feature. Set the value to 0 + # to use the default value. + # @!attribute [rw] disabled + # @return [::Boolean] + # Is this config disabled. When set to true, no runs will be scheduled for + # this transfer config. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Data transfer modification time. Ignored by server on input. + # @!attribute [r] next_run_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Next time when data transfer will run. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferState] + # Output only. State of the most recently updated transfer run. + # @!attribute [rw] user_id + # @return [::Integer] + # Deprecated. Unique ID of the user on whose behalf transfer is done. + # @!attribute [r] dataset_region + # @return [::String] + # Output only. Region in which BigQuery dataset is located. + # @!attribute [rw] notification_pubsub_topic + # @return [::String] + # Pub/Sub topic where notifications will be sent after transfer runs + # associated with this transfer config finish. + # + # The format for specifying a pubsub topic is: + # `projects/{project_id}/topics/{topic_id}` + # @!attribute [rw] email_preferences + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EmailPreferences] + # Email notifications will be sent according to these preferences + # to the email address of the user who owns this transfer config. + # @!attribute [r] owner_info + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::UserInfo] + # Output only. Information about the user whose credentials are used to + # transfer data. Populated only for `transferConfigs.get` requests. In case + # the user information is not available, this field will not be populated. + # @!attribute [rw] encryption_configuration + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EncryptionConfiguration] + # The encryption configuration part. Currently, it is only used for the + # optional KMS key name. The BigQuery service account of your project must be + # granted permissions to use the key. Read methods will return the key name + # applied in effect. Write methods will apply the key if it is present, or + # otherwise try to apply project default keys if it is absent. + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. Error code with detailed information about reason of the + # latest config failure. + class TransferConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the encryption configuration for a transfer. + # @!attribute [rw] kms_key_name + # @return [::Google::Protobuf::StringValue] + # The name of the KMS key used for encrypting BigQuery data. + class EncryptionConfiguration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a data transfer run. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the transfer run. + # Transfer run names have the form + # `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. + # The name is ignored when creating a transfer run. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # Minimum time after which a transfer run can be started. + # @!attribute [rw] run_time + # @return [::Google::Protobuf::Timestamp] + # For batch transfer runs, specifies the date and time of the data should be + # ingested. + # @!attribute [rw] error_status + # @return [::Google::Rpc::Status] + # Status of the transfer run. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when transfer run was started. + # Parameter ignored by server for input requests. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when transfer run ended. + # Parameter ignored by server for input requests. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last time the data transfer run state was updated. + # @!attribute [r] params + # @return [::Google::Protobuf::Struct] + # Output only. Parameters specific to each data source. For more information + # see the bq tab in the 'Setting up a data transfer' section for each data + # source. For example the parameters for Cloud Storage transfers are listed + # here: + # https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + # @!attribute [r] destination_dataset_id + # @return [::String] + # Output only. The BigQuery target dataset id. + # @!attribute [r] data_source_id + # @return [::String] + # Output only. Data source id. + # @!attribute [rw] state + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferState] + # Data transfer run state. Ignored for input requests. + # @!attribute [rw] user_id + # @return [::Integer] + # Deprecated. Unique ID of the user on whose behalf transfer is done. + # @!attribute [r] schedule + # @return [::String] + # Output only. Describes the schedule of this transfer run if it was + # created as part of a regular schedule. For batch transfer runs that are + # scheduled manually, this is empty. + # NOTE: the system might choose to delay the schedule depending on the + # current load, so `schedule_time` doesn't always match this. + # @!attribute [r] notification_pubsub_topic + # @return [::String] + # Output only. Pub/Sub topic where a notification will be sent after this + # transfer run finishes. + # + # The format for specifying a pubsub topic is: + # `projects/{project_id}/topics/{topic_id}` + # @!attribute [r] email_preferences + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EmailPreferences] + # Output only. Email notifications will be sent according to these + # preferences to the email address of the user who owns the transfer config + # this run was derived from. + class TransferRun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a user facing message for a particular data transfer run. + # @!attribute [rw] message_time + # @return [::Google::Protobuf::Timestamp] + # Time when message was logged. + # @!attribute [rw] severity + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity] + # Message severity. + # @!attribute [rw] message_text + # @return [::String] + # Message text. + class TransferMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents data transfer user facing message severity. + module MessageSeverity + # No severity specified. + MESSAGE_SEVERITY_UNSPECIFIED = 0 + + # Informational message. + INFO = 1 + + # Warning message. + WARNING = 2 + + # Error message. + ERROR = 3 + end + end + + # DEPRECATED. Represents data transfer type. + # @deprecated This enum is deprecated and may be removed in the next major version update. + module TransferType + # Invalid or Unknown transfer type placeholder. + TRANSFER_TYPE_UNSPECIFIED = 0 + + # Batch data transfer. + BATCH = 1 + + # Streaming data transfer. Streaming data source currently doesn't + # support multiple transfer configs per project. + STREAMING = 2 + end + + # Represents data transfer run state. + module TransferState + # State placeholder (0). + TRANSFER_STATE_UNSPECIFIED = 0 + + # Data transfer is scheduled and is waiting to be picked up by + # data transfer backend (2). + PENDING = 2 + + # Data transfer is in progress (3). + RUNNING = 3 + + # Data transfer completed successfully (4). + SUCCEEDED = 4 + + # Data transfer failed (5). + FAILED = 5 + + # Data transfer is cancelled (6). + CANCELLED = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile new file mode 100644 index 000000000000..f317b2ca6a31 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-bigquery-data_transfer-v1", path: "../" +else + gem "google-cloud-bigquery-data_transfer-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb new file mode 100644 index 000000000000..c280cada5a84 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the check_valid_creds call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds. +# +def check_valid_creds + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new + + # Call the check_valid_creds method. + result = client.check_valid_creds request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb new file mode 100644 index 000000000000..8d85ed804920 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the create_transfer_config call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config. +# +def create_transfer_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new + + # Call the create_transfer_config method. + result = client.create_transfer_config request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb new file mode 100644 index 000000000000..5b85f2a09133 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the delete_transfer_config call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config. +# +def delete_transfer_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new + + # Call the delete_transfer_config method. + result = client.delete_transfer_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb new file mode 100644 index 000000000000..96cbd5325d48 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the delete_transfer_run call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run. +# +def delete_transfer_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new + + # Call the delete_transfer_run method. + result = client.delete_transfer_run request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb new file mode 100644 index 000000000000..0aa1d48f390c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the enroll_data_sources call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources. +# +def enroll_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new + + # Call the enroll_data_sources method. + result = client.enroll_data_sources request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb new file mode 100644 index 000000000000..0883819624a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the get_data_source call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source. +# +def get_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new + + # Call the get_data_source method. + result = client.get_data_source request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb new file mode 100644 index 000000000000..0a34e0c405ac --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the get_transfer_config call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config. +# +def get_transfer_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new + + # Call the get_transfer_config method. + result = client.get_transfer_config request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb new file mode 100644 index 000000000000..76369885f83e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the get_transfer_run call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run. +# +def get_transfer_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new + + # Call the get_transfer_run method. + result = client.get_transfer_run request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb new file mode 100644 index 000000000000..5d17514eec9d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the list_data_sources call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources. +# +def list_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new + + # Call the list_data_sources method. + result = client.list_data_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource. + p item + end +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb new file mode 100644 index 000000000000..1d837326d842 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the list_transfer_configs call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs. +# +def list_transfer_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new + + # Call the list_transfer_configs method. + result = client.list_transfer_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + p item + end +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb new file mode 100644 index 000000000000..5b6589ed7c49 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the list_transfer_logs call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs. +# +def list_transfer_logs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new + + # Call the list_transfer_logs method. + result = client.list_transfer_logs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage. + p item + end +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb new file mode 100644 index 000000000000..7bdea24c0b01 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the list_transfer_runs call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs. +# +def list_transfer_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new + + # Call the list_transfer_runs method. + result = client.list_transfer_runs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. + p item + end +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb new file mode 100644 index 000000000000..0f581bd7b3d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the schedule_transfer_runs call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs. +# +def schedule_transfer_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new + + # Call the schedule_transfer_runs method. + result = client.schedule_transfer_runs request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb new file mode 100644 index 000000000000..5eae9585a6dc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the start_manual_transfer_runs call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs. +# +def start_manual_transfer_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new + + # Call the start_manual_transfer_runs method. + result = client.start_manual_transfer_runs request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb new file mode 100644 index 000000000000..0f13ef52ede7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the unenroll_data_sources call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources. +# +def unenroll_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new + + # Call the unenroll_data_sources method. + result = client.unenroll_data_sources request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb new file mode 100644 index 000000000000..78cd53878f8c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the update_transfer_config call in the DataTransferService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config. +# +def update_transfer_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new + + # Call the update_transfer_config method. + result = client.update_transfer_config request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json new file mode 100644 index 000000000000..c079afe66ffd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json @@ -0,0 +1,655 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-data_transfer-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.datatransfer.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync", + "title": "Snippet for the get_data_source call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source.", + "file": "data_transfer_service/get_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::DataSource", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "GetDataSource", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetDataSource", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync", + "title": "Snippet for the list_data_sources call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources.", + "file": "data_transfer_service/list_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_sources", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "ListDataSources", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListDataSources", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync", + "title": "Snippet for the create_transfer_config call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config.", + "file": "data_transfer_service/create_transfer_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_transfer_config", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "CreateTransferConfig", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.CreateTransferConfig", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync", + "title": "Snippet for the update_transfer_config call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config.", + "file": "data_transfer_service/update_transfer_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_transfer_config", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "UpdateTransferConfig", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.UpdateTransferConfig", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync", + "title": "Snippet for the delete_transfer_config call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config.", + "file": "data_transfer_service/delete_transfer_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_transfer_config", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "DeleteTransferConfig", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferConfig", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync", + "title": "Snippet for the get_transfer_config call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config.", + "file": "data_transfer_service/get_transfer_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_transfer_config", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "GetTransferConfig", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferConfig", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync", + "title": "Snippet for the list_transfer_configs call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs.", + "file": "data_transfer_service/list_transfer_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_transfer_configs", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "ListTransferConfigs", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferConfigs", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync", + "title": "Snippet for the schedule_transfer_runs call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs.", + "file": "data_transfer_service/schedule_transfer_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "schedule_transfer_runs", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "ScheduleTransferRuns", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ScheduleTransferRuns", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync", + "title": "Snippet for the start_manual_transfer_runs call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs.", + "file": "data_transfer_service/start_manual_transfer_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_manual_transfer_runs", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "StartManualTransferRuns", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.StartManualTransferRuns", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync", + "title": "Snippet for the get_transfer_run call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run.", + "file": "data_transfer_service/get_transfer_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_transfer_run", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "GetTransferRun", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferRun", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync", + "title": "Snippet for the delete_transfer_run call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run.", + "file": "data_transfer_service/delete_transfer_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_transfer_run", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "DeleteTransferRun", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferRun", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync", + "title": "Snippet for the list_transfer_runs call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs.", + "file": "data_transfer_service/list_transfer_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_transfer_runs", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "ListTransferRuns", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferRuns", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync", + "title": "Snippet for the list_transfer_logs call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs.", + "file": "data_transfer_service/list_transfer_logs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_transfer_logs", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "ListTransferLogs", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferLogs", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync", + "title": "Snippet for the check_valid_creds call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds.", + "file": "data_transfer_service/check_valid_creds.rb", + "language": "RUBY", + "client_method": { + "short_name": "check_valid_creds", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "CheckValidCreds", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.CheckValidCreds", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync", + "title": "Snippet for the enroll_data_sources call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources.", + "file": "data_transfer_service/enroll_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "enroll_data_sources", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "EnrollDataSources", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.EnrollDataSources", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync", + "title": "Snippet for the unenroll_data_sources call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources.", + "file": "data_transfer_service/unenroll_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "unenroll_data_sources", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "UnenrollDataSources", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.UnenrollDataSources", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb new file mode 100644 index 000000000000..5d878393639f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" + +class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_data_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_path project: "value0", data_source: "value1" + assert_equal "projects/value0/dataSources/value1", path + + path = client.data_source_path project: "value0", location: "value1", data_source: "value2" + assert_equal "projects/value0/locations/value1/dataSources/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_run_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.run_path project: "value0", transfer_config: "value1", run: "value2" + assert_equal "projects/value0/transferConfigs/value1/runs/value2", path + + path = client.run_path project: "value0", location: "value1", transfer_config: "value2", run: "value3" + assert_equal "projects/value0/locations/value1/transferConfigs/value2/runs/value3", path + end + end + + def test_transfer_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.transfer_config_path project: "value0", transfer_config: "value1" + assert_equal "projects/value0/transferConfigs/value1", path + + path = client.transfer_config_path project: "value0", location: "value1", transfer_config: "value2" + assert_equal "projects/value0/locations/value1/transferConfigs/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb new file mode 100644 index 000000000000..361722fbe258 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb @@ -0,0 +1,988 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" + + +class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_data_source + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_data_source ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_data_source(::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_count + end + end + end + + def test_list_data_sources + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_data_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_data_sources parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_data_sources({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_sources_client_stub.call_count + end + end + end + + def test_create_transfer_config + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + transfer_config = {} + authorization_code = "hello world" + version_info = "hello world" + service_account_name = "hello world" + + create_transfer_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_create_transfer_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_transfer_config_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_transfer_config parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_transfer_config_client_stub.call_count + end + end + end + + def test_update_transfer_config + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + transfer_config = {} + authorization_code = "hello world" + update_mask = {} + version_info = "hello world" + service_account_name = "hello world" + + update_transfer_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_update_transfer_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_transfer_config_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_transfer_config transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_transfer_config_client_stub.call_count + end + end + end + + def test_delete_transfer_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_transfer_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_delete_transfer_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_transfer_config_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_transfer_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_transfer_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_transfer_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_transfer_config_client_stub.call_count + end + end + end + + def test_get_transfer_config + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_transfer_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_transfer_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_transfer_config_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_transfer_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_transfer_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_transfer_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_transfer_config_client_stub.call_count + end + end + end + + def test_list_transfer_configs + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_source_ids = ["hello world"] + page_token = "hello world" + page_size = 42 + + list_transfer_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_transfer_configs_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_transfer_configs parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_transfer_configs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_transfer_configs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_transfer_configs_client_stub.call_count + end + end + end + + def test_schedule_transfer_runs + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + start_time = {} + end_time = {} + + schedule_transfer_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_schedule_transfer_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, schedule_transfer_runs_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.schedule_transfer_runs parent: parent, start_time: start_time, end_time: end_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.schedule_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.schedule_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, schedule_transfer_runs_client_stub.call_count + end + end + end + + def test_start_manual_transfer_runs + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requested_time_range = {} + + start_manual_transfer_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_start_manual_transfer_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_manual_transfer_runs_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.start_manual_transfer_runs parent: parent, requested_time_range: requested_time_range do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.start_manual_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.start_manual_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_manual_transfer_runs_client_stub.call_count + end + end + end + + def test_get_transfer_run + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_transfer_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_transfer_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_transfer_run_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_transfer_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_transfer_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_transfer_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_transfer_run_client_stub.call_count + end + end + end + + def test_delete_transfer_run + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_transfer_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_delete_transfer_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_transfer_run_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_transfer_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_transfer_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_transfer_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_transfer_run_client_stub.call_count + end + end + end + + def test_list_transfer_runs + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + states = [:TRANSFER_STATE_UNSPECIFIED] + page_token = "hello world" + page_size = 42 + run_attempt = :RUN_ATTEMPT_UNSPECIFIED + + list_transfer_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_transfer_runs_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_transfer_runs parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_transfer_runs_client_stub.call_count + end + end + end + + def test_list_transfer_logs + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + message_types = [:MESSAGE_SEVERITY_UNSPECIFIED] + + list_transfer_logs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_logs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_transfer_logs_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_transfer_logs parent: parent, page_token: page_token, page_size: page_size, message_types: message_types do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_transfer_logs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_transfer_logs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_transfer_logs_client_stub.call_count + end + end + end + + def test_check_valid_creds + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + check_valid_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_check_valid_creds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, check_valid_creds_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.check_valid_creds({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.check_valid_creds name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.check_valid_creds ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.check_valid_creds({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.check_valid_creds(::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, check_valid_creds_client_stub.call_count + end + end + end + + def test_enroll_data_sources + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + data_source_ids = ["hello world"] + + enroll_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_enroll_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enroll_data_sources_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.enroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.enroll_data_sources name: name, data_source_ids: data_source_ids do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.enroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.enroll_data_sources({ name: name, data_source_ids: data_source_ids }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.enroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enroll_data_sources_client_stub.call_count + end + end + end + + def test_unenroll_data_sources + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + data_source_ids = ["hello world"] + + unenroll_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_unenroll_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unenroll_data_sources_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.unenroll_data_sources name: name, data_source_ids: data_source_ids do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.unenroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.unenroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unenroll_data_sources_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb new file mode 100644 index 000000000000..6cfbc0d06bce --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb @@ -0,0 +1,1103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" + +class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_data_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_data_source ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_data_source(::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_rpc_count + end + end + + def test_list_data_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_sources, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_sources_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_data_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_data_sources parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_data_sources({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_sources_client_stub.call_rpc_count + end + end + + def test_create_transfer_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + transfer_config = {} + authorization_code = "hello world" + version_info = "hello world" + service_account_name = "hello world" + + create_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_transfer_config, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig), request["transfer_config"] + assert_equal "hello world", request["authorization_code"] + assert_equal "hello world", request["version_info"] + assert_equal "hello world", request["service_account_name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_transfer_config_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_transfer_config parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_transfer_config_client_stub.call_rpc_count + end + end + + def test_update_transfer_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + transfer_config = {} + authorization_code = "hello world" + update_mask = {} + version_info = "hello world" + service_account_name = "hello world" + + update_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_transfer_config, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig), request["transfer_config"] + assert_equal "hello world", request["authorization_code"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["version_info"] + assert_equal "hello world", request["service_account_name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_transfer_config_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_transfer_config transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_transfer_config_client_stub.call_rpc_count + end + end + + def test_delete_transfer_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_transfer_config, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_transfer_config_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_transfer_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_transfer_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_transfer_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_transfer_config_client_stub.call_rpc_count + end + end + + def test_get_transfer_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_transfer_config, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_transfer_config_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_transfer_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_transfer_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_transfer_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_transfer_config_client_stub.call_rpc_count + end + end + + def test_list_transfer_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_source_ids = ["hello world"] + page_token = "hello world" + page_size = 42 + + list_transfer_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_transfer_configs, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["data_source_ids"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_transfer_configs_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_transfer_configs parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_transfer_configs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_transfer_configs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_transfer_configs_client_stub.call_rpc_count + end + end + + def test_schedule_transfer_runs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + start_time = {} + end_time = {} + + schedule_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :schedule_transfer_runs, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, schedule_transfer_runs_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.schedule_transfer_runs parent: parent, start_time: start_time, end_time: end_time do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.schedule_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.schedule_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, schedule_transfer_runs_client_stub.call_rpc_count + end + end + + def test_start_manual_transfer_runs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requested_time_range = {} + + start_manual_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_manual_transfer_runs, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange), request["requested_time_range"] + assert_equal :requested_time_range, request.time + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_manual_transfer_runs_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.start_manual_transfer_runs parent: parent, requested_time_range: requested_time_range do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.start_manual_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.start_manual_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, start_manual_transfer_runs_client_stub.call_rpc_count + end + end + + def test_get_transfer_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_transfer_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_transfer_run, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_transfer_run_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_transfer_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_transfer_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_transfer_run({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_transfer_run_client_stub.call_rpc_count + end + end + + def test_delete_transfer_run + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_transfer_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_transfer_run, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_transfer_run_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_transfer_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_transfer_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_transfer_run({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_transfer_run_client_stub.call_rpc_count + end + end + + def test_list_transfer_runs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + states = [:TRANSFER_STATE_UNSPECIFIED] + page_token = "hello world" + page_size = 42 + run_attempt = :RUN_ATTEMPT_UNSPECIFIED + + list_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_transfer_runs, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, request + assert_equal "hello world", request["parent"] + assert_equal [:TRANSFER_STATE_UNSPECIFIED], request["states"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal :RUN_ATTEMPT_UNSPECIFIED, request["run_attempt"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_transfer_runs_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_transfer_runs parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_transfer_runs_client_stub.call_rpc_count + end + end + + def test_list_transfer_logs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + message_types = [:MESSAGE_SEVERITY_UNSPECIFIED] + + list_transfer_logs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_transfer_logs, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal [:MESSAGE_SEVERITY_UNSPECIFIED], request["message_types"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_transfer_logs_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_transfer_logs parent: parent, page_token: page_token, page_size: page_size, message_types: message_types do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_transfer_logs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_transfer_logs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_transfer_logs_client_stub.call_rpc_count + end + end + + def test_check_valid_creds + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + check_valid_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :check_valid_creds, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, check_valid_creds_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.check_valid_creds({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.check_valid_creds name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.check_valid_creds ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.check_valid_creds({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.check_valid_creds(::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, check_valid_creds_client_stub.call_rpc_count + end + end + + def test_enroll_data_sources + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + data_source_ids = ["hello world"] + + enroll_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enroll_data_sources, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["data_source_ids"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enroll_data_sources_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.enroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.enroll_data_sources name: name, data_source_ids: data_source_ids do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.enroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.enroll_data_sources({ name: name, data_source_ids: data_source_ids }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.enroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enroll_data_sources_client_stub.call_rpc_count + end + end + + def test_unenroll_data_sources + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + data_source_ids = ["hello world"] + + unenroll_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unenroll_data_sources, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["data_source_ids"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, unenroll_data_sources_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.unenroll_data_sources name: name, data_source_ids: data_source_ids do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.unenroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.unenroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, unenroll_data_sources_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-migration-v2/.gitignore b/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-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-bigquery-migration-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json new file mode 100644 index 000000000000..519979303a46 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "bigquerymigration.googleapis.com", + "api_shortname": "bigquerymigration", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest", + "distribution_name": "google-cloud-bigquery-migration-v2", + "is_cloud": true, + "language": "ruby", + "name": "bigquerymigration", + "name_pretty": "BigQuery Migration V2 API", + "product_documentation": "https://cloud.google.com/bigquery/docs/migration-intro", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/migration-intro", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml new file mode 100644 index 000000000000..57be07ac546b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-migration-v2.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-bigquery-migration-v2.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts b/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts new file mode 100644 index 000000000000..e1a4dd51c1ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Migration V2 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..49431cec3789 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-migration-v2 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-bigquery-migration-v2 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/bigquery/migration/v2" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/migration/v2" + +::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-bigquery-migration-v2 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/bigquery/migration/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-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-bigquery-migration-v2/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md new file mode 100644 index 000000000000..e5d5fbcb7669 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Migration V2 API + +The migration service, exposing apis for migration jobs operations, and agent management. + +The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Migration V2 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-migration](https://rubygems.org/gems/google-cloud-bigquery-migration). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-migration-v2 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/bigquerymigration.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/migration/v2" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new +request = ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new # (request fields as keyword arguments...) +response = client.create_migration_workflow request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/docs/migration-intro) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/bigquery/migration/v2" +require "logger" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.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-bigquery-migration`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-migration-v2`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-bigquery-migration`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-bigquery-migration-v2`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile new file mode 100644 index 000000000000..22b1470bce3b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-bigquery-migration-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/migration/v2/migration_service/credentials" + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-migration-v2 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-migration-v2 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-migration-v2 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bigquery-migration-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-migration-v2" + header "google-cloud-bigquery-migration-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-migration-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-migration-v2 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-migration-v2 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-migration-v2 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json new file mode 100644 index 000000000000..da3bd8bcce33 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.migration.v2", + "libraryPackage": "::Google::Cloud::Bigquery::Migration::V2", + "services": { + "MigrationService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client", + "rpcs": { + "CreateMigrationWorkflow": { + "methods": [ + "create_migration_workflow" + ] + }, + "GetMigrationWorkflow": { + "methods": [ + "get_migration_workflow" + ] + }, + "ListMigrationWorkflows": { + "methods": [ + "list_migration_workflows" + ] + }, + "DeleteMigrationWorkflow": { + "methods": [ + "delete_migration_workflow" + ] + }, + "StartMigrationWorkflow": { + "methods": [ + "start_migration_workflow" + ] + }, + "GetMigrationSubtask": { + "methods": [ + "get_migration_subtask" + ] + }, + "ListMigrationSubtasks": { + "methods": [ + "list_migration_subtasks" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec b/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec new file mode 100644 index 000000000000..8549c9fb4ab2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/migration/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-migration-v2" + gem.version = Google::Cloud::Bigquery::Migration::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details." + gem.summary = "The migration service, exposing apis for migration jobs operations, and agent management." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb new file mode 100644 index 000000000000..c91652afe47e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/bigquery/migration/v2" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb new file mode 100644 index 000000000000..a9ad338b1127 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/migration/v2/migration_service" +require "google/cloud/bigquery/migration/v2/version" + +module Google + module Cloud + module Bigquery + module Migration + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/migration/v2" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/migration/v2" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module V2 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/bigquery/migration/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb new file mode 100644 index 000000000000..3cc37a0c122d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/assessment_task.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n8google/cloud/bigquery/migration/v2/assessment_task.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xf6\x01\n\x15\x41ssessmentTaskDetails\x12\x17\n\ninput_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_dataset\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0equerylogs_path\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12]\n\x0e\x66\x65\x61ture_handle\x18\x06 \x01(\x0b\x32;.google.cloud.bigquery.migration.v2.AssessmentFeatureHandleB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_feature_handle\"\\\n\x17\x41ssessmentFeatureHandle\x12\'\n\x15\x61\x64\x64_shareable_dataset\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x18\n\x16_add_shareable_datasetB\xcf\x01\n&com.google.cloud.bigquery.migration.v2B\x13\x41ssessmentTaskProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + AssessmentTaskDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AssessmentTaskDetails").msgclass + AssessmentFeatureHandle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AssessmentFeatureHandle").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb new file mode 100644 index 000000000000..64ad22c7c8c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/migration_entities.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/bigquery/migration/v2/assessment_task_pb' +require 'google/cloud/bigquery/migration/v2/migration_error_details_pb' +require 'google/cloud/bigquery/migration/v2/migration_metrics_pb' +require 'google/cloud/bigquery/migration/v2/translation_config_pb' +require 'google/cloud/bigquery/migration/v2/translation_details_pb' +require 'google/cloud/bigquery/migration/v2/translation_usability_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/error_details_pb' + + +descriptor_data = "\n;google/cloud/bigquery/migration/v2/migration_entities.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/bigquery/migration/v2/assessment_task.proto\x1a@google/cloud/bigquery/migration/v2/migration_error_details.proto\x1a:google/cloud/bigquery/migration/v2/migration_metrics.proto\x1a;google/cloud/bigquery/migration/v2/translation_config.proto\x1agoogle/cloud/bigquery/migration/v2/translation_usability.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/rpc/error_details.proto\"\x80\x05\n\x11MigrationWorkflow\x12\x17\n\x04name\x18\x01 \x01(\tB\t\xe0\x41\x03\xe0\x41\x05\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12O\n\x05tasks\x18\x02 \x03(\x0b\x32@.google.cloud.bigquery.migration.v2.MigrationWorkflow.TasksEntry\x12O\n\x05state\x18\x03 \x01(\x0e\x32;.google.cloud.bigquery.migration.v2.MigrationWorkflow.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a_\n\nTasksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.MigrationTask:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\r\n\tCOMPLETED\x10\x04:u\xea\x41r\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\n\x06points\x18\x04 \x03(\x0b\x32).google.cloud.bigquery.migration.v2.PointB\x03\xe0\x41\x02\"\x8a\x01\n\x05Point\x12\x42\n\x08interval\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.TimeInterval\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.bigquery.migration.v2.TypedValue\"v\n\x0cTimeInterval\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xaa\x01\n\nTypedValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x36\n\x12\x64istribution_value\x18\x05 \x01(\x0b\x32\x18.google.api.DistributionH\x00\x42\x07\n\x05valueB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationMetricsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TimeSeries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeSeries").msgclass + Point = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Point").msgclass + TimeInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeInterval").msgclass + TypedValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TypedValue").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb new file mode 100644 index 000000000000..2d48893a2487 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/migration/v2/version" + +require "google/cloud/bigquery/migration/v2/migration_service/credentials" +require "google/cloud/bigquery/migration/v2/migration_service/paths" +require "google/cloud/bigquery/migration/v2/migration_service/client" +require "google/cloud/bigquery/migration/v2/migration_service/rest" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + ## + # Service to handle EDW migrations. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/migration/v2/migration_service" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/migration/v2/migration_service/rest" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module MigrationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "migration_service", "helpers.rb" +require "google/cloud/bigquery/migration/v2/migration_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb new file mode 100644 index 000000000000..13235e1d3d21 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb @@ -0,0 +1,1103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/migration/v2/migration_service_pb" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + ## + # Client for the MigrationService service. + # + # Service to handle EDW migrations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :migration_service_stub + + ## + # Configure the MigrationService Client class. + # + # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MigrationService clients + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "Migration", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_migration_workflow.timeout = 60.0 + + default_config.rpcs.get_migration_workflow.timeout = 60.0 + default_config.rpcs.get_migration_workflow.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_migration_workflows.timeout = 60.0 + default_config.rpcs.list_migration_workflows.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_migration_workflow.timeout = 60.0 + + default_config.rpcs.start_migration_workflow.timeout = 60.0 + default_config.rpcs.start_migration_workflow.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the MigrationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @migration_service_stub.universe_domain + end + + ## + # Create a new MigrationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MigrationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/bigquery/migration/v2/migration_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @migration_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @migration_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @migration_service_stub.logger + end + + # Service calls + + ## + # Creates a migration workflow. + # + # @overload create_migration_workflow(request, options = nil) + # Pass arguments to `create_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_migration_workflow(parent: nil, migration_workflow: nil) + # Pass arguments to `create_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project to which this migration workflow belongs. + # Example: `projects/foo/locations/bar` + # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] + # Required. The migration workflow to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new + # + # # Call the create_migration_workflow method. + # result = client.create_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def create_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :create_migration_workflow, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a previously created migration workflow. + # + # @overload get_migration_workflow(request, options = nil) + # Pass arguments to `get_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_migration_workflow(name: nil, read_mask: nil) + # Pass arguments to `get_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new + # + # # Call the get_migration_workflow method. + # result = client.get_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def get_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :get_migration_workflow, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously created migration workflow. + # + # @overload list_migration_workflows(request, options = nil) + # Pass arguments to `list_migration_workflows` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_migration_workflows` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location of the migration workflows to list. + # Example: `projects/123/locations/us` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # @param page_size [::Integer] + # The maximum number of migration workflows to return. The service may return + # fewer than this number. + # @param page_token [::String] + # A page token, received from previous `ListMigrationWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationWorkflows` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new + # + # # Call the list_migration_workflows method. + # result = client.list_migration_workflows request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p item + # end + # + def list_migration_workflows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_migration_workflows.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_migration_workflows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_migration_workflows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :list_migration_workflows, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a migration workflow by name. + # + # @overload delete_migration_workflow(request, options = nil) + # Pass arguments to `delete_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_migration_workflow(name: nil) + # Pass arguments to `delete_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new + # + # # Call the delete_migration_workflow method. + # result = client.delete_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :delete_migration_workflow, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts a previously created migration workflow. I.e., the state transitions + # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + # An error will be signaled if the state is anything other than DRAFT or + # RUNNING. + # + # @overload start_migration_workflow(request, options = nil) + # Pass arguments to `start_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_migration_workflow(name: nil) + # Pass arguments to `start_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new + # + # # Call the start_migration_workflow method. + # result = client.start_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def start_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :start_migration_workflow, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a previously created migration subtask. + # + # @overload get_migration_subtask(request, options = nil) + # Pass arguments to `get_migration_subtask` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_migration_subtask(name: nil, read_mask: nil) + # Pass arguments to `get_migration_subtask` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The unique identifier for the migration subtask. + # Example: `projects/123/locations/us/workflows/1234/subtasks/543` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new + # + # # Call the get_migration_subtask method. + # result = client.get_migration_subtask request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + # p result + # + def get_migration_subtask request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_migration_subtask.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_migration_subtask.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_migration_subtask.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :get_migration_subtask, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously created migration subtasks. + # + # @overload list_migration_subtasks(request, options = nil) + # Pass arguments to `list_migration_subtasks` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_migration_subtasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The migration task of the subtasks to list. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # @param page_size [::Integer] + # Optional. The maximum number of migration tasks to return. The service may + # return fewer than this number. + # @param page_token [::String] + # Optional. A page token, received from previous `ListMigrationSubtasks` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationSubtasks` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. The filter to apply. This can be used to get the subtasks of a + # specific tasks in a workflow, e.g. `migration_task = "ab012"` where + # `"ab012"` is the task ID (not the name in the named map). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new + # + # # Call the list_migration_subtasks method. + # result = client.list_migration_subtasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + # p item + # end + # + def list_migration_subtasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_migration_subtasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_migration_subtasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_migration_subtasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :list_migration_subtasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MigrationService API. + # + # This class represents the configuration for MigrationService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_migration_workflow to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "bigquerymigration.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the MigrationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :create_migration_workflow + ## + # RPC-specific configuration for `get_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_workflow + ## + # RPC-specific configuration for `list_migration_workflows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_workflows + ## + # RPC-specific configuration for `delete_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_migration_workflow + ## + # RPC-specific configuration for `start_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :start_migration_workflow + ## + # RPC-specific configuration for `get_migration_subtask` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_subtask + ## + # RPC-specific configuration for `list_migration_subtasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_subtasks + + # @private + def initialize parent_rpcs = nil + create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow + @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config + get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow + @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config + list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows + @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config + delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow + @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config + start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow + @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config + get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask + @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config + list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks + @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb new file mode 100644 index 000000000000..db5d89803933 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + # Credentials for the MigrationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb new file mode 100644 index 000000000000..21bfeb2669a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + # Path helper methods for the MigrationService API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified MigrationSubtask resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}` + # + # @param project [String] + # @param location [String] + # @param workflow [String] + # @param subtask [String] + # + # @return [::String] + def migration_subtask_path project:, location:, workflow:, subtask: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "workflow cannot contain /" if workflow.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workflows/#{workflow}/subtasks/#{subtask}" + end + + ## + # Create a fully-qualified MigrationWorkflow resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workflows/{workflow}` + # + # @param project [String] + # @param location [String] + # @param workflow [String] + # + # @return [::String] + def migration_workflow_path project:, location:, workflow: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workflows/#{workflow}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb new file mode 100644 index 000000000000..d298ae4f0452 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/migration/v2/version" + +require "google/cloud/bigquery/migration/v2/migration_service/credentials" +require "google/cloud/bigquery/migration/v2/migration_service/paths" +require "google/cloud/bigquery/migration/v2/migration_service/rest/client" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + ## + # Service to handle EDW migrations. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/migration/v2/migration_service/rest" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module MigrationService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/migration/v2/migration_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb new file mode 100644 index 000000000000..ac684cdcb8fa --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb @@ -0,0 +1,1011 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/migration/v2/migration_service_pb" +require "google/cloud/bigquery/migration/v2/migration_service/rest/service_stub" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + module Rest + ## + # REST client for the MigrationService service. + # + # Service to handle EDW migrations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :migration_service_stub + + ## + # Configure the MigrationService Client class. + # + # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MigrationService clients + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "Migration", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_migration_workflow.timeout = 60.0 + + default_config.rpcs.get_migration_workflow.timeout = 60.0 + default_config.rpcs.get_migration_workflow.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_migration_workflows.timeout = 60.0 + default_config.rpcs.list_migration_workflows.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_migration_workflow.timeout = 60.0 + + default_config.rpcs.start_migration_workflow.timeout = 60.0 + default_config.rpcs.start_migration_workflow.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the MigrationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @migration_service_stub.universe_domain + end + + ## + # Create a new MigrationService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MigrationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @migration_service_stub = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @migration_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @migration_service_stub.logger + end + + # Service calls + + ## + # Creates a migration workflow. + # + # @overload create_migration_workflow(request, options = nil) + # Pass arguments to `create_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_migration_workflow(parent: nil, migration_workflow: nil) + # Pass arguments to `create_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project to which this migration workflow belongs. + # Example: `projects/foo/locations/bar` + # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] + # Required. The migration workflow to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new + # + # # Call the create_migration_workflow method. + # result = client.create_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def create_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.create_migration_workflow request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a previously created migration workflow. + # + # @overload get_migration_workflow(request, options = nil) + # Pass arguments to `get_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_migration_workflow(name: nil, read_mask: nil) + # Pass arguments to `get_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new + # + # # Call the get_migration_workflow method. + # result = client.get_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def get_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.get_migration_workflow request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously created migration workflow. + # + # @overload list_migration_workflows(request, options = nil) + # Pass arguments to `list_migration_workflows` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_migration_workflows` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location of the migration workflows to list. + # Example: `projects/123/locations/us` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # @param page_size [::Integer] + # The maximum number of migration workflows to return. The service may return + # fewer than this number. + # @param page_token [::String] + # A page token, received from previous `ListMigrationWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationWorkflows` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new + # + # # Call the list_migration_workflows method. + # result = client.list_migration_workflows request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p item + # end + # + def list_migration_workflows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_migration_workflows.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_migration_workflows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_migration_workflows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.list_migration_workflows request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, "migration_workflows", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a migration workflow by name. + # + # @overload delete_migration_workflow(request, options = nil) + # Pass arguments to `delete_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_migration_workflow(name: nil) + # Pass arguments to `delete_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new + # + # # Call the delete_migration_workflow method. + # result = client.delete_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.delete_migration_workflow request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts a previously created migration workflow. I.e., the state transitions + # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + # An error will be signaled if the state is anything other than DRAFT or + # RUNNING. + # + # @overload start_migration_workflow(request, options = nil) + # Pass arguments to `start_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_migration_workflow(name: nil) + # Pass arguments to `start_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new + # + # # Call the start_migration_workflow method. + # result = client.start_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def start_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.start_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.start_migration_workflow request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a previously created migration subtask. + # + # @overload get_migration_subtask(request, options = nil) + # Pass arguments to `get_migration_subtask` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_migration_subtask(name: nil, read_mask: nil) + # Pass arguments to `get_migration_subtask` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The unique identifier for the migration subtask. + # Example: `projects/123/locations/us/workflows/1234/subtasks/543` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new + # + # # Call the get_migration_subtask method. + # result = client.get_migration_subtask request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + # p result + # + def get_migration_subtask request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_migration_subtask.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_migration_subtask.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_migration_subtask.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.get_migration_subtask request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously created migration subtasks. + # + # @overload list_migration_subtasks(request, options = nil) + # Pass arguments to `list_migration_subtasks` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_migration_subtasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The migration task of the subtasks to list. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # @param page_size [::Integer] + # Optional. The maximum number of migration tasks to return. The service may + # return fewer than this number. + # @param page_token [::String] + # Optional. A page token, received from previous `ListMigrationSubtasks` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationSubtasks` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. The filter to apply. This can be used to get the subtasks of a + # specific tasks in a workflow, e.g. `migration_task = "ab012"` where + # `"ab012"` is the task ID (not the name in the named map). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new + # + # # Call the list_migration_subtasks method. + # result = client.list_migration_subtasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + # p item + # end + # + def list_migration_subtasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_migration_subtasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_migration_subtasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_migration_subtasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.list_migration_subtasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, "migration_subtasks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MigrationService REST API. + # + # This class represents the configuration for MigrationService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_migration_workflow to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "bigquerymigration.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the MigrationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :create_migration_workflow + ## + # RPC-specific configuration for `get_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_workflow + ## + # RPC-specific configuration for `list_migration_workflows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_workflows + ## + # RPC-specific configuration for `delete_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_migration_workflow + ## + # RPC-specific configuration for `start_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :start_migration_workflow + ## + # RPC-specific configuration for `get_migration_subtask` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_subtask + ## + # RPC-specific configuration for `list_migration_subtasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_subtasks + + # @private + def initialize parent_rpcs = nil + create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow + @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config + get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow + @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config + list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows + @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config + delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow + @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config + start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow + @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config + get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask + @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config + list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks + @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb new file mode 100644 index 000000000000..21756920f3bf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb @@ -0,0 +1,512 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/migration/v2/migration_service_pb" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + module Rest + ## + # REST service stub for the MigrationService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: false, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # A result object deserialized from the server's reply + def create_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_migration_workflow_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_migration_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # A result object deserialized from the server's reply + def get_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_workflow_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_migration_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_migration_workflows REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] + # A result object deserialized from the server's reply + def list_migration_workflows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_workflows_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_migration_workflows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_migration_workflow_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_migration_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the start_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def start_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_migration_workflow_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "start_migration_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_migration_subtask REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # A result object deserialized from the server's reply + def get_migration_subtask request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_subtask_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_migration_subtask", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_migration_subtasks REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse] + # A result object deserialized from the server's reply + def list_migration_subtasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_subtasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_migration_subtasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/workflows", + body: "migration_workflow", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_migration_workflows REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_migration_workflows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/workflows", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:start", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_migration_subtask REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_migration_subtask_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/subtasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_migration_subtasks REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_migration_subtasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/subtasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb new file mode 100644 index 000000000000..22bab24f5771 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/migration_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/bigquery/migration/v2/migration_entities_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n:google/cloud/bigquery/migration/v2/migration_service.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a;google/cloud/bigquery/migration/v2/migration_entities.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb3\x01\n\x1e\x43reateMigrationWorkflowRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12V\n\x12migration_workflow\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflowB\x03\xe0\x41\x02\"\x96\x01\n\x1bGetMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb0\x01\n\x1dListMigrationWorkflowsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8d\x01\n\x1eListMigrationWorkflowsResponse\x12R\n\x13migration_workflows\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1e\x44\x65leteMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"i\n\x1dStartMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"\x99\x01\n\x1aGetMigrationSubtaskRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1bigquerymigration.googleapis.com/MigrationSubtask\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xe4\x01\n\x1cListMigrationSubtasksRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x1dListMigrationSubtasksResponse\x12P\n\x12migration_subtasks\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcb\x0c\n\x10MigrationService\x12\xfb\x01\n\x17\x43reateMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"e\xda\x41\x19parent,migration_workflow\x82\xd3\xe4\x93\x02\x43\"-/v2/{parent=projects/*/locations/*}/workflows:\x12migration_workflow\x12\xcc\x01\n\x14GetMigrationWorkflow\x12?.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/workflows/*}\x12\xdf\x01\n\x16ListMigrationWorkflows\x12\x41.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest\x1a\x42.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/workflows\x12\xb3\x01\n\x17\x44\x65leteMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/workflows/*}\x12\xba\x01\n\x16StartMigrationWorkflow\x12\x41.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/workflows/*}:start:\x01*\x12\xd4\x01\n\x13GetMigrationSubtask\x12>.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest\x1a\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}\x12\xe7\x01\n\x15ListMigrationSubtasks\x12@.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest\x1a\x41.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v2/{parent=projects/*/locations/*/workflows/*}/subtasks\x1aT\xca\x41 bigquerymigration.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationServiceProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + CreateMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest").msgclass + GetMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest").msgclass + ListMigrationWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest").msgclass + ListMigrationWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse").msgclass + DeleteMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest").msgclass + StartMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest").msgclass + GetMigrationSubtaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest").msgclass + ListMigrationSubtasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest").msgclass + ListMigrationSubtasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb new file mode 100644 index 000000000000..8984838dfd6d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/migration/v2/migration_service.proto for package 'google.cloud.bigquery.migration.v2' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/bigquery/migration/v2/migration_service_pb' + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + # Service to handle EDW migrations. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.migration.v2.MigrationService' + + # Creates a migration workflow. + rpc :CreateMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow + # Gets a previously created migration workflow. + rpc :GetMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow + # Lists previously created migration workflow. + rpc :ListMigrationWorkflows, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse + # Deletes a migration workflow by name. + rpc :DeleteMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Google::Protobuf::Empty + # Starts a previously created migration workflow. I.e., the state transitions + # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + # An error will be signaled if the state is anything other than DRAFT or + # RUNNING. + rpc :StartMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Google::Protobuf::Empty + # Gets a previously created migration subtask. + rpc :GetMigrationSubtask, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask + # Lists previously created migration subtasks. + rpc :ListMigrationSubtasks, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb new file mode 100644 index 000000000000..76d58e045e9e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/migration/v2/migration_service/rest" +require "google/cloud/bigquery/migration/v2/version" + +module Google + module Cloud + module Bigquery + module Migration + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/migration/v2/rest" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module V2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb new file mode 100644 index 000000000000..26de688def6d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n;google/cloud/bigquery/migration/v2/translation_config.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe0\x03\n\x18TranslationConfigDetails\x12\x19\n\x0fgcs_source_path\x18\x01 \x01(\tH\x00\x12\x19\n\x0fgcs_target_path\x18\x02 \x01(\tH\x01\x12V\n\x11name_mapping_list\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.migration.v2.ObjectNameMappingListH\x02\x12\x43\n\x0esource_dialect\x18\x03 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x43\n\x0etarget_dialect\x18\x04 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x41\n\nsource_env\x18\x06 \x01(\x0b\x32-.google.cloud.bigquery.migration.v2.SourceEnv\x12\x16\n\x0erequest_source\x18\x08 \x01(\t\x12\x14\n\x0ctarget_types\x18\t \x03(\tB\x11\n\x0fsource_locationB\x11\n\x0ftarget_locationB\x15\n\x13output_name_mapping\"\xeb\n\n\x07\x44ialect\x12O\n\x10\x62igquery_dialect\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.BigQueryDialectH\x00\x12K\n\x0ehiveql_dialect\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.HiveQLDialectH\x00\x12O\n\x10redshift_dialect\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.RedshiftDialectH\x00\x12O\n\x10teradata_dialect\x18\x04 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.TeradataDialectH\x00\x12K\n\x0eoracle_dialect\x18\x05 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.OracleDialectH\x00\x12O\n\x10sparksql_dialect\x18\x06 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.SparkSQLDialectH\x00\x12Q\n\x11snowflake_dialect\x18\x07 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SnowflakeDialectH\x00\x12M\n\x0fnetezza_dialect\x18\x08 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NetezzaDialectH\x00\x12X\n\x15\x61zure_synapse_dialect\x18\t \x01(\x0b\x32\x37.google.cloud.bigquery.migration.v2.AzureSynapseDialectH\x00\x12M\n\x0fvertica_dialect\x18\n \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.VerticaDialectH\x00\x12R\n\x12sql_server_dialect\x18\x0b \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SQLServerDialectH\x00\x12S\n\x12postgresql_dialect\x18\x0c \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.PostgresqlDialectH\x00\x12K\n\x0epresto_dialect\x18\r \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.PrestoDialectH\x00\x12I\n\rmysql_dialect\x18\x0e \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.MySQLDialectH\x00\x12\x45\n\x0b\x64\x62\x32_dialect\x18\x0f \x01(\x0b\x32..google.cloud.bigquery.migration.v2.DB2DialectH\x00\x12K\n\x0esqlite_dialect\x18\x10 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.SQLiteDialectH\x00\x12Q\n\x11greenplum_dialect\x18\x11 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.GreenplumDialectH\x00\x42\x0f\n\rdialect_value\"\x11\n\x0f\x42igQueryDialect\"\x0f\n\rHiveQLDialect\"\x11\n\x0fRedshiftDialect\"\x8a\x01\n\x0fTeradataDialect\x12\x46\n\x04mode\x18\x01 \x01(\x0e\x32\x38.google.cloud.bigquery.migration.v2.TeradataDialect.Mode\"/\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x07\n\x03SQL\x10\x01\x12\x08\n\x04\x42TEQ\x10\x02\"\x0f\n\rOracleDialect\"\x11\n\x0fSparkSQLDialect\"\x12\n\x10SnowflakeDialect\"\x10\n\x0eNetezzaDialect\"\x15\n\x13\x41zureSynapseDialect\"\x10\n\x0eVerticaDialect\"\x12\n\x10SQLServerDialect\"\x13\n\x11PostgresqlDialect\"\x0f\n\rPrestoDialect\"\x0e\n\x0cMySQLDialect\"\x0c\n\nDB2Dialect\"\x0f\n\rSQLiteDialect\"\x12\n\x10GreenplumDialect\"`\n\x15ObjectNameMappingList\x12G\n\x08name_map\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.ObjectNameMapping\"\x9d\x01\n\x11ObjectNameMapping\x12\x42\n\x06source\x18\x01 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NameMappingKey\x12\x44\n\x06target\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.NameMappingValue\"\xab\x02\n\x0eNameMappingKey\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.migration.v2.NameMappingKey.Type\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08relation\x18\x04 \x01(\t\x12\x11\n\tattribute\x18\x05 \x01(\t\"\x8a\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x0c\n\x08RELATION\x10\x03\x12\r\n\tATTRIBUTE\x10\x04\x12\x12\n\x0eRELATION_ALIAS\x10\x05\x12\x13\n\x0f\x41TTRIBUTE_ALIAS\x10\x06\x12\x0c\n\x08\x46UNCTION\x10\x07\"Y\n\x10NameMappingValue\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x10\n\x08relation\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\"f\n\tSourceEnv\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd2\x01\n&com.google.cloud.bigquery.migration.v2B\x16TranslationConfigProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TranslationConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationConfigDetails").msgclass + Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Dialect").msgclass + BigQueryDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.BigQueryDialect").msgclass + HiveQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.HiveQLDialect").msgclass + RedshiftDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.RedshiftDialect").msgclass + TeradataDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect").msgclass + TeradataDialect::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect.Mode").enummodule + OracleDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.OracleDialect").msgclass + SparkSQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SparkSQLDialect").msgclass + SnowflakeDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SnowflakeDialect").msgclass + NetezzaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NetezzaDialect").msgclass + AzureSynapseDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AzureSynapseDialect").msgclass + VerticaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.VerticaDialect").msgclass + SQLServerDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLServerDialect").msgclass + PostgresqlDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PostgresqlDialect").msgclass + PrestoDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PrestoDialect").msgclass + MySQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.MySQLDialect").msgclass + DB2Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DB2Dialect").msgclass + SQLiteDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLiteDialect").msgclass + GreenplumDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GreenplumDialect").msgclass + ObjectNameMappingList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMappingList").msgclass + ObjectNameMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMapping").msgclass + NameMappingKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey").msgclass + NameMappingKey::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey.Type").enummodule + NameMappingValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingValue").msgclass + SourceEnv = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnv").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb new file mode 100644 index 000000000000..52eee84cfd27 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_details.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\n\x07literal\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.LiteralH\x00\x12\x17\n\rgcs_file_path\x18\x04 \x01(\tH\x00\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06source\"#\n\nTargetSpec\x12\x15\n\rrelative_path\x18\x01 \x01(\t\"h\n\x07Literal\x12\x18\n\x0eliteral_string\x18\x02 \x01(\tH\x00\x12\x17\n\rliteral_bytes\x18\x03 \x01(\x0cH\x00\x12\x1a\n\rrelative_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0e\n\x0cliteral_data\"n\n\x11SourceEnvironment\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd3\x01\n&com.google.cloud.bigquery.migration.v2B\x17TranslationDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TranslationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationDetails").msgclass + SuggestionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionConfig").msgclass + SuggestionStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep").msgclass + SuggestionStep::SuggestionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType").enummodule + SuggestionStep::RewriteTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget").enummodule + SourceTargetMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceTargetMapping").msgclass + SourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceSpec").msgclass + TargetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TargetSpec").msgclass + Literal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Literal").msgclass + SourceEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnvironment").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb new file mode 100644 index 000000000000..b371a88bb83b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_suggestion.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/cloud/bigquery/migration/v2/translation_suggestion.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x88\x02\n\x17TranslationReportRecord\x12V\n\x08severity\x18\x01 \x01(\x0e\x32\x44.google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity\x12\x13\n\x0bscript_line\x18\x02 \x01(\x05\x12\x15\n\rscript_column\x18\x03 \x01(\x05\x12\x10\n\x08\x63\x61tegory\x18\x04 \x01(\t\x12\x0f\n\x07message\x18\x05 \x01(\t\"F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\xd6\x01\n&com.google.cloud.bigquery.migration.v2B\x1aTranslationSuggestionProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TranslationReportRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord").msgclass + TranslationReportRecord::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb new file mode 100644 index 000000000000..840017a9f86a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_usability.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/cloud/bigquery/migration/v2/translation_usability.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf6\x01\n\x13GcsReportLogMessage\x12\x10\n\x08severity\x18\x01 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x02 \x01(\t\x12\x11\n\tfile_path\x18\x03 \x01(\t\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x1a\n\x12source_script_line\x18\x05 \x01(\x05\x12\x1c\n\x14source_script_column\x18\x06 \x01(\x05\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x16\n\x0escript_context\x18\x08 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\t \x01(\t\x12\x0e\n\x06\x65\x66\x66\x65\x63t\x18\n \x01(\t\x12\x13\n\x0bobject_name\x18\x0b \x01(\tB\xd5\x01\n&com.google.cloud.bigquery.migration.v2B\x19TranslationUsabilityProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + GcsReportLogMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GcsReportLogMessage").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb new file mode 100644 index 000000000000..c33fa4b1c721 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md new file mode 100644 index 000000000000..6a3802be6255 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Migration V2 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-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-bigquery-migration-v2/proto_docs/google/api/distribution.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb new file mode 100644 index 000000000000..e4f870d5ad0d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb @@ -0,0 +1,233 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Distribution` contains summary statistics for a population of values. It + # optionally contains a histogram representing the distribution of those values + # across a set of buckets. + # + # The summary statistics are the count, mean, sum of the squared deviation from + # the mean, the minimum, and the maximum of the set of population of values. + # The histogram is based on a sequence of buckets and gives a count of values + # that fall into each bucket. The boundaries of the buckets are given either + # explicitly or by formulas for buckets of fixed or exponentially increasing + # widths. + # + # Although it is not forbidden, it is generally a bad idea to include + # non-finite values (infinities or NaNs) in the population of values, as this + # will render the `mean` and `sum_of_squared_deviation` fields meaningless. + # @!attribute [rw] count + # @return [::Integer] + # The number of values in the population. Must be non-negative. This value + # must equal the sum of the values in `bucket_counts` if a histogram is + # provided. + # @!attribute [rw] mean + # @return [::Float] + # The arithmetic mean of the values in the population. If `count` is zero + # then this field must be zero. + # @!attribute [rw] sum_of_squared_deviation + # @return [::Float] + # The sum of squared deviations from the mean of the values in the + # population. For values x_i this is: + # + # Sum[i=1..n]((x_i - mean)^2) + # + # Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition + # describes Welford's method for accumulating this sum in one pass. + # + # If `count` is zero then this field must be zero. + # @!attribute [rw] range + # @return [::Google::Api::Distribution::Range] + # If specified, contains the range of the population values. The field + # must not be present if the `count` is zero. + # @!attribute [rw] bucket_options + # @return [::Google::Api::Distribution::BucketOptions] + # Defines the histogram bucket boundaries. If the distribution does not + # contain a histogram, then omit this field. + # @!attribute [rw] bucket_counts + # @return [::Array<::Integer>] + # The number of values in each bucket of the histogram, as described in + # `bucket_options`. If the distribution does not have a histogram, then omit + # this field. If there is a histogram, then the sum of the values in + # `bucket_counts` must equal the value in the `count` field of the + # distribution. + # + # If present, `bucket_counts` should contain N values, where N is the number + # of buckets specified in `bucket_options`. If you supply fewer than N + # values, the remaining values are assumed to be 0. + # + # The order of the values in `bucket_counts` follows the bucket numbering + # schemes described for the three bucket types. The first value must be the + # count for the underflow bucket (number 0). The next N-2 values are the + # counts for the finite buckets (number 1 through N-2). The N'th value in + # `bucket_counts` is the count for the overflow bucket (number N-1). + # @!attribute [rw] exemplars + # @return [::Array<::Google::Api::Distribution::Exemplar>] + # Must be in increasing order of `value` field. + class Distribution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The range of the population values. + # @!attribute [rw] min + # @return [::Float] + # The minimum of the population values. + # @!attribute [rw] max + # @return [::Float] + # The maximum of the population values. + class Range + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BucketOptions` describes the bucket boundaries used to create a histogram + # for the distribution. The buckets can be in a linear sequence, an + # exponential sequence, or each bucket can be specified explicitly. + # `BucketOptions` does not include the number of values in each bucket. + # + # A bucket has an inclusive lower bound and exclusive upper bound for the + # values that are counted for that bucket. The upper bound of a bucket must + # be strictly greater than the lower bound. The sequence of N buckets for a + # distribution consists of an underflow bucket (number 0), zero or more + # finite buckets (number 1 through N - 2) and an overflow bucket (number N - + # 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the + # same as the upper bound of bucket i - 1. The buckets span the whole range + # of finite values: lower bound of the underflow bucket is -infinity and the + # upper bound of the overflow bucket is +infinity. The finite buckets are + # so-called because both bounds are finite. + # @!attribute [rw] linear_buckets + # @return [::Google::Api::Distribution::BucketOptions::Linear] + # The linear bucket. + # + # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exponential_buckets + # @return [::Google::Api::Distribution::BucketOptions::Exponential] + # The exponential buckets. + # + # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] explicit_buckets + # @return [::Google::Api::Distribution::BucketOptions::Explicit] + # The explicit buckets. + # + # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BucketOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies a linear sequence of buckets that all have the same width + # (except overflow and underflow). Each bucket represents a constant + # absolute uncertainty on the specific value in the bucket. + # + # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + # following boundaries: + # + # Upper bound (0 <= i < N-1): offset + (width * i). + # + # Lower bound (1 <= i < N): offset + (width * (i - 1)). + # @!attribute [rw] num_finite_buckets + # @return [::Integer] + # Must be greater than 0. + # @!attribute [rw] width + # @return [::Float] + # Must be greater than 0. + # @!attribute [rw] offset + # @return [::Float] + # Lower bound of the first bucket. + class Linear + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies an exponential sequence of buckets that have a width that is + # proportional to the value of the lower bound. Each bucket represents a + # constant relative uncertainty on a specific value in the bucket. + # + # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + # following boundaries: + # + # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). + # + # Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). + # @!attribute [rw] num_finite_buckets + # @return [::Integer] + # Must be greater than 0. + # @!attribute [rw] growth_factor + # @return [::Float] + # Must be greater than 1. + # @!attribute [rw] scale + # @return [::Float] + # Must be greater than 0. + class Exponential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a set of buckets with arbitrary widths. + # + # There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following + # boundaries: + # + # Upper bound (0 <= i < N-1): bounds[i] + # Lower bound (1 <= i < N); bounds[i - 1] + # + # The `bounds` field must contain at least one element. If `bounds` has + # only one element, then there are no finite buckets, and that single + # element is the common boundary of the overflow and underflow buckets. + # @!attribute [rw] bounds + # @return [::Array<::Float>] + # The values must be monotonically increasing. + class Explicit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Exemplars are example points that may be used to annotate aggregated + # distribution values. They are metadata that gives information about a + # particular value added to a Distribution bucket, such as a trace ID that + # was active when a value was added. They may contain further information, + # such as a example values and timestamps, origin, etc. + # @!attribute [rw] value + # @return [::Float] + # Value of the exemplar point. This value determines to which bucket the + # exemplar belongs. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # The observation (sampling) time of the above value. + # @!attribute [rw] attachments + # @return [::Array<::Google::Protobuf::Any>] + # Contextual information about the example value. Examples are: + # + # Trace: type.googleapis.com/google.monitoring.v3.SpanContext + # + # Literal string: type.googleapis.com/google.protobuf.StringValue + # + # Labels dropped during aggregation: + # type.googleapis.com/google.monitoring.v3.DroppedLabels + # + # There may be only a single attachment of any given message type in a + # single exemplar, and this is enforced by the system. + class Exemplar + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb new file mode 100644 index 000000000000..02d2f8d451f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A description of a label. + # @!attribute [rw] key + # @return [::String] + # The label key. + # @!attribute [rw] value_type + # @return [::Google::Api::LabelDescriptor::ValueType] + # The type of data that can be assigned to the label. + # @!attribute [rw] description + # @return [::String] + # A human-readable description for the label. + class LabelDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value types that can be used as label values. + module ValueType + # A variable-length string. This is the default. + STRING = 0 + + # Boolean; true or false. + BOOL = 1 + + # A 64-bit signed integer. + INT64 = 2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb new file mode 100644 index 000000000000..56510feeee0f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb @@ -0,0 +1,299 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Defines a metric type and its schema. Once a metric descriptor is created, + # deleting or altering it stops data collection and makes the metric type's + # existing data unusable. + # @!attribute [rw] name + # @return [::String] + # The resource name of the metric descriptor. + # @!attribute [rw] type + # @return [::String] + # The metric type, including its DNS name prefix. The type is not + # URL-encoded. All user-defined metric types have the DNS name + # `custom.googleapis.com` or `external.googleapis.com`. Metric types should + # use a natural hierarchical grouping. For example: + # + # "custom.googleapis.com/invoice/paid/amount" + # "external.googleapis.com/prometheus/up" + # "appengine.googleapis.com/http/server/response_latencies" + # @!attribute [rw] labels + # @return [::Array<::Google::Api::LabelDescriptor>] + # The set of labels that can be used to describe a specific + # instance of this metric type. For example, the + # `appengine.googleapis.com/http/server/response_latencies` metric + # type has a label for the HTTP response code, `response_code`, so + # you can look at latencies for successful responses or just + # for responses that failed. + # @!attribute [rw] metric_kind + # @return [::Google::Api::MetricDescriptor::MetricKind] + # Whether the metric records instantaneous values, changes to a value, etc. + # Some combinations of `metric_kind` and `value_type` might not be supported. + # @!attribute [rw] value_type + # @return [::Google::Api::MetricDescriptor::ValueType] + # Whether the measurement is an integer, a floating-point number, etc. + # Some combinations of `metric_kind` and `value_type` might not be supported. + # @!attribute [rw] unit + # @return [::String] + # The units in which the metric value is reported. It is only applicable + # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + # defines the representation of the stored metric values. + # + # Different systems might scale the values to be more easily displayed (so a + # value of `0.02kBy` _might_ be displayed as `20By`, and a value of + # `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is + # `kBy`, then the value of the metric is always in thousands of bytes, no + # matter how it might be displayed. + # + # If you want a custom metric to record the exact number of CPU-seconds used + # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is + # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 + # CPU-seconds, then the value is written as `12005`. + # + # Alternatively, if you want a custom metric to record data in a more + # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is + # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), + # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). + # + # The supported units are a subset of [The Unified Code for Units of + # Measure](https://unitsofmeasure.org/ucum.html) standard: + # + # **Basic units (UNIT)** + # + # * `bit` bit + # * `By` byte + # * `s` second + # * `min` minute + # * `h` hour + # * `d` day + # * `1` dimensionless + # + # **Prefixes (PREFIX)** + # + # * `k` kilo (10^3) + # * `M` mega (10^6) + # * `G` giga (10^9) + # * `T` tera (10^12) + # * `P` peta (10^15) + # * `E` exa (10^18) + # * `Z` zetta (10^21) + # * `Y` yotta (10^24) + # + # * `m` milli (10^-3) + # * `u` micro (10^-6) + # * `n` nano (10^-9) + # * `p` pico (10^-12) + # * `f` femto (10^-15) + # * `a` atto (10^-18) + # * `z` zepto (10^-21) + # * `y` yocto (10^-24) + # + # * `Ki` kibi (2^10) + # * `Mi` mebi (2^20) + # * `Gi` gibi (2^30) + # * `Ti` tebi (2^40) + # * `Pi` pebi (2^50) + # + # **Grammar** + # + # The grammar also includes these connectors: + # + # * `/` division or ratio (as an infix operator). For examples, + # `kBy/{email}` or `MiBy/10ms` (although you should almost never + # have `/s` in a metric `unit`; rates should always be computed at + # query time from the underlying cumulative or delta value). + # * `.` multiplication or composition (as an infix operator). For + # examples, `GBy.d` or `k{watt}.h`. + # + # The grammar for a unit is as follows: + # + # Expression = Component { "." Component } { "/" Component } ; + # + # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] + # | Annotation + # | "1" + # ; + # + # Annotation = "{" NAME "}" ; + # + # Notes: + # + # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation + # is used alone, then the unit is equivalent to `1`. For examples, + # `{request}/s == 1/s`, `By{transmitted}/s == By/s`. + # * `NAME` is a sequence of non-blank printable ASCII characters not + # containing `{` or `}`. + # * `1` represents a unitary [dimensionless + # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such + # as in `1/s`. It is typically used when none of the basic units are + # appropriate. For example, "new users per day" can be represented as + # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new + # users). Alternatively, "thousands of page views per day" would be + # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric + # value of `5.3` would mean "5300 page views per day"). + # * `%` represents dimensionless value of 1/100, and annotates values giving + # a percentage (so the metric values are typically in the range of 0..100, + # and a metric value `3` means "3 percent"). + # * `10^2.%` indicates a metric contains a ratio, typically in the range + # 0..1, that will be multiplied by 100 and displayed as a percentage + # (so a metric value `0.03` means "3 percent"). + # @!attribute [rw] description + # @return [::String] + # A detailed description of the metric, which can be used in documentation. + # @!attribute [rw] display_name + # @return [::String] + # A concise name for the metric, which can be displayed in user interfaces. + # Use sentence case without an ending period, for example "Request count". + # This field is optional but it is recommended to be set for any metrics + # associated with user-visible concepts, such as Quota. + # @!attribute [rw] metadata + # @return [::Google::Api::MetricDescriptor::MetricDescriptorMetadata] + # Optional. Metadata which can be used to guide usage of the metric. + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Optional. The launch stage of the metric definition. + # @!attribute [rw] monitored_resource_types + # @return [::Array<::String>] + # Read-only. If present, then a [time + # series][google.monitoring.v3.TimeSeries], which is identified partially by + # a metric type and a + # [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that + # is associated with this metric type can only be associated with one of the + # monitored resource types listed here. + class MetricDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional annotations that can be used to guide the usage of a metric. + # @!attribute [rw] launch_stage + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Api::LaunchStage] + # Deprecated. Must use the + # {::Google::Api::MetricDescriptor#launch_stage MetricDescriptor.launch_stage} + # instead. + # @!attribute [rw] sample_period + # @return [::Google::Protobuf::Duration] + # The sampling period of metric data points. For metrics which are written + # periodically, consecutive data points are stored at this time interval, + # excluding data loss due to errors. Metrics with a higher granularity have + # a smaller sampling period. + # @!attribute [rw] ingest_delay + # @return [::Google::Protobuf::Duration] + # The delay of data points caused by ingestion. Data points older than this + # age are guaranteed to be ingested and available to be read, excluding + # data loss due to errors. + # @!attribute [rw] time_series_resource_hierarchy_level + # @return [::Array<::Google::Api::MetricDescriptor::MetricDescriptorMetadata::TimeSeriesResourceHierarchyLevel>] + # The scope of the timeseries data of the metric. + class MetricDescriptorMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The resource hierarchy level of the timeseries data of a metric. + module TimeSeriesResourceHierarchyLevel + # Do not use this default value. + TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0 + + # Scopes a metric to a project. + PROJECT = 1 + + # Scopes a metric to an organization. + ORGANIZATION = 2 + + # Scopes a metric to a folder. + FOLDER = 3 + end + end + + # The kind of measurement. It describes how the data is reported. + # For information on setting the start time and end time based on + # the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval]. + module MetricKind + # Do not use this default value. + METRIC_KIND_UNSPECIFIED = 0 + + # An instantaneous measurement of a value. + GAUGE = 1 + + # The change in a value during a time interval. + DELTA = 2 + + # A value accumulated over a time interval. Cumulative + # measurements in a time series should have the same start time + # and increasing end times, until an event resets the cumulative + # value to zero and sets a new start time for the following + # points. + CUMULATIVE = 3 + end + + # The value type of a metric. + module ValueType + # Do not use this default value. + VALUE_TYPE_UNSPECIFIED = 0 + + # The value is a boolean. + # This value type can be used only if the metric kind is `GAUGE`. + BOOL = 1 + + # The value is a signed 64-bit integer. + INT64 = 2 + + # The value is a double precision floating point number. + DOUBLE = 3 + + # The value is a text string. + # This value type can be used only if the metric kind is `GAUGE`. + STRING = 4 + + # The value is a {::Google::Api::Distribution `Distribution`}. + DISTRIBUTION = 5 + + # The value is money. + MONEY = 6 + end + end + + # A specific metric, identified by specifying values for all of the + # labels of a {::Google::Api::MetricDescriptor `MetricDescriptor`}. + # @!attribute [rw] type + # @return [::String] + # An existing metric type, see + # {::Google::Api::MetricDescriptor google.api.MetricDescriptor}. For example, + # `custom.googleapis.com/invoice/paid/amount`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The set of label values that uniquely identify this metric. All + # labels listed in the `MetricDescriptor` must be assigned values. + class Metric + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb new file mode 100644 index 000000000000..51337845e2a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.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 Bigquery + module Migration + module V2 + # Assessment task config. + # @!attribute [rw] input_path + # @return [::String] + # Required. The Cloud Storage path for assessment input files. + # @!attribute [rw] output_dataset + # @return [::String] + # Required. The BigQuery dataset for output. + # @!attribute [rw] querylogs_path + # @return [::String] + # Optional. An optional Cloud Storage path to write the query logs (which is + # then used as an input path on the translation task) + # @!attribute [rw] data_source + # @return [::String] + # Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) + # from which the input data is extracted. + # @!attribute [rw] feature_handle + # @return [::Google::Cloud::Bigquery::Migration::V2::AssessmentFeatureHandle] + # Optional. A collection of additional feature flags for this assessment. + class AssessmentTaskDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User-definable feature flags for assessment tasks. + # @!attribute [rw] add_shareable_dataset + # @return [::Boolean] + # Optional. Whether to create a dataset containing non-PII data in addition + # to the output dataset. + class AssessmentFeatureHandle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb new file mode 100644 index 000000000000..2e38004a68f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb @@ -0,0 +1,297 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + # A migration workflow which specifies what needs to be done for an EDW + # migration. + # @!attribute [r] name + # @return [::String] + # Output only. Immutable. Identifier. The unique identifier for the migration + # workflow. The ID is server-generated. + # + # Example: `projects/123/locations/us/workflows/345` + # @!attribute [rw] display_name + # @return [::String] + # The display name of the workflow. This can be set to give a workflow + # a descriptive name. There is no guarantee or enforcement of uniqueness. + # @!attribute [rw] tasks + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Migration::V2::MigrationTask}] + # The tasks in a workflow in a named map. The name (i.e. key) has no + # meaning and is merely a convenient way to address a specific task + # in a workflow. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow::State] + # Output only. That status of the workflow. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the workflow was created. + # @!attribute [r] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the workflow was last updated. + class MigrationWorkflow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask] + class TasksEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible migration workflow states. + module State + # Workflow state is unspecified. + STATE_UNSPECIFIED = 0 + + # Workflow is in draft status, i.e. tasks are not yet eligible for + # execution. + DRAFT = 1 + + # Workflow is running (i.e. tasks are eligible for execution). + RUNNING = 2 + + # Workflow is paused. Tasks currently in progress may continue, but no + # further tasks will be scheduled. + PAUSED = 3 + + # Workflow is complete. There should not be any task in a non-terminal + # state, but if they are (e.g. forced termination), they will not be + # scheduled. + COMPLETED = 4 + end + end + + # A single task for a migration which has details about the configuration of + # the task. + # @!attribute [rw] assessment_task_details + # @return [::Google::Cloud::Bigquery::Migration::V2::AssessmentTaskDetails] + # Task configuration for Assessment. + # + # Note: The following fields are mutually exclusive: `assessment_task_details`, `translation_config_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] translation_config_details + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationConfigDetails] + # Task configuration for CW Batch/Offline SQL Translation. + # + # Note: The following fields are mutually exclusive: `translation_config_details`, `assessment_task_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] translation_details + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationDetails] + # Task details for unified SQL Translation. + # + # Note: The following fields are mutually exclusive: `translation_details`, `assessment_task_details`, `translation_config_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] id + # @return [::String] + # Output only. Immutable. The unique identifier for the migration task. The + # ID is server-generated. + # @!attribute [rw] type + # @return [::String] + # The type of the task. This must be one of the supported task types. + # + # Assessment: + # + # - `Assessment_Hive` - Assessment for Hive. + # - `Assessment_Redshift` - Assessment for Redshift. + # - `Assessment_Snowflake` - Assessment for Snowflake. + # - `Assessment_Teradata_v2` - Assessment for Teradata. + # - `Assessment_Oracle` - Assessment for Oracle. + # - `Assessment_Hadoop` - Assessment for Hadoop. + # - `Assessment_Informatica` - Assessment for Informatica. + # + # Translation: + # See [Supported Task + # Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) + # for a list of supported task types. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask::State] + # Output only. The current state of the task. + # @!attribute [r] processing_error + # @return [::Google::Rpc::ErrorInfo] + # Output only. An explanation that may be populated when the task is in + # FAILED state. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the task was created. + # @!attribute [r] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the task was last updated. + # @!attribute [r] resource_error_details + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] + # Output only. Provides details to errors and issues encountered while + # processing the task. Presence of error details does not mean that the task + # failed. + # @!attribute [r] resource_error_count + # @return [::Integer] + # Output only. The number or resources with errors. Note: This is not the + # total number of errors as each resource can have more than one error. This + # is used to indicate truncation by having a `resource_error_count` that is + # higher than the size of `resource_error_details`. + # @!attribute [r] metrics + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] + # Output only. The metrics for the task. + # @!attribute [r] task_result + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTaskResult] + # Output only. The result of the task. + # @!attribute [r] total_processing_error_count + # @return [::Integer] + # Output only. Count of all the processing errors in this task and its + # subtasks. + # @!attribute [r] total_resource_error_count + # @return [::Integer] + # Output only. Count of all the resource errors in this task and its + # subtasks. + class MigrationTask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of a migration task. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The task is waiting for orchestration. + PENDING = 1 + + # The task is assigned to an orchestrator. + ORCHESTRATING = 2 + + # The task is running, i.e. its subtasks are ready for execution. + RUNNING = 3 + + # The task is paused. Assigned subtasks can continue, but no new subtasks + # will be scheduled. + PAUSED = 4 + + # The task finished successfully. + SUCCEEDED = 5 + + # The task finished unsuccessfully. + FAILED = 6 + end + end + + # A subtask for a migration which carries details about the configuration of + # the subtask. The content of the details should not matter to the end user, + # but is a contract between the subtask creator and subtask worker. + # @!attribute [r] name + # @return [::String] + # Output only. Immutable. The resource name for the migration subtask. The ID + # is server-generated. + # + # Example: `projects/123/locations/us/workflows/345/subtasks/678` + # @!attribute [rw] task_id + # @return [::String] + # The unique ID of the task to which this subtask belongs. + # @!attribute [rw] type + # @return [::String] + # The type of the Subtask. The migration service does not check whether this + # is a known type. It is up to the task creator (i.e. orchestrator or worker) + # to ensure it only creates subtasks for which there are compatible workers + # polling for Subtasks. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask::State] + # Output only. The current state of the subtask. + # @!attribute [r] processing_error + # @return [::Google::Rpc::ErrorInfo] + # Output only. An explanation that may be populated when the task is in + # FAILED state. + # @!attribute [r] resource_error_details + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] + # Output only. Provides details to errors and issues encountered while + # processing the subtask. Presence of error details does not mean that the + # subtask failed. + # @!attribute [r] resource_error_count + # @return [::Integer] + # Output only. The number or resources with errors. Note: This is not the + # total number of errors as each resource can have more than one error. This + # is used to indicate truncation by having a `resource_error_count` that is + # higher than the size of `resource_error_details`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the subtask was created. + # @!attribute [r] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the subtask was last updated. + # @!attribute [r] metrics + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] + # Output only. The metrics for the subtask. + class MigrationSubtask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of a migration subtask. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The subtask is ready, i.e. it is ready for execution. + ACTIVE = 1 + + # The subtask is running, i.e. it is assigned to a worker for execution. + RUNNING = 2 + + # The subtask finished successfully. + SUCCEEDED = 3 + + # The subtask finished unsuccessfully. + FAILED = 4 + + # The subtask is paused, i.e., it will not be scheduled. If it was already + # assigned,it might still finish but no new lease renewals will be granted. + PAUSED = 5 + + # The subtask is pending a dependency. It will be scheduled once its + # dependencies are done. + PENDING_DEPENDENCY = 6 + end + end + + # The migration task result. + # @!attribute [rw] translation_task_result + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationTaskResult] + # Details specific to translation task types. + class MigrationTaskResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Translation specific result details from the migration task. + # @!attribute [rw] translated_literals + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Literal>] + # The list of the translated literals. + # @!attribute [rw] report_log_messages + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::GcsReportLogMessage>] + # The records from the aggregate CSV report for a migration workflow. + # @!attribute [rw] console_uri + # @return [::String] + # The Cloud Console URI for the migration workflow. + class TranslationTaskResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb new file mode 100644 index 000000000000..29dfe6d0ee40 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + # Provides details for errors and the corresponding resources. + # @!attribute [rw] resource_info + # @return [::Google::Rpc::ResourceInfo] + # Required. Information about the resource where the error is located. + # @!attribute [rw] error_details + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ErrorDetail>] + # Required. The error details for the resource. + # @!attribute [rw] error_count + # @return [::Integer] + # Required. How many errors there are in total for the resource. Truncation + # can be indicated by having an `error_count` that is higher than the size of + # `error_details`. + class ResourceErrorDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides details for errors, e.g. issues that where encountered when + # processing a subtask. + # @!attribute [rw] location + # @return [::Google::Cloud::Bigquery::Migration::V2::ErrorLocation] + # Optional. The exact location within the resource (if applicable). + # @!attribute [rw] error_info + # @return [::Google::Rpc::ErrorInfo] + # Required. Describes the cause of the error with structured detail. + class ErrorDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Holds information about where the error is located. + # @!attribute [rw] line + # @return [::Integer] + # Optional. If applicable, denotes the line where the error occurred. A zero + # value means that there is no line information. + # @!attribute [rw] column + # @return [::Integer] + # Optional. If applicable, denotes the column where the error occurred. A + # zero value means that there is no columns information. + class ErrorLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb new file mode 100644 index 000000000000..41e34dd60654 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + # The metrics object for a SubTask. + # @!attribute [rw] metric + # @return [::String] + # Required. The name of the metric. + # + # If the metric is not known by the service yet, it will be auto-created. + # @!attribute [rw] value_type + # @return [::Google::Api::MetricDescriptor::ValueType] + # Required. The value type of the time series. + # @!attribute [rw] metric_kind + # @return [::Google::Api::MetricDescriptor::MetricKind] + # Optional. The metric kind of the time series. + # + # If present, it must be the same as the metric kind of the associated + # metric. If the associated metric's descriptor must be auto-created, then + # this field specifies the metric kind of the new descriptor and must be + # either `GAUGE` (the default) or `CUMULATIVE`. + # @!attribute [rw] points + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Point>] + # Required. The data points of this time series. When listing time series, + # points are returned in reverse time order. + # + # When creating a time series, this field must contain exactly one point and + # the point's type must be the same as the value type of the associated + # metric. If the associated metric's descriptor must be auto-created, then + # the value type of the descriptor is determined by the point's type, which + # must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + class TimeSeries + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single data point in a time series. + # @!attribute [rw] interval + # @return [::Google::Cloud::Bigquery::Migration::V2::TimeInterval] + # The time interval to which the data point applies. For `GAUGE` metrics, + # the start time does not need to be supplied, but if it is supplied, it must + # equal the end time. For `DELTA` metrics, the start and end time should + # specify a non-zero interval, with subsequent points specifying contiguous + # and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + # time should specify a non-zero interval, with subsequent points specifying + # the same start time and increasing end times, until an event resets the + # cumulative value to zero and sets a new start time for the following + # points. + # @!attribute [rw] value + # @return [::Google::Cloud::Bigquery::Migration::V2::TypedValue] + # The value of the data point. + class Point + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A time interval extending just after a start time through an end time. + # If the start time is the same as the end time, then the interval + # represents a single point in time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The beginning of the time interval. The default value + # for the start time is the end time. The start time must not be + # later than the end time. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. The end of the time interval. + class TimeInterval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single strongly-typed value. + # @!attribute [rw] bool_value + # @return [::Boolean] + # A Boolean value: `true` or `false`. + # + # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int64_value + # @return [::Integer] + # A 64-bit integer. Its range is approximately `+/-9.2x10^18`. + # + # Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] double_value + # @return [::Float] + # A 64-bit double-precision floating-point number. Its magnitude + # is approximately `+/-10^(+/-300)` and it has 16 significant digits of + # precision. + # + # Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # A variable-length string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] distribution_value + # @return [::Google::Api::Distribution] + # A distribution value. + # + # Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TypedValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb new file mode 100644 index 000000000000..d833be3e5b1d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb @@ -0,0 +1,166 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + # Request to create a migration workflow resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project to which this migration workflow belongs. + # Example: `projects/foo/locations/bar` + # @!attribute [rw] migration_workflow + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # Required. The migration workflow to create. + class CreateMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a previously created migration workflow. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be retrieved. + class GetMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list previously created migration workflows. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location of the migration workflows to list. + # Example: `projects/123/locations/us` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be retrieved. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of migration workflows to return. The service may return + # fewer than this number. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from previous `ListMigrationWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationWorkflows` + # must match the call that provided the page token. + class ListMigrationWorkflowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for a `ListMigrationWorkflows` call. + # @!attribute [rw] migration_workflows + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # The migration workflows for the specified project / location. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListMigrationWorkflowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete a previously created migration workflow. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + class DeleteMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to start a previously created migration workflow. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + class StartMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a previously created migration subtasks. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration subtask. + # Example: `projects/123/locations/us/workflows/1234/subtasks/543` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to be retrieved. + class GetMigrationSubtaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list previously created migration subtasks. + # @!attribute [rw] parent + # @return [::String] + # Required. The migration task of the subtasks to list. + # Example: `projects/123/locations/us/workflows/1234` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to be retrieved. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of migration tasks to return. The service may + # return fewer than this number. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from previous `ListMigrationSubtasks` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationSubtasks` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to apply. This can be used to get the subtasks of a + # specific tasks in a workflow, e.g. `migration_task = "ab012"` where + # `"ab012"` is the task ID (not the name in the named map). + class ListMigrationSubtasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for a `ListMigrationSubtasks` call. + # @!attribute [rw] migration_subtasks + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # The migration subtasks for the specified task. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListMigrationSubtasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb new file mode 100644 index 000000000000..d0c7dde5e35b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + # The translation config to capture necessary settings for a translation task + # and subtask. + # @!attribute [rw] gcs_source_path + # @return [::String] + # The Cloud Storage path for a directory of files to translate in a task. + # @!attribute [rw] gcs_target_path + # @return [::String] + # The Cloud Storage path to write back the corresponding input files to. + # @!attribute [rw] name_mapping_list + # @return [::Google::Cloud::Bigquery::Migration::V2::ObjectNameMappingList] + # The mapping of objects to their desired output names in list form. + # @!attribute [rw] source_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] + # The dialect of the input files. + # @!attribute [rw] target_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] + # The target dialect for the engine to translate the input to. + # @!attribute [rw] source_env + # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnv] + # The default source environment values for the translation. + # @!attribute [rw] request_source + # @return [::String] + # The indicator to show translation request initiator. + # @!attribute [rw] target_types + # @return [::Array<::String>] + # The types of output to generate, e.g. sql, metadata etc. If not specified, + # a default set of targets will be generated. Some additional target types + # may be slower to generate. See the documentation for the set of available + # target types. + class TranslationConfigDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The possible dialect options for translation. + # @!attribute [rw] bigquery_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::BigQueryDialect] + # The BigQuery dialect + # + # Note: The following fields are mutually exclusive: `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hiveql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::HiveQLDialect] + # The HiveQL dialect + # + # Note: The following fields are mutually exclusive: `hiveql_dialect`, `bigquery_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] redshift_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::RedshiftDialect] + # The Redshift dialect + # + # Note: The following fields are mutually exclusive: `redshift_dialect`, `bigquery_dialect`, `hiveql_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] teradata_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect] + # The Teradata dialect + # + # Note: The following fields are mutually exclusive: `teradata_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oracle_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::OracleDialect] + # The Oracle dialect + # + # Note: The following fields are mutually exclusive: `oracle_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sparksql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SparkSQLDialect] + # The SparkSQL dialect + # + # Note: The following fields are mutually exclusive: `sparksql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] snowflake_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SnowflakeDialect] + # The Snowflake dialect + # + # Note: The following fields are mutually exclusive: `snowflake_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] netezza_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::NetezzaDialect] + # The Netezza dialect + # + # Note: The following fields are mutually exclusive: `netezza_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] azure_synapse_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::AzureSynapseDialect] + # The Azure Synapse dialect + # + # Note: The following fields are mutually exclusive: `azure_synapse_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vertica_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::VerticaDialect] + # The Vertica dialect + # + # Note: The following fields are mutually exclusive: `vertica_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sql_server_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SQLServerDialect] + # The SQL Server dialect + # + # Note: The following fields are mutually exclusive: `sql_server_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] postgresql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::PostgresqlDialect] + # The Postgresql dialect + # + # Note: The following fields are mutually exclusive: `postgresql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] presto_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::PrestoDialect] + # The Presto dialect + # + # Note: The following fields are mutually exclusive: `presto_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mysql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::MySQLDialect] + # The MySQL dialect + # + # Note: The following fields are mutually exclusive: `mysql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] db2_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::DB2Dialect] + # DB2 dialect + # + # Note: The following fields are mutually exclusive: `db2_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sqlite_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SQLiteDialect] + # SQLite dialect + # + # Note: The following fields are mutually exclusive: `sqlite_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] greenplum_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::GreenplumDialect] + # Greenplum dialect + # + # Note: The following fields are mutually exclusive: `greenplum_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Dialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for BigQuery. + class BigQueryDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for HiveQL. + class HiveQLDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Redshift. + class RedshiftDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Teradata. + # @!attribute [rw] mode + # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect::Mode] + # Which Teradata sub-dialect mode the user specifies. + class TeradataDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The sub-dialect options for Teradata. + module Mode + # Unspecified mode. + MODE_UNSPECIFIED = 0 + + # Teradata SQL mode. + SQL = 1 + + # BTEQ mode (which includes SQL). + BTEQ = 2 + end + end + + # The dialect definition for Oracle. + class OracleDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for SparkSQL. + class SparkSQLDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Snowflake. + class SnowflakeDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Netezza. + class NetezzaDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Azure Synapse. + class AzureSynapseDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Vertica. + class VerticaDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for SQL Server. + class SQLServerDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Postgresql. + class PostgresqlDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Presto. + class PrestoDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for MySQL. + class MySQLDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for DB2. + class DB2Dialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for SQLite. + class SQLiteDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Greenplum. + class GreenplumDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a map of name mappings using a list of key:value proto messages of + # existing name to desired output name. + # @!attribute [rw] name_map + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ObjectNameMapping>] + # The elements of the object name map. + class ObjectNameMappingList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a key-value pair of NameMappingKey to NameMappingValue to + # represent the mapping of SQL names from the input value to desired output. + # @!attribute [rw] source + # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey] + # The name of the object in source that is being mapped. + # @!attribute [rw] target + # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingValue] + # The desired target name of the object that is being mapped. + class ObjectNameMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The potential components of a full name mapping that will be mapped + # during translation in the source data warehouse. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey::Type] + # The type of object that is being mapped. + # @!attribute [rw] database + # @return [::String] + # The database name (BigQuery project ID equivalent in the source data + # warehouse). + # @!attribute [rw] schema + # @return [::String] + # The schema name (BigQuery dataset equivalent in the source data warehouse). + # @!attribute [rw] relation + # @return [::String] + # The relation name (BigQuery table or view equivalent in the source data + # warehouse). + # @!attribute [rw] attribute + # @return [::String] + # The attribute name (BigQuery column equivalent in the source data + # warehouse). + class NameMappingKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the object that is being mapped. + module Type + # Unspecified name mapping type. + TYPE_UNSPECIFIED = 0 + + # The object being mapped is a database. + DATABASE = 1 + + # The object being mapped is a schema. + SCHEMA = 2 + + # The object being mapped is a relation. + RELATION = 3 + + # The object being mapped is an attribute. + ATTRIBUTE = 4 + + # The object being mapped is a relation alias. + RELATION_ALIAS = 5 + + # The object being mapped is a an attribute alias. + ATTRIBUTE_ALIAS = 6 + + # The object being mapped is a function. + FUNCTION = 7 + end + end + + # The potential components of a full name mapping that will be mapped + # during translation in the target data warehouse. + # @!attribute [rw] database + # @return [::String] + # The database name (BigQuery project ID equivalent in the target data + # warehouse). + # @!attribute [rw] schema + # @return [::String] + # The schema name (BigQuery dataset equivalent in the target data warehouse). + # @!attribute [rw] relation + # @return [::String] + # The relation name (BigQuery table or view equivalent in the target data + # warehouse). + # @!attribute [rw] attribute + # @return [::String] + # The attribute name (BigQuery column equivalent in the target data + # warehouse). + class NameMappingValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the default source environment values for the translation. + # @!attribute [rw] default_database + # @return [::String] + # The default database name to fully qualify SQL objects when their database + # name is missing. + # @!attribute [rw] schema_search_path + # @return [::Array<::String>] + # The schema search path. When SQL objects are missing schema name, + # translation engine will search through this list to find the value. + # @!attribute [rw] metadata_store_dataset + # @return [::String] + # Optional. Expects a valid BigQuery dataset ID that exists, e.g., + # project-123.metadata_store_123. If specified, translation will search and + # read the required schema information from a metadata store in this dataset. + # If metadata store doesn't exist, translation will parse the metadata file + # and upload the schema info to a temp table in the dataset to speed up + # future translation jobs. + class SourceEnv + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb new file mode 100644 index 000000000000..43810632c46b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.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 Cloud + module Bigquery + module Migration + module V2 + # The translation details to capture the necessary settings for a translation + # job. + # @!attribute [rw] source_target_mapping + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SourceTargetMapping>] + # The mapping from source to target SQL. + # @!attribute [rw] target_base_uri + # @return [::String] + # The base URI for all writes to persistent storage. + # @!attribute [rw] source_environment + # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnvironment] + # The default source environment values for the translation. + # @!attribute [rw] target_return_literals + # @return [::Array<::String>] + # The list of literal targets that will be directly returned to the response. + # Each entry consists of the constructed path, EXCLUDING the base path. Not + # providing a target_base_uri will prevent writing to persistent storage. + # @!attribute [rw] target_types + # @return [::Array<::String>] + # The types of output to generate, e.g. sql, metadata, + # lineage_from_sql_scripts, etc. If not specified, a default set of + # targets will be generated. Some additional target types may be slower to + # generate. See the documentation for the set of available target types. + # @!attribute [rw] suggestion_config + # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionConfig] + # The configuration for the suggestion if requested as a target type. + class TranslationDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration for the suggestion if requested as a target type. + # @!attribute [rw] skip_suggestion_steps + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SuggestionStep>] + # The list of suggestion steps to skip. + class SuggestionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Suggestion step to skip. + # @!attribute [rw] suggestion_type + # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionStep::SuggestionType] + # The type of suggestion. + # @!attribute [rw] rewrite_target + # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionStep::RewriteTarget] + # The rewrite target. + class SuggestionStep + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Suggestion type. + module SuggestionType + # Suggestion type unspecified. + SUGGESTION_TYPE_UNSPECIFIED = 0 + + # Query customization. + QUERY_CUSTOMIZATION = 1 + + # Translation explanation. + TRANSLATION_EXPLANATION = 2 + end + + # The target to apply the suggestion to. + module RewriteTarget + # Rewrite target unspecified. + REWRITE_TARGET_UNSPECIFIED = 0 + + # Source SQL. + SOURCE_SQL = 1 + + # Target SQL. + TARGET_SQL = 2 + end + end + + # Represents one mapping from a source SQL to a target SQL. + # @!attribute [rw] source_spec + # @return [::Google::Cloud::Bigquery::Migration::V2::SourceSpec] + # The source SQL or the path to it. + # @!attribute [rw] target_spec + # @return [::Google::Cloud::Bigquery::Migration::V2::TargetSpec] + # The target SQL or the path for it. + class SourceTargetMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents one path to the location that holds source data. + # @!attribute [rw] base_uri + # @return [::String] + # The base URI for all files to be read in as sources for translation. + # + # Note: The following fields are mutually exclusive: `base_uri`, `literal`, `gcs_file_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] literal + # @return [::Google::Cloud::Bigquery::Migration::V2::Literal] + # Source literal. + # + # Note: The following fields are mutually exclusive: `literal`, `base_uri`, `gcs_file_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs_file_path + # @return [::String] + # The path to a single source file in Cloud Storage. + # + # Note: The following fields are mutually exclusive: `gcs_file_path`, `base_uri`, `literal`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The optional field to specify the encoding of the sql bytes. + class SourceSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents one path to the location that holds target data. + # @!attribute [rw] relative_path + # @return [::String] + # The relative path for the target data. Given source file + # `base_uri/input/sql`, the output would be + # `target_base_uri/sql/relative_path/input.sql`. + class TargetSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Literal data. + # @!attribute [rw] literal_string + # @return [::String] + # Literal string data. + # + # Note: The following fields are mutually exclusive: `literal_string`, `literal_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] literal_bytes + # @return [::String] + # Literal byte data. + # + # Note: The following fields are mutually exclusive: `literal_bytes`, `literal_string`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] relative_path + # @return [::String] + # Required. The identifier of the literal entry. + class Literal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the default source environment values for the translation. + # @!attribute [rw] default_database + # @return [::String] + # The default database name to fully qualify SQL objects when their database + # name is missing. + # @!attribute [rw] schema_search_path + # @return [::Array<::String>] + # The schema search path. When SQL objects are missing schema name, + # translation engine will search through this list to find the value. + # @!attribute [rw] metadata_store_dataset + # @return [::String] + # Optional. Expects a validQ BigQuery dataset ID that exists, e.g., + # project-123.metadata_store_123. If specified, translation will search and + # read the required schema information from a metadata store in this dataset. + # If metadata store doesn't exist, translation will parse the metadata file + # and upload the schema info to a temp table in the dataset to speed up + # future translation jobs. + class SourceEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb new file mode 100644 index 000000000000..ba08b1dfb393 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + # Details about a record. + # @!attribute [rw] severity + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationReportRecord::Severity] + # Severity of the translation record. + # @!attribute [rw] script_line + # @return [::Integer] + # Specifies the row from the source text where the error occurred (0 based). + # Example: 2 + # @!attribute [rw] script_column + # @return [::Integer] + # Specifies the column from the source texts where the error occurred. (0 + # based) example: 6 + # @!attribute [rw] category + # @return [::String] + # Category of the error/warning. Example: SyntaxError + # @!attribute [rw] message + # @return [::String] + # Detailed message of the record. + class TranslationReportRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity type of the record. + module Severity + # SeverityType not specified. + SEVERITY_UNSPECIFIED = 0 + + # INFO type. + INFO = 1 + + # WARNING type. The translated query may still provide useful information + # if all the report records are WARNING. + WARNING = 2 + + # ERROR type. Translation failed. + ERROR = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb new file mode 100644 index 000000000000..13d55b41ed54 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + # A record in the aggregate CSV report for a migration workflow + # @!attribute [rw] severity + # @return [::String] + # Severity of the translation record. + # @!attribute [rw] category + # @return [::String] + # Category of the error/warning. Example: SyntaxError + # @!attribute [rw] file_path + # @return [::String] + # The file path in which the error occurred + # @!attribute [rw] filename + # @return [::String] + # The file name in which the error occurred + # @!attribute [rw] source_script_line + # @return [::Integer] + # Specifies the row from the source text where the error occurred (0 based, + # -1 for messages without line location). Example: 2 + # @!attribute [rw] source_script_column + # @return [::Integer] + # Specifies the column from the source texts where the error occurred. (0 + # based, -1 for messages without column location) example: 6 + # @!attribute [rw] message + # @return [::String] + # Detailed message of the record. + # @!attribute [rw] script_context + # @return [::String] + # The script context (obfuscated) in which the error occurred + # @!attribute [rw] action + # @return [::String] + # Category of the error/warning. Example: SyntaxError + # @!attribute [rw] effect + # @return [::String] + # Effect of the error/warning. Example: COMPATIBILITY + # @!attribute [rw] object_name + # @return [::String] + # Name of the affected object in the log message. + class GcsReportLogMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-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-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb new file mode 100644 index 000000000000..507d2b54094a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb @@ -0,0 +1,420 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # Describes the cause of the error with structured details. + # + # Example of an error when contacting the "pubsub.googleapis.com" API when it + # is not enabled: + # + # { "reason": "API_DISABLED" + # "domain": "googleapis.com" + # "metadata": { + # "resource": "projects/123", + # "service": "pubsub.googleapis.com" + # } + # } + # + # This response indicates that the pubsub.googleapis.com API is not enabled. + # + # Example of an error that is returned when attempting to create a Spanner + # instance in a region that is out of stock: + # + # { "reason": "STOCKOUT" + # "domain": "spanner.googleapis.com", + # "metadata": { + # "availableRegions": "us-central1,us-east2" + # } + # } + # @!attribute [rw] reason + # @return [::String] + # The reason of the error. This is a constant value that identifies the + # proximate cause of the error. Error reasons are unique within a particular + # domain of errors. This should be at most 63 characters and match a + # regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents + # UPPER_SNAKE_CASE. + # @!attribute [rw] domain + # @return [::String] + # The logical grouping to which the "reason" belongs. The error domain + # is typically the registered service name of the tool or product that + # generates the error. Example: "pubsub.googleapis.com". If the error is + # generated by some common infrastructure, the error domain must be a + # globally unique value that identifies the infrastructure. For Google API + # infrastructure, the error domain is "googleapis.com". + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional structured details about this error. + # + # Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should + # ideally be lowerCamelCase. Also, they must be limited to 64 characters in + # length. When identifying the current value of an exceeded limit, the units + # should be contained in the key, not the value. For example, rather than + # `{"instanceLimit": "100/request"}`, should be returned as, + # `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of + # instances that can be created in a single (batch) request. + class ErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes when the clients can retry a failed request. Clients could ignore + # the recommendation here or retry when this information is missing from error + # responses. + # + # It's always recommended that clients should use exponential backoff when + # retrying. + # + # Clients should wait until `retry_delay` amount of time has passed since + # receiving the error response before retrying. If retrying requests also + # fail, clients should use an exponential backoff scheme to gradually increase + # the delay between retries based on `retry_delay`, until either a maximum + # number of retries have been reached or a maximum retry delay cap has been + # reached. + # @!attribute [rw] retry_delay + # @return [::Google::Protobuf::Duration] + # Clients should wait at least this long between retrying the same request. + class RetryInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes additional debugging info. + # @!attribute [rw] stack_entries + # @return [::Array<::String>] + # The stack trace entries indicating where the error occurred. + # @!attribute [rw] detail + # @return [::String] + # Additional debugging information provided by the server. + class DebugInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes how a quota check failed. + # + # For example if a daily limit was exceeded for the calling project, + # a service could respond with a QuotaFailure detail containing the project + # id and the description of the quota limit that was exceeded. If the + # calling project hasn't enabled the service in the developer console, then + # a service could respond with the project id and set `service_disabled` + # to true. + # + # Also see RetryInfo and Help types for other details about handling a + # quota failure. + # @!attribute [rw] violations + # @return [::Array<::Google::Rpc::QuotaFailure::Violation>] + # Describes all quota violations. + class QuotaFailure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A message type used to describe a single quota violation. For example, a + # daily quota or a custom quota that was exceeded. + # @!attribute [rw] subject + # @return [::String] + # The subject on which the quota check failed. + # For example, "clientip:" or "project:". + # @!attribute [rw] description + # @return [::String] + # A description of how the quota check failed. Clients can use this + # description to find more about the quota configuration in the service's + # public documentation, or find the relevant quota limit to adjust through + # developer console. + # + # For example: "Service disabled" or "Daily Limit for read operations + # exceeded". + # @!attribute [rw] api_service + # @return [::String] + # The API Service from which the `QuotaFailure.Violation` orginates. In + # some cases, Quota issues originate from an API Service other than the one + # that was called. In other words, a dependency of the called API Service + # could be the cause of the `QuotaFailure`, and this field would have the + # dependency API service name. + # + # For example, if the called API is Kubernetes Engine API + # (container.googleapis.com), and a quota violation occurs in the + # Kubernetes Engine API itself, this field would be + # "container.googleapis.com". On the other hand, if the quota violation + # occurs when the Kubernetes Engine API creates VMs in the Compute Engine + # API (compute.googleapis.com), this field would be + # "compute.googleapis.com". + # @!attribute [rw] quota_metric + # @return [::String] + # The metric of the violated quota. A quota metric is a named counter to + # measure usage, such as API requests or CPUs. When an activity occurs in a + # service, such as Virtual Machine allocation, one or more quota metrics + # may be affected. + # + # For example, "compute.googleapis.com/cpus_per_vm_family", + # "storage.googleapis.com/internet_egress_bandwidth". + # @!attribute [rw] quota_id + # @return [::String] + # The id of the violated quota. Also know as "limit name", this is the + # unique identifier of a quota in the context of an API service. + # + # For example, "CPUS-PER-VM-FAMILY-per-project-region". + # @!attribute [rw] quota_dimensions + # @return [::Google::Protobuf::Map{::String => ::String}] + # The dimensions of the violated quota. Every non-global quota is enforced + # on a set of dimensions. While quota metric defines what to count, the + # dimensions specify for what aspects the counter should be increased. + # + # For example, the quota "CPUs per region per VM family" enforces a limit + # on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions + # "region" and "vm_family". And if the violation occurred in region + # "us-central1" and for VM family "n1", the quota_dimensions would be, + # + # { + # "region": "us-central1", + # "vm_family": "n1", + # } + # + # When a quota is enforced globally, the quota_dimensions would always be + # empty. + # @!attribute [rw] quota_value + # @return [::Integer] + # The enforced quota value at the time of the `QuotaFailure`. + # + # For example, if the enforced quota value at the time of the + # `QuotaFailure` on the number of CPUs is "10", then the value of this + # field would reflect this quantity. + # @!attribute [rw] future_quota_value + # @return [::Integer] + # The new quota value being rolled out at the time of the violation. At the + # completion of the rollout, this value will be enforced in place of + # quota_value. If no rollout is in progress at the time of the violation, + # this field is not set. + # + # For example, if at the time of the violation a rollout is in progress + # changing the number of CPUs quota from 10 to 20, 20 would be the value of + # this field. + class Violation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class QuotaDimensionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Describes what preconditions have failed. + # + # For example, if an RPC failed because it required the Terms of Service to be + # acknowledged, it could list the terms of service violation in the + # PreconditionFailure message. + # @!attribute [rw] violations + # @return [::Array<::Google::Rpc::PreconditionFailure::Violation>] + # Describes all precondition violations. + class PreconditionFailure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A message type used to describe a single precondition failure. + # @!attribute [rw] type + # @return [::String] + # The type of PreconditionFailure. We recommend using a service-specific + # enum type to define the supported precondition violation subjects. For + # example, "TOS" for "Terms of Service violation". + # @!attribute [rw] subject + # @return [::String] + # The subject, relative to the type, that failed. + # For example, "google.com/cloud" relative to the "TOS" type would indicate + # which terms of service is being referenced. + # @!attribute [rw] description + # @return [::String] + # A description of how the precondition failed. Developers can use this + # description to understand how to fix the failure. + # + # For example: "Terms of service not accepted". + class Violation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes violations in a client request. This error type focuses on the + # syntactic aspects of the request. + # @!attribute [rw] field_violations + # @return [::Array<::Google::Rpc::BadRequest::FieldViolation>] + # Describes all violations in a client request. + class BadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A message type used to describe a single bad request field. + # @!attribute [rw] field + # @return [::String] + # A path that leads to a field in the request body. The value will be a + # sequence of dot-separated identifiers that identify a protocol buffer + # field. + # + # Consider the following: + # + # message CreateContactRequest { + # message EmailAddress { + # enum Type { + # TYPE_UNSPECIFIED = 0; + # HOME = 1; + # WORK = 2; + # } + # + # optional string email = 1; + # repeated EmailType type = 2; + # } + # + # string full_name = 1; + # repeated EmailAddress email_addresses = 2; + # } + # + # In this example, in proto `field` could take one of the following values: + # + # * `full_name` for a violation in the `full_name` value + # * `email_addresses[0].email` for a violation in the `email` field of the + # first `email_addresses` message + # * `email_addresses[2].type[1]` for a violation in the second `type` + # value in the third `email_addresses` message. + # + # In JSON, the same values are represented as: + # + # * `fullName` for a violation in the `fullName` value + # * `emailAddresses[0].email` for a violation in the `email` field of the + # first `emailAddresses` message + # * `emailAddresses[2].type[1]` for a violation in the second `type` + # value in the third `emailAddresses` message. + # @!attribute [rw] description + # @return [::String] + # A description of why the request element is bad. + # @!attribute [rw] reason + # @return [::String] + # The reason of the field-level error. This is a constant value that + # identifies the proximate cause of the field-level error. It should + # uniquely identify the type of the FieldViolation within the scope of the + # google.rpc.ErrorInfo.domain. This should be at most 63 + # characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, + # which represents UPPER_SNAKE_CASE. + # @!attribute [rw] localized_message + # @return [::Google::Rpc::LocalizedMessage] + # Provides a localized error message for field-level errors that is safe to + # return to the API consumer. + class FieldViolation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Contains metadata about the request that clients can attach when filing a bug + # or providing other forms of feedback. + # @!attribute [rw] request_id + # @return [::String] + # An opaque string that should only be interpreted by the service generating + # it. For example, it can be used to identify requests in the service's logs. + # @!attribute [rw] serving_data + # @return [::String] + # Any data that was used to serve this request. For example, an encrypted + # stack trace that can be sent back to the service provider for debugging. + class RequestInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the resource that is being accessed. + # @!attribute [rw] resource_type + # @return [::String] + # A name for the type of resource being accessed, e.g. "sql table", + # "cloud storage bucket", "file", "Google calendar"; or the type URL + # of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". + # @!attribute [rw] resource_name + # @return [::String] + # The name of the resource being accessed. For example, a shared calendar + # name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current + # error is + # [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. + # @!attribute [rw] owner + # @return [::String] + # The owner of the resource (optional). + # For example, "user:" or "project:". + # @!attribute [rw] description + # @return [::String] + # Describes what error is encountered when accessing this resource. + # For example, updating a cloud project may require the `writer` permission + # on the developer console project. + class ResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides links to documentation or for performing an out of band action. + # + # For example, if a quota check failed with an error indicating the calling + # project hasn't enabled the accessed service, this can contain a URL pointing + # directly to the right place in the developer console to flip the bit. + # @!attribute [rw] links + # @return [::Array<::Google::Rpc::Help::Link>] + # URL(s) pointing to additional information on handling the current error. + class Help + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a URL link. + # @!attribute [rw] description + # @return [::String] + # Describes what the link offers. + # @!attribute [rw] url + # @return [::String] + # The URL of the link. + class Link + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Provides a localized error message that is safe to return to the user + # which can be attached to an RPC error. + # @!attribute [rw] locale + # @return [::String] + # The locale used following the specification defined at + # https://www.rfc-editor.org/rfc/bcp/bcp47.txt. + # Examples are: "en-US", "fr-CH", "es-MX" + # @!attribute [rw] message + # @return [::String] + # The localized error message in the above locale. + class LocalizedMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile new file mode 100644 index 000000000000..4d1b3eac9aa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-bigquery-migration-v2", path: "../" +else + gem "google-cloud-bigquery-migration-v2" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb new file mode 100644 index 000000000000..eb3b21d627fc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the create_migration_workflow call in the MigrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow. +# +def create_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new + + # Call the create_migration_workflow method. + result = client.create_migration_workflow request + + # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb new file mode 100644 index 000000000000..add86a0f96f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the delete_migration_workflow call in the MigrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow. +# +def delete_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new + + # Call the delete_migration_workflow method. + result = client.delete_migration_workflow request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb new file mode 100644 index 000000000000..1e668aecb17b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the get_migration_subtask call in the MigrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask. +# +def get_migration_subtask + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new + + # Call the get_migration_subtask method. + result = client.get_migration_subtask request + + # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb new file mode 100644 index 000000000000..835a5af7a227 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the get_migration_workflow call in the MigrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow. +# +def get_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new + + # Call the get_migration_workflow method. + result = client.get_migration_workflow request + + # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb new file mode 100644 index 000000000000..b526522af82b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the list_migration_subtasks call in the MigrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks. +# +def list_migration_subtasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new + + # Call the list_migration_subtasks method. + result = client.list_migration_subtasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + p item + end +end +# [END bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb new file mode 100644 index 000000000000..acc8872c9867 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the list_migration_workflows call in the MigrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows. +# +def list_migration_workflows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new + + # Call the list_migration_workflows method. + result = client.list_migration_workflows request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + p item + end +end +# [END bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb new file mode 100644 index 000000000000..db1b4071ef4d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the start_migration_workflow call in the MigrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow. +# +def start_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new + + # Call the start_migration_workflow method. + result = client.start_migration_workflow request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json new file mode 100644 index 000000000000..a72510c3fe90 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-migration-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.migration.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync", + "title": "Snippet for the create_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow.", + "file": "migration_service/create_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "CreateMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync", + "title": "Snippet for the get_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow.", + "file": "migration_service/get_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "GetMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync", + "title": "Snippet for the list_migration_workflows call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows.", + "file": "migration_service/list_migration_workflows.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_migration_workflows", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "ListMigrationWorkflows", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflows", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync", + "title": "Snippet for the delete_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow.", + "file": "migration_service/delete_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "DeleteMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync", + "title": "Snippet for the start_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow.", + "file": "migration_service/start_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "StartMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync", + "title": "Snippet for the get_migration_subtask call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask.", + "file": "migration_service/get_migration_subtask.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_migration_subtask", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "GetMigrationSubtask", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtask", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync", + "title": "Snippet for the list_migration_subtasks call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks.", + "file": "migration_service/list_migration_subtasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_migration_subtasks", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "ListMigrationSubtasks", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasks", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb new file mode 100644 index 000000000000..930bdb76bea3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/migration/v2/migration_service" + +class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_migration_subtask_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.migration_subtask_path project: "value0", location: "value1", workflow: "value2", subtask: "value3" + assert_equal "projects/value0/locations/value1/workflows/value2/subtasks/value3", path + end + end + + def test_migration_workflow_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.migration_workflow_path project: "value0", location: "value1", workflow: "value2" + assert_equal "projects/value0/locations/value1/workflows/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb new file mode 100644 index 000000000000..9012c7921707 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb @@ -0,0 +1,487 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/bigquery/migration/v2/migration_service_pb" +require "google/cloud/bigquery/migration/v2/migration_service/rest" + + +class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_migration_workflow + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + migration_workflow = {} + + create_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_create_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_migration_workflow_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_migration_workflow_client_stub.call_count + end + end + end + + def test_get_migration_workflow + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_migration_workflow_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_migration_workflow({ name: name, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_migration_workflow name: name, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_migration_workflow({ name: name, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_migration_workflow_client_stub.call_count + end + end + end + + def test_list_migration_workflows + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_mask = {} + page_size = 42 + page_token = "hello world" + + list_migration_workflows_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_workflows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_migration_workflows_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_migration_workflows parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_migration_workflows_client_stub.call_count + end + end + end + + def test_delete_migration_workflow + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_delete_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_migration_workflow_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_migration_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_migration_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_migration_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_migration_workflow_client_stub.call_count + end + end + end + + def test_start_migration_workflow + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + start_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_start_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_migration_workflow_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.start_migration_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.start_migration_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.start_migration_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_migration_workflow_client_stub.call_count + end + end + end + + def test_get_migration_subtask + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_migration_subtask_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_subtask_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_migration_subtask_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_migration_subtask({ name: name, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_migration_subtask name: name, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_migration_subtask({ name: name, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_migration_subtask_client_stub.call_count + end + end + end + + def test_list_migration_subtasks + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_mask = {} + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_migration_subtasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_subtasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_migration_subtasks_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_migration_subtasks parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_migration_subtasks_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb new file mode 100644 index 000000000000..16e72e64171e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb @@ -0,0 +1,540 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/migration/v2/migration_service_pb" +require "google/cloud/bigquery/migration/v2/migration_service" + +class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_migration_workflow + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + migration_workflow = {} + + create_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow), request["migration_workflow"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_migration_workflow_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_migration_workflow_client_stub.call_rpc_count + end + end + + def test_get_migration_workflow + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_migration_workflow_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_migration_workflow({ name: name, read_mask: read_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_migration_workflow name: name, read_mask: read_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_migration_workflow({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_migration_workflow_client_stub.call_rpc_count + end + end + + def test_list_migration_workflows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_mask = {} + page_size = 42 + page_token = "hello world" + + list_migration_workflows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_migration_workflows, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_migration_workflows_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_migration_workflows parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_migration_workflows_client_stub.call_rpc_count + end + end + + def test_delete_migration_workflow + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_migration_workflow_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_migration_workflow({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_migration_workflow name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_migration_workflow({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_migration_workflow_client_stub.call_rpc_count + end + end + + def test_start_migration_workflow + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + start_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_migration_workflow_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.start_migration_workflow({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.start_migration_workflow name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.start_migration_workflow({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, start_migration_workflow_client_stub.call_rpc_count + end + end + + def test_get_migration_subtask + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_migration_subtask_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_migration_subtask, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_migration_subtask_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_migration_subtask({ name: name, read_mask: read_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_migration_subtask name: name, read_mask: read_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_migration_subtask({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_migration_subtask_client_stub.call_rpc_count + end + end + + def test_list_migration_subtasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_mask = {} + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_migration_subtasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_migration_subtasks, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_migration_subtasks_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_migration_subtasks parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_migration_subtasks_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-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-bigquery-reservation-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json new file mode 100644 index 000000000000..a2ae9c6f27bd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "bigqueryreservation.googleapis.com", + "api_shortname": "bigqueryreservation", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest", + "distribution_name": "google-cloud-bigquery-reservation-v1", + "is_cloud": true, + "language": "ruby", + "name": "bigqueryreservation", + "name_pretty": "BigQuery Reservation V1 API", + "product_documentation": "https://cloud.google.com/bigquery/docs/reference/reservations", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. Note that google-cloud-bigquery-reservation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-reservation instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BIGQUERY_RESERVATION", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/reference/reservations", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml new file mode 100644 index 000000000000..9001cc0bde65 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-reservation-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-bigquery-reservation-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts new file mode 100644 index 000000000000..9fa1700ac9d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Reservation V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..0b1eacbc181a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-reservation-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-bigquery-reservation-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/bigquery/reservation/v1" + +client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/reservation/v1" + +::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-bigquery-reservation-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/bigquery/reservation/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md new file mode 100644 index 000000000000..029f3afa6042 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Reservation V1 API + +A service to modify your BigQuery reservations. + +The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Reservation V1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-reservation](https://rubygems.org/gems/google-cloud-bigquery-reservation). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-reservation-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/bigqueryreservation.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/reservation/v1" + +client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new +request = ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new # (request fields as keyword arguments...) +response = client.create_reservation request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/reservations) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/bigquery/reservation/v1" +require "logger" + +client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.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-bigquery-reservation`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-reservation-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-bigquery-reservation`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-bigquery-reservation-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile new file mode 100644 index 000000000000..9f80b229812a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-bigquery-reservation-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BIGQUERY_RESERVATION_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BIGQUERY_RESERVATION_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BIGQUERY_RESERVATION_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or BIGQUERY_RESERVATION_TEST_PROJECT=test123 BIGQUERY_RESERVATION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BIGQUERY_RESERVATION_PROJECT"] = project + ENV["BIGQUERY_RESERVATION_TEST_PROJECT"] = project + ENV["BIGQUERY_RESERVATION_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-reservation-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-reservation-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-reservation-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bigquery-reservation-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-reservation-v1" + header "google-cloud-bigquery-reservation-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-reservation-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-reservation-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-reservation-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-reservation-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json new file mode 100644 index 000000000000..effdec3d98a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json @@ -0,0 +1,163 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.reservation.v1", + "libraryPackage": "::Google::Cloud::Bigquery::Reservation::V1", + "services": { + "ReservationService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client", + "rpcs": { + "CreateReservation": { + "methods": [ + "create_reservation" + ] + }, + "ListReservations": { + "methods": [ + "list_reservations" + ] + }, + "GetReservation": { + "methods": [ + "get_reservation" + ] + }, + "DeleteReservation": { + "methods": [ + "delete_reservation" + ] + }, + "UpdateReservation": { + "methods": [ + "update_reservation" + ] + }, + "FailoverReservation": { + "methods": [ + "failover_reservation" + ] + }, + "CreateCapacityCommitment": { + "methods": [ + "create_capacity_commitment" + ] + }, + "ListCapacityCommitments": { + "methods": [ + "list_capacity_commitments" + ] + }, + "GetCapacityCommitment": { + "methods": [ + "get_capacity_commitment" + ] + }, + "DeleteCapacityCommitment": { + "methods": [ + "delete_capacity_commitment" + ] + }, + "UpdateCapacityCommitment": { + "methods": [ + "update_capacity_commitment" + ] + }, + "SplitCapacityCommitment": { + "methods": [ + "split_capacity_commitment" + ] + }, + "MergeCapacityCommitments": { + "methods": [ + "merge_capacity_commitments" + ] + }, + "CreateAssignment": { + "methods": [ + "create_assignment" + ] + }, + "ListAssignments": { + "methods": [ + "list_assignments" + ] + }, + "DeleteAssignment": { + "methods": [ + "delete_assignment" + ] + }, + "SearchAssignments": { + "methods": [ + "search_assignments" + ] + }, + "SearchAllAssignments": { + "methods": [ + "search_all_assignments" + ] + }, + "MoveAssignment": { + "methods": [ + "move_assignment" + ] + }, + "UpdateAssignment": { + "methods": [ + "update_assignment" + ] + }, + "GetBiReservation": { + "methods": [ + "get_bi_reservation" + ] + }, + "UpdateBiReservation": { + "methods": [ + "update_bi_reservation" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "CreateReservationGroup": { + "methods": [ + "create_reservation_group" + ] + }, + "GetReservationGroup": { + "methods": [ + "get_reservation_group" + ] + }, + "DeleteReservationGroup": { + "methods": [ + "delete_reservation_group" + ] + }, + "ListReservationGroups": { + "methods": [ + "list_reservation_groups" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec new file mode 100644 index 000000000000..aaa9a7ab3439 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/reservation/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-reservation-v1" + gem.version = Google::Cloud::Bigquery::Reservation::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. Note that google-cloud-bigquery-reservation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-reservation instead. See the readme for more details." + gem.summary = "A service to modify your BigQuery reservations." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.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-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb new file mode 100644 index 000000000000..2ad2aa32f13c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/bigquery/reservation/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb new file mode 100644 index 000000000000..155fb2af6d91 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/reservation/v1/reservation_service" +require "google/cloud/bigquery/reservation/v1/version" + +module Google + module Cloud + module Bigquery + module Reservation + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/reservation/v1" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/reservation/v1" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/bigquery/reservation/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb new file mode 100644 index 000000000000..0a0dbb35a131 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/reservation/v1/reservation.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n6google/cloud/bigquery/reservation/v1/reservation.proto\x12$google.cloud.bigquery.reservation.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xfc\x0c\n\x0bReservation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\rslot_capacity\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1e\n\x11ignore_idle_slots\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12S\n\tautoscale\x18\x07 \x01(\x0b\x32;.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleB\x03\xe0\x41\x01\x12\x18\n\x0b\x63oncurrency\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x36\n\rcreation_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\"\n\x16multi_region_auxiliary\x18\x0e \x01(\x08\x42\x02\x18\x01\x12\x43\n\x07\x65\x64ition\x18\x11 \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.EditionB\x03\xe0\x41\x01\x12\x43\n\x10primary_location\x18\x12 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x45\n\x12secondary_location\x18\x13 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!locations.googleapis.com/Location\x12L\n\x19original_primary_location\x18\x14 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\tmax_slots\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12X\n\x0cscaling_mode\x18\x16 \x01(\x0e\x32=.google.cloud.bigquery.reservation.v1.Reservation.ScalingModeB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x17 \x03(\x0b\x32=.google.cloud.bigquery.reservation.v1.Reservation.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x11reservation_group\x18\x19 \x01(\tB\x03\xe0\x41\x01\x12\x64\n\x12replication_status\x18\x18 \x01(\x0b\x32\x43.google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatusB\x03\xe0\x41\x03\x12V\n\x11scheduling_policy\x18\x1b \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xe0\x41\x01\x1a?\n\tAutoscale\x12\x1a\n\rcurrent_slots\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\tmax_slots\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x1a\xf8\x01\n\x11ReplicationStatus\x12&\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x38\n\x0flast_error_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x15last_replication_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x18soft_failover_start_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"c\n\x0bScalingMode\x12\x1c\n\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41UTOSCALE_ONLY\x10\x01\x12\x13\n\x0fIDLE_SLOTS_ONLY\x10\x02\x12\r\n\tALL_SLOTS\x10\x03:w\xea\x41t\n.bigqueryreservation.googleapis.com/Reservation\x12\x42projects/{project}/locations/{location}/reservations/{reservation}B\x0c\n\n_max_slots\"l\n\x10SchedulingPolicy\x12\x1d\n\x0b\x63oncurrency\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1b\n\tmax_slots\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x0e\n\x0c_concurrencyB\x0c\n\n_max_slots\"\xd5\x01\n\x10ReservationGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:\xad\x01\xea\x41\xa9\x01\n3bigqueryreservation.googleapis.com/ReservationGroup\x12Mprojects/{project}/locations/{location}/reservationGroups/{reservation_group}*\x11reservationGroups2\x10reservationGroup\"\xaa\x08\n\x12\x43\x61pacityCommitment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nslot_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12Z\n\x04plan\x18\x03 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xe0\x41\x01\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.bigquery.reservation.v1.CapacityCommitment.StateB\x03\xe0\x41\x03\x12>\n\x15\x63ommitment_start_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13\x63ommitment_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12/\n\x0e\x66\x61ilure_status\x18\x07 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x62\n\x0crenewal_plan\x18\x08 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xe0\x41\x01\x12\"\n\x16multi_region_auxiliary\x18\n \x01(\x08\x42\x02\x18\x01\x12\x43\n\x07\x65\x64ition\x18\x0c \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.EditionB\x03\xe0\x41\x01\x12\x19\n\x0cis_flat_rate\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\"\xca\x01\n\x0e\x43ommitmentPlan\x12\x1f\n\x1b\x43OMMITMENT_PLAN_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46LEX\x10\x03\x12\x16\n\x0e\x46LEX_FLAT_RATE\x10\x07\x1a\x02\x08\x01\x12\r\n\x05TRIAL\x10\x05\x1a\x02\x08\x01\x12\x0b\n\x07MONTHLY\x10\x02\x12\x19\n\x11MONTHLY_FLAT_RATE\x10\x08\x1a\x02\x08\x01\x12\n\n\x06\x41NNUAL\x10\x04\x12\x18\n\x10\x41NNUAL_FLAT_RATE\x10\t\x1a\x02\x08\x01\x12\x0e\n\nTHREE_YEAR\x10\n\x12\x08\n\x04NONE\x10\x06\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03:\x8e\x01\xea\x41\x8a\x01\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12Qprojects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}\"\xc2\x01\n\x18\x43reateReservationRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x16\n\x0ereservation_id\x18\x02 \x01(\t\x12\x46\n\x0breservation\x18\x03 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\"\x88\x01\n\x17ListReservationsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"|\n\x18ListReservationsResponse\x12G\n\x0creservations\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x15GetReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"`\n\x18\x44\x65leteReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"\x93\x01\n\x18UpdateReservationRequest\x12\x46\n\x0breservation\x18\x01 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb2\x01\n\x1a\x46\x61iloverReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\x12N\n\rfailover_mode\x18\x02 \x01(\x0e\x32\x32.google.cloud.bigquery.reservation.v1.FailoverModeB\x03\xe0\x41\x01\"\xe7\x01\n\x1d\x43reateReservationGroupRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x62igqueryreservation.googleapis.com/ReservationGroup\x12!\n\x14reservation_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x11reservation_group\x18\x03 \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.ReservationGroupB\x03\xe0\x41\x02\"g\n\x1aGetReservationGroupRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3bigqueryreservation.googleapis.com/ReservationGroup\"\x92\x01\n\x1cListReservationGroupsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x62igqueryreservation.googleapis.com/ReservationGroup\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8c\x01\n\x1dListReservationGroupsResponse\x12R\n\x12reservation_groups\x18\x01 \x03(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1d\x44\x65leteReservationGroupRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3bigqueryreservation.googleapis.com/ReservationGroup\"\x95\x02\n\x1f\x43reateCapacityCommitmentRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12U\n\x13\x63\x61pacity_commitment\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12,\n$enforce_single_admin_project_per_org\x18\x04 \x01(\x08\x12\x1e\n\x16\x63\x61pacity_commitment_id\x18\x05 \x01(\t\"\x96\x01\n\x1eListCapacityCommitmentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x92\x01\n\x1fListCapacityCommitmentsResponse\x12V\n\x14\x63\x61pacity_commitments\x18\x01 \x03(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x1cGetCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\"}\n\x1f\x44\x65leteCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"\xa9\x01\n\x1fUpdateCapacityCommitmentRequest\x12U\n\x13\x63\x61pacity_commitment\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x81\x01\n\x1eSplitCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x12\n\nslot_count\x18\x02 \x01(\x03\"\xb4\x01\n\x1fSplitCapacityCommitmentResponse\x12G\n\x05\x66irst\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12H\n\x06second\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\"\xb3\x01\n\x1fMergeCapacityCommitmentsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x1f\n\x17\x63\x61pacity_commitment_ids\x18\x02 \x03(\t\x12#\n\x16\x63\x61pacity_commitment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb1\x06\n\nAssignment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x61ssignee\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12O\n\x08job_type\x18\x03 \x01(\x0e\x32\x38.google.cloud.bigquery.reservation.v1.Assignment.JobTypeB\x03\xe0\x41\x01\x12J\n\x05state\x18\x06 \x01(\x0e\x32\x36.google.cloud.bigquery.reservation.v1.Assignment.StateB\x03\xe0\x41\x03\x12(\n\x19\x65nable_gemini_in_bigquery\x18\n \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12V\n\x11scheduling_policy\x18\x0b \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xe0\x41\x01\x12\x16\n\tprincipal\x18\x0c \x01(\tB\x03\xe0\x41\x01\"\xdc\x01\n\x07JobType\x12\x18\n\x14JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08PIPELINE\x10\x01\x12\t\n\x05QUERY\x10\x02\x12\x0f\n\x0bML_EXTERNAL\x10\x03\x12\x0e\n\nBACKGROUND\x10\x04\x12\x0e\n\nCONTINUOUS\x10\x06\x12\"\n\x1e\x42\x41\x43KGROUND_CHANGE_DATA_CAPTURE\x10\x07\x12$\n BACKGROUND_COLUMN_METADATA_INDEX\x10\x08\x12#\n\x1f\x42\x41\x43KGROUND_SEARCH_INDEX_REFRESH\x10\t\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02:\xa9\x01\xea\x41\xa5\x01\n-bigqueryreservation.googleapis.com/Assignment\x12[projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}*\x0b\x61ssignments2\nassignment\"\xbd\x01\n\x17\x43reateAssignmentRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x44\n\nassignment\x18\x02 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x15\n\rassignment_id\x18\x04 \x01(\t\"\x86\x01\n\x16ListAssignmentsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x17ListAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17\x44\x65leteAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\"\x8b\x01\n\x18SearchAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8e\x01\n\x1bSearchAllAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"{\n\x19SearchAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"~\n\x1cSearchAllAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbf\x01\n\x15MoveAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\x12J\n\x0e\x64\x65stination_id\x18\x03 \x01(\tB2\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x15\n\rassignment_id\x18\x05 \x01(\t\"\x90\x01\n\x17UpdateAssignmentRequest\x12\x44\n\nassignment\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"Y\n\x0eTableReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ndataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08table_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xae\x02\n\rBiReservation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04size\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12S\n\x10preferred_tables\x18\x05 \x03(\x0b\x32\x34.google.cloud.bigquery.reservation.v1.TableReferenceB\x03\xe0\x41\x01:l\xea\x41i\n0bigqueryreservation.googleapis.com/BiReservation\x12\x35projects/{project}/locations/{location}/biReservation\"a\n\x17GetBiReservationRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0bigqueryreservation.googleapis.com/BiReservation\"\x9a\x01\n\x1aUpdateBiReservationRequest\x12K\n\x0e\x62i_reservation\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.reservation.v1.BiReservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask*U\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x03*A\n\x0c\x46\x61iloverMode\x12\x1d\n\x19\x46\x41ILOVER_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SOFT\x10\x01\x12\x08\n\x04HARD\x10\x02\x32\xa3\x36\n\x12ReservationService\x12\xf1\x01\n\x11\x43reateReservation\x12>.google.cloud.bigquery.reservation.v1.CreateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"i\xda\x41!parent,reservation,reservation_id\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/reservations:\x0breservation\x12\xd4\x01\n\x10ListReservations\x12=.google.cloud.bigquery.reservation.v1.ListReservationsRequest\x1a>.google.cloud.bigquery.reservation.v1.ListReservationsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/reservations\x12\xc1\x01\n\x0eGetReservation\x12;.google.cloud.bigquery.reservation.v1.GetReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/reservations/*}\x12\xac\x01\n\x11\x44\x65leteReservation\x12>.google.cloud.bigquery.reservation.v1.DeleteReservationRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/reservations/*}\x12\xf3\x01\n\x11UpdateReservation\x12>.google.cloud.bigquery.reservation.v1.UpdateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"k\xda\x41\x17reservation,update_mask\x82\xd3\xe4\x93\x02K2/v1/{parent=projects/*/locations/*/reservations/*}/assignments:\nassignment\x12\xdf\x01\n\x0fListAssignments\x12<.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest\x1a=.google.cloud.bigquery.reservation.v1.ListAssignmentsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/reservations/*}/assignments\x12\xb8\x01\n\x10\x44\x65leteAssignment\x12=.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/reservations/*/assignments/*}\x12\xe5\x01\n\x11SearchAssignments\x12>.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest\x1a?.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse\"O\x88\x02\x01\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}:searchAssignments\x12\xee\x01\n\x14SearchAllAssignments\x12\x41.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest\x1a\x42.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse\"O\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}:searchAllAssignments\x12\xe5\x01\n\x0eMoveAssignment\x12;.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"d\xda\x41\x13name,destination_id\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move:\x01*\x12\xfb\x01\n\x10UpdateAssignment\x12=.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"v\xda\x41\x16\x61ssignment,update_mask\x82\xd3\xe4\x93\x02W2I/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}:\nassignment\x12\xc6\x01\n\x10GetBiReservation\x12=.google.cloud.bigquery.reservation.v1.GetBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/biReservation}\x12\x81\x02\n\x13UpdateBiReservation\x12@.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\"s\xda\x41\x1a\x62i_reservation,update_mask\x82\xd3\xe4\x93\x02P2>/v1/{bi_reservation.name=projects/*/locations/*/biReservation}:\x0e\x62i_reservation\x12\xf4\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xa8\x01\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x96\x01\x12\x41/v1/{resource=projects/*/locations/*/reservations/*}:getIamPolicyZQ\x12O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:getIamPolicy\x12\x81\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xb5\x01\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x9c\x01\"A/v1/{resource=projects/*/locations/*/reservations/*}:setIamPolicy:\x01*ZT\"O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:setIamPolicy:\x01*\x12\x9b\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xaf\x01\x82\xd3\xe4\x93\x02\xa8\x01\"G/v1/{resource=projects/*/locations/*/reservations/*}:testIamPermissions:\x01*ZZ\"U/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:testIamPermissions:\x01*\x12\xe7\x01\n\x16\x43reateReservationGroup\x12\x43.google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest\x1a\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\"P\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/reservationGroups:\x11reservation_group\x12\xd5\x01\n\x13GetReservationGroup\x12@.google.cloud.bigquery.reservation.v1.GetReservationGroupRequest\x1a\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xbb\x01\n\x16\x44\x65leteReservationGroup\x12\x43.google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xe8\x01\n\x15ListReservationGroups\x12\x42.google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest\x1a\x43.google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/reservationGroups\x1a\x7f\xca\x41\"bigqueryreservation.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xd8\x01\n(com.google.cloud.bigquery.reservation.v1B\x10ReservationProtoP\x01ZJcloud.google.com/go/bigquery/reservation/apiv1/reservationpb;reservationpb\xaa\x02$Google.Cloud.BigQuery.Reservation.V1\xca\x02$Google\\Cloud\\BigQuery\\Reservation\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + Reservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation").msgclass + Reservation::Autoscale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.Autoscale").msgclass + Reservation::ReplicationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus").msgclass + Reservation::ScalingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.ScalingMode").enummodule + SchedulingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SchedulingPolicy").msgclass + ReservationGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ReservationGroup").msgclass + CapacityCommitment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment").msgclass + CapacityCommitment::CommitmentPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan").enummodule + CapacityCommitment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.State").enummodule + CreateReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateReservationRequest").msgclass + ListReservationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationsRequest").msgclass + ListReservationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationsResponse").msgclass + GetReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetReservationRequest").msgclass + DeleteReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteReservationRequest").msgclass + UpdateReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateReservationRequest").msgclass + FailoverReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.FailoverReservationRequest").msgclass + CreateReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest").msgclass + GetReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetReservationGroupRequest").msgclass + ListReservationGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest").msgclass + ListReservationGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse").msgclass + DeleteReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest").msgclass + CreateCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest").msgclass + ListCapacityCommitmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest").msgclass + ListCapacityCommitmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsResponse").msgclass + GetCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest").msgclass + DeleteCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest").msgclass + UpdateCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest").msgclass + SplitCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest").msgclass + SplitCapacityCommitmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse").msgclass + MergeCapacityCommitmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest").msgclass + Assignment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment").msgclass + Assignment::JobType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment.JobType").enummodule + Assignment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment.State").enummodule + CreateAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateAssignmentRequest").msgclass + ListAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsRequest").msgclass + ListAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsResponse").msgclass + DeleteAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest").msgclass + SearchAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest").msgclass + SearchAllAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest").msgclass + SearchAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse").msgclass + SearchAllAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse").msgclass + MoveAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MoveAssignmentRequest").msgclass + UpdateAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest").msgclass + TableReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.TableReference").msgclass + BiReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.BiReservation").msgclass + GetBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetBiReservationRequest").msgclass + UpdateBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest").msgclass + Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Edition").enummodule + FailoverMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.FailoverMode").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb new file mode 100644 index 000000000000..2f3df98d3356 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/reservation/v1/version" + +require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" +require "google/cloud/bigquery/reservation/v1/reservation_service/paths" +require "google/cloud/bigquery/reservation/v1/reservation_service/client" +require "google/cloud/bigquery/reservation/v1/reservation_service/rest" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + ## + # This API allows users to manage their BigQuery reservations. + # + # A reservation provides computational resource guarantees, in the form of + # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a + # unit of computational power in BigQuery, and serves as the basic unit of + # parallelism. In a scan of a multi-partitioned table, a single slot operates + # on a single partition of the table. A reservation resource exists as a child + # resource of the admin project and location, e.g.: + # `projects/myproject/locations/US/reservations/reservationName`. + # + # A capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. A capacity + # commitment resource exists as a child resource of the admin project and + # location, e.g.: + # `projects/myproject/locations/US/capacityCommitments/id`. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/reservation/v1/reservation_service" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/reservation/v1/reservation_service/rest" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + module ReservationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "reservation_service", "helpers.rb" +require "google/cloud/bigquery/reservation/v1/reservation_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb new file mode 100644 index 000000000000..71c3545c8e3a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb @@ -0,0 +1,3516 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/reservation/v1/reservation_pb" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + ## + # Client for the ReservationService service. + # + # This API allows users to manage their BigQuery reservations. + # + # A reservation provides computational resource guarantees, in the form of + # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a + # unit of computational power in BigQuery, and serves as the basic unit of + # parallelism. In a scan of a multi-partitioned table, a single slot operates + # on a single partition of the table. A reservation resource exists as a child + # resource of the admin project and location, e.g.: + # `projects/myproject/locations/US/reservations/reservationName`. + # + # A capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. A capacity + # commitment resource exists as a child resource of the admin project and + # location, e.g.: + # `projects/myproject/locations/US/capacityCommitments/id`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigqueryreservation.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reservation_service_stub + + ## + # Configure the ReservationService Client class. + # + # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReservationService clients + # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "Reservation", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_reservation.timeout = 300.0 + + default_config.rpcs.list_reservations.timeout = 300.0 + default_config.rpcs.list_reservations.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_reservation.timeout = 300.0 + default_config.rpcs.get_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_reservation.timeout = 300.0 + default_config.rpcs.delete_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_reservation.timeout = 300.0 + + default_config.rpcs.failover_reservation.timeout = 300.0 + + default_config.rpcs.create_capacity_commitment.timeout = 300.0 + + default_config.rpcs.list_capacity_commitments.timeout = 300.0 + default_config.rpcs.list_capacity_commitments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_capacity_commitment.timeout = 300.0 + default_config.rpcs.get_capacity_commitment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_capacity_commitment.timeout = 300.0 + default_config.rpcs.delete_capacity_commitment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_capacity_commitment.timeout = 300.0 + + default_config.rpcs.split_capacity_commitment.timeout = 300.0 + + default_config.rpcs.merge_capacity_commitments.timeout = 300.0 + + default_config.rpcs.create_assignment.timeout = 300.0 + + default_config.rpcs.list_assignments.timeout = 300.0 + default_config.rpcs.list_assignments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_assignment.timeout = 300.0 + default_config.rpcs.delete_assignment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_assignments.timeout = 300.0 + default_config.rpcs.search_assignments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.move_assignment.timeout = 300.0 + + default_config.rpcs.get_bi_reservation.timeout = 300.0 + default_config.rpcs.get_bi_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_bi_reservation.timeout = 300.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReservationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @reservation_service_stub.universe_domain + end + + ## + # Create a new ReservationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReservationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/bigquery/reservation/v1/reservation_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @reservation_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @reservation_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reservation_service_stub.logger + end + + # Service calls + + ## + # Creates a new reservation resource. + # + # @overload create_reservation(request, options = nil) + # Pass arguments to `create_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_reservation(parent: nil, reservation_id: nil, reservation: nil) + # Pass arguments to `create_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project, location. E.g., + # `projects/myproject/locations/US` + # @param reservation_id [::String] + # The reservation ID. It must only contain lower case alphanumeric + # characters or dashes. It must start with a letter and must not end + # with a dash. Its maximum length is 64 characters. + # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] + # Definition of the new reservation to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new + # + # # Call the create_reservation method. + # result = client.create_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def create_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :create_reservation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the reservations for the project in the specified location. + # + # @overload list_reservations(request, options = nil) + # Pass arguments to `list_reservations` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_reservations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reservations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new + # + # # Call the list_reservations method. + # result = client.list_reservations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p item + # end + # + def list_reservations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_reservations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_reservations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reservations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :list_reservations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_reservations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about the reservation. + # + # @overload get_reservation(request, options = nil) + # Pass arguments to `get_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_reservation(name: nil) + # Pass arguments to `get_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new + # + # # Call the get_reservation method. + # result = client.get_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def get_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :get_reservation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + # + # @overload delete_reservation(request, options = nil) + # Pass arguments to `delete_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_reservation(name: nil) + # Pass arguments to `delete_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new + # + # # Call the delete_reservation method. + # result = client.delete_reservation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :delete_reservation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing reservation resource. + # + # @overload update_reservation(request, options = nil) + # Pass arguments to `update_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_reservation(reservation: nil, update_mask: nil) + # Pass arguments to `update_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] + # Content of the reservation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new + # + # # Call the update_reservation method. + # result = client.update_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def update_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.reservation&.name + header_params["reservation.name"] = request.reservation.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :update_reservation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fail over a reservation to the secondary location. The operation should be + # done in the current secondary location, which will be promoted to the + # new primary location for the reservation. + # Attempting to failover a reservation in the current primary location will + # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload failover_reservation(request, options = nil) + # Pass arguments to `failover_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload failover_reservation(name: nil, failover_mode: nil) + # Pass arguments to `failover_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation to failover. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # @param failover_mode [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] + # Optional. A parameter that determines how writes that are pending + # replication are handled after a failover is initiated. If not specified, + # HARD failover mode is used by default. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new + # + # # Call the failover_reservation method. + # result = client.failover_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def failover_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.failover_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.failover_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.failover_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :failover_reservation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new capacity commitment resource. + # + # @overload create_capacity_commitment(request, options = nil) + # Pass arguments to `create_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil, capacity_commitment_id: nil) + # Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] + # Content of the capacity commitment to create. + # @param enforce_single_admin_project_per_org [::Boolean] + # If true, fail the request if another project in the organization has a + # capacity commitment. + # @param capacity_commitment_id [::String] + # The optional capacity commitment ID. Capacity commitment name will be + # generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + # NOTE: this ID won't be kept if the capacity commitment is split or merged. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new + # + # # Call the create_capacity_commitment method. + # result = client.create_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def create_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_capacity_commitment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_capacity_commitment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :create_capacity_commitment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the capacity commitments for the admin project. + # + # @overload list_capacity_commitments(request, options = nil) + # Pass arguments to `list_capacity_commitments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_capacity_commitments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_capacity_commitments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new + # + # # Call the list_capacity_commitments method. + # result = client.list_capacity_commitments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p item + # end + # + def list_capacity_commitments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_capacity_commitments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_capacity_commitments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_capacity_commitments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :list_capacity_commitments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_capacity_commitments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about the capacity commitment. + # + # @overload get_capacity_commitment(request, options = nil) + # Pass arguments to `get_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_capacity_commitment(name: nil) + # Pass arguments to `get_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the capacity commitment to retrieve. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new + # + # # Call the get_capacity_commitment method. + # result = client.get_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def get_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_capacity_commitment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_capacity_commitment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :get_capacity_commitment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a capacity commitment. Attempting to delete capacity commitment + # before its commitment_end_time will fail with the error code + # `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload delete_capacity_commitment(request, options = nil) + # Pass arguments to `delete_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_capacity_commitment(name: nil, force: nil) + # Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the capacity commitment to delete. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # @param force [::Boolean] + # Can be used to force delete commitments even if assignments exist. Deleting + # commitments with assignments may cause queries to fail if they no longer + # have access to slots. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new + # + # # Call the delete_capacity_commitment method. + # result = client.delete_capacity_commitment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_capacity_commitment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_capacity_commitment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :delete_capacity_commitment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing capacity commitment. + # + # Only `plan` and `renewal_plan` fields can be updated. + # + # Plan can only be changed to a plan of a longer commitment period. + # Attempting to change to a plan with shorter commitment period will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload update_capacity_commitment(request, options = nil) + # Pass arguments to `update_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_capacity_commitment(capacity_commitment: nil, update_mask: nil) + # Pass arguments to `update_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] + # Content of the capacity commitment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new + # + # # Call the update_capacity_commitment method. + # result = client.update_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def update_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_capacity_commitment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.capacity_commitment&.name + header_params["capacity_commitment.name"] = request.capacity_commitment.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_capacity_commitment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :update_capacity_commitment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Splits capacity commitment to two commitments of the same plan and + # `commitment_end_time`. + # + # A common use case is to enable downgrading commitments. + # + # For example, in order to downgrade from 10000 slots to 8000, you might + # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, + # you delete the first one after the commitment end time passes. + # + # @overload split_capacity_commitment(request, options = nil) + # Pass arguments to `split_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload split_capacity_commitment(name: nil, slot_count: nil) + # Pass arguments to `split_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name e.g.,: + # `projects/myproject/locations/US/capacityCommitments/123` + # @param slot_count [::Integer] + # Number of slots in the capacity commitment after the split. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new + # + # # Call the split_capacity_commitment method. + # result = client.split_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. + # p result + # + def split_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.split_capacity_commitment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.split_capacity_commitment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.split_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :split_capacity_commitment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Merges capacity commitments of the same plan into a single commitment. + # + # The resulting capacity commitment has the greater commitment_end_time + # out of the to-be-merged capacity commitments. + # + # Attempting to merge capacity commitments of different plan will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload merge_capacity_commitments(request, options = nil) + # Pass arguments to `merge_capacity_commitments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload merge_capacity_commitments(parent: nil, capacity_commitment_ids: nil, capacity_commitment_id: nil) + # Pass arguments to `merge_capacity_commitments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent resource that identifies admin project and location e.g., + # `projects/myproject/locations/us` + # @param capacity_commitment_ids [::Array<::String>] + # Ids of capacity commitments to merge. + # These capacity commitments must exist under admin project and location + # specified in the parent. + # ID is the last portion of capacity commitment name e.g., 'abc' for + # projects/myproject/locations/US/capacityCommitments/abc + # @param capacity_commitment_id [::String] + # Optional. The optional resulting capacity commitment ID. Capacity + # commitment name will be generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new + # + # # Call the merge_capacity_commitments method. + # result = client.merge_capacity_commitments request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def merge_capacity_commitments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.merge_capacity_commitments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.merge_capacity_commitments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :merge_capacity_commitments, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an assignment object which allows the given project to submit jobs + # of a certain type using slots from the specified reservation. + # + # Currently a + # resource (project, folder, organization) can only have one assignment per + # each (job_type, location) combination, and that reservation will be used + # for all jobs of the matching type. + # + # Different assignments can be created on different levels of the + # projects, folders or organization hierarchy. During query execution, + # the assignment is looked up at the project, folder and organization levels + # in that order. The first assignment found is applied to the query. + # + # When creating assignments, it does not matter if other assignments exist at + # higher levels. + # + # Example: + # + # * The organization `organizationA` contains two projects, `project1` + # and `project2`. + # * Assignments for all three entities (`organizationA`, `project1`, and + # `project2`) could all be created and mapped to the same or different + # reservations. + # + # "None" assignments represent an absence of the assignment. Projects + # assigned to None use on-demand pricing. To create a "None" assignment, use + # "none" as a reservation_id in the parent. Example parent: + # `projects/myproject/locations/US/reservations/none`. + # + # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have + # 'bigquery.admin' permissions on the project using the reservation + # and the project that owns this reservation. + # + # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment + # does not match location of the reservation. + # + # @overload create_assignment(request, options = nil) + # Pass arguments to `create_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_assignment(parent: nil, assignment: nil, assignment_id: nil) + # Pass arguments to `create_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name of the assignment + # E.g. `projects/myproject/locations/US/reservations/team1-prod` + # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] + # Assignment resource to create. + # @param assignment_id [::String] + # The optional assignment ID. Assignment name will be generated automatically + # if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # Max length is 64 characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new + # + # # Call the create_assignment method. + # result = client.create_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def create_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_assignment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_assignment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :create_assignment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists assignments. + # + # Only explicitly created assignments will be returned. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, ListAssignments will just return the above two assignments + # for reservation `res1`, and no expansion/merge will happen. + # + # The wildcard "-" can be used for + # reservations in the request. In that case all assignments belongs to the + # specified project and location will be listed. + # + # **Note** "-" cannot be used for projects nor locations. + # + # @overload list_assignments(request, options = nil) + # Pass arguments to `list_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_assignments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_assignments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name e.g.: + # + # `projects/myproject/locations/US/reservations/team1-prod` + # + # Or: + # + # `projects/myproject/locations/US/reservations/-` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new + # + # # Call the list_assignments method. + # result = client.list_assignments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def list_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_assignments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_assignments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :list_assignments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_assignments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a assignment. No expansion will happen. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, deletion of the `` assignment won't + # affect the other assignment ``. After said deletion, + # queries from `project1` will still use `res1` while queries from + # `project2` will switch to use on-demand mode. + # + # @overload delete_assignment(request, options = nil) + # Pass arguments to `delete_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_assignment(name: nil) + # Pass arguments to `delete_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource, e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new + # + # # Call the delete_assignment method. + # result = client.delete_assignment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_assignment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_assignment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :delete_assignment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deprecated: Looks up assignments for a specified resource for a particular + # region. If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + # + # **Note** "-" cannot be used for projects + # nor locations. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload search_assignments(request, options = nil) + # Pass arguments to `search_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_assignments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the admin project(containing project and + # location), e.g.: + # `projects/myproject/locations/US`. + # @param query [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new + # + # # Call the search_assignments method. + # result = client.search_assignments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def search_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_assignments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_assignments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :search_assignments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_assignments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up assignments for a specified resource for a particular region. + # If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + # + # @overload search_all_assignments(request, options = nil) + # Pass arguments to `search_all_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_all_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_all_assignments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name with location (project name could be the + # wildcard '-'), e.g.: + # `projects/-/locations/US`. + # @param query [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new + # + # # Call the search_all_assignments method. + # result = client.search_all_assignments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def search_all_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_all_assignments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_all_assignments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_all_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :search_all_assignments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_all_assignments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Moves an assignment under a new reservation. + # + # This differs from removing an existing assignment and recreating a new one + # by providing a transactional change that ensures an assignee always has an + # associated reservation. + # + # @overload move_assignment(request, options = nil) + # Pass arguments to `move_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload move_assignment(name: nil, destination_id: nil, assignment_id: nil) + # Pass arguments to `move_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the assignment, + # e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + # @param destination_id [::String] + # The new reservation ID, e.g.: + # `projects/myotherproject/locations/US/reservations/team2-prod` + # @param assignment_id [::String] + # The optional assignment ID. A new assignment name is generated if this + # field is empty. + # + # This field can contain only lowercase alphanumeric characters or dashes. + # Max length is 64 characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new + # + # # Call the move_assignment method. + # result = client.move_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def move_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.move_assignment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.move_assignment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.move_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :move_assignment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing assignment. + # + # Only the `priority` field can be updated. + # + # @overload update_assignment(request, options = nil) + # Pass arguments to `update_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_assignment(assignment: nil, update_mask: nil) + # Pass arguments to `update_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] + # Content of the assignment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new + # + # # Call the update_assignment method. + # result = client.update_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def update_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_assignment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.assignment&.name + header_params["assignment.name"] = request.assignment.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_assignment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :update_assignment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a BI reservation. + # + # @overload get_bi_reservation(request, options = nil) + # Pass arguments to `get_bi_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_bi_reservation(name: nil) + # Pass arguments to `get_bi_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested reservation, for example: + # `projects/{project_id}/locations/{location_id}/biReservation` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new + # + # # Call the get_bi_reservation method. + # result = client.get_bi_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + # p result + # + def get_bi_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_bi_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_bi_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_bi_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :get_bi_reservation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a BI reservation. + # + # Only fields specified in the `field_mask` are updated. + # + # A singleton BI reservation always exists with default size 0. + # In order to reserve BI capacity it needs to be updated to an amount + # greater than 0. In order to release BI capacity reservation size + # must be set to 0. + # + # @overload update_bi_reservation(request, options = nil) + # Pass arguments to `update_bi_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_bi_reservation(bi_reservation: nil, update_mask: nil) + # Pass arguments to `update_bi_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param bi_reservation [::Google::Cloud::Bigquery::Reservation::V1::BiReservation, ::Hash] + # A reservation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A list of fields to be updated in this request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new + # + # # Call the update_bi_reservation method. + # result = client.update_bi_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + # p result + # + def update_bi_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_bi_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.bi_reservation&.name + header_params["bi_reservation.name"] = request.bi_reservation.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_bi_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_bi_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :update_bi_reservation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a resource. + # May return: + # + # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the + # permission to view it. + # * An empty policy if the resource exists but doesn't have a set policy. + # + # Supported resources are: + # - Reservations + # - ReservationAssignments + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.getIamPolicy` to get policies on + # reservations. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets an access control policy for a resource. Replaces any existing + # policy. + # + # Supported resources are: + # - Reservations + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.setIamPolicy` to set policies on + # reservations. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets your permissions on a resource. Returns an empty set of permissions if + # the resource doesn't exist. + # + # Supported resources are: + # - Reservations + # + # No Google IAM permissions are required to call this method. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new reservation group. + # + # @overload create_reservation_group(request, options = nil) + # Pass arguments to `create_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_reservation_group(parent: nil, reservation_group_id: nil, reservation_group: nil) + # Pass arguments to `create_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project, location. E.g., + # `projects/myproject/locations/US` + # @param reservation_group_id [::String] + # Required. The reservation group ID. It must only contain lower case + # alphanumeric characters or dashes. It must start with a letter and must not + # end with a dash. Its maximum length is 64 characters. + # @param reservation_group [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup, ::Hash] + # Required. New Reservation Group to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new + # + # # Call the create_reservation_group method. + # result = client.create_reservation_group request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p result + # + def create_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_reservation_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :create_reservation_group, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about the reservation group. + # + # @overload get_reservation_group(request, options = nil) + # Pass arguments to `get_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_reservation_group(name: nil) + # Pass arguments to `get_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new + # + # # Call the get_reservation_group method. + # result = client.get_reservation_group request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p result + # + def get_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_reservation_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :get_reservation_group, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + # + # @overload delete_reservation_group(request, options = nil) + # Pass arguments to `delete_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_reservation_group(name: nil) + # Pass arguments to `delete_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new + # + # # Call the delete_reservation_group method. + # result = client.delete_reservation_group request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_reservation_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :delete_reservation_group, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the reservation groups for the project in the specified location. + # + # @overload list_reservation_groups(request, options = nil) + # Pass arguments to `list_reservation_groups` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_reservation_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reservation_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new + # + # # Call the list_reservation_groups method. + # result = client.list_reservation_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p item + # end + # + def list_reservation_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_reservation_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_reservation_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reservation_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :list_reservation_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_reservation_groups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ReservationService API. + # + # This class represents the configuration for ReservationService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_reservation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_reservation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_reservation.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "bigqueryreservation.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ReservationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reservation + ## + # RPC-specific configuration for `list_reservations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reservations + ## + # RPC-specific configuration for `get_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reservation + ## + # RPC-specific configuration for `delete_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_reservation + ## + # RPC-specific configuration for `update_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_reservation + ## + # RPC-specific configuration for `failover_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :failover_reservation + ## + # RPC-specific configuration for `create_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_capacity_commitment + ## + # RPC-specific configuration for `list_capacity_commitments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_capacity_commitments + ## + # RPC-specific configuration for `get_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_capacity_commitment + ## + # RPC-specific configuration for `delete_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_capacity_commitment + ## + # RPC-specific configuration for `update_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_capacity_commitment + ## + # RPC-specific configuration for `split_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :split_capacity_commitment + ## + # RPC-specific configuration for `merge_capacity_commitments` + # @return [::Gapic::Config::Method] + # + attr_reader :merge_capacity_commitments + ## + # RPC-specific configuration for `create_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_assignment + ## + # RPC-specific configuration for `list_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assignments + ## + # RPC-specific configuration for `delete_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_assignment + ## + # RPC-specific configuration for `search_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :search_assignments + ## + # RPC-specific configuration for `search_all_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :search_all_assignments + ## + # RPC-specific configuration for `move_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :move_assignment + ## + # RPC-specific configuration for `update_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_assignment + ## + # RPC-specific configuration for `get_bi_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_bi_reservation + ## + # RPC-specific configuration for `update_bi_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_bi_reservation + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reservation_group + ## + # RPC-specific configuration for `get_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reservation_group + ## + # RPC-specific configuration for `delete_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_reservation_group + ## + # RPC-specific configuration for `list_reservation_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reservation_groups + + # @private + def initialize parent_rpcs = nil + create_reservation_config = parent_rpcs.create_reservation if parent_rpcs.respond_to? :create_reservation + @create_reservation = ::Gapic::Config::Method.new create_reservation_config + list_reservations_config = parent_rpcs.list_reservations if parent_rpcs.respond_to? :list_reservations + @list_reservations = ::Gapic::Config::Method.new list_reservations_config + get_reservation_config = parent_rpcs.get_reservation if parent_rpcs.respond_to? :get_reservation + @get_reservation = ::Gapic::Config::Method.new get_reservation_config + delete_reservation_config = parent_rpcs.delete_reservation if parent_rpcs.respond_to? :delete_reservation + @delete_reservation = ::Gapic::Config::Method.new delete_reservation_config + update_reservation_config = parent_rpcs.update_reservation if parent_rpcs.respond_to? :update_reservation + @update_reservation = ::Gapic::Config::Method.new update_reservation_config + failover_reservation_config = parent_rpcs.failover_reservation if parent_rpcs.respond_to? :failover_reservation + @failover_reservation = ::Gapic::Config::Method.new failover_reservation_config + create_capacity_commitment_config = parent_rpcs.create_capacity_commitment if parent_rpcs.respond_to? :create_capacity_commitment + @create_capacity_commitment = ::Gapic::Config::Method.new create_capacity_commitment_config + list_capacity_commitments_config = parent_rpcs.list_capacity_commitments if parent_rpcs.respond_to? :list_capacity_commitments + @list_capacity_commitments = ::Gapic::Config::Method.new list_capacity_commitments_config + get_capacity_commitment_config = parent_rpcs.get_capacity_commitment if parent_rpcs.respond_to? :get_capacity_commitment + @get_capacity_commitment = ::Gapic::Config::Method.new get_capacity_commitment_config + delete_capacity_commitment_config = parent_rpcs.delete_capacity_commitment if parent_rpcs.respond_to? :delete_capacity_commitment + @delete_capacity_commitment = ::Gapic::Config::Method.new delete_capacity_commitment_config + update_capacity_commitment_config = parent_rpcs.update_capacity_commitment if parent_rpcs.respond_to? :update_capacity_commitment + @update_capacity_commitment = ::Gapic::Config::Method.new update_capacity_commitment_config + split_capacity_commitment_config = parent_rpcs.split_capacity_commitment if parent_rpcs.respond_to? :split_capacity_commitment + @split_capacity_commitment = ::Gapic::Config::Method.new split_capacity_commitment_config + merge_capacity_commitments_config = parent_rpcs.merge_capacity_commitments if parent_rpcs.respond_to? :merge_capacity_commitments + @merge_capacity_commitments = ::Gapic::Config::Method.new merge_capacity_commitments_config + create_assignment_config = parent_rpcs.create_assignment if parent_rpcs.respond_to? :create_assignment + @create_assignment = ::Gapic::Config::Method.new create_assignment_config + list_assignments_config = parent_rpcs.list_assignments if parent_rpcs.respond_to? :list_assignments + @list_assignments = ::Gapic::Config::Method.new list_assignments_config + delete_assignment_config = parent_rpcs.delete_assignment if parent_rpcs.respond_to? :delete_assignment + @delete_assignment = ::Gapic::Config::Method.new delete_assignment_config + search_assignments_config = parent_rpcs.search_assignments if parent_rpcs.respond_to? :search_assignments + @search_assignments = ::Gapic::Config::Method.new search_assignments_config + search_all_assignments_config = parent_rpcs.search_all_assignments if parent_rpcs.respond_to? :search_all_assignments + @search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config + move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment + @move_assignment = ::Gapic::Config::Method.new move_assignment_config + update_assignment_config = parent_rpcs.update_assignment if parent_rpcs.respond_to? :update_assignment + @update_assignment = ::Gapic::Config::Method.new update_assignment_config + get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation + @get_bi_reservation = ::Gapic::Config::Method.new get_bi_reservation_config + update_bi_reservation_config = parent_rpcs.update_bi_reservation if parent_rpcs.respond_to? :update_bi_reservation + @update_bi_reservation = ::Gapic::Config::Method.new update_bi_reservation_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_reservation_group_config = parent_rpcs.create_reservation_group if parent_rpcs.respond_to? :create_reservation_group + @create_reservation_group = ::Gapic::Config::Method.new create_reservation_group_config + get_reservation_group_config = parent_rpcs.get_reservation_group if parent_rpcs.respond_to? :get_reservation_group + @get_reservation_group = ::Gapic::Config::Method.new get_reservation_group_config + delete_reservation_group_config = parent_rpcs.delete_reservation_group if parent_rpcs.respond_to? :delete_reservation_group + @delete_reservation_group = ::Gapic::Config::Method.new delete_reservation_group_config + list_reservation_groups_config = parent_rpcs.list_reservation_groups if parent_rpcs.respond_to? :list_reservation_groups + @list_reservation_groups = ::Gapic::Config::Method.new list_reservation_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb new file mode 100644 index 000000000000..a7158a1de8b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + # Credentials for the ReservationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BIGQUERY_RESERVATION_CREDENTIALS", + "BIGQUERY_RESERVATION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BIGQUERY_RESERVATION_CREDENTIALS_JSON", + "BIGQUERY_RESERVATION_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb new file mode 100644 index 000000000000..24dc5bcf219f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + # Path helper methods for the ReservationService API. + module Paths + ## + # Create a fully-qualified Assignment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}` + # + # @param project [String] + # @param location [String] + # @param reservation [String] + # @param assignment [String] + # + # @return [::String] + def assignment_path project:, location:, reservation:, assignment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "reservation cannot contain /" if reservation.to_s.include? "/" + + "projects/#{project}/locations/#{location}/reservations/#{reservation}/assignments/#{assignment}" + end + + ## + # Create a fully-qualified BiReservation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/biReservation` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def bi_reservation_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/biReservation" + end + + ## + # Create a fully-qualified CapacityCommitment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}` + # + # @param project [String] + # @param location [String] + # @param capacity_commitment [String] + # + # @return [::String] + def capacity_commitment_path project:, location:, capacity_commitment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/capacityCommitments/#{capacity_commitment}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Reservation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/reservations/{reservation}` + # + # @param project [String] + # @param location [String] + # @param reservation [String] + # + # @return [::String] + def reservation_path project:, location:, reservation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/reservations/#{reservation}" + end + + ## + # Create a fully-qualified ReservationGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/reservationGroups/{reservation_group}` + # + # @param project [String] + # @param location [String] + # @param reservation_group [String] + # + # @return [::String] + def reservation_group_path project:, location:, reservation_group: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/reservationGroups/#{reservation_group}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb new file mode 100644 index 000000000000..41e991c06c3e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/reservation/v1/version" + +require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" +require "google/cloud/bigquery/reservation/v1/reservation_service/paths" +require "google/cloud/bigquery/reservation/v1/reservation_service/rest/client" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + ## + # This API allows users to manage their BigQuery reservations. + # + # A reservation provides computational resource guarantees, in the form of + # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a + # unit of computational power in BigQuery, and serves as the basic unit of + # parallelism. In a scan of a multi-partitioned table, a single slot operates + # on a single partition of the table. A reservation resource exists as a child + # resource of the admin project and location, e.g.: + # `projects/myproject/locations/US/reservations/reservationName`. + # + # A capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. A capacity + # commitment resource exists as a child resource of the admin project and + # location, e.g.: + # `projects/myproject/locations/US/capacityCommitments/id`. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/reservation/v1/reservation_service/rest" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + module ReservationService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/reservation/v1/reservation_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb new file mode 100644 index 000000000000..d225ac8bf66e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb @@ -0,0 +1,3268 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/reservation/v1/reservation_pb" +require "google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + module Rest + ## + # REST client for the ReservationService service. + # + # This API allows users to manage their BigQuery reservations. + # + # A reservation provides computational resource guarantees, in the form of + # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a + # unit of computational power in BigQuery, and serves as the basic unit of + # parallelism. In a scan of a multi-partitioned table, a single slot operates + # on a single partition of the table. A reservation resource exists as a child + # resource of the admin project and location, e.g.: + # `projects/myproject/locations/US/reservations/reservationName`. + # + # A capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. A capacity + # commitment resource exists as a child resource of the admin project and + # location, e.g.: + # `projects/myproject/locations/US/capacityCommitments/id`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigqueryreservation.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reservation_service_stub + + ## + # Configure the ReservationService Client class. + # + # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReservationService clients + # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "Reservation", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_reservation.timeout = 300.0 + + default_config.rpcs.list_reservations.timeout = 300.0 + default_config.rpcs.list_reservations.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_reservation.timeout = 300.0 + default_config.rpcs.get_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_reservation.timeout = 300.0 + default_config.rpcs.delete_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_reservation.timeout = 300.0 + + default_config.rpcs.failover_reservation.timeout = 300.0 + + default_config.rpcs.create_capacity_commitment.timeout = 300.0 + + default_config.rpcs.list_capacity_commitments.timeout = 300.0 + default_config.rpcs.list_capacity_commitments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_capacity_commitment.timeout = 300.0 + default_config.rpcs.get_capacity_commitment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_capacity_commitment.timeout = 300.0 + default_config.rpcs.delete_capacity_commitment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_capacity_commitment.timeout = 300.0 + + default_config.rpcs.split_capacity_commitment.timeout = 300.0 + + default_config.rpcs.merge_capacity_commitments.timeout = 300.0 + + default_config.rpcs.create_assignment.timeout = 300.0 + + default_config.rpcs.list_assignments.timeout = 300.0 + default_config.rpcs.list_assignments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_assignment.timeout = 300.0 + default_config.rpcs.delete_assignment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_assignments.timeout = 300.0 + default_config.rpcs.search_assignments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.move_assignment.timeout = 300.0 + + default_config.rpcs.get_bi_reservation.timeout = 300.0 + default_config.rpcs.get_bi_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_bi_reservation.timeout = 300.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReservationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @reservation_service_stub.universe_domain + end + + ## + # Create a new ReservationService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReservationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @reservation_service_stub = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @reservation_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reservation_service_stub.logger + end + + # Service calls + + ## + # Creates a new reservation resource. + # + # @overload create_reservation(request, options = nil) + # Pass arguments to `create_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_reservation(parent: nil, reservation_id: nil, reservation: nil) + # Pass arguments to `create_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project, location. E.g., + # `projects/myproject/locations/US` + # @param reservation_id [::String] + # The reservation ID. It must only contain lower case alphanumeric + # characters or dashes. It must start with a letter and must not end + # with a dash. Its maximum length is 64 characters. + # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] + # Definition of the new reservation to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new + # + # # Call the create_reservation method. + # result = client.create_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def create_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.create_reservation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the reservations for the project in the specified location. + # + # @overload list_reservations(request, options = nil) + # Pass arguments to `list_reservations` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_reservations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reservations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new + # + # # Call the list_reservations method. + # result = client.list_reservations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p item + # end + # + def list_reservations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_reservations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_reservations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reservations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.list_reservations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_reservations, "reservations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about the reservation. + # + # @overload get_reservation(request, options = nil) + # Pass arguments to `get_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_reservation(name: nil) + # Pass arguments to `get_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new + # + # # Call the get_reservation method. + # result = client.get_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def get_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.get_reservation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + # + # @overload delete_reservation(request, options = nil) + # Pass arguments to `delete_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_reservation(name: nil) + # Pass arguments to `delete_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new + # + # # Call the delete_reservation method. + # result = client.delete_reservation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.delete_reservation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing reservation resource. + # + # @overload update_reservation(request, options = nil) + # Pass arguments to `update_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_reservation(reservation: nil, update_mask: nil) + # Pass arguments to `update_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] + # Content of the reservation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new + # + # # Call the update_reservation method. + # result = client.update_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def update_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.update_reservation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fail over a reservation to the secondary location. The operation should be + # done in the current secondary location, which will be promoted to the + # new primary location for the reservation. + # Attempting to failover a reservation in the current primary location will + # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload failover_reservation(request, options = nil) + # Pass arguments to `failover_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload failover_reservation(name: nil, failover_mode: nil) + # Pass arguments to `failover_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation to failover. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # @param failover_mode [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] + # Optional. A parameter that determines how writes that are pending + # replication are handled after a failover is initiated. If not specified, + # HARD failover mode is used by default. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new + # + # # Call the failover_reservation method. + # result = client.failover_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def failover_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.failover_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.failover_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.failover_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.failover_reservation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new capacity commitment resource. + # + # @overload create_capacity_commitment(request, options = nil) + # Pass arguments to `create_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil, capacity_commitment_id: nil) + # Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] + # Content of the capacity commitment to create. + # @param enforce_single_admin_project_per_org [::Boolean] + # If true, fail the request if another project in the organization has a + # capacity commitment. + # @param capacity_commitment_id [::String] + # The optional capacity commitment ID. Capacity commitment name will be + # generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + # NOTE: this ID won't be kept if the capacity commitment is split or merged. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new + # + # # Call the create_capacity_commitment method. + # result = client.create_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def create_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_capacity_commitment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_capacity_commitment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.create_capacity_commitment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the capacity commitments for the admin project. + # + # @overload list_capacity_commitments(request, options = nil) + # Pass arguments to `list_capacity_commitments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_capacity_commitments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_capacity_commitments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new + # + # # Call the list_capacity_commitments method. + # result = client.list_capacity_commitments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p item + # end + # + def list_capacity_commitments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_capacity_commitments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_capacity_commitments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_capacity_commitments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.list_capacity_commitments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_capacity_commitments, "capacity_commitments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about the capacity commitment. + # + # @overload get_capacity_commitment(request, options = nil) + # Pass arguments to `get_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_capacity_commitment(name: nil) + # Pass arguments to `get_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the capacity commitment to retrieve. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new + # + # # Call the get_capacity_commitment method. + # result = client.get_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def get_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_capacity_commitment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_capacity_commitment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.get_capacity_commitment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a capacity commitment. Attempting to delete capacity commitment + # before its commitment_end_time will fail with the error code + # `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload delete_capacity_commitment(request, options = nil) + # Pass arguments to `delete_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_capacity_commitment(name: nil, force: nil) + # Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the capacity commitment to delete. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # @param force [::Boolean] + # Can be used to force delete commitments even if assignments exist. Deleting + # commitments with assignments may cause queries to fail if they no longer + # have access to slots. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new + # + # # Call the delete_capacity_commitment method. + # result = client.delete_capacity_commitment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_capacity_commitment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_capacity_commitment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.delete_capacity_commitment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing capacity commitment. + # + # Only `plan` and `renewal_plan` fields can be updated. + # + # Plan can only be changed to a plan of a longer commitment period. + # Attempting to change to a plan with shorter commitment period will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload update_capacity_commitment(request, options = nil) + # Pass arguments to `update_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_capacity_commitment(capacity_commitment: nil, update_mask: nil) + # Pass arguments to `update_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] + # Content of the capacity commitment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new + # + # # Call the update_capacity_commitment method. + # result = client.update_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def update_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_capacity_commitment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_capacity_commitment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.update_capacity_commitment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Splits capacity commitment to two commitments of the same plan and + # `commitment_end_time`. + # + # A common use case is to enable downgrading commitments. + # + # For example, in order to downgrade from 10000 slots to 8000, you might + # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, + # you delete the first one after the commitment end time passes. + # + # @overload split_capacity_commitment(request, options = nil) + # Pass arguments to `split_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload split_capacity_commitment(name: nil, slot_count: nil) + # Pass arguments to `split_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name e.g.,: + # `projects/myproject/locations/US/capacityCommitments/123` + # @param slot_count [::Integer] + # Number of slots in the capacity commitment after the split. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new + # + # # Call the split_capacity_commitment method. + # result = client.split_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. + # p result + # + def split_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.split_capacity_commitment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.split_capacity_commitment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.split_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.split_capacity_commitment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Merges capacity commitments of the same plan into a single commitment. + # + # The resulting capacity commitment has the greater commitment_end_time + # out of the to-be-merged capacity commitments. + # + # Attempting to merge capacity commitments of different plan will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload merge_capacity_commitments(request, options = nil) + # Pass arguments to `merge_capacity_commitments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload merge_capacity_commitments(parent: nil, capacity_commitment_ids: nil, capacity_commitment_id: nil) + # Pass arguments to `merge_capacity_commitments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent resource that identifies admin project and location e.g., + # `projects/myproject/locations/us` + # @param capacity_commitment_ids [::Array<::String>] + # Ids of capacity commitments to merge. + # These capacity commitments must exist under admin project and location + # specified in the parent. + # ID is the last portion of capacity commitment name e.g., 'abc' for + # projects/myproject/locations/US/capacityCommitments/abc + # @param capacity_commitment_id [::String] + # Optional. The optional resulting capacity commitment ID. Capacity + # commitment name will be generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new + # + # # Call the merge_capacity_commitments method. + # result = client.merge_capacity_commitments request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def merge_capacity_commitments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.merge_capacity_commitments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.merge_capacity_commitments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.merge_capacity_commitments request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an assignment object which allows the given project to submit jobs + # of a certain type using slots from the specified reservation. + # + # Currently a + # resource (project, folder, organization) can only have one assignment per + # each (job_type, location) combination, and that reservation will be used + # for all jobs of the matching type. + # + # Different assignments can be created on different levels of the + # projects, folders or organization hierarchy. During query execution, + # the assignment is looked up at the project, folder and organization levels + # in that order. The first assignment found is applied to the query. + # + # When creating assignments, it does not matter if other assignments exist at + # higher levels. + # + # Example: + # + # * The organization `organizationA` contains two projects, `project1` + # and `project2`. + # * Assignments for all three entities (`organizationA`, `project1`, and + # `project2`) could all be created and mapped to the same or different + # reservations. + # + # "None" assignments represent an absence of the assignment. Projects + # assigned to None use on-demand pricing. To create a "None" assignment, use + # "none" as a reservation_id in the parent. Example parent: + # `projects/myproject/locations/US/reservations/none`. + # + # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have + # 'bigquery.admin' permissions on the project using the reservation + # and the project that owns this reservation. + # + # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment + # does not match location of the reservation. + # + # @overload create_assignment(request, options = nil) + # Pass arguments to `create_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_assignment(parent: nil, assignment: nil, assignment_id: nil) + # Pass arguments to `create_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name of the assignment + # E.g. `projects/myproject/locations/US/reservations/team1-prod` + # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] + # Assignment resource to create. + # @param assignment_id [::String] + # The optional assignment ID. Assignment name will be generated automatically + # if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # Max length is 64 characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new + # + # # Call the create_assignment method. + # result = client.create_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def create_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_assignment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_assignment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.create_assignment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists assignments. + # + # Only explicitly created assignments will be returned. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, ListAssignments will just return the above two assignments + # for reservation `res1`, and no expansion/merge will happen. + # + # The wildcard "-" can be used for + # reservations in the request. In that case all assignments belongs to the + # specified project and location will be listed. + # + # **Note** "-" cannot be used for projects nor locations. + # + # @overload list_assignments(request, options = nil) + # Pass arguments to `list_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_assignments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_assignments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name e.g.: + # + # `projects/myproject/locations/US/reservations/team1-prod` + # + # Or: + # + # `projects/myproject/locations/US/reservations/-` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new + # + # # Call the list_assignments method. + # result = client.list_assignments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def list_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_assignments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_assignments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.list_assignments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_assignments, "assignments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a assignment. No expansion will happen. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, deletion of the `` assignment won't + # affect the other assignment ``. After said deletion, + # queries from `project1` will still use `res1` while queries from + # `project2` will switch to use on-demand mode. + # + # @overload delete_assignment(request, options = nil) + # Pass arguments to `delete_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_assignment(name: nil) + # Pass arguments to `delete_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource, e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new + # + # # Call the delete_assignment method. + # result = client.delete_assignment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_assignment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_assignment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.delete_assignment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deprecated: Looks up assignments for a specified resource for a particular + # region. If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + # + # **Note** "-" cannot be used for projects + # nor locations. + # + # @overload search_assignments(request, options = nil) + # Pass arguments to `search_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_assignments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the admin project(containing project and + # location), e.g.: + # `projects/myproject/locations/US`. + # @param query [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new + # + # # Call the search_assignments method. + # result = client.search_assignments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def search_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_assignments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_assignments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.search_assignments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :search_assignments, "assignments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up assignments for a specified resource for a particular region. + # If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + # + # @overload search_all_assignments(request, options = nil) + # Pass arguments to `search_all_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_all_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_all_assignments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name with location (project name could be the + # wildcard '-'), e.g.: + # `projects/-/locations/US`. + # @param query [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new + # + # # Call the search_all_assignments method. + # result = client.search_all_assignments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def search_all_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_all_assignments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_all_assignments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_all_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.search_all_assignments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :search_all_assignments, "assignments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Moves an assignment under a new reservation. + # + # This differs from removing an existing assignment and recreating a new one + # by providing a transactional change that ensures an assignee always has an + # associated reservation. + # + # @overload move_assignment(request, options = nil) + # Pass arguments to `move_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload move_assignment(name: nil, destination_id: nil, assignment_id: nil) + # Pass arguments to `move_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the assignment, + # e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + # @param destination_id [::String] + # The new reservation ID, e.g.: + # `projects/myotherproject/locations/US/reservations/team2-prod` + # @param assignment_id [::String] + # The optional assignment ID. A new assignment name is generated if this + # field is empty. + # + # This field can contain only lowercase alphanumeric characters or dashes. + # Max length is 64 characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new + # + # # Call the move_assignment method. + # result = client.move_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def move_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.move_assignment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.move_assignment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.move_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.move_assignment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing assignment. + # + # Only the `priority` field can be updated. + # + # @overload update_assignment(request, options = nil) + # Pass arguments to `update_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_assignment(assignment: nil, update_mask: nil) + # Pass arguments to `update_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] + # Content of the assignment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new + # + # # Call the update_assignment method. + # result = client.update_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def update_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_assignment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_assignment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.update_assignment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a BI reservation. + # + # @overload get_bi_reservation(request, options = nil) + # Pass arguments to `get_bi_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_bi_reservation(name: nil) + # Pass arguments to `get_bi_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested reservation, for example: + # `projects/{project_id}/locations/{location_id}/biReservation` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new + # + # # Call the get_bi_reservation method. + # result = client.get_bi_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + # p result + # + def get_bi_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_bi_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_bi_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_bi_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.get_bi_reservation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a BI reservation. + # + # Only fields specified in the `field_mask` are updated. + # + # A singleton BI reservation always exists with default size 0. + # In order to reserve BI capacity it needs to be updated to an amount + # greater than 0. In order to release BI capacity reservation size + # must be set to 0. + # + # @overload update_bi_reservation(request, options = nil) + # Pass arguments to `update_bi_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_bi_reservation(bi_reservation: nil, update_mask: nil) + # Pass arguments to `update_bi_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param bi_reservation [::Google::Cloud::Bigquery::Reservation::V1::BiReservation, ::Hash] + # A reservation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A list of fields to be updated in this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new + # + # # Call the update_bi_reservation method. + # result = client.update_bi_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + # p result + # + def update_bi_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_bi_reservation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_bi_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_bi_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.update_bi_reservation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a resource. + # May return: + # + # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the + # permission to view it. + # * An empty policy if the resource exists but doesn't have a set policy. + # + # Supported resources are: + # - Reservations + # - ReservationAssignments + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.getIamPolicy` to get policies on + # reservations. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets an access control policy for a resource. Replaces any existing + # policy. + # + # Supported resources are: + # - Reservations + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.setIamPolicy` to set policies on + # reservations. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets your permissions on a resource. Returns an empty set of permissions if + # the resource doesn't exist. + # + # Supported resources are: + # - Reservations + # + # No Google IAM permissions are required to call this method. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new reservation group. + # + # @overload create_reservation_group(request, options = nil) + # Pass arguments to `create_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_reservation_group(parent: nil, reservation_group_id: nil, reservation_group: nil) + # Pass arguments to `create_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project, location. E.g., + # `projects/myproject/locations/US` + # @param reservation_group_id [::String] + # Required. The reservation group ID. It must only contain lower case + # alphanumeric characters or dashes. It must start with a letter and must not + # end with a dash. Its maximum length is 64 characters. + # @param reservation_group [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup, ::Hash] + # Required. New Reservation Group to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new + # + # # Call the create_reservation_group method. + # result = client.create_reservation_group request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p result + # + def create_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_reservation_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.create_reservation_group request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about the reservation group. + # + # @overload get_reservation_group(request, options = nil) + # Pass arguments to `get_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_reservation_group(name: nil) + # Pass arguments to `get_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new + # + # # Call the get_reservation_group method. + # result = client.get_reservation_group request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p result + # + def get_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_reservation_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.get_reservation_group request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + # + # @overload delete_reservation_group(request, options = nil) + # Pass arguments to `delete_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_reservation_group(name: nil) + # Pass arguments to `delete_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new + # + # # Call the delete_reservation_group method. + # result = client.delete_reservation_group request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_reservation_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.delete_reservation_group request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the reservation groups for the project in the specified location. + # + # @overload list_reservation_groups(request, options = nil) + # Pass arguments to `list_reservation_groups` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_reservation_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reservation_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new + # + # # Call the list_reservation_groups method. + # result = client.list_reservation_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p item + # end + # + def list_reservation_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_reservation_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_reservation_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reservation_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.list_reservation_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_reservation_groups, "reservation_groups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ReservationService REST API. + # + # This class represents the configuration for ReservationService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_reservation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_reservation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_reservation.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "bigqueryreservation.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ReservationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reservation + ## + # RPC-specific configuration for `list_reservations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reservations + ## + # RPC-specific configuration for `get_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reservation + ## + # RPC-specific configuration for `delete_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_reservation + ## + # RPC-specific configuration for `update_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_reservation + ## + # RPC-specific configuration for `failover_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :failover_reservation + ## + # RPC-specific configuration for `create_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_capacity_commitment + ## + # RPC-specific configuration for `list_capacity_commitments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_capacity_commitments + ## + # RPC-specific configuration for `get_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_capacity_commitment + ## + # RPC-specific configuration for `delete_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_capacity_commitment + ## + # RPC-specific configuration for `update_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_capacity_commitment + ## + # RPC-specific configuration for `split_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :split_capacity_commitment + ## + # RPC-specific configuration for `merge_capacity_commitments` + # @return [::Gapic::Config::Method] + # + attr_reader :merge_capacity_commitments + ## + # RPC-specific configuration for `create_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_assignment + ## + # RPC-specific configuration for `list_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assignments + ## + # RPC-specific configuration for `delete_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_assignment + ## + # RPC-specific configuration for `search_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :search_assignments + ## + # RPC-specific configuration for `search_all_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :search_all_assignments + ## + # RPC-specific configuration for `move_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :move_assignment + ## + # RPC-specific configuration for `update_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_assignment + ## + # RPC-specific configuration for `get_bi_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_bi_reservation + ## + # RPC-specific configuration for `update_bi_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_bi_reservation + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reservation_group + ## + # RPC-specific configuration for `get_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reservation_group + ## + # RPC-specific configuration for `delete_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_reservation_group + ## + # RPC-specific configuration for `list_reservation_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reservation_groups + + # @private + def initialize parent_rpcs = nil + create_reservation_config = parent_rpcs.create_reservation if parent_rpcs.respond_to? :create_reservation + @create_reservation = ::Gapic::Config::Method.new create_reservation_config + list_reservations_config = parent_rpcs.list_reservations if parent_rpcs.respond_to? :list_reservations + @list_reservations = ::Gapic::Config::Method.new list_reservations_config + get_reservation_config = parent_rpcs.get_reservation if parent_rpcs.respond_to? :get_reservation + @get_reservation = ::Gapic::Config::Method.new get_reservation_config + delete_reservation_config = parent_rpcs.delete_reservation if parent_rpcs.respond_to? :delete_reservation + @delete_reservation = ::Gapic::Config::Method.new delete_reservation_config + update_reservation_config = parent_rpcs.update_reservation if parent_rpcs.respond_to? :update_reservation + @update_reservation = ::Gapic::Config::Method.new update_reservation_config + failover_reservation_config = parent_rpcs.failover_reservation if parent_rpcs.respond_to? :failover_reservation + @failover_reservation = ::Gapic::Config::Method.new failover_reservation_config + create_capacity_commitment_config = parent_rpcs.create_capacity_commitment if parent_rpcs.respond_to? :create_capacity_commitment + @create_capacity_commitment = ::Gapic::Config::Method.new create_capacity_commitment_config + list_capacity_commitments_config = parent_rpcs.list_capacity_commitments if parent_rpcs.respond_to? :list_capacity_commitments + @list_capacity_commitments = ::Gapic::Config::Method.new list_capacity_commitments_config + get_capacity_commitment_config = parent_rpcs.get_capacity_commitment if parent_rpcs.respond_to? :get_capacity_commitment + @get_capacity_commitment = ::Gapic::Config::Method.new get_capacity_commitment_config + delete_capacity_commitment_config = parent_rpcs.delete_capacity_commitment if parent_rpcs.respond_to? :delete_capacity_commitment + @delete_capacity_commitment = ::Gapic::Config::Method.new delete_capacity_commitment_config + update_capacity_commitment_config = parent_rpcs.update_capacity_commitment if parent_rpcs.respond_to? :update_capacity_commitment + @update_capacity_commitment = ::Gapic::Config::Method.new update_capacity_commitment_config + split_capacity_commitment_config = parent_rpcs.split_capacity_commitment if parent_rpcs.respond_to? :split_capacity_commitment + @split_capacity_commitment = ::Gapic::Config::Method.new split_capacity_commitment_config + merge_capacity_commitments_config = parent_rpcs.merge_capacity_commitments if parent_rpcs.respond_to? :merge_capacity_commitments + @merge_capacity_commitments = ::Gapic::Config::Method.new merge_capacity_commitments_config + create_assignment_config = parent_rpcs.create_assignment if parent_rpcs.respond_to? :create_assignment + @create_assignment = ::Gapic::Config::Method.new create_assignment_config + list_assignments_config = parent_rpcs.list_assignments if parent_rpcs.respond_to? :list_assignments + @list_assignments = ::Gapic::Config::Method.new list_assignments_config + delete_assignment_config = parent_rpcs.delete_assignment if parent_rpcs.respond_to? :delete_assignment + @delete_assignment = ::Gapic::Config::Method.new delete_assignment_config + search_assignments_config = parent_rpcs.search_assignments if parent_rpcs.respond_to? :search_assignments + @search_assignments = ::Gapic::Config::Method.new search_assignments_config + search_all_assignments_config = parent_rpcs.search_all_assignments if parent_rpcs.respond_to? :search_all_assignments + @search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config + move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment + @move_assignment = ::Gapic::Config::Method.new move_assignment_config + update_assignment_config = parent_rpcs.update_assignment if parent_rpcs.respond_to? :update_assignment + @update_assignment = ::Gapic::Config::Method.new update_assignment_config + get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation + @get_bi_reservation = ::Gapic::Config::Method.new get_bi_reservation_config + update_bi_reservation_config = parent_rpcs.update_bi_reservation if parent_rpcs.respond_to? :update_bi_reservation + @update_bi_reservation = ::Gapic::Config::Method.new update_bi_reservation_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_reservation_group_config = parent_rpcs.create_reservation_group if parent_rpcs.respond_to? :create_reservation_group + @create_reservation_group = ::Gapic::Config::Method.new create_reservation_group_config + get_reservation_group_config = parent_rpcs.get_reservation_group if parent_rpcs.respond_to? :get_reservation_group + @get_reservation_group = ::Gapic::Config::Method.new get_reservation_group_config + delete_reservation_group_config = parent_rpcs.delete_reservation_group if parent_rpcs.respond_to? :delete_reservation_group + @delete_reservation_group = ::Gapic::Config::Method.new delete_reservation_group_config + list_reservation_groups_config = parent_rpcs.list_reservation_groups if parent_rpcs.respond_to? :list_reservation_groups + @list_reservation_groups = ::Gapic::Config::Method.new list_reservation_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb new file mode 100644 index 000000000000..546513e1180a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb @@ -0,0 +1,1889 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/reservation/v1/reservation_pb" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + module Rest + ## + # REST service stub for the ReservationService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # A result object deserialized from the server's reply + def create_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_reservation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_reservations REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse] + # A result object deserialized from the server's reply + def list_reservations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reservations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_reservations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # A result object deserialized from the server's reply + def get_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_reservation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_reservation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # A result object deserialized from the server's reply + def update_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_reservation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the failover_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # A result object deserialized from the server's reply + def failover_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_failover_reservation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "failover_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # A result object deserialized from the server's reply + def create_capacity_commitment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_capacity_commitment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_capacity_commitment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_capacity_commitments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse] + # A result object deserialized from the server's reply + def list_capacity_commitments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_capacity_commitments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_capacity_commitments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # A result object deserialized from the server's reply + def get_capacity_commitment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_capacity_commitment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_capacity_commitment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_capacity_commitment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_capacity_commitment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_capacity_commitment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # A result object deserialized from the server's reply + def update_capacity_commitment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_capacity_commitment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_capacity_commitment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the split_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # A result object deserialized from the server's reply + def split_capacity_commitment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_split_capacity_commitment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "split_capacity_commitment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the merge_capacity_commitments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # A result object deserialized from the server's reply + def merge_capacity_commitments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_merge_capacity_commitments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "merge_capacity_commitments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # A result object deserialized from the server's reply + def create_assignment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_assignment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_assignment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse] + # A result object deserialized from the server's reply + def list_assignments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_assignments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_assignments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_assignment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_assignment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_assignment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse] + # A result object deserialized from the server's reply + def search_assignments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_assignments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_assignments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_all_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse] + # A result object deserialized from the server's reply + def search_all_assignments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_all_assignments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_all_assignments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the move_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # A result object deserialized from the server's reply + def move_assignment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_move_assignment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "move_assignment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # A result object deserialized from the server's reply + def update_assignment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_assignment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_assignment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_bi_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # A result object deserialized from the server's reply + def get_bi_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_bi_reservation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_bi_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_bi_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # A result object deserialized from the server's reply + def update_bi_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_bi_reservation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_bi_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # A result object deserialized from the server's reply + def create_reservation_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_reservation_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_reservation_group", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # A result object deserialized from the server's reply + def get_reservation_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_reservation_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_reservation_group", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_reservation_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_reservation_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_reservation_group", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_reservation_groups REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse] + # A result object deserialized from the server's reply + def list_reservation_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reservation_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_reservation_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/reservations", + body: "reservation", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reservations REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_reservations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/reservations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{reservation.name}", + body: "reservation", + matches: [ + ["reservation.name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the failover_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_failover_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:failoverReservation", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_capacity_commitment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/capacityCommitments", + body: "capacity_commitment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_capacity_commitments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_capacity_commitments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/capacityCommitments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_capacity_commitment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_capacity_commitment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_capacity_commitment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{capacity_commitment.name}", + body: "capacity_commitment", + matches: [ + ["capacity_commitment.name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the split_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_split_capacity_commitment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:split", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the merge_capacity_commitments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_merge_capacity_commitments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/capacityCommitments:merge", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_assignment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assignments", + body: "assignment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_assignments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assignments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_assignment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_assignments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}:searchAssignments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_all_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_all_assignments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}:searchAllAssignments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the move_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_move_assignment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:move", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_assignment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{assignment.name}", + body: "assignment", + matches: [ + ["assignment.name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_bi_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_bi_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/biReservation/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_bi_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_bi_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{bi_reservation.name}", + body: "bi_reservation", + matches: [ + ["bi_reservation.name", %r{^projects/[^/]+/locations/[^/]+/biReservation/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_reservation_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/reservationGroups", + body: "reservation_group", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_reservation_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservationGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_reservation_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservationGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reservation_groups REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_reservation_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/reservationGroups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb new file mode 100644 index 000000000000..2edd21e05187 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb @@ -0,0 +1,297 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/reservation/v1/reservation.proto for package 'google.cloud.bigquery.reservation.v1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/bigquery/reservation/v1/reservation_pb' + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + # This API allows users to manage their BigQuery reservations. + # + # A reservation provides computational resource guarantees, in the form of + # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a + # unit of computational power in BigQuery, and serves as the basic unit of + # parallelism. In a scan of a multi-partitioned table, a single slot operates + # on a single partition of the table. A reservation resource exists as a child + # resource of the admin project and location, e.g.: + # `projects/myproject/locations/US/reservations/reservationName`. + # + # A capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. A capacity + # commitment resource exists as a child resource of the admin project and + # location, e.g.: + # `projects/myproject/locations/US/capacityCommitments/id`. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.reservation.v1.ReservationService' + + # Creates a new reservation resource. + rpc :CreateReservation, ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation + # Lists all the reservations for the project in the specified location. + rpc :ListReservations, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse + # Returns information about the reservation. + rpc :GetReservation, ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + rpc :DeleteReservation, ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Google::Protobuf::Empty + # Updates an existing reservation resource. + rpc :UpdateReservation, ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation + # Fail over a reservation to the secondary location. The operation should be + # done in the current secondary location, which will be promoted to the + # new primary location for the reservation. + # Attempting to failover a reservation in the current primary location will + # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. + rpc :FailoverReservation, ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation + # Creates a new capacity commitment resource. + rpc :CreateCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment + # Lists all the capacity commitments for the admin project. + rpc :ListCapacityCommitments, ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse + # Returns information about the capacity commitment. + rpc :GetCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment + # Deletes a capacity commitment. Attempting to delete capacity commitment + # before its commitment_end_time will fail with the error code + # `google.rpc.Code.FAILED_PRECONDITION`. + rpc :DeleteCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Google::Protobuf::Empty + # Updates an existing capacity commitment. + # + # Only `plan` and `renewal_plan` fields can be updated. + # + # Plan can only be changed to a plan of a longer commitment period. + # Attempting to change to a plan with shorter commitment period will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + rpc :UpdateCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment + # Splits capacity commitment to two commitments of the same plan and + # `commitment_end_time`. + # + # A common use case is to enable downgrading commitments. + # + # For example, in order to downgrade from 10000 slots to 8000, you might + # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, + # you delete the first one after the commitment end time passes. + rpc :SplitCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse + # Merges capacity commitments of the same plan into a single commitment. + # + # The resulting capacity commitment has the greater commitment_end_time + # out of the to-be-merged capacity commitments. + # + # Attempting to merge capacity commitments of different plan will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + rpc :MergeCapacityCommitments, ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment + # Creates an assignment object which allows the given project to submit jobs + # of a certain type using slots from the specified reservation. + # + # Currently a + # resource (project, folder, organization) can only have one assignment per + # each (job_type, location) combination, and that reservation will be used + # for all jobs of the matching type. + # + # Different assignments can be created on different levels of the + # projects, folders or organization hierarchy. During query execution, + # the assignment is looked up at the project, folder and organization levels + # in that order. The first assignment found is applied to the query. + # + # When creating assignments, it does not matter if other assignments exist at + # higher levels. + # + # Example: + # + # * The organization `organizationA` contains two projects, `project1` + # and `project2`. + # * Assignments for all three entities (`organizationA`, `project1`, and + # `project2`) could all be created and mapped to the same or different + # reservations. + # + # "None" assignments represent an absence of the assignment. Projects + # assigned to None use on-demand pricing. To create a "None" assignment, use + # "none" as a reservation_id in the parent. Example parent: + # `projects/myproject/locations/US/reservations/none`. + # + # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have + # 'bigquery.admin' permissions on the project using the reservation + # and the project that owns this reservation. + # + # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment + # does not match location of the reservation. + rpc :CreateAssignment, ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment + # Lists assignments. + # + # Only explicitly created assignments will be returned. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, ListAssignments will just return the above two assignments + # for reservation `res1`, and no expansion/merge will happen. + # + # The wildcard "-" can be used for + # reservations in the request. In that case all assignments belongs to the + # specified project and location will be listed. + # + # **Note** "-" cannot be used for projects nor locations. + rpc :ListAssignments, ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse + # Deletes a assignment. No expansion will happen. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, deletion of the `` assignment won't + # affect the other assignment ``. After said deletion, + # queries from `project1` will still use `res1` while queries from + # `project2` will switch to use on-demand mode. + rpc :DeleteAssignment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Google::Protobuf::Empty + # Deprecated: Looks up assignments for a specified resource for a particular + # region. If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + # + # **Note** "-" cannot be used for projects + # nor locations. + rpc :SearchAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse + # Looks up assignments for a specified resource for a particular region. + # If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + rpc :SearchAllAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse + # Moves an assignment under a new reservation. + # + # This differs from removing an existing assignment and recreating a new one + # by providing a transactional change that ensures an assignee always has an + # associated reservation. + rpc :MoveAssignment, ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment + # Updates an existing assignment. + # + # Only the `priority` field can be updated. + rpc :UpdateAssignment, ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment + # Retrieves a BI reservation. + rpc :GetBiReservation, ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::BiReservation + # Updates a BI reservation. + # + # Only fields specified in the `field_mask` are updated. + # + # A singleton BI reservation always exists with default size 0. + # In order to reserve BI capacity it needs to be updated to an amount + # greater than 0. In order to release BI capacity reservation size + # must be set to 0. + rpc :UpdateBiReservation, ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::BiReservation + # Gets the access control policy for a resource. + # May return: + # + # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the + # permission to view it. + # * An empty policy if the resource exists but doesn't have a set policy. + # + # Supported resources are: + # - Reservations + # - ReservationAssignments + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.getIamPolicy` to get policies on + # reservations. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets an access control policy for a resource. Replaces any existing + # policy. + # + # Supported resources are: + # - Reservations + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.setIamPolicy` to set policies on + # reservations. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets your permissions on a resource. Returns an empty set of permissions if + # the resource doesn't exist. + # + # Supported resources are: + # - Reservations + # + # No Google IAM permissions are required to call this method. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Creates a new reservation group. + rpc :CreateReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup + # Returns information about the reservation group. + rpc :GetReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + rpc :DeleteReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Google::Protobuf::Empty + # Lists all the reservation groups for the project in the specified location. + rpc :ListReservationGroups, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb new file mode 100644 index 000000000000..bb32a525c996 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/reservation/v1/reservation_service/rest" +require "google/cloud/bigquery/reservation/v1/version" + +module Google + module Cloud + module Bigquery + module Reservation + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/reservation/v1/rest" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb new file mode 100644 index 000000000000..be5b8808b160 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md new file mode 100644 index 000000000000..dcf8e9f79d59 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Reservation V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb new file mode 100644 index 000000000000..e49ef9709d5c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb @@ -0,0 +1,1207 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + # A reservation is a mechanism used to guarantee slots to users. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the reservation, e.g., + # `projects/*/locations/*/reservations/team1-prod`. + # The reservation_id must only contain lower case alphanumeric characters or + # dashes. It must start with a letter and must not end with a dash. Its + # maximum length is 64 characters. + # @!attribute [rw] slot_capacity + # @return [::Integer] + # Optional. Baseline slots available to this reservation. A slot is a unit of + # computational power in BigQuery, and serves as the unit of parallelism. + # + # Queries using this reservation might use more slots during runtime if + # ignore_idle_slots is set to false, or autoscaling is enabled. + # + # The total slot_capacity of the reservation and its siblings + # may exceed the total slot_count of capacity commitments. In that case, the + # exceeding slots will be charged with the autoscale SKU. You can increase + # the number of baseline slots in a reservation every few minutes. If you + # want to decrease your baseline slots, you are limited to once an hour if + # you have recently changed your baseline slot capacity and your baseline + # slots exceed your committed slots. Otherwise, you can decrease your + # baseline slots every few minutes. + # @!attribute [rw] ignore_idle_slots + # @return [::Boolean] + # Optional. If false, any query or pipeline job using this reservation will + # use idle slots from other reservations within the same admin project. If + # true, a query or pipeline job using this reservation will execute with the + # slot capacity specified in the slot_capacity field at most. + # @!attribute [rw] autoscale + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::Autoscale] + # Optional. The configuration parameters for the auto scaling feature. + # @!attribute [rw] concurrency + # @return [::Integer] + # Optional. Job concurrency target which sets a soft upper bound on the + # number of jobs that can run concurrently in this reservation. This is a + # soft target due to asynchronous nature of the system and various + # optimizations for small queries. Default value is 0 which means that + # concurrency target will be automatically computed by the system. NOTE: this + # field is exposed as target job concurrency in the Information Schema, DDL + # and BigQuery CLI. + # @!attribute [r] creation_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation time of the reservation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update time of the reservation. + # @!attribute [rw] multi_region_auxiliary + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Applicable only for reservations located within one of the BigQuery + # multi-regions (US or EU). + # + # If set to true, this reservation is placed in the organization's + # secondary region which is designated for disaster recovery purposes. + # If false, this reservation is placed in the organization's default region. + # + # NOTE: this is a preview feature. Project must be allow-listed in order to + # set this field. + # @!attribute [rw] edition + # @return [::Google::Cloud::Bigquery::Reservation::V1::Edition] + # Optional. Edition of the reservation. + # @!attribute [r] primary_location + # @return [::String] + # Output only. The current location of the reservation's primary replica. + # This field is only set for reservations using the managed disaster recovery + # feature. + # @!attribute [rw] secondary_location + # @return [::String] + # Optional. The current location of the reservation's secondary replica. This + # field is only set for reservations using the managed disaster recovery + # feature. Users can set this in create reservation calls + # to create a failover reservation or in update reservation calls to convert + # a non-failover reservation to a failover reservation(or vice versa). + # @!attribute [r] original_primary_location + # @return [::String] + # Output only. The location where the reservation was originally created. + # This is set only during the failover reservation's creation. All billing + # charges for the failover reservation will be applied to this location. + # @!attribute [rw] max_slots + # @return [::Integer] + # Optional. The overall max slots for the reservation, covering slot_capacity + # (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. + # If present, the reservation won't use more than the specified number of + # slots, even if there is demand and supply (from idle slots). + # NOTE: capping a reservation's idle slot usage is best effort and its + # usage may exceed the max_slots value. However, in terms of + # autoscale.current_slots (which accounts for the additional added slots), it + # will never exceed the max_slots - baseline. + # + # + # This field must be set together with the scaling_mode enum value, + # otherwise the request will be rejected with error code + # `google.rpc.Code.INVALID_ARGUMENT`. + # + # If the max_slots and scaling_mode are set, the autoscale or + # autoscale.max_slots field must be unset. Otherwise the request will be + # rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the + # autoscale field may still be in the output. The autopscale.max_slots will + # always show as 0 and the autoscaler.current_slots will represent the + # current slots from autoscaler excluding idle slots. + # For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, + # then in the output, the autoscaler.max_slots will be 0 and the + # autoscaler.current_slots may be any value between 0 and 1000. + # + # If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 + # and idle slots usage is 200, then in the output, the autoscaler.max_slots + # will be 0 and the autoscaler.current_slots will not be higher than 700. + # + # If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the + # output, the autoscaler field will be null. + # + # If the max_slots and scaling_mode are set, then the ignore_idle_slots field + # must be aligned with the scaling_mode enum value.(See details in + # ScalingMode comments). Otherwise the request will be rejected with + # error code `google.rpc.Code.INVALID_ARGUMENT`. + # + # Please note, the max_slots is for user to manage the part of slots greater + # than the baseline. Therefore, we don't allow users to set max_slots smaller + # or equal to the baseline as it will not be meaningful. If the field is + # present and slot_capacity>=max_slots, requests will be rejected with error + # code `google.rpc.Code.INVALID_ARGUMENT`. + # + # Please note that if max_slots is set to 0, we will treat it as unset. + # Customers can set max_slots to 0 and set scaling_mode to + # SCALING_MODE_UNSPECIFIED to disable the max_slots feature. + # @!attribute [rw] scaling_mode + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::ScalingMode] + # Optional. The scaling mode for the reservation. + # If the field is present but max_slots is not present, requests will be + # rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels associated with this reservation. You can use these + # to organize and group your reservations. + # You can set this property when you create or update a reservation. + # @!attribute [rw] reservation_group + # @return [::String] + # Optional. The reservation group that this reservation belongs to. + # You can set this property when you create or update a reservation. + # Reservations do not need to belong to a reservation group. + # Format: + # projects/\\{project}/locations/\\{location}/reservationGroups/\\{reservation_group} + # or just \\{reservation_group} + # @!attribute [r] replication_status + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::ReplicationStatus] + # Output only. The Disaster Recovery(DR) replication status of the + # reservation. This is only available for the primary replicas of DR/failover + # reservations and provides information about the both the staleness of the + # secondary and the last error encountered while trying to replicate changes + # from the primary to the secondary. If this field is blank, it means that + # the reservation is either not a DR reservation or the reservation is a DR + # secondary or that any replication operations on the reservation have + # succeeded. + # @!attribute [rw] scheduling_policy + # @return [::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy] + # Optional. The scheduling policy to use for jobs and queries running under + # this reservation. The scheduling policy controls how the reservation's + # resources are distributed. + # + # This feature is not yet generally available. + class Reservation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Auto scaling settings. + # @!attribute [r] current_slots + # @return [::Integer] + # Output only. The slot capacity added to this reservation when autoscale + # happens. Will be between [0, max_slots]. Note: after users reduce + # max_slots, it may take a while before it can be propagated, so + # current_slots may stay in the original value and could be larger than + # max_slots for that brief period (less than one minute) + # @!attribute [rw] max_slots + # @return [::Integer] + # Optional. Number of slots to be scaled when needed. + class Autoscale + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Disaster Recovery(DR) replication status of the reservation. + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. The last error encountered while trying to replicate changes + # from the primary to the secondary. This field is only available if the + # replication has not succeeded since. + # @!attribute [r] last_error_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the last error was encountered while + # trying to replicate changes from the primary to the secondary. This field + # is only available if the replication has not succeeded since. + # @!attribute [r] last_replication_time + # @return [::Google::Protobuf::Timestamp] + # Output only. A timestamp corresponding to the last change on the primary + # that was successfully replicated to the secondary. + # @!attribute [r] soft_failover_start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which a soft failover for the reservation and + # its associated datasets was initiated. After this field is set, all + # subsequent changes to the reservation will be rejected unless a hard + # failover overrides this operation. This field will be cleared once the + # failover is complete. + class ReplicationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The scaling mode for the reservation. This enum determines how the + # reservation scales up and down. + module ScalingMode + # Default value of ScalingMode. + SCALING_MODE_UNSPECIFIED = 0 + + # The reservation will scale up only using slots from autoscaling. It will + # not use any idle slots even if there may be some available. The upper + # limit that autoscaling can scale up to will be max_slots - baseline. + # For example, if max_slots is 1000, baseline is 200 and customer sets + # ScalingMode to AUTOSCALE_ONLY, then autoscalerg will scale up to 800 + # slots and no idle slots will be used. + # + # Please note, in this mode, the ignore_idle_slots field must be set to + # true. Otherwise the request will be rejected with error code + # `google.rpc.Code.INVALID_ARGUMENT`. + AUTOSCALE_ONLY = 1 + + # The reservation will scale up using only idle slots contributed by + # other reservations or from unassigned commitments. If no idle slots are + # available it will not scale up further. If the idle slots which it is + # using are reclaimed by the contributing reservation(s) it may be forced + # to scale down. The max idle slots the reservation can be max_slots - + # baseline capacity. For example, if max_slots is 1000, baseline is 200 and + # customer sets ScalingMode to IDLE_SLOTS_ONLY, + # 1. if there are 1000 idle slots available in other reservations, the + # reservation will scale up to 1000 slots with 200 baseline and 800 idle + # slots. + # 2. if there are 500 idle slots available in other reservations, the + # reservation will scale up to 700 slots with 200 baseline and 500 idle + # slots. + # Please note, in this mode, the reservation might not be able to scale up + # to max_slots. + # + # Please note, in this mode, the ignore_idle_slots field must be set to + # false. Otherwise the request will be rejected with error code + # `google.rpc.Code.INVALID_ARGUMENT`. + IDLE_SLOTS_ONLY = 2 + + # The reservation will scale up using all slots available to it. It will + # use idle slots contributed by other reservations or from unassigned + # commitments first. If no idle slots are available it will scale up using + # autoscaling. For example, if max_slots is 1000, baseline is 200 and + # customer sets ScalingMode to ALL_SLOTS, + # 1. if there are 800 idle slots available in other reservations, the + # reservation will scale up to 1000 slots with 200 baseline and 800 idle + # slots. + # 2. if there are 500 idle slots available in other reservations, the + # reservation will scale up to 1000 slots with 200 baseline, 500 idle + # slots and 300 autoscaling slots. + # 3. if there are no idle slots available in other reservations, it will + # scale up to 1000 slots with 200 baseline and 800 autoscaling slots. + # + # Please note, in this mode, the ignore_idle_slots field must be set to + # false. Otherwise the request will be rejected with error code + # `google.rpc.Code.INVALID_ARGUMENT`. + ALL_SLOTS = 3 + end + end + + # The scheduling policy controls how a reservation's resources are distributed. + # @!attribute [rw] concurrency + # @return [::Integer] + # Optional. If present and > 0, the reservation will attempt to limit the + # concurrency of jobs running for any particular project within it to the + # given value. + # + # This feature is not yet generally available. + # @!attribute [rw] max_slots + # @return [::Integer] + # Optional. If present and > 0, the reservation will attempt to limit the + # slot consumption of queries running for any particular project within it to + # the given value. + # + # This feature is not yet generally available. + class SchedulingPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A reservation group is a container for reservations. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the reservation group, e.g., + # `projects/*/locations/*/reservationGroups/team1-prod`. + # The reservation_group_id must only contain lower case alphanumeric + # characters or dashes. It must start with a letter and must not end with a + # dash. Its maximum length is 64 characters. + class ReservationGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. Annual + # commitments renew by default. Commitments can be removed after their + # commitment end time passes. + # + # In order to remove annual commitment, its plan needs to be changed + # to monthly or flex first. + # + # A capacity commitment resource exists as a child resource of the admin + # project. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the capacity commitment, e.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # The commitment_id must only contain lower case alphanumeric characters or + # dashes. It must start with a letter and must not end + # with a dash. Its maximum length is 64 characters. + # @!attribute [rw] slot_count + # @return [::Integer] + # Optional. Number of slots in this commitment. + # @!attribute [rw] plan + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::CommitmentPlan] + # Optional. Capacity commitment commitment plan. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::State] + # Output only. State of the commitment. + # @!attribute [r] commitment_start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The start of the current commitment period. It is applicable + # only for ACTIVE capacity commitments. Note after the commitment is renewed, + # commitment_start_time won't be changed. It refers to the start time of the + # original commitment. + # @!attribute [r] commitment_end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The end of the current commitment period. It is applicable + # only for ACTIVE capacity commitments. Note after renewal, + # commitment_end_time is the time the renewed commitment expires. So itwould + # be at a time after commitment_start_time + committed period, because we + # don't change commitment_start_time , + # @!attribute [r] failure_status + # @return [::Google::Rpc::Status] + # Output only. For FAILED commitment plan, provides the reason of failure. + # @!attribute [rw] renewal_plan + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::CommitmentPlan] + # Optional. The plan this capacity commitment is converted to after + # commitment_end_time passes. Once the plan is changed, committed period is + # extended according to commitment plan. Only applicable for ANNUAL and TRIAL + # commitments. + # @!attribute [rw] multi_region_auxiliary + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Applicable only for commitments located within one of the BigQuery + # multi-regions (US or EU). + # + # If set to true, this commitment is placed in the organization's + # secondary region which is designated for disaster recovery purposes. + # If false, this commitment is placed in the organization's default region. + # + # NOTE: this is a preview feature. Project must be allow-listed in order to + # set this field. + # @!attribute [rw] edition + # @return [::Google::Cloud::Bigquery::Reservation::V1::Edition] + # Optional. Edition of the capacity commitment. + # @!attribute [r] is_flat_rate + # @return [::Boolean] + # Output only. If true, the commitment is a flat-rate commitment, otherwise, + # it's an edition commitment. + class CapacityCommitment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Commitment plan defines the current committed period. Capacity commitment + # cannot be deleted during it's committed period. + module CommitmentPlan + # Invalid plan value. Requests with this value will be rejected with + # error code `google.rpc.Code.INVALID_ARGUMENT`. + COMMITMENT_PLAN_UNSPECIFIED = 0 + + # Flex commitments have committed period of 1 minute after becoming ACTIVE. + # After that, they are not in a committed period anymore and can be removed + # any time. + FLEX = 3 + + # Same as FLEX, should only be used if flat-rate commitments are still + # available. + FLEX_FLAT_RATE = 7 + + # Trial commitments have a committed period of 182 days after becoming + # ACTIVE. After that, they are converted to a new commitment based on the + # `renewal_plan`. Default `renewal_plan` for Trial commitment is Flex so + # that it can be deleted right after committed period ends. + TRIAL = 5 + + # Monthly commitments have a committed period of 30 days after becoming + # ACTIVE. After that, they are not in a committed period anymore and can be + # removed any time. + MONTHLY = 2 + + # Same as MONTHLY, should only be used if flat-rate commitments are still + # available. + MONTHLY_FLAT_RATE = 8 + + # Annual commitments have a committed period of 365 days after becoming + # ACTIVE. After that they are converted to a new commitment based on the + # renewal_plan. + ANNUAL = 4 + + # Same as ANNUAL, should only be used if flat-rate commitments are still + # available. + ANNUAL_FLAT_RATE = 9 + + # 3-year commitments have a committed period of 1095(3 * 365) days after + # becoming ACTIVE. After that they are converted to a new commitment based + # on the renewal_plan. + THREE_YEAR = 10 + + # Should only be used for `renewal_plan` and is only meaningful if + # edition is specified to values other than EDITION_UNSPECIFIED. Otherwise + # CreateCapacityCommitmentRequest or UpdateCapacityCommitmentRequest will + # be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. If the + # renewal_plan is NONE, capacity commitment will be removed at the end of + # its commitment period. + NONE = 6 + end + + # Capacity commitment can either become ACTIVE right away or transition + # from PENDING to ACTIVE or FAILED. + module State + # Invalid state value. + STATE_UNSPECIFIED = 0 + + # Capacity commitment is pending provisioning. Pending capacity commitment + # does not contribute to the project's slot_capacity. + PENDING = 1 + + # Once slots are provisioned, capacity commitment becomes active. + # slot_count is added to the project's slot_capacity. + ACTIVE = 2 + + # Capacity commitment is failed to be activated by the backend. + FAILED = 3 + end + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation ReservationService.CreateReservation}. + # @!attribute [rw] parent + # @return [::String] + # Required. Project, location. E.g., + # `projects/myproject/locations/US` + # @!attribute [rw] reservation_id + # @return [::String] + # The reservation ID. It must only contain lower case alphanumeric + # characters or dashes. It must start with a letter and must not end + # with a dash. Its maximum length is 64 characters. + # @!attribute [rw] reservation + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # Definition of the new reservation to create. + class CreateReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListReservationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}. + # @!attribute [rw] reservations + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] + # List of reservations visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListReservationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation ReservationService.GetReservation}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + class GetReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation ReservationService.DeleteReservation}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + class DeleteReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation ReservationService.UpdateReservation}. + # @!attribute [rw] reservation + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # Content of the reservation to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Standard field mask for the set of fields to be updated. + class UpdateReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for ReservationService.FailoverReservation. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the reservation to failover. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # @!attribute [rw] failover_mode + # @return [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] + # Optional. A parameter that determines how writes that are pending + # replication are handled after a failover is initiated. If not specified, + # HARD failover mode is used by default. + class FailoverReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group ReservationService.CreateReservationGroup}. + # @!attribute [rw] parent + # @return [::String] + # Required. Project, location. E.g., + # `projects/myproject/locations/US` + # @!attribute [rw] reservation_group_id + # @return [::String] + # Required. The reservation group ID. It must only contain lower case + # alphanumeric characters or dashes. It must start with a letter and must not + # end with a dash. Its maximum length is 64 characters. + # @!attribute [rw] reservation_group + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # Required. New Reservation Group to create. + class CreateReservationGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group ReservationService.GetReservationGroup}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + class GetReservationGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups ReservationService.ListReservationGroups}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListReservationGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups ReservationService.ListReservationGroups}. + # @!attribute [rw] reservation_groups + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] + # List of reservations visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListReservationGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group ReservationService.DeleteReservationGroup}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + class DeleteReservationGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment ReservationService.CreateCapacityCommitment}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @!attribute [rw] capacity_commitment + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # Content of the capacity commitment to create. + # @!attribute [rw] enforce_single_admin_project_per_org + # @return [::Boolean] + # If true, fail the request if another project in the organization has a + # capacity commitment. + # @!attribute [rw] capacity_commitment_id + # @return [::String] + # The optional capacity commitment ID. Capacity commitment name will be + # generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + # NOTE: this ID won't be kept if the capacity commitment is split or merged. + class CreateCapacityCommitmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListCapacityCommitmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}. + # @!attribute [rw] capacity_commitments + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] + # List of capacity commitments visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListCapacityCommitmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment ReservationService.GetCapacityCommitment}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the capacity commitment to retrieve. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + class GetCapacityCommitmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment ReservationService.DeleteCapacityCommitment}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the capacity commitment to delete. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # @!attribute [rw] force + # @return [::Boolean] + # Can be used to force delete commitments even if assignments exist. Deleting + # commitments with assignments may cause queries to fail if they no longer + # have access to slots. + class DeleteCapacityCommitmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment ReservationService.UpdateCapacityCommitment}. + # @!attribute [rw] capacity_commitment + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # Content of the capacity commitment to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Standard field mask for the set of fields to be updated. + class UpdateCapacityCommitmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name e.g.,: + # `projects/myproject/locations/US/capacityCommitments/123` + # @!attribute [rw] slot_count + # @return [::Integer] + # Number of slots in the capacity commitment after the split. + class SplitCapacityCommitmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}. + # @!attribute [rw] first + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # First capacity commitment, result of a split. + # @!attribute [rw] second + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # Second capacity commitment, result of a split. + class SplitCapacityCommitmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments ReservationService.MergeCapacityCommitments}. + # @!attribute [rw] parent + # @return [::String] + # Parent resource that identifies admin project and location e.g., + # `projects/myproject/locations/us` + # @!attribute [rw] capacity_commitment_ids + # @return [::Array<::String>] + # Ids of capacity commitments to merge. + # These capacity commitments must exist under admin project and location + # specified in the parent. + # ID is the last portion of capacity commitment name e.g., 'abc' for + # projects/myproject/locations/US/capacityCommitments/abc + # @!attribute [rw] capacity_commitment_id + # @return [::String] + # Optional. The optional resulting capacity commitment ID. Capacity + # commitment name will be generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + class MergeCapacityCommitmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An assignment allows a project to submit jobs + # of a certain type using slots from the specified reservation. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the resource. E.g.: + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. + # The assignment_id must only contain lower case alphanumeric characters or + # dashes and the max length is 64 characters. + # @!attribute [rw] assignee + # @return [::String] + # Optional. The resource which will use the reservation. E.g. + # `projects/myproject`, `folders/123`, or `organizations/456`. + # @!attribute [rw] job_type + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment::JobType] + # Optional. Which type of jobs will use the reservation. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment::State] + # Output only. State of the assignment. + # @!attribute [rw] enable_gemini_in_bigquery + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Optional. Deprecated: "Gemini in BigQuery" is now available by + # default for all BigQuery editions and should not be explicitly set. + # Controls if "Gemini in BigQuery" + # (https://cloud.google.com/gemini/docs/bigquery/overview) features should be + # enabled for this reservation assignment. + # @!attribute [rw] scheduling_policy + # @return [::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy] + # Optional. The scheduling policy to use for jobs and queries of this + # assignee when running under the associated reservation. The scheduling + # policy controls how the reservation's resources are distributed. This + # overrides the default scheduling policy specified on the reservation. + # + # This feature is not yet generally available. + # @!attribute [rw] principal + # @return [::String] + # Optional. Represents the principal for this assignment. If not empty, jobs + # run by this principal will utilize the associated reservation. Otherwise, + # jobs will fall back to using the reservation assigned to the project, + # folder, or organization (in that order). If no reservation is assigned at + # any of these levels, on-demand capacity will be used. + # + # The supported formats are: + # + # * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, + # * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` + # for service accounts, + # * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` + # for workload identity pool identities. + # * The special value `unknown_or_deleted_user` represents principals which + # cannot be read from the user info service, for example deleted users. + class Assignment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of job, which could be specified when using the reservation. + module JobType + # Invalid type. Requests with this value will be rejected with + # error code `google.rpc.Code.INVALID_ARGUMENT`. + JOB_TYPE_UNSPECIFIED = 0 + + # Pipeline (load/export) jobs from the project will use the reservation. + PIPELINE = 1 + + # Query jobs from the project will use the reservation. + QUERY = 2 + + # BigQuery ML jobs that use services external to BigQuery for model + # training. These jobs will not utilize idle slots from other reservations. + ML_EXTERNAL = 3 + + # Background jobs that BigQuery runs for the customers in the background. + BACKGROUND = 4 + + # Continuous SQL jobs will use this reservation. Reservations with + # continuous assignments cannot be mixed with non-continuous assignments. + CONTINUOUS = 6 + + # Finer granularity background jobs for capturing changes in a source + # database and streaming them into BigQuery. Reservations with this job + # type take priority over a default BACKGROUND reservation assignment (if + # it exists). + BACKGROUND_CHANGE_DATA_CAPTURE = 7 + + # Finer granularity background jobs for refreshing cached metadata for + # BigQuery tables. Reservations with this job type take priority over a + # default BACKGROUND reservation assignment (if it exists). + BACKGROUND_COLUMN_METADATA_INDEX = 8 + + # Finer granularity background jobs for refreshing search indexes upon + # BigQuery table columns. Reservations with this job type + # take priority over a default BACKGROUND reservation assignment (if it + # exists). + BACKGROUND_SEARCH_INDEX_REFRESH = 9 + end + + # Assignment will remain in PENDING state if no active capacity commitment is + # present. It will become ACTIVE when some capacity commitment becomes + # active. + module State + # Invalid state value. + STATE_UNSPECIFIED = 0 + + # Queries from assignee will be executed as on-demand, if related + # assignment is pending. + PENDING = 1 + + # Assignment is ready. + ACTIVE = 2 + end + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment ReservationService.CreateAssignment}. + # Note: "bigquery.reservationAssignments.create" permission is required on the + # related assignee. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name of the assignment + # E.g. `projects/myproject/locations/US/reservations/team1-prod` + # @!attribute [rw] assignment + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # Assignment resource to create. + # @!attribute [rw] assignment_id + # @return [::String] + # The optional assignment ID. Assignment name will be generated automatically + # if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # Max length is 64 characters. + class CreateAssignmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name e.g.: + # + # `projects/myproject/locations/US/reservations/team1-prod` + # + # Or: + # + # `projects/myproject/locations/US/reservations/-` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListAssignmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}. + # @!attribute [rw] assignments + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # List of assignments visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListAssignmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment ReservationService.DeleteAssignment}. + # Note: "bigquery.reservationAssignments.delete" permission is required on the + # related assignee. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource, e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + class DeleteAssignmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}. + # Note: "bigquery.reservationAssignments.search" permission is required on the + # related assignee. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the admin project(containing project and + # location), e.g.: + # `projects/myproject/locations/US`. + # @!attribute [rw] query + # @return [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class SearchAssignmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}. + # Note: "bigquery.reservationAssignments.search" permission is required on the + # related assignee. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name with location (project name could be the + # wildcard '-'), e.g.: + # `projects/-/locations/US`. + # @!attribute [rw] query + # @return [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class SearchAllAssignmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}. + # @!attribute [rw] assignments + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # List of assignments visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class SearchAssignmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}. + # @!attribute [rw] assignments + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # List of assignments visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class SearchAllAssignmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment ReservationService.MoveAssignment}. + # + # **Note**: "bigquery.reservationAssignments.create" permission is required on + # the destination_id. + # + # **Note**: "bigquery.reservationAssignments.create" and + # "bigquery.reservationAssignments.delete" permission are required on the + # related assignee. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the assignment, + # e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + # @!attribute [rw] destination_id + # @return [::String] + # The new reservation ID, e.g.: + # `projects/myotherproject/locations/US/reservations/team2-prod` + # @!attribute [rw] assignment_id + # @return [::String] + # The optional assignment ID. A new assignment name is generated if this + # field is empty. + # + # This field can contain only lowercase alphanumeric characters or dashes. + # Max length is 64 characters. + class MoveAssignmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment ReservationService.UpdateAssignment}. + # @!attribute [rw] assignment + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # Content of the assignment to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Standard field mask for the set of fields to be updated. + class UpdateAssignmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fully qualified reference to BigQuery table. + # Internally stored as google.cloud.bi.v1.BqTableReference. + # @!attribute [rw] project_id + # @return [::String] + # Optional. The assigned project ID of the project. + # @!attribute [rw] dataset_id + # @return [::String] + # Optional. The ID of the dataset in the above project. + # @!attribute [rw] table_id + # @return [::String] + # Optional. The ID of the table in the above dataset. + class TableReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a BI Reservation. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the singleton BI reservation. + # Reservation names have the form + # `projects/{project_id}/locations/{location_id}/biReservation`. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of a reservation. + # @!attribute [rw] size + # @return [::Integer] + # Optional. Size of a reservation, in bytes. + # @!attribute [rw] preferred_tables + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::TableReference>] + # Optional. Preferred tables to use BI capacity for. + class BiReservation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a singleton BI reservation. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the requested reservation, for example: + # `projects/{project_id}/locations/{location_id}/biReservation` + class GetBiReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a BI reservation. + # @!attribute [rw] bi_reservation + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # A reservation to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # A list of fields to be updated in this request. + class UpdateBiReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of editions. + # Different features and behaviors are provided to different editions + # Capacity commitments and reservations are linked to editions. + module Edition + # Default value, which will be treated as ENTERPRISE. + EDITION_UNSPECIFIED = 0 + + # Standard edition. + STANDARD = 1 + + # Enterprise edition. + ENTERPRISE = 2 + + # Enterprise Plus edition. + ENTERPRISE_PLUS = 3 + end + + # The failover mode when a user initiates a failover on a reservation + # determines how writes that are pending replication are handled after the + # failover is initiated. + module FailoverMode + # Invalid value. + FAILOVER_MODE_UNSPECIFIED = 0 + + # When customers initiate a soft failover, BigQuery will wait until all + # committed writes are replicated to the secondary. This mode requires both + # regions to be available for the failover to succeed and prevents data loss. + SOFT = 1 + + # When customers initiate a hard failover, BigQuery will not wait until all + # committed writes are replicated to the secondary. There can be data loss + # for hard failover. + HARD = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile new file mode 100644 index 000000000000..d0e18bc92cd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-bigquery-reservation-v1", path: "../" +else + gem "google-cloud-bigquery-reservation-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb new file mode 100644 index 000000000000..521034bd4bbb --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the create_assignment call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment. +# +def create_assignment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new + + # Call the create_assignment method. + result = client.create_assignment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb new file mode 100644 index 000000000000..009f27435599 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the create_capacity_commitment call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment. +# +def create_capacity_commitment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new + + # Call the create_capacity_commitment method. + result = client.create_capacity_commitment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb new file mode 100644 index 000000000000..085d3fc69e50 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the create_reservation call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation. +# +def create_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new + + # Call the create_reservation method. + result = client.create_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb new file mode 100644 index 000000000000..bce27da2456d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the create_reservation_group call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group. +# +def create_reservation_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new + + # Call the create_reservation_group method. + result = client.create_reservation_group request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb new file mode 100644 index 000000000000..bcd9a3be93fc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the delete_assignment call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment. +# +def delete_assignment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new + + # Call the delete_assignment method. + result = client.delete_assignment request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb new file mode 100644 index 000000000000..b0c78a4fd165 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the delete_capacity_commitment call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment. +# +def delete_capacity_commitment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new + + # Call the delete_capacity_commitment method. + result = client.delete_capacity_commitment request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb new file mode 100644 index 000000000000..d8bac2d9baf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the delete_reservation call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation. +# +def delete_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new + + # Call the delete_reservation method. + result = client.delete_reservation request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb new file mode 100644 index 000000000000..fe6838172e60 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the delete_reservation_group call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group. +# +def delete_reservation_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new + + # Call the delete_reservation_group method. + result = client.delete_reservation_group request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb new file mode 100644 index 000000000000..80443f502d44 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the failover_reservation call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation. +# +def failover_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new + + # Call the failover_reservation method. + result = client.failover_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb new file mode 100644 index 000000000000..2b549c493903 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the get_bi_reservation call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation. +# +def get_bi_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new + + # Call the get_bi_reservation method. + result = client.get_bi_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb new file mode 100644 index 000000000000..bf907ad51799 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the get_capacity_commitment call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment. +# +def get_capacity_commitment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new + + # Call the get_capacity_commitment method. + result = client.get_capacity_commitment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb new file mode 100644 index 000000000000..e3861739e77e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the get_iam_policy call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb new file mode 100644 index 000000000000..accd2421609b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the get_reservation call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation. +# +def get_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new + + # Call the get_reservation method. + result = client.get_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb new file mode 100644 index 000000000000..0c3d3ef808b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the get_reservation_group call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group. +# +def get_reservation_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new + + # Call the get_reservation_group method. + result = client.get_reservation_group request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb new file mode 100644 index 000000000000..f1f669f1ff95 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the list_assignments call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments. +# +def list_assignments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new + + # Call the list_assignments method. + result = client.list_assignments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb new file mode 100644 index 000000000000..bcfb6bd8ea92 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the list_capacity_commitments call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments. +# +def list_capacity_commitments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new + + # Call the list_capacity_commitments method. + result = client.list_capacity_commitments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb new file mode 100644 index 000000000000..f06ea8557380 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the list_reservation_groups call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups. +# +def list_reservation_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new + + # Call the list_reservation_groups method. + result = client.list_reservation_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb new file mode 100644 index 000000000000..a33941e64425 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the list_reservations call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations. +# +def list_reservations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new + + # Call the list_reservations method. + result = client.list_reservations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Reservation. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb new file mode 100644 index 000000000000..e613421e5c07 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the merge_capacity_commitments call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments. +# +def merge_capacity_commitments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new + + # Call the merge_capacity_commitments method. + result = client.merge_capacity_commitments request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb new file mode 100644 index 000000000000..bfde018b1dbe --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the move_assignment call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment. +# +def move_assignment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new + + # Call the move_assignment method. + result = client.move_assignment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb new file mode 100644 index 000000000000..b44239d089c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the search_all_assignments call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments. +# +def search_all_assignments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new + + # Call the search_all_assignments method. + result = client.search_all_assignments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb new file mode 100644 index 000000000000..de534b544c70 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the search_assignments call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments. +# +def search_assignments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new + + # Call the search_assignments method. + result = client.search_assignments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb new file mode 100644 index 000000000000..87068c26b062 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the set_iam_policy call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb new file mode 100644 index 000000000000..d162341ed27b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the split_capacity_commitment call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment. +# +def split_capacity_commitment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new + + # Call the split_capacity_commitment method. + result = client.split_capacity_commitment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb new file mode 100644 index 000000000000..a178dceda953 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the test_iam_permissions call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb new file mode 100644 index 000000000000..6f60f2e93e93 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the update_assignment call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment. +# +def update_assignment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new + + # Call the update_assignment method. + result = client.update_assignment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb new file mode 100644 index 000000000000..c3b37b5568d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the update_bi_reservation call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation. +# +def update_bi_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new + + # Call the update_bi_reservation method. + result = client.update_bi_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb new file mode 100644 index 000000000000..47aea627cc66 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the update_capacity_commitment call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment. +# +def update_capacity_commitment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new + + # Call the update_capacity_commitment method. + result = client.update_capacity_commitment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb new file mode 100644 index 000000000000..a607011a6c50 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the update_reservation call in the ReservationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation. +# +def update_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new + + # Call the update_reservation method. + result = client.update_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json new file mode 100644 index 000000000000..9c975b868826 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json @@ -0,0 +1,1175 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-reservation-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.reservation.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync", + "title": "Snippet for the create_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation.", + "file": "reservation_service/create_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "CreateReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListReservations_sync", + "title": "Snippet for the list_reservations call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations.", + "file": "reservation_service/list_reservations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reservations", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "ListReservations", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListReservations", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetReservation_sync", + "title": "Snippet for the get_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation.", + "file": "reservation_service/get_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "GetReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync", + "title": "Snippet for the delete_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation.", + "file": "reservation_service/delete_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "DeleteReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync", + "title": "Snippet for the update_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation.", + "file": "reservation_service/update_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "UpdateReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync", + "title": "Snippet for the failover_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation.", + "file": "reservation_service/failover_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "failover_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "FailoverReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.FailoverReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync", + "title": "Snippet for the create_capacity_commitment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment.", + "file": "reservation_service/create_capacity_commitment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_capacity_commitment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "CreateCapacityCommitment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateCapacityCommitment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync", + "title": "Snippet for the list_capacity_commitments call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments.", + "file": "reservation_service/list_capacity_commitments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_capacity_commitments", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "ListCapacityCommitments", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListCapacityCommitments", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync", + "title": "Snippet for the get_capacity_commitment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment.", + "file": "reservation_service/get_capacity_commitment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_capacity_commitment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "GetCapacityCommitment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetCapacityCommitment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync", + "title": "Snippet for the delete_capacity_commitment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment.", + "file": "reservation_service/delete_capacity_commitment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_capacity_commitment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "DeleteCapacityCommitment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteCapacityCommitment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync", + "title": "Snippet for the update_capacity_commitment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment.", + "file": "reservation_service/update_capacity_commitment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_capacity_commitment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "UpdateCapacityCommitment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateCapacityCommitment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync", + "title": "Snippet for the split_capacity_commitment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment.", + "file": "reservation_service/split_capacity_commitment.rb", + "language": "RUBY", + "client_method": { + "short_name": "split_capacity_commitment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "SplitCapacityCommitment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SplitCapacityCommitment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync", + "title": "Snippet for the merge_capacity_commitments call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments.", + "file": "reservation_service/merge_capacity_commitments.rb", + "language": "RUBY", + "client_method": { + "short_name": "merge_capacity_commitments", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "MergeCapacityCommitments", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.MergeCapacityCommitments", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync", + "title": "Snippet for the create_assignment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment.", + "file": "reservation_service/create_assignment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_assignment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "CreateAssignment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateAssignment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync", + "title": "Snippet for the list_assignments call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments.", + "file": "reservation_service/list_assignments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_assignments", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "ListAssignments", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListAssignments", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync", + "title": "Snippet for the delete_assignment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment.", + "file": "reservation_service/delete_assignment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_assignment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "DeleteAssignment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteAssignment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync", + "title": "Snippet for the search_assignments call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments.", + "file": "reservation_service/search_assignments.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_assignments", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "SearchAssignments", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SearchAssignments", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync", + "title": "Snippet for the search_all_assignments call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments.", + "file": "reservation_service/search_all_assignments.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_all_assignments", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "SearchAllAssignments", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SearchAllAssignments", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync", + "title": "Snippet for the move_assignment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment.", + "file": "reservation_service/move_assignment.rb", + "language": "RUBY", + "client_method": { + "short_name": "move_assignment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "MoveAssignment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.MoveAssignment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync", + "title": "Snippet for the update_assignment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment.", + "file": "reservation_service/update_assignment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_assignment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "UpdateAssignment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateAssignment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync", + "title": "Snippet for the get_bi_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation.", + "file": "reservation_service/get_bi_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_bi_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::BiReservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "GetBiReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetBiReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync", + "title": "Snippet for the update_bi_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation.", + "file": "reservation_service/update_bi_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_bi_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::BiReservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "UpdateBiReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateBiReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy.", + "file": "reservation_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetIamPolicy", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy.", + "file": "reservation_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SetIamPolicy", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions.", + "file": "reservation_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.TestIamPermissions", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync", + "title": "Snippet for the create_reservation_group call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group.", + "file": "reservation_service/create_reservation_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_reservation_group", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "CreateReservationGroup", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateReservationGroup", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync", + "title": "Snippet for the get_reservation_group call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group.", + "file": "reservation_service/get_reservation_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_reservation_group", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "GetReservationGroup", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetReservationGroup", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync", + "title": "Snippet for the delete_reservation_group call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group.", + "file": "reservation_service/delete_reservation_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_reservation_group", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "DeleteReservationGroup", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteReservationGroup", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync", + "title": "Snippet for the list_reservation_groups call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups.", + "file": "reservation_service/list_reservation_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reservation_groups", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "ListReservationGroups", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListReservationGroups", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb new file mode 100644 index 000000000000..f56e3454b155 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/reservation/v1/reservation_service" + +class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_assignment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.assignment_path project: "value0", location: "value1", reservation: "value2", assignment: "value3" + assert_equal "projects/value0/locations/value1/reservations/value2/assignments/value3", path + end + end + + def test_bi_reservation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.bi_reservation_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/biReservation", path + end + end + + def test_capacity_commitment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.capacity_commitment_path project: "value0", location: "value1", capacity_commitment: "value2" + assert_equal "projects/value0/locations/value1/capacityCommitments/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_reservation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reservation_path project: "value0", location: "value1", reservation: "value2" + assert_equal "projects/value0/locations/value1/reservations/value2", path + end + end + + def test_reservation_group_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reservation_group_path project: "value0", location: "value1", reservation_group: "value2" + assert_equal "projects/value0/locations/value1/reservationGroups/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb new file mode 100644 index 000000000000..de701638258c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb @@ -0,0 +1,1703 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/bigquery/reservation/v1/reservation_pb" +require "google/cloud/bigquery/reservation/v1/reservation_service/rest" + + +class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reservation_id = "hello world" + reservation = {} + + create_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_reservation parent: parent, reservation_id: reservation_id, reservation: reservation do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_reservation ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_reservation(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_reservation_client_stub.call_count + end + end + end + + def test_list_reservations + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_reservations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_reservations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reservations_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_reservations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_reservations parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_reservations ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_reservations({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_reservations(::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_reservations_client_stub.call_count + end + end + end + + def test_get_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_reservation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_reservation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_reservation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_reservation_client_stub.call_count + end + end + end + + def test_delete_reservation + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_reservation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_reservation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_reservation ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_reservation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_reservation(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_reservation_client_stub.call_count + end + end + end + + def test_update_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + reservation = {} + update_mask = {} + + update_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_reservation({ reservation: reservation, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_reservation reservation: reservation, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_reservation({ reservation: reservation, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_reservation_client_stub.call_count + end + end + end + + def test_failover_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + failover_mode = :FAILOVER_MODE_UNSPECIFIED + + failover_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_failover_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, failover_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.failover_reservation({ name: name, failover_mode: failover_mode }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.failover_reservation name: name, failover_mode: failover_mode do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.failover_reservation ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.failover_reservation({ name: name, failover_mode: failover_mode }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.failover_reservation(::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, failover_reservation_client_stub.call_count + end + end + end + + def test_create_capacity_commitment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + capacity_commitment = {} + enforce_single_admin_project_per_org = true + capacity_commitment_id = "hello world" + + create_capacity_commitment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_capacity_commitment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_capacity_commitment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_capacity_commitment parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_capacity_commitment_client_stub.call_count + end + end + end + + def test_list_capacity_commitments + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_capacity_commitments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_capacity_commitments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_capacity_commitments_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_capacity_commitments({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_capacity_commitments parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_capacity_commitments({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_capacity_commitments_client_stub.call_count + end + end + end + + def test_get_capacity_commitment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_capacity_commitment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_capacity_commitment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_capacity_commitment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_capacity_commitment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_capacity_commitment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_capacity_commitment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_capacity_commitment_client_stub.call_count + end + end + end + + def test_delete_capacity_commitment + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_capacity_commitment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_capacity_commitment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_capacity_commitment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_capacity_commitment({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_capacity_commitment name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_capacity_commitment({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_capacity_commitment_client_stub.call_count + end + end + end + + def test_update_capacity_commitment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + capacity_commitment = {} + update_mask = {} + + update_capacity_commitment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_capacity_commitment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_capacity_commitment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_capacity_commitment capacity_commitment: capacity_commitment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_capacity_commitment_client_stub.call_count + end + end + end + + def test_split_capacity_commitment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + slot_count = 42 + + split_capacity_commitment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_split_capacity_commitment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, split_capacity_commitment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.split_capacity_commitment({ name: name, slot_count: slot_count }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.split_capacity_commitment name: name, slot_count: slot_count do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.split_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.split_capacity_commitment({ name: name, slot_count: slot_count }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.split_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, split_capacity_commitment_client_stub.call_count + end + end + end + + def test_merge_capacity_commitments + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + capacity_commitment_ids = ["hello world"] + capacity_commitment_id = "hello world" + + merge_capacity_commitments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_merge_capacity_commitments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, merge_capacity_commitments_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.merge_capacity_commitments parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.merge_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.merge_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, merge_capacity_commitments_client_stub.call_count + end + end + end + + def test_create_assignment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + assignment = {} + assignment_id = "hello world" + + create_assignment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_assignment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_assignment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_assignment parent: parent, assignment: assignment, assignment_id: assignment_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_assignment ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_assignment(::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_assignment_client_stub.call_count + end + end + end + + def test_list_assignments + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_assignments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_assignments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_assignments_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_assignments({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_assignments parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_assignments ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_assignments({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_assignments(::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_assignments_client_stub.call_count + end + end + end + + def test_delete_assignment + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_assignment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_assignment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_assignment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_assignment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_assignment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_assignment ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_assignment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_assignment(::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_assignment_client_stub.call_count + end + end + end + + def test_search_assignments + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_assignments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_search_assignments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_assignments_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_assignments_client_stub.call_count + end + end + end + + def test_search_all_assignments + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_all_assignments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_search_all_assignments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_all_assignments_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_all_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_all_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_all_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_all_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_all_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_all_assignments_client_stub.call_count + end + end + end + + def test_move_assignment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination_id = "hello world" + assignment_id = "hello world" + + move_assignment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_move_assignment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, move_assignment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.move_assignment name: name, destination_id: destination_id, assignment_id: assignment_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.move_assignment ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.move_assignment(::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, move_assignment_client_stub.call_count + end + end + end + + def test_update_assignment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + assignment = {} + update_mask = {} + + update_assignment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_assignment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_assignment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_assignment({ assignment: assignment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_assignment assignment: assignment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_assignment ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_assignment({ assignment: assignment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_assignment(::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_assignment_client_stub.call_count + end + end + end + + def test_get_bi_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_bi_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_bi_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_bi_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_bi_reservation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_bi_reservation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_bi_reservation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_bi_reservation_client_stub.call_count + end + end + end + + def test_update_bi_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + bi_reservation = {} + update_mask = {} + + update_bi_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_bi_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_bi_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_bi_reservation bi_reservation: bi_reservation, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_bi_reservation_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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_reservation_group + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reservation_group_id = "hello world" + reservation_group = {} + + create_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_reservation_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_reservation_group_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_reservation_group parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_reservation_group_client_stub.call_count + end + end + end + + def test_get_reservation_group + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_reservation_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_reservation_group_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_reservation_group({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_reservation_group name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_reservation_group({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_reservation_group_client_stub.call_count + end + end + end + + def test_delete_reservation_group + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_reservation_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_reservation_group_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_reservation_group({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_reservation_group name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_reservation_group({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_reservation_group_client_stub.call_count + end + end + end + + def test_list_reservation_groups + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_reservation_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_reservation_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reservation_groups_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_reservation_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_reservation_groups ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_reservation_groups(::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_reservation_groups_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb new file mode 100644 index 000000000000..83f89c3b1580 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb @@ -0,0 +1,1892 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/reservation/v1/reservation_pb" +require "google/cloud/bigquery/reservation/v1/reservation_service" + +class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reservation_id = "hello world" + reservation = {} + + create_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["reservation_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Reservation), request["reservation"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_reservation parent: parent, reservation_id: reservation_id, reservation: reservation do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_reservation ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_reservation(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_reservation_client_stub.call_rpc_count + end + end + + def test_list_reservations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_reservations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reservations, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_reservations_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_reservations({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_reservations parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_reservations ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_reservations({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_reservations(::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_reservations_client_stub.call_rpc_count + end + end + + def test_get_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_reservation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_reservation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_reservation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_reservation_client_stub.call_rpc_count + end + end + + def test_delete_reservation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_reservation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_reservation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_reservation ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_reservation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_reservation(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_reservation_client_stub.call_rpc_count + end + end + + def test_update_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + reservation = {} + update_mask = {} + + update_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Reservation), request["reservation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_reservation({ reservation: reservation, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_reservation reservation: reservation, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_reservation({ reservation: reservation, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_reservation_client_stub.call_rpc_count + end + end + + def test_failover_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + failover_mode = :FAILOVER_MODE_UNSPECIFIED + + failover_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :failover_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, request + assert_equal "hello world", request["name"] + assert_equal :FAILOVER_MODE_UNSPECIFIED, request["failover_mode"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, failover_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.failover_reservation({ name: name, failover_mode: failover_mode }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.failover_reservation name: name, failover_mode: failover_mode do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.failover_reservation ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.failover_reservation({ name: name, failover_mode: failover_mode }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.failover_reservation(::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, failover_reservation_client_stub.call_rpc_count + end + end + + def test_create_capacity_commitment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + capacity_commitment = {} + enforce_single_admin_project_per_org = true + capacity_commitment_id = "hello world" + + create_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_capacity_commitment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment), request["capacity_commitment"] + assert_equal true, request["enforce_single_admin_project_per_org"] + assert_equal "hello world", request["capacity_commitment_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_capacity_commitment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_capacity_commitment parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_capacity_commitment_client_stub.call_rpc_count + end + end + + def test_list_capacity_commitments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_capacity_commitments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_capacity_commitments, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_capacity_commitments_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_capacity_commitments({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_capacity_commitments parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_capacity_commitments({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_capacity_commitments_client_stub.call_rpc_count + end + end + + def test_get_capacity_commitment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_capacity_commitment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_capacity_commitment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_capacity_commitment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_capacity_commitment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_capacity_commitment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_capacity_commitment_client_stub.call_rpc_count + end + end + + def test_delete_capacity_commitment + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_capacity_commitment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_capacity_commitment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_capacity_commitment({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_capacity_commitment name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_capacity_commitment({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_capacity_commitment_client_stub.call_rpc_count + end + end + + def test_update_capacity_commitment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + capacity_commitment = {} + update_mask = {} + + update_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_capacity_commitment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment), request["capacity_commitment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_capacity_commitment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_capacity_commitment capacity_commitment: capacity_commitment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_capacity_commitment_client_stub.call_rpc_count + end + end + + def test_split_capacity_commitment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + slot_count = 42 + + split_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :split_capacity_commitment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["slot_count"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, split_capacity_commitment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.split_capacity_commitment({ name: name, slot_count: slot_count }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.split_capacity_commitment name: name, slot_count: slot_count do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.split_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.split_capacity_commitment({ name: name, slot_count: slot_count }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.split_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, split_capacity_commitment_client_stub.call_rpc_count + end + end + + def test_merge_capacity_commitments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + capacity_commitment_ids = ["hello world"] + capacity_commitment_id = "hello world" + + merge_capacity_commitments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :merge_capacity_commitments, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["capacity_commitment_ids"] + assert_equal "hello world", request["capacity_commitment_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, merge_capacity_commitments_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.merge_capacity_commitments parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.merge_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.merge_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, merge_capacity_commitments_client_stub.call_rpc_count + end + end + + def test_create_assignment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + assignment = {} + assignment_id = "hello world" + + create_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_assignment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Assignment), request["assignment"] + assert_equal "hello world", request["assignment_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_assignment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_assignment parent: parent, assignment: assignment, assignment_id: assignment_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_assignment ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_assignment(::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_assignment_client_stub.call_rpc_count + end + end + + def test_list_assignments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_assignments, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_assignments_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_assignments({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_assignments parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_assignments ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_assignments({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_assignments(::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_assignments_client_stub.call_rpc_count + end + end + + def test_delete_assignment + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_assignment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_assignment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_assignment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_assignment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_assignment ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_assignment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_assignment(::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_assignment_client_stub.call_rpc_count + end + end + + def test_search_assignments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_assignments, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_assignments_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_assignments_client_stub.call_rpc_count + end + end + + def test_search_all_assignments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_all_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_all_assignments, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_all_assignments_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_all_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_all_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_all_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_all_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_all_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_all_assignments_client_stub.call_rpc_count + end + end + + def test_move_assignment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination_id = "hello world" + assignment_id = "hello world" + + move_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :move_assignment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["destination_id"] + assert_equal "hello world", request["assignment_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, move_assignment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.move_assignment name: name, destination_id: destination_id, assignment_id: assignment_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.move_assignment ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.move_assignment(::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, move_assignment_client_stub.call_rpc_count + end + end + + def test_update_assignment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + assignment = {} + update_mask = {} + + update_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_assignment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Assignment), request["assignment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_assignment_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_assignment({ assignment: assignment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_assignment assignment: assignment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_assignment ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_assignment({ assignment: assignment, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_assignment(::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_assignment_client_stub.call_rpc_count + end + end + + def test_get_bi_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_bi_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_bi_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_bi_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_bi_reservation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_bi_reservation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_bi_reservation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_bi_reservation_client_stub.call_rpc_count + end + end + + def test_update_bi_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + bi_reservation = {} + update_mask = {} + + update_bi_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_bi_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::BiReservation), request["bi_reservation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_bi_reservation_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_bi_reservation bi_reservation: bi_reservation, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_bi_reservation_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::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_reservation_group + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reservation_group_id = "hello world" + reservation_group = {} + + create_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_reservation_group, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["reservation_group_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup), request["reservation_group"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_reservation_group_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_reservation_group parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_reservation_group_client_stub.call_rpc_count + end + end + + def test_get_reservation_group + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_reservation_group, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_reservation_group_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_reservation_group({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_reservation_group name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_reservation_group({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_reservation_group_client_stub.call_rpc_count + end + end + + def test_delete_reservation_group + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_reservation_group, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_reservation_group_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_reservation_group({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_reservation_group name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_reservation_group({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_reservation_group_client_stub.call_rpc_count + end + end + + def test_list_reservation_groups + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_reservation_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reservation_groups, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_reservation_groups_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_reservation_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_reservation_groups ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_reservation_groups(::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_reservation_groups_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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" From 3d6997629f717001d268ca060a7b147c093716f8 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 6 Aug 2026 21:03: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 --- google-cloud-app_hub-v1/.owlbot-manifest.json | 3 +- google-cloud-app_hub-v1/.toys.rb | 2 +- google-cloud-app_hub-v1/Rakefile | 2 +- .../lib/google-cloud-app_hub-v1.rb | 2 +- .../lib/google/cloud/app_hub/v1.rb | 2 +- .../lib/google/cloud/app_hub/v1/app_hub.rb | 2 +- .../google/cloud/app_hub/v1/app_hub/client.rb | 2 +- .../cloud/app_hub/v1/app_hub/credentials.rb | 2 +- .../cloud/app_hub/v1/app_hub/operations.rb | 2 +- .../google/cloud/app_hub/v1/app_hub/paths.rb | 2 +- .../google/cloud/app_hub/v1/app_hub/rest.rb | 2 +- .../cloud/app_hub/v1/app_hub/rest/client.rb | 2 +- .../app_hub/v1/app_hub/rest/operations.rb | 2 +- .../app_hub/v1/app_hub/rest/service_stub.rb | 2 +- .../cloud/app_hub/v1/bindings_override.rb | 2 +- .../lib/google/cloud/app_hub/v1/rest.rb | 2 +- .../apphub/v1/apphub_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 +- .../google/cloud/apphub/v1/apphub_service.rb | 2 +- .../google/cloud/apphub/v1/application.rb | 2 +- .../google/cloud/apphub/v1/attributes.rb | 2 +- .../google/cloud/apphub/v1/service.rb | 2 +- .../apphub/v1/service_project_attachment.rb | 2 +- .../google/cloud/apphub/v1/workload.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 +- google-cloud-app_hub-v1/snippets/Gemfile | 2 +- .../snippets/app_hub/create_application.rb | 2 +- .../snippets/app_hub/create_service.rb | 2 +- .../create_service_project_attachment.rb | 2 +- .../snippets/app_hub/create_workload.rb | 2 +- .../snippets/app_hub/delete_application.rb | 2 +- .../snippets/app_hub/delete_service.rb | 2 +- .../delete_service_project_attachment.rb | 2 +- .../snippets/app_hub/delete_workload.rb | 2 +- .../detach_service_project_attachment.rb | 2 +- .../snippets/app_hub/get_application.rb | 2 +- .../app_hub/get_discovered_service.rb | 2 +- .../app_hub/get_discovered_workload.rb | 2 +- .../snippets/app_hub/get_service.rb | 2 +- .../app_hub/get_service_project_attachment.rb | 2 +- .../snippets/app_hub/get_workload.rb | 2 +- .../snippets/app_hub/list_applications.rb | 2 +- .../app_hub/list_discovered_services.rb | 2 +- .../app_hub/list_discovered_workloads.rb | 2 +- .../list_service_project_attachments.rb | 2 +- .../snippets/app_hub/list_services.rb | 2 +- .../snippets/app_hub/list_workloads.rb | 2 +- .../app_hub/lookup_discovered_service.rb | 2 +- .../app_hub/lookup_discovered_workload.rb | 2 +- .../lookup_service_project_attachment.rb | 2 +- .../snippets/app_hub/update_application.rb | 2 +- .../snippets/app_hub/update_service.rb | 2 +- .../snippets/app_hub/update_workload.rb | 2 +- .../app_hub/v1/app_hub_operations_test.rb | 2 +- .../cloud/app_hub/v1/app_hub_paths_test.rb | 2 +- .../cloud/app_hub/v1/app_hub_rest_test.rb | 2 +- .../google/cloud/app_hub/v1/app_hub_test.rb | 2 +- google-cloud-app_hub-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../proto_docs/google/protobuf/timestamp.rb | 13 +- .../.owlbot-manifest.json | 3 +- google-cloud-artifact_registry-v1/.toys.rb | 2 +- google-cloud-artifact_registry-v1/Rakefile | 2 +- .../lib/google-cloud-artifact_registry-v1.rb | 2 +- .../lib/google/cloud/artifact_registry/v1.rb | 2 +- .../artifact_registry/v1/artifact_registry.rb | 2 +- .../v1/artifact_registry/client.rb | 2 +- .../v1/artifact_registry/credentials.rb | 2 +- .../v1/artifact_registry/operations.rb | 2 +- .../v1/artifact_registry/paths.rb | 2 +- .../v1/artifact_registry/rest.rb | 2 +- .../v1/artifact_registry/rest/client.rb | 2 +- .../v1/artifact_registry/rest/operations.rb | 2 +- .../v1/artifact_registry/rest/service_stub.rb | 2 +- .../artifact_registry/v1/bindings_override.rb | 2 +- .../google/cloud/artifact_registry/v1/rest.rb | 2 +- .../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/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../artifactregistry/v1/apt_artifact.rb | 2 +- .../devtools/artifactregistry/v1/artifact.rb | 2 +- .../artifactregistry/v1/attachment.rb | 2 +- .../devtools/artifactregistry/v1/export.rb | 2 +- .../devtools/artifactregistry/v1/file.rb | 2 +- .../devtools/artifactregistry/v1/generic.rb | 2 +- .../google/devtools/artifactregistry/v1/go.rb | 2 +- .../artifactregistry/v1/kfp_artifact.rb | 2 +- .../devtools/artifactregistry/v1/package.rb | 2 +- .../artifactregistry/v1/repository.rb | 2 +- .../devtools/artifactregistry/v1/rule.rb | 2 +- .../devtools/artifactregistry/v1/service.rb | 2 +- .../devtools/artifactregistry/v1/settings.rb | 2 +- .../devtools/artifactregistry/v1/tag.rb | 2 +- .../devtools/artifactregistry/v1/version.rb | 2 +- .../artifactregistry/v1/vpcsc_config.rb | 2 +- .../artifactregistry/v1/yum_artifact.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_delete_versions.rb | 2 +- .../artifact_registry/create_attachment.rb | 2 +- .../artifact_registry/create_repository.rb | 2 +- .../snippets/artifact_registry/create_rule.rb | 2 +- .../snippets/artifact_registry/create_tag.rb | 2 +- .../artifact_registry/delete_attachment.rb | 2 +- .../snippets/artifact_registry/delete_file.rb | 2 +- .../artifact_registry/delete_package.rb | 2 +- .../artifact_registry/delete_repository.rb | 2 +- .../snippets/artifact_registry/delete_rule.rb | 2 +- .../snippets/artifact_registry/delete_tag.rb | 2 +- .../artifact_registry/delete_version.rb | 2 +- .../artifact_registry/export_artifact.rb | 2 +- .../artifact_registry/get_attachment.rb | 2 +- .../artifact_registry/get_docker_image.rb | 2 +- .../snippets/artifact_registry/get_file.rb | 2 +- .../artifact_registry/get_iam_policy.rb | 2 +- .../artifact_registry/get_maven_artifact.rb | 2 +- .../artifact_registry/get_npm_package.rb | 2 +- .../snippets/artifact_registry/get_package.rb | 2 +- .../artifact_registry/get_project_settings.rb | 2 +- .../artifact_registry/get_python_package.rb | 2 +- .../artifact_registry/get_repository.rb | 2 +- .../snippets/artifact_registry/get_rule.rb | 2 +- .../snippets/artifact_registry/get_tag.rb | 2 +- .../snippets/artifact_registry/get_version.rb | 2 +- .../artifact_registry/get_vpcsc_config.rb | 2 +- .../artifact_registry/import_apt_artifacts.rb | 2 +- .../artifact_registry/import_yum_artifacts.rb | 2 +- .../artifact_registry/list_attachments.rb | 2 +- .../artifact_registry/list_docker_images.rb | 2 +- .../snippets/artifact_registry/list_files.rb | 2 +- .../artifact_registry/list_maven_artifacts.rb | 2 +- .../artifact_registry/list_npm_packages.rb | 2 +- .../artifact_registry/list_packages.rb | 2 +- .../artifact_registry/list_python_packages.rb | 2 +- .../artifact_registry/list_repositories.rb | 2 +- .../snippets/artifact_registry/list_rules.rb | 2 +- .../snippets/artifact_registry/list_tags.rb | 2 +- .../artifact_registry/list_versions.rb | 2 +- .../artifact_registry/set_iam_policy.rb | 2 +- .../artifact_registry/test_iam_permissions.rb | 2 +- .../snippets/artifact_registry/update_file.rb | 2 +- .../artifact_registry/update_package.rb | 2 +- .../update_project_settings.rb | 2 +- .../artifact_registry/update_repository.rb | 2 +- .../snippets/artifact_registry/update_rule.rb | 2 +- .../snippets/artifact_registry/update_tag.rb | 2 +- .../artifact_registry/update_version.rb | 2 +- .../artifact_registry/update_vpcsc_config.rb | 2 +- .../v1/artifact_registry_operations_test.rb | 2 +- .../v1/artifact_registry_paths_test.rb | 2 +- .../v1/artifact_registry_rest_test.rb | 2 +- .../v1/artifact_registry_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- .../google-cloud-artifact_registry-v1beta2.rb | 2 +- .../google/cloud/artifact_registry/v1beta2.rb | 2 +- .../v1beta2/artifact_registry.rb | 2 +- .../v1beta2/artifact_registry/client.rb | 2 +- .../v1beta2/artifact_registry/credentials.rb | 2 +- .../v1beta2/artifact_registry/operations.rb | 2 +- .../v1beta2/artifact_registry/paths.rb | 2 +- .../v1beta2/artifact_registry/rest.rb | 2 +- .../v1beta2/artifact_registry/rest/client.rb | 2 +- .../artifact_registry/rest/operations.rb | 2 +- .../artifact_registry/rest/service_stub.rb | 2 +- .../v1beta2/bindings_override.rb | 2 +- .../cloud/artifact_registry/v1beta2/rest.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 +- .../artifactregistry/v1beta2/apt_artifact.rb | 2 +- .../devtools/artifactregistry/v1beta2/file.rb | 2 +- .../artifactregistry/v1beta2/package.rb | 2 +- .../artifactregistry/v1beta2/repository.rb | 2 +- .../artifactregistry/v1beta2/service.rb | 2 +- .../artifactregistry/v1beta2/settings.rb | 2 +- .../devtools/artifactregistry/v1beta2/tag.rb | 2 +- .../artifactregistry/v1beta2/version.rb | 2 +- .../artifactregistry/v1beta2/yum_artifact.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 +- .../artifact_registry/create_repository.rb | 2 +- .../snippets/artifact_registry/create_tag.rb | 2 +- .../artifact_registry/delete_package.rb | 2 +- .../artifact_registry/delete_repository.rb | 2 +- .../snippets/artifact_registry/delete_tag.rb | 2 +- .../artifact_registry/delete_version.rb | 2 +- .../snippets/artifact_registry/get_file.rb | 2 +- .../artifact_registry/get_iam_policy.rb | 2 +- .../snippets/artifact_registry/get_package.rb | 2 +- .../artifact_registry/get_project_settings.rb | 2 +- .../artifact_registry/get_repository.rb | 2 +- .../snippets/artifact_registry/get_tag.rb | 2 +- .../snippets/artifact_registry/get_version.rb | 2 +- .../artifact_registry/import_apt_artifacts.rb | 2 +- .../artifact_registry/import_yum_artifacts.rb | 2 +- .../snippets/artifact_registry/list_files.rb | 2 +- .../artifact_registry/list_packages.rb | 2 +- .../artifact_registry/list_repositories.rb | 2 +- .../snippets/artifact_registry/list_tags.rb | 2 +- .../artifact_registry/list_versions.rb | 2 +- .../artifact_registry/set_iam_policy.rb | 2 +- .../artifact_registry/test_iam_permissions.rb | 2 +- .../update_project_settings.rb | 2 +- .../artifact_registry/update_repository.rb | 2 +- .../snippets/artifact_registry/update_tag.rb | 2 +- .../artifact_registry_operations_test.rb | 2 +- .../v1beta2/artifact_registry_paths_test.rb | 2 +- .../v1beta2/artifact_registry_rest_test.rb | 2 +- .../v1beta2/artifact_registry_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-assured_workloads-v1/.toys.rb | 2 +- google-cloud-assured_workloads-v1/Rakefile | 2 +- .../lib/google-cloud-assured_workloads-v1.rb | 2 +- .../lib/google/cloud/assured_workloads/v1.rb | 2 +- .../v1/assured_workloads_service.rb | 2 +- .../v1/assured_workloads_service/client.rb | 2 +- .../assured_workloads_service/credentials.rb | 2 +- .../assured_workloads_service/operations.rb | 2 +- .../v1/assured_workloads_service/paths.rb | 2 +- .../v1/assured_workloads_service/rest.rb | 2 +- .../assured_workloads_service/rest/client.rb | 2 +- .../rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- .../google/cloud/assured_workloads/v1/rest.rb | 2 +- .../v1/assuredworkloads_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 +- .../assuredworkloads/v1/assuredworkloads.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 +- .../snippets/Gemfile | 2 +- .../acknowledge_violation.rb | 2 +- .../create_workload.rb | 2 +- .../delete_workload.rb | 2 +- .../get_violation.rb | 2 +- .../assured_workloads_service/get_workload.rb | 2 +- .../list_violations.rb | 2 +- .../list_workloads.rb | 2 +- .../restrict_allowed_resources.rb | 2 +- .../update_workload.rb | 2 +- ...sured_workloads_service_operations_test.rb | 2 +- .../assured_workloads_service_paths_test.rb | 2 +- .../v1/assured_workloads_service_rest_test.rb | 2 +- .../v1/assured_workloads_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- .../google-cloud-assured_workloads-v1beta1.rb | 2 +- .../google/cloud/assured_workloads/v1beta1.rb | 2 +- .../v1beta1/assured_workloads_service.rb | 2 +- .../assured_workloads_service/client.rb | 2 +- .../assured_workloads_service/credentials.rb | 2 +- .../assured_workloads_service/operations.rb | 2 +- .../assured_workloads_service/paths.rb | 2 +- .../v1beta1/assured_workloads_service/rest.rb | 2 +- .../assured_workloads_service/rest/client.rb | 2 +- .../rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- .../cloud/assured_workloads/v1beta1/rest.rb | 2 +- .../assuredworkloads_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 +- .../v1beta1/assuredworkloads.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 +- .../snippets/Gemfile | 2 +- .../analyze_workload_move.rb | 2 +- .../create_workload.rb | 2 +- .../delete_workload.rb | 2 +- .../assured_workloads_service/get_workload.rb | 2 +- .../list_workloads.rb | 2 +- .../restrict_allowed_resources.rb | 2 +- .../update_workload.rb | 2 +- ...sured_workloads_service_operations_test.rb | 2 +- .../assured_workloads_service_paths_test.rb | 2 +- .../assured_workloads_service_rest_test.rb | 2 +- .../v1beta1/assured_workloads_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../proto_docs/google/protobuf/timestamp.rb | 13 +- google-cloud-automl-v1/.owlbot-manifest.json | 1 + google-cloud-automl-v1/.toys.rb | 2 +- google-cloud-automl-v1/Rakefile | 2 +- .../lib/google-cloud-automl-v1.rb | 2 +- .../lib/google/cloud/automl/v1.rb | 2 +- .../lib/google/cloud/automl/v1/automl.rb | 2 +- .../google/cloud/automl/v1/automl/client.rb | 2 +- .../cloud/automl/v1/automl/credentials.rb | 2 +- .../cloud/automl/v1/automl/operations.rb | 2 +- .../google/cloud/automl/v1/automl/paths.rb | 2 +- .../lib/google/cloud/automl/v1/automl/rest.rb | 2 +- .../cloud/automl/v1/automl/rest/client.rb | 2 +- .../cloud/automl/v1/automl/rest/operations.rb | 2 +- .../automl/v1/automl/rest/service_stub.rb | 2 +- .../cloud/automl/v1/prediction_service.rb | 2 +- .../automl/v1/prediction_service/client.rb | 2 +- .../v1/prediction_service/credentials.rb | 2 +- .../v1/prediction_service/operations.rb | 2 +- .../automl/v1/prediction_service/paths.rb | 2 +- .../automl/v1/prediction_service/rest.rb | 2 +- .../v1/prediction_service/rest/client.rb | 2 +- .../v1/prediction_service/rest/operations.rb | 2 +- .../prediction_service/rest/service_stub.rb | 2 +- .../v1/prediction_service_services_pb.rb | 2 +- .../lib/google/cloud/automl/v1/rest.rb | 2 +- .../cloud/automl/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/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/automl/v1/annotation_payload.rb | 2 +- .../google/cloud/automl/v1/annotation_spec.rb | 2 +- .../google/cloud/automl/v1/classification.rb | 2 +- .../google/cloud/automl/v1/data_items.rb | 2 +- .../google/cloud/automl/v1/dataset.rb | 2 +- .../google/cloud/automl/v1/detection.rb | 2 +- .../google/cloud/automl/v1/geometry.rb | 2 +- .../google/cloud/automl/v1/image.rb | 2 +- .../proto_docs/google/cloud/automl/v1/io.rb | 2 +- .../google/cloud/automl/v1/model.rb | 2 +- .../cloud/automl/v1/model_evaluation.rb | 2 +- .../google/cloud/automl/v1/operations.rb | 2 +- .../cloud/automl/v1/prediction_service.rb | 2 +- .../google/cloud/automl/v1/service.rb | 2 +- .../proto_docs/google/cloud/automl/v1/text.rb | 2 +- .../google/cloud/automl/v1/text_extraction.rb | 2 +- .../google/cloud/automl/v1/text_segment.rb | 2 +- .../google/cloud/automl/v1/text_sentiment.rb | 2 +- .../google/cloud/automl/v1/translation.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 +- google-cloud-automl-v1/snippets/Gemfile | 2 +- .../snippets/automl/create_dataset.rb | 2 +- .../snippets/automl/create_model.rb | 2 +- .../snippets/automl/delete_dataset.rb | 2 +- .../snippets/automl/delete_model.rb | 2 +- .../snippets/automl/deploy_model.rb | 2 +- .../snippets/automl/export_data.rb | 2 +- .../snippets/automl/export_model.rb | 2 +- .../snippets/automl/get_annotation_spec.rb | 2 +- .../snippets/automl/get_dataset.rb | 2 +- .../snippets/automl/get_model.rb | 2 +- .../snippets/automl/get_model_evaluation.rb | 2 +- .../snippets/automl/import_data.rb | 2 +- .../snippets/automl/list_datasets.rb | 2 +- .../snippets/automl/list_model_evaluations.rb | 2 +- .../snippets/automl/list_models.rb | 2 +- .../snippets/automl/undeploy_model.rb | 2 +- .../snippets/automl/update_dataset.rb | 2 +- .../snippets/automl/update_model.rb | 2 +- .../prediction_service/batch_predict.rb | 2 +- .../snippets/prediction_service/predict.rb | 2 +- .../cloud/automl/v1/automl_operations_test.rb | 2 +- .../cloud/automl/v1/automl_paths_test.rb | 2 +- .../cloud/automl/v1/automl_rest_test.rb | 2 +- .../google/cloud/automl/v1/automl_test.rb | 2 +- .../v1/prediction_service_operations_test.rb | 2 +- .../v1/prediction_service_paths_test.rb | 2 +- .../automl/v1/prediction_service_rest_test.rb | 2 +- .../automl/v1/prediction_service_test.rb | 2 +- google-cloud-automl-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 1 + google-cloud-automl-v1beta1/.toys.rb | 2 +- google-cloud-automl-v1beta1/Rakefile | 2 +- .../lib/google-cloud-automl-v1beta1.rb | 2 +- .../lib/google/cloud/automl/v1beta1.rb | 2 +- .../lib/google/cloud/automl/v1beta1/automl.rb | 2 +- .../cloud/automl/v1beta1/automl/client.rb | 2 +- .../automl/v1beta1/automl/credentials.rb | 2 +- .../cloud/automl/v1beta1/automl/operations.rb | 2 +- .../cloud/automl/v1beta1/automl/paths.rb | 2 +- .../cloud/automl/v1beta1/automl/rest.rb | 2 +- .../automl/v1beta1/automl/rest/client.rb | 2 +- .../automl/v1beta1/automl/rest/operations.rb | 2 +- .../v1beta1/automl/rest/service_stub.rb | 2 +- .../automl/v1beta1/prediction_service.rb | 2 +- .../v1beta1/prediction_service/client.rb | 2 +- .../v1beta1/prediction_service/credentials.rb | 2 +- .../v1beta1/prediction_service/operations.rb | 2 +- .../v1beta1/prediction_service/paths.rb | 2 +- .../automl/v1beta1/prediction_service/rest.rb | 2 +- .../v1beta1/prediction_service/rest/client.rb | 2 +- .../prediction_service/rest/operations.rb | 2 +- .../prediction_service/rest/service_stub.rb | 2 +- .../v1beta1/prediction_service_services_pb.rb | 2 +- .../lib/google/cloud/automl/v1beta1/rest.rb | 2 +- .../automl/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 +- .../automl/v1beta1/annotation_payload.rb | 2 +- .../cloud/automl/v1beta1/annotation_spec.rb | 2 +- .../cloud/automl/v1beta1/classification.rb | 2 +- .../cloud/automl/v1beta1/column_spec.rb | 2 +- .../google/cloud/automl/v1beta1/data_items.rb | 2 +- .../google/cloud/automl/v1beta1/data_stats.rb | 2 +- .../google/cloud/automl/v1beta1/data_types.rb | 2 +- .../google/cloud/automl/v1beta1/dataset.rb | 2 +- .../google/cloud/automl/v1beta1/detection.rb | 2 +- .../google/cloud/automl/v1beta1/geometry.rb | 2 +- .../google/cloud/automl/v1beta1/image.rb | 2 +- .../google/cloud/automl/v1beta1/io.rb | 2 +- .../google/cloud/automl/v1beta1/model.rb | 2 +- .../cloud/automl/v1beta1/model_evaluation.rb | 2 +- .../google/cloud/automl/v1beta1/operations.rb | 2 +- .../automl/v1beta1/prediction_service.rb | 2 +- .../google/cloud/automl/v1beta1/ranges.rb | 2 +- .../google/cloud/automl/v1beta1/regression.rb | 2 +- .../google/cloud/automl/v1beta1/service.rb | 2 +- .../google/cloud/automl/v1beta1/table_spec.rb | 2 +- .../google/cloud/automl/v1beta1/tables.rb | 2 +- .../google/cloud/automl/v1beta1/temporal.rb | 2 +- .../google/cloud/automl/v1beta1/text.rb | 2 +- .../cloud/automl/v1beta1/text_extraction.rb | 2 +- .../cloud/automl/v1beta1/text_segment.rb | 2 +- .../cloud/automl/v1beta1/text_sentiment.rb | 2 +- .../cloud/automl/v1beta1/translation.rb | 2 +- .../google/cloud/automl/v1beta1/video.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 +- google-cloud-automl-v1beta1/snippets/Gemfile | 2 +- .../snippets/automl/create_dataset.rb | 2 +- .../snippets/automl/create_model.rb | 2 +- .../snippets/automl/delete_dataset.rb | 2 +- .../snippets/automl/delete_model.rb | 2 +- .../snippets/automl/deploy_model.rb | 2 +- .../snippets/automl/export_data.rb | 2 +- .../automl/export_evaluated_examples.rb | 2 +- .../snippets/automl/export_model.rb | 2 +- .../snippets/automl/get_annotation_spec.rb | 2 +- .../snippets/automl/get_column_spec.rb | 2 +- .../snippets/automl/get_dataset.rb | 2 +- .../snippets/automl/get_model.rb | 2 +- .../snippets/automl/get_model_evaluation.rb | 2 +- .../snippets/automl/get_table_spec.rb | 2 +- .../snippets/automl/import_data.rb | 2 +- .../snippets/automl/list_column_specs.rb | 2 +- .../snippets/automl/list_datasets.rb | 2 +- .../snippets/automl/list_model_evaluations.rb | 2 +- .../snippets/automl/list_models.rb | 2 +- .../snippets/automl/list_table_specs.rb | 2 +- .../snippets/automl/undeploy_model.rb | 2 +- .../snippets/automl/update_column_spec.rb | 2 +- .../snippets/automl/update_dataset.rb | 2 +- .../snippets/automl/update_table_spec.rb | 2 +- .../prediction_service/batch_predict.rb | 2 +- .../snippets/prediction_service/predict.rb | 2 +- .../automl/v1beta1/automl_operations_test.rb | 2 +- .../cloud/automl/v1beta1/automl_paths_test.rb | 2 +- .../cloud/automl/v1beta1/automl_rest_test.rb | 2 +- .../cloud/automl/v1beta1/automl_test.rb | 2 +- .../prediction_service_operations_test.rb | 2 +- .../v1beta1/prediction_service_paths_test.rb | 2 +- .../v1beta1/prediction_service_rest_test.rb | 2 +- .../automl/v1beta1/prediction_service_test.rb | 2 +- google-cloud-automl-v1beta1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-backupdr-v1/.toys.rb | 2 +- google-cloud-backupdr-v1/Rakefile | 2 +- .../lib/google-cloud-backupdr-v1.rb | 2 +- .../lib/google/cloud/backupdr/v1.rb | 2 +- .../lib/google/cloud/backupdr/v1/backupdr.rb | 2 +- .../cloud/backupdr/v1/backupdr/client.rb | 2 +- .../cloud/backupdr/v1/backupdr/credentials.rb | 2 +- .../cloud/backupdr/v1/backupdr/operations.rb | 2 +- .../cloud/backupdr/v1/backupdr/paths.rb | 2 +- .../google/cloud/backupdr/v1/backupdr/rest.rb | 2 +- .../cloud/backupdr/v1/backupdr/rest/client.rb | 2 +- .../backupdr/v1/backupdr/rest/operations.rb | 2 +- .../backupdr/v1/backupdr/rest/service_stub.rb | 2 +- .../cloud/backupdr/v1/backupdr_services_pb.rb | 2 +- .../cloud/backupdr/v1/bindings_override.rb | 2 +- .../lib/google/cloud/backupdr/v1/rest.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 +- .../google/cloud/backupdr/v1/backupdr.rb | 2 +- .../google/cloud/backupdr/v1/backupplan.rb | 2 +- .../backupdr/v1/backupplanassociation.rb | 2 +- .../google/cloud/backupdr/v1/backupvault.rb | 2 +- .../cloud/backupdr/v1/backupvault_ba.rb | 2 +- .../cloud/backupdr/v1/backupvault_cloudsql.rb | 2 +- .../cloud/backupdr/v1/backupvault_disk.rb | 2 +- .../cloud/backupdr/v1/backupvault_gce.rb | 2 +- .../cloud/backupdr/v1/datasourcereference.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 +- .../proto_docs/google/type/dayofweek.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../proto_docs/google/type/month.rb | 2 +- google-cloud-backupdr-v1/snippets/Gemfile | 2 +- .../snippets/backupdr/create_backup_plan.rb | 2 +- .../create_backup_plan_association.rb | 2 +- .../snippets/backupdr/create_backup_vault.rb | 2 +- .../backupdr/create_management_server.rb | 2 +- .../snippets/backupdr/delete_backup.rb | 2 +- .../snippets/backupdr/delete_backup_plan.rb | 2 +- .../delete_backup_plan_association.rb | 2 +- .../snippets/backupdr/delete_backup_vault.rb | 2 +- .../backupdr/delete_management_server.rb | 2 +- ...kup_plan_associations_for_resource_type.rb | 2 +- .../fetch_backups_for_resource_type.rb | 2 +- ...ata_source_references_for_resource_type.rb | 2 +- .../backupdr/fetch_usable_backup_vaults.rb | 2 +- .../snippets/backupdr/get_backup.rb | 2 +- .../snippets/backupdr/get_backup_plan.rb | 2 +- .../backupdr/get_backup_plan_association.rb | 2 +- .../backupdr/get_backup_plan_revision.rb | 2 +- .../snippets/backupdr/get_backup_vault.rb | 2 +- .../snippets/backupdr/get_data_source.rb | 2 +- .../backupdr/get_data_source_reference.rb | 2 +- .../backupdr/get_management_server.rb | 2 +- .../snippets/backupdr/initialize_service.rb | 2 +- .../backupdr/list_backup_plan_associations.rb | 2 +- .../backupdr/list_backup_plan_revisions.rb | 2 +- .../snippets/backupdr/list_backup_plans.rb | 2 +- .../snippets/backupdr/list_backup_vaults.rb | 2 +- .../snippets/backupdr/list_backups.rb | 2 +- .../backupdr/list_data_source_references.rb | 2 +- .../snippets/backupdr/list_data_sources.rb | 2 +- .../backupdr/list_management_servers.rb | 2 +- .../snippets/backupdr/restore_backup.rb | 2 +- .../snippets/backupdr/trigger_backup.rb | 2 +- .../snippets/backupdr/update_backup.rb | 2 +- .../snippets/backupdr/update_backup_plan.rb | 2 +- .../update_backup_plan_association.rb | 2 +- .../snippets/backupdr/update_backup_vault.rb | 2 +- .../snippets/backupdr/update_data_source.rb | 2 +- .../backupdr/v1/backupdr_operations_test.rb | 2 +- .../cloud/backupdr/v1/backupdr_paths_test.rb | 2 +- .../cloud/backupdr/v1/backupdr_rest_test.rb | 2 +- .../google/cloud/backupdr/v1/backupdr_test.rb | 2 +- google-cloud-backupdr-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-bare_metal_solution-v2/.toys.rb | 2 +- google-cloud-bare_metal_solution-v2/Rakefile | 2 +- .../google-cloud-bare_metal_solution-v2.rb | 2 +- .../google/cloud/bare_metal_solution/v2.rb | 2 +- .../v2/bare_metal_solution.rb | 2 +- .../v2/bare_metal_solution/client.rb | 2 +- .../v2/bare_metal_solution/credentials.rb | 2 +- .../v2/bare_metal_solution/operations.rb | 2 +- .../v2/bare_metal_solution/paths.rb | 2 +- .../v2/bare_metal_solution/rest.rb | 2 +- .../v2/bare_metal_solution/rest/client.rb | 2 +- .../v2/bare_metal_solution/rest/operations.rb | 2 +- .../bare_metal_solution/rest/service_stub.rb | 2 +- .../v2/bindings_override.rb | 2 +- .../cloud/bare_metal_solution/v2/rest.rb | 2 +- .../v2/baremetalsolution_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 +- .../baremetalsolution/v2/baremetalsolution.rb | 2 +- .../cloud/baremetalsolution/v2/common.rb | 2 +- .../cloud/baremetalsolution/v2/instance.rb | 2 +- .../google/cloud/baremetalsolution/v2/lun.rb | 2 +- .../cloud/baremetalsolution/v2/network.rb | 2 +- .../cloud/baremetalsolution/v2/nfs_share.rb | 2 +- .../cloud/baremetalsolution/v2/osimage.rb | 2 +- .../baremetalsolution/v2/provisioning.rb | 2 +- .../cloud/baremetalsolution/v2/ssh_key.rb | 2 +- .../cloud/baremetalsolution/v2/volume.rb | 2 +- .../baremetalsolution/v2/volume_snapshot.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 +- .../bare_metal_solution/create_nfs_share.rb | 2 +- .../create_provisioning_config.rb | 2 +- .../bare_metal_solution/create_ssh_key.rb | 2 +- .../create_volume_snapshot.rb | 2 +- .../bare_metal_solution/delete_nfs_share.rb | 2 +- .../bare_metal_solution/delete_ssh_key.rb | 2 +- .../delete_volume_snapshot.rb | 2 +- .../bare_metal_solution/detach_lun.rb | 2 +- .../disable_interactive_serial_console.rb | 2 +- .../enable_interactive_serial_console.rb | 2 +- .../snippets/bare_metal_solution/evict_lun.rb | 2 +- .../bare_metal_solution/evict_volume.rb | 2 +- .../bare_metal_solution/get_instance.rb | 2 +- .../snippets/bare_metal_solution/get_lun.rb | 2 +- .../bare_metal_solution/get_network.rb | 2 +- .../bare_metal_solution/get_nfs_share.rb | 2 +- .../get_provisioning_config.rb | 2 +- .../bare_metal_solution/get_volume.rb | 2 +- .../get_volume_snapshot.rb | 2 +- .../bare_metal_solution/list_instances.rb | 2 +- .../snippets/bare_metal_solution/list_luns.rb | 2 +- .../bare_metal_solution/list_network_usage.rb | 2 +- .../bare_metal_solution/list_networks.rb | 2 +- .../bare_metal_solution/list_nfs_shares.rb | 2 +- .../bare_metal_solution/list_os_images.rb | 2 +- .../list_provisioning_quotas.rb | 2 +- .../bare_metal_solution/list_ssh_keys.rb | 2 +- .../list_volume_snapshots.rb | 2 +- .../bare_metal_solution/list_volumes.rb | 2 +- .../bare_metal_solution/rename_instance.rb | 2 +- .../bare_metal_solution/rename_network.rb | 2 +- .../bare_metal_solution/rename_nfs_share.rb | 2 +- .../bare_metal_solution/rename_volume.rb | 2 +- .../bare_metal_solution/reset_instance.rb | 2 +- .../bare_metal_solution/resize_volume.rb | 2 +- .../restore_volume_snapshot.rb | 2 +- .../bare_metal_solution/start_instance.rb | 2 +- .../bare_metal_solution/stop_instance.rb | 2 +- .../submit_provisioning_config.rb | 2 +- .../bare_metal_solution/update_instance.rb | 2 +- .../bare_metal_solution/update_network.rb | 2 +- .../bare_metal_solution/update_nfs_share.rb | 2 +- .../update_provisioning_config.rb | 2 +- .../bare_metal_solution/update_volume.rb | 2 +- .../v2/bare_metal_solution_operations_test.rb | 2 +- .../v2/bare_metal_solution_paths_test.rb | 2 +- .../v2/bare_metal_solution_rest_test.rb | 2 +- .../v2/bare_metal_solution_test.rb | 2 +- .../test/helper.rb | 2 +- google-cloud-batch-v1/.owlbot-manifest.json | 3 +- google-cloud-batch-v1/.toys.rb | 2 +- google-cloud-batch-v1/Rakefile | 2 +- .../lib/google-cloud-batch-v1.rb | 2 +- .../lib/google/cloud/batch/v1.rb | 2 +- .../google/cloud/batch/v1/batch_service.rb | 2 +- .../cloud/batch/v1/batch_service/client.rb | 2 +- .../batch/v1/batch_service/credentials.rb | 2 +- .../batch/v1/batch_service/operations.rb | 2 +- .../cloud/batch/v1/batch_service/paths.rb | 2 +- .../cloud/batch/v1/batch_service/rest.rb | 2 +- .../batch/v1/batch_service/rest/client.rb | 2 +- .../batch/v1/batch_service/rest/operations.rb | 2 +- .../v1/batch_service/rest/service_stub.rb | 2 +- .../cloud/batch/v1/batch_services_pb.rb | 2 +- .../cloud/batch/v1/bindings_override.rb | 2 +- .../lib/google/cloud/batch/v1/rest.rb | 2 +- google-cloud-batch-v1/lib/google/iam/v1.rb | 2 +- .../lib/google/iam/v1/bindings_override.rb | 2 +- .../lib/google/iam/v1/iam_policy.rb | 2 +- .../lib/google/iam/v1/iam_policy/client.rb | 2 +- .../google/iam/v1/iam_policy/credentials.rb | 2 +- .../lib/google/iam/v1/iam_policy/rest.rb | 2 +- .../google/iam/v1/iam_policy/rest/client.rb | 2 +- .../iam/v1/iam_policy/rest/service_stub.rb | 2 +- .../lib/google/iam/v1/rest.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 +- .../proto_docs/google/cloud/batch/v1/batch.rb | 2 +- .../proto_docs/google/cloud/batch/v1/job.rb | 2 +- .../proto_docs/google/cloud/batch/v1/task.rb | 2 +- .../google/cloud/batch/v1/volume.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 +- .../proto_docs/google/type/expr.rb | 2 +- google-cloud-batch-v1/snippets/Gemfile | 2 +- .../snippets/batch_service/cancel_job.rb | 2 +- .../snippets/batch_service/create_job.rb | 2 +- .../snippets/batch_service/delete_job.rb | 2 +- .../snippets/batch_service/get_job.rb | 2 +- .../snippets/batch_service/get_task.rb | 2 +- .../snippets/batch_service/list_jobs.rb | 2 +- .../snippets/batch_service/list_tasks.rb | 2 +- .../snippets/iam_policy/get_iam_policy.rb | 2 +- .../snippets/iam_policy/set_iam_policy.rb | 2 +- .../iam_policy/test_iam_permissions.rb | 2 +- .../batch/v1/batch_service_operations_test.rb | 2 +- .../batch/v1/batch_service_paths_test.rb | 2 +- .../cloud/batch/v1/batch_service_rest_test.rb | 2 +- .../cloud/batch/v1/batch_service_test.rb | 2 +- .../google/iam/v1/iam_policy_rest_test.rb | 2 +- .../test/google/iam/v1/iam_policy_test.rb | 2 +- google-cloud-batch-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...le-cloud-beyond_corp-app_connections-v1.rb | 2 +- .../cloud/beyond_corp/app_connections/v1.rb | 2 +- .../v1/app_connections_service.rb | 2 +- .../v1/app_connections_service/client.rb | 2 +- .../v1/app_connections_service/credentials.rb | 2 +- .../v1/app_connections_service/operations.rb | 2 +- .../v1/app_connections_service/paths.rb | 2 +- .../v1/app_connections_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 +- .../v1/app_connections_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 +- .../create_app_connection.rb | 2 +- .../delete_app_connection.rb | 2 +- .../get_app_connection.rb | 2 +- .../list_app_connections.rb | 2 +- .../resolve_app_connections.rb | 2 +- .../update_app_connection.rb | 2 +- ...app_connections_service_operations_test.rb | 2 +- .../v1/app_connections_service_paths_test.rb | 2 +- .../v1/app_connections_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...gle-cloud-beyond_corp-app_connectors-v1.rb | 2 +- .../cloud/beyond_corp/app_connectors/v1.rb | 2 +- .../v1/app_connectors_service.rb | 2 +- .../v1/app_connectors_service/client.rb | 2 +- .../v1/app_connectors_service/credentials.rb | 2 +- .../v1/app_connectors_service/operations.rb | 2 +- .../v1/app_connectors_service/paths.rb | 2 +- .../v1/app_connectors_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 +- .../v1/app_connector_instance_config.rb | 2 +- .../v1/app_connectors_service.rb | 2 +- .../appconnectors/v1/resource_info.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 +- .../create_app_connector.rb | 2 +- .../delete_app_connector.rb | 2 +- .../get_app_connector.rb | 2 +- .../list_app_connectors.rb | 2 +- .../app_connectors_service/report_status.rb | 2 +- .../update_app_connector.rb | 2 +- .../app_connectors_service_operations_test.rb | 2 +- .../v1/app_connectors_service_paths_test.rb | 2 +- .../v1/app_connectors_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...oogle-cloud-beyond_corp-app_gateways-v1.rb | 2 +- .../cloud/beyond_corp/app_gateways/v1.rb | 2 +- .../app_gateways/v1/app_gateways_service.rb | 2 +- .../v1/app_gateways_service/client.rb | 2 +- .../v1/app_gateways_service/credentials.rb | 2 +- .../v1/app_gateways_service/operations.rb | 2 +- .../v1/app_gateways_service/paths.rb | 2 +- .../v1/app_gateways_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 +- .../appgateways/v1/app_gateways_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 +- .../create_app_gateway.rb | 2 +- .../delete_app_gateway.rb | 2 +- .../app_gateways_service/get_app_gateway.rb | 2 +- .../app_gateways_service/list_app_gateways.rb | 2 +- .../app_gateways_service_operations_test.rb | 2 +- .../v1/app_gateways_service_paths_test.rb | 2 +- .../v1/app_gateways_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...le-cloud-beyond_corp-client_gateways-v1.rb | 2 +- .../cloud/beyond_corp/client_gateways/v1.rb | 2 +- .../v1/client_gateways_service.rb | 2 +- .../v1/client_gateways_service/client.rb | 2 +- .../v1/client_gateways_service/credentials.rb | 2 +- .../v1/client_gateways_service/operations.rb | 2 +- .../v1/client_gateways_service/paths.rb | 2 +- .../v1/client_gateways_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 +- .../v1/client_gateways_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 +- .../create_client_gateway.rb | 2 +- .../delete_client_gateway.rb | 2 +- .../get_client_gateway.rb | 2 +- .../list_client_gateways.rb | 2 +- ...client_gateways_service_operations_test.rb | 2 +- .../v1/client_gateways_service_paths_test.rb | 2 +- .../v1/client_gateways_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- .../google-cloud-bigquery-analytics_hub-v1.rb | 2 +- .../google/cloud/bigquery/analytics_hub/v1.rb | 2 +- .../analytics_hub/v1/analytics_hub_service.rb | 2 +- .../v1/analytics_hub_service/client.rb | 2 +- .../v1/analytics_hub_service/credentials.rb | 2 +- .../v1/analytics_hub_service/operations.rb | 2 +- .../v1/analytics_hub_service/paths.rb | 2 +- .../v1/analytics_hub_service/rest.rb | 2 +- .../v1/analytics_hub_service/rest/client.rb | 2 +- .../analytics_hub_service/rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- .../cloud/bigquery/analytics_hub/v1/rest.rb | 2 +- .../v1/analyticshub_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 +- .../bigquery/analyticshub/v1/analyticshub.rb | 2 +- .../cloud/bigquery/analyticshub/v1/pubsub.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/protobuf/wrappers.rb | 2 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../approve_query_template.rb | 2 +- .../create_data_exchange.rb | 2 +- .../analytics_hub_service/create_listing.rb | 2 +- .../create_query_template.rb | 2 +- .../delete_data_exchange.rb | 2 +- .../analytics_hub_service/delete_listing.rb | 2 +- .../delete_query_template.rb | 2 +- .../delete_subscription.rb | 2 +- .../get_data_exchange.rb | 2 +- .../analytics_hub_service/get_iam_policy.rb | 2 +- .../analytics_hub_service/get_listing.rb | 2 +- .../get_query_template.rb | 2 +- .../analytics_hub_service/get_subscription.rb | 2 +- .../list_data_exchanges.rb | 2 +- .../analytics_hub_service/list_listings.rb | 2 +- .../list_org_data_exchanges.rb | 2 +- .../list_query_templates.rb | 2 +- .../list_shared_resource_subscriptions.rb | 2 +- .../list_subscriptions.rb | 2 +- .../refresh_subscription.rb | 2 +- .../revoke_subscription.rb | 2 +- .../analytics_hub_service/set_iam_policy.rb | 2 +- .../submit_query_template.rb | 2 +- .../subscribe_data_exchange.rb | 2 +- .../subscribe_listing.rb | 2 +- .../test_iam_permissions.rb | 2 +- .../update_data_exchange.rb | 2 +- .../analytics_hub_service/update_listing.rb | 2 +- .../update_query_template.rb | 2 +- .../analytics_hub_service_operations_test.rb | 2 +- .../v1/analytics_hub_service_paths_test.rb | 2 +- .../v1/analytics_hub_service_rest_test.rb | 2 +- .../v1/analytics_hub_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- .../google-cloud-bigquery-data_transfer-v1.rb | 2 +- .../google/cloud/bigquery/data_transfer/v1.rb | 2 +- .../data_transfer/v1/bindings_override.rb | 2 +- .../data_transfer/v1/data_transfer_service.rb | 2 +- .../v1/data_transfer_service/client.rb | 2 +- .../v1/data_transfer_service/credentials.rb | 2 +- .../v1/data_transfer_service/paths.rb | 2 +- .../v1/data_transfer_service/rest.rb | 2 +- .../v1/data_transfer_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../cloud/bigquery/data_transfer/v1/rest.rb | 2 +- .../v1/datatransfer_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 +- .../bigquery/datatransfer/v1/datatransfer.rb | 2 +- .../bigquery/datatransfer/v1/transfer.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/protobuf/wrappers.rb | 2 +- .../proto_docs/google/rpc/status.rb | 2 +- .../snippets/Gemfile | 2 +- .../check_valid_creds.rb | 2 +- .../create_transfer_config.rb | 2 +- .../delete_transfer_config.rb | 2 +- .../delete_transfer_run.rb | 2 +- .../enroll_data_sources.rb | 2 +- .../data_transfer_service/get_data_source.rb | 2 +- .../get_transfer_config.rb | 2 +- .../data_transfer_service/get_transfer_run.rb | 2 +- .../list_data_sources.rb | 2 +- .../list_transfer_configs.rb | 2 +- .../list_transfer_logs.rb | 2 +- .../list_transfer_runs.rb | 2 +- .../schedule_transfer_runs.rb | 2 +- .../start_manual_transfer_runs.rb | 2 +- .../unenroll_data_sources.rb | 2 +- .../update_transfer_config.rb | 2 +- .../v1/data_transfer_service_paths_test.rb | 2 +- .../v1/data_transfer_service_rest_test.rb | 2 +- .../v1/data_transfer_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-bigquery-migration-v2/.toys.rb | 2 +- google-cloud-bigquery-migration-v2/Rakefile | 2 +- .../lib/google-cloud-bigquery-migration-v2.rb | 2 +- .../lib/google/cloud/bigquery/migration/v2.rb | 2 +- .../migration/v2/migration_service.rb | 2 +- .../migration/v2/migration_service/client.rb | 2 +- .../v2/migration_service/credentials.rb | 2 +- .../migration/v2/migration_service/paths.rb | 2 +- .../migration/v2/migration_service/rest.rb | 2 +- .../v2/migration_service/rest/client.rb | 2 +- .../v2/migration_service/rest/service_stub.rb | 2 +- .../v2/migration_service_services_pb.rb | 2 +- .../cloud/bigquery/migration/v2/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/distribution.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/metric.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../migration/v2/migration_entities.rb | 2 +- .../migration/v2/migration_error_details.rb | 2 +- .../migration/v2/migration_metrics.rb | 2 +- .../migration/v2/migration_service.rb | 2 +- .../migration/v2/translation_config.rb | 2 +- .../migration/v2/translation_details.rb | 2 +- .../migration/v2/translation_suggestion.rb | 2 +- .../migration/v2/translation_usability.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/error_details.rb | 2 +- .../snippets/Gemfile | 2 +- .../create_migration_workflow.rb | 2 +- .../delete_migration_workflow.rb | 2 +- .../get_migration_subtask.rb | 2 +- .../get_migration_workflow.rb | 2 +- .../list_migration_subtasks.rb | 2 +- .../list_migration_workflows.rb | 2 +- .../start_migration_workflow.rb | 2 +- .../v2/migration_service_paths_test.rb | 2 +- .../v2/migration_service_rest_test.rb | 2 +- .../migration/v2/migration_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-bigquery-reservation-v1/.toys.rb | 2 +- google-cloud-bigquery-reservation-v1/Rakefile | 2 +- .../google-cloud-bigquery-reservation-v1.rb | 2 +- .../google/cloud/bigquery/reservation/v1.rb | 2 +- .../reservation/v1/reservation_service.rb | 2 +- .../v1/reservation_service/client.rb | 2 +- .../v1/reservation_service/credentials.rb | 2 +- .../v1/reservation_service/paths.rb | 2 +- .../v1/reservation_service/rest.rb | 2 +- .../v1/reservation_service/rest/client.rb | 2 +- .../reservation_service/rest/service_stub.rb | 2 +- .../reservation/v1/reservation_services_pb.rb | 2 +- .../cloud/bigquery/reservation/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 +- .../bigquery/reservation/v1/reservation.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/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../reservation_service/create_assignment.rb | 2 +- .../create_capacity_commitment.rb | 2 +- .../reservation_service/create_reservation.rb | 2 +- .../create_reservation_group.rb | 2 +- .../reservation_service/delete_assignment.rb | 2 +- .../delete_capacity_commitment.rb | 2 +- .../reservation_service/delete_reservation.rb | 2 +- .../delete_reservation_group.rb | 2 +- .../failover_reservation.rb | 2 +- .../reservation_service/get_bi_reservation.rb | 2 +- .../get_capacity_commitment.rb | 2 +- .../reservation_service/get_iam_policy.rb | 2 +- .../reservation_service/get_reservation.rb | 2 +- .../get_reservation_group.rb | 2 +- .../reservation_service/list_assignments.rb | 2 +- .../list_capacity_commitments.rb | 2 +- .../list_reservation_groups.rb | 2 +- .../reservation_service/list_reservations.rb | 2 +- .../merge_capacity_commitments.rb | 2 +- .../reservation_service/move_assignment.rb | 2 +- .../search_all_assignments.rb | 2 +- .../reservation_service/search_assignments.rb | 2 +- .../reservation_service/set_iam_policy.rb | 2 +- .../split_capacity_commitment.rb | 2 +- .../test_iam_permissions.rb | 2 +- .../reservation_service/update_assignment.rb | 2 +- .../update_bi_reservation.rb | 2 +- .../update_capacity_commitment.rb | 2 +- .../reservation_service/update_reservation.rb | 2 +- .../v1/reservation_service_paths_test.rb | 2 +- .../v1/reservation_service_rest_test.rb | 2 +- .../v1/reservation_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../google-cloud-app_hub-v1/.gitignore | 20 - .../.repo-metadata.json | 17 - .../google-cloud-app_hub-v1/.rubocop.yml | 33 - .../google-cloud-app_hub-v1/.toys.rb | 28 - .../google-cloud-app_hub-v1/.yardopts | 12 - .../google-cloud-app_hub-v1/AUTHENTICATION.md | 122 - .../google-cloud-app_hub-v1/CHANGELOG.md | 2 - .../google-cloud-app_hub-v1/Gemfile | 15 - .../google-cloud-app_hub-v1/LICENSE.md | 201 - .../google-cloud-app_hub-v1/README.md | 154 - .../google-cloud-app_hub-v1/Rakefile | 169 - .../gapic_metadata.json | 153 - .../google-cloud-app_hub-v1.gemspec | 30 - .../lib/google-cloud-app_hub-v1.rb | 21 - .../lib/google/cloud/app_hub/v1.rb | 45 - .../lib/google/cloud/app_hub/v1/app_hub.rb | 56 - .../google/cloud/app_hub/v1/app_hub/client.rb | 3470 ---------- .../cloud/app_hub/v1/app_hub/credentials.rb | 47 - .../cloud/app_hub/v1/app_hub/operations.rb | 843 --- .../google/cloud/app_hub/v1/app_hub/paths.rb | 182 - .../google/cloud/app_hub/v1/app_hub/rest.rb | 54 - .../cloud/app_hub/v1/app_hub/rest/client.rb | 3247 ---------- .../app_hub/v1/app_hub/rest/operations.rb | 927 --- .../app_hub/v1/app_hub/rest/service_stub.rb | 1736 ----- .../cloud/app_hub/v1/bindings_override.rb | 108 - .../lib/google/cloud/app_hub/v1/rest.rb | 38 - .../lib/google/cloud/app_hub/v1/version.rb | 28 - .../cloud/apphub/v1/apphub_service_pb.rb | 71 - .../apphub/v1/apphub_service_services_pb.rb | 104 - .../google/cloud/apphub/v1/application_pb.rb | 30 - .../google/cloud/apphub/v1/attributes_pb.rb | 28 - .../lib/google/cloud/apphub/v1/service_pb.rb | 31 - .../v1/service_project_attachment_pb.rb | 27 - .../lib/google/cloud/apphub/v1/workload_pb.rb | 31 - .../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/apphub/v1/apphub_service.rb | 787 --- .../google/cloud/apphub/v1/application.rb | 103 - .../google/cloud/apphub/v1/attributes.rb | 115 - .../google/cloud/apphub/v1/service.rb | 139 - .../apphub/v1/service_project_attachment.rb | 72 - .../google/cloud/apphub/v1/workload.rb | 140 - .../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 - .../google-cloud-app_hub-v1/snippets/Gemfile | 32 - .../snippets/app_hub/create_application.rb | 54 - .../snippets/app_hub/create_service.rb | 54 - .../create_service_project_attachment.rb | 54 - .../snippets/app_hub/create_workload.rb | 54 - .../snippets/app_hub/delete_application.rb | 54 - .../snippets/app_hub/delete_service.rb | 54 - .../delete_service_project_attachment.rb | 54 - .../snippets/app_hub/delete_workload.rb | 54 - .../detach_service_project_attachment.rb | 47 - .../snippets/app_hub/get_application.rb | 47 - .../app_hub/get_discovered_service.rb | 47 - .../app_hub/get_discovered_workload.rb | 47 - .../snippets/app_hub/get_service.rb | 47 - .../app_hub/get_service_project_attachment.rb | 47 - .../snippets/app_hub/get_workload.rb | 47 - .../snippets/app_hub/list_applications.rb | 51 - .../app_hub/list_discovered_services.rb | 51 - .../app_hub/list_discovered_workloads.rb | 51 - .../list_service_project_attachments.rb | 51 - .../snippets/app_hub/list_services.rb | 51 - .../snippets/app_hub/list_workloads.rb | 51 - .../app_hub/lookup_discovered_service.rb | 47 - .../app_hub/lookup_discovered_workload.rb | 47 - .../lookup_service_project_attachment.rb | 47 - .../snippets/app_hub/update_application.rb | 54 - .../snippets/app_hub/update_service.rb | 54 - .../snippets/app_hub/update_workload.rb | 54 - ...ippet_metadata_google.cloud.apphub.v1.json | 1095 ---- .../app_hub/v1/app_hub_operations_test.rb | 400 -- .../cloud/app_hub/v1/app_hub_paths_test.rb | 139 - .../cloud/app_hub/v1/app_hub_rest_test.rb | 1605 ----- .../google/cloud/app_hub/v1/app_hub_test.rb | 1865 ------ .../google-cloud-app_hub-v1/test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-app_optimize-v1beta/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-app_optimize-v1beta/Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../google-cloud-app_optimize-v1beta/Rakefile | 169 - .../gapic_metadata.json | 43 - .../google-cloud-app_optimize-v1beta.gemspec | 29 - .../lib/google-cloud-app_optimize-v1beta.rb | 21 - .../cloud/app_optimize/v1beta/version.rb | 28 - .../lib/google/cloud/appoptimize/v1beta.rb | 45 - .../cloud/appoptimize/v1beta/app_optimize.rb | 56 - .../appoptimize/v1beta/app_optimize/client.rb | 961 --- .../v1beta/app_optimize/credentials.rb | 47 - .../v1beta/app_optimize/operations.rb | 843 --- .../appoptimize/v1beta/app_optimize/paths.rb | 102 - .../appoptimize/v1beta/app_optimize/rest.rb | 54 - .../v1beta/app_optimize/rest/client.rb | 891 --- .../v1beta/app_optimize/rest/operations.rb | 927 --- .../v1beta/app_optimize/rest/service_stub.rb | 388 -- .../appoptimize/v1beta/app_optimize_pb.rb | 40 - .../v1beta/app_optimize_services_pb.rb | 57 - .../appoptimize/v1beta/bindings_override.rb | 75 - .../google/cloud/appoptimize/v1beta/rest.rb | 38 - .../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/appoptimize/v1beta/app_optimize.rb | 328 - .../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/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../snippets/app_optimize/create_report.rb | 54 - .../snippets/app_optimize/delete_report.rb | 47 - .../snippets/app_optimize/get_report.rb | 47 - .../snippets/app_optimize/list_reports.rb | 51 - .../snippets/app_optimize/read_report.rb | 51 - ...adata_google.cloud.appoptimize.v1beta.json | 215 - .../v1beta/app_optimize_operations_test.rb | 400 -- .../v1beta/app_optimize_paths_test.rb | 91 - .../v1beta/app_optimize_rest_test.rb | 376 -- .../appoptimize/v1beta/app_optimize_test.rb | 437 -- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-artifact_registry-v1/Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 268 - .../google-cloud-artifact_registry-v1.gemspec | 30 - .../lib/google-cloud-artifact_registry-v1.rb | 21 - .../lib/google/cloud/artifact_registry/v1.rb | 45 - .../artifact_registry/v1/artifact_registry.rb | 68 - .../v1/artifact_registry/client.rb | 5574 ----------------- .../v1/artifact_registry/credentials.rb | 52 - .../v1/artifact_registry/operations.rb | 843 --- .../v1/artifact_registry/paths.rb | 333 - .../v1/artifact_registry/rest.rb | 66 - .../v1/artifact_registry/rest/client.rb | 5189 --------------- .../v1/artifact_registry/rest/operations.rb | 927 --- .../v1/artifact_registry/rest/service_stub.rb | 3149 ---------- .../artifact_registry/v1/bindings_override.rb | 75 - .../google/cloud/artifact_registry/v1/rest.rb | 38 - .../cloud/artifact_registry/v1/version.rb | 28 - .../artifactregistry/v1/apt_artifact_pb.rb | 31 - .../artifactregistry/v1/artifact_pb.rb | 41 - .../artifactregistry/v1/attachment_pb.rb | 30 - .../devtools/artifactregistry/v1/export_pb.rb | 29 - .../devtools/artifactregistry/v1/file_pb.rb | 33 - .../artifactregistry/v1/generic_pb.rb | 25 - .../devtools/artifactregistry/v1/go_pb.rb | 25 - .../artifactregistry/v1/kfp_artifact_pb.rb | 24 - .../artifactregistry/v1/package_pb.rb | 31 - .../artifactregistry/v1/repository_pb.rb | 72 - .../devtools/artifactregistry/v1/rule_pb.rb | 34 - .../artifactregistry/v1/service_pb.rb | 41 - .../v1/service_services_pb.rb | 172 - .../artifactregistry/v1/settings_pb.rb | 28 - .../devtools/artifactregistry/v1/tag_pb.rb | 30 - .../artifactregistry/v1/version_pb.rb | 37 - .../artifactregistry/v1/vpcsc_config_pb.rb | 28 - .../artifactregistry/v1/yum_artifact_pb.rb | 31 - .../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 - .../artifactregistry/v1/apt_artifact.rb | 118 - .../devtools/artifactregistry/v1/artifact.rb | 384 -- .../artifactregistry/v1/attachment.rb | 152 - .../devtools/artifactregistry/v1/export.rb | 91 - .../devtools/artifactregistry/v1/file.rb | 211 - .../devtools/artifactregistry/v1/generic.rb | 48 - .../google/devtools/artifactregistry/v1/go.rb | 45 - .../artifactregistry/v1/kfp_artifact.rb | 42 - .../devtools/artifactregistry/v1/package.rb | 169 - .../artifactregistry/v1/repository.rb | 848 --- .../devtools/artifactregistry/v1/rule.rb | 149 - .../devtools/artifactregistry/v1/service.rb | 32 - .../devtools/artifactregistry/v1/settings.rb | 90 - .../devtools/artifactregistry/v1/tag.rb | 152 - .../devtools/artifactregistry/v1/version.rb | 237 - .../artifactregistry/v1/vpcsc_config.rb | 82 - .../artifactregistry/v1/yum_artifact.rb | 110 - .../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_delete_versions.rb | 54 - .../artifact_registry/create_attachment.rb | 54 - .../artifact_registry/create_repository.rb | 54 - .../snippets/artifact_registry/create_rule.rb | 47 - .../snippets/artifact_registry/create_tag.rb | 47 - .../artifact_registry/delete_attachment.rb | 54 - .../snippets/artifact_registry/delete_file.rb | 54 - .../artifact_registry/delete_package.rb | 54 - .../artifact_registry/delete_repository.rb | 54 - .../snippets/artifact_registry/delete_rule.rb | 47 - .../snippets/artifact_registry/delete_tag.rb | 47 - .../artifact_registry/delete_version.rb | 54 - .../artifact_registry/export_artifact.rb | 54 - .../artifact_registry/get_attachment.rb | 47 - .../artifact_registry/get_docker_image.rb | 47 - .../snippets/artifact_registry/get_file.rb | 47 - .../artifact_registry/get_iam_policy.rb | 47 - .../artifact_registry/get_maven_artifact.rb | 47 - .../artifact_registry/get_npm_package.rb | 47 - .../snippets/artifact_registry/get_package.rb | 47 - .../artifact_registry/get_project_settings.rb | 47 - .../artifact_registry/get_python_package.rb | 47 - .../artifact_registry/get_repository.rb | 47 - .../snippets/artifact_registry/get_rule.rb | 47 - .../snippets/artifact_registry/get_tag.rb | 47 - .../snippets/artifact_registry/get_version.rb | 47 - .../artifact_registry/get_vpcsc_config.rb | 47 - .../artifact_registry/import_apt_artifacts.rb | 54 - .../artifact_registry/import_yum_artifacts.rb | 54 - .../artifact_registry/list_attachments.rb | 51 - .../artifact_registry/list_docker_images.rb | 51 - .../snippets/artifact_registry/list_files.rb | 51 - .../artifact_registry/list_maven_artifacts.rb | 51 - .../artifact_registry/list_npm_packages.rb | 51 - .../artifact_registry/list_packages.rb | 51 - .../artifact_registry/list_python_packages.rb | 51 - .../artifact_registry/list_repositories.rb | 51 - .../snippets/artifact_registry/list_rules.rb | 51 - .../snippets/artifact_registry/list_tags.rb | 51 - .../artifact_registry/list_versions.rb | 51 - .../artifact_registry/set_iam_policy.rb | 47 - .../artifact_registry/test_iam_permissions.rb | 47 - .../snippets/artifact_registry/update_file.rb | 47 - .../artifact_registry/update_package.rb | 47 - .../update_project_settings.rb | 47 - .../artifact_registry/update_repository.rb | 47 - .../snippets/artifact_registry/update_rule.rb | 47 - .../snippets/artifact_registry/update_tag.rb | 47 - .../artifact_registry/update_version.rb | 47 - .../artifact_registry/update_vpcsc_config.rb | 47 - ...a_google.devtools.artifactregistry.v1.json | 2015 ------ .../v1/artifact_registry_operations_test.rb | 400 -- .../v1/artifact_registry_paths_test.rb | 223 - .../v1/artifact_registry_rest_test.rb | 2861 --------- .../v1/artifact_registry_test.rb | 3256 ---------- .../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 | 143 - ...le-cloud-artifact_registry-v1beta2.gemspec | 30 - .../google-cloud-artifact_registry-v1beta2.rb | 21 - .../google/cloud/artifact_registry/v1beta2.rb | 45 - .../v1beta2/artifact_registry.rb | 68 - .../v1beta2/artifact_registry/client.rb | 3004 --------- .../v1beta2/artifact_registry/credentials.rb | 52 - .../v1beta2/artifact_registry/operations.rb | 843 --- .../v1beta2/artifact_registry/paths.rb | 106 - .../v1beta2/artifact_registry/rest.rb | 66 - .../v1beta2/artifact_registry/rest/client.rb | 2794 --------- .../artifact_registry/rest/operations.rb | 927 --- .../artifact_registry/rest/service_stub.rb | 1615 ----- .../v1beta2/bindings_override.rb | 75 - .../cloud/artifact_registry/v1beta2/rest.rb | 38 - .../artifact_registry/v1beta2/version.rb | 28 - .../v1beta2/apt_artifact_pb.rb | 31 - .../artifactregistry/v1beta2/file_pb.rb | 29 - .../artifactregistry/v1beta2/package_pb.rb | 27 - .../artifactregistry/v1beta2/repository_pb.rb | 35 - .../artifactregistry/v1beta2/service_pb.rb | 36 - .../v1beta2/service_services_pb.rb | 116 - .../artifactregistry/v1beta2/settings_pb.rb | 28 - .../artifactregistry/v1beta2/tag_pb.rb | 30 - .../artifactregistry/v1beta2/version_pb.rb | 32 - .../v1beta2/yum_artifact_pb.rb | 31 - .../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 - .../artifactregistry/v1beta2/apt_artifact.rb | 118 - .../devtools/artifactregistry/v1beta2/file.rb | 128 - .../artifactregistry/v1beta2/package.rb | 93 - .../artifactregistry/v1beta2/repository.rb | 202 - .../artifactregistry/v1beta2/service.rb | 32 - .../artifactregistry/v1beta2/settings.rb | 80 - .../devtools/artifactregistry/v1beta2/tag.rb | 132 - .../artifactregistry/v1beta2/version.rb | 132 - .../artifactregistry/v1beta2/yum_artifact.rb | 110 - .../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 - .../artifact_registry/create_repository.rb | 54 - .../snippets/artifact_registry/create_tag.rb | 47 - .../artifact_registry/delete_package.rb | 54 - .../artifact_registry/delete_repository.rb | 54 - .../snippets/artifact_registry/delete_tag.rb | 47 - .../artifact_registry/delete_version.rb | 54 - .../snippets/artifact_registry/get_file.rb | 47 - .../artifact_registry/get_iam_policy.rb | 47 - .../snippets/artifact_registry/get_package.rb | 47 - .../artifact_registry/get_project_settings.rb | 47 - .../artifact_registry/get_repository.rb | 47 - .../snippets/artifact_registry/get_tag.rb | 47 - .../snippets/artifact_registry/get_version.rb | 47 - .../artifact_registry/import_apt_artifacts.rb | 54 - .../artifact_registry/import_yum_artifacts.rb | 54 - .../snippets/artifact_registry/list_files.rb | 51 - .../artifact_registry/list_packages.rb | 51 - .../artifact_registry/list_repositories.rb | 51 - .../snippets/artifact_registry/list_tags.rb | 51 - .../artifact_registry/list_versions.rb | 51 - .../artifact_registry/set_iam_policy.rb | 47 - .../artifact_registry/test_iam_permissions.rb | 47 - .../update_project_settings.rb | 47 - .../artifact_registry/update_repository.rb | 47 - .../snippets/artifact_registry/update_tag.rb | 47 - ...gle.devtools.artifactregistry.v1beta2.json | 1015 --- .../artifact_registry_operations_test.rb | 400 -- .../v1beta2/artifact_registry_paths_test.rb | 91 - .../v1beta2/artifact_registry_rest_test.rb | 1478 ----- .../v1beta2/artifact_registry_test.rb | 1683 ----- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-assured_workloads-v1/Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 63 - .../google-cloud-assured_workloads-v1.gemspec | 28 - .../lib/google-cloud-assured_workloads-v1.rb | 21 - .../lib/google/cloud/assured_workloads/v1.rb | 45 - .../v1/assured_workloads_service.rb | 56 - .../v1/assured_workloads_service/client.rb | 1305 ---- .../assured_workloads_service/credentials.rb | 51 - .../assured_workloads_service/operations.rb | 843 --- .../v1/assured_workloads_service/paths.rb | 90 - .../v1/assured_workloads_service/rest.rb | 53 - .../assured_workloads_service/rest/client.rb | 930 --- .../rest/operations.rb | 927 --- .../rest/service_stub.rb | 450 -- .../google/cloud/assured_workloads/v1/rest.rb | 37 - .../cloud/assured_workloads/v1/version.rb | 28 - .../v1/assuredworkloads_pb.rb | 64 - .../v1/assuredworkloads_services_pb.rb | 78 - .../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 - .../assuredworkloads/v1/assuredworkloads.rb | 720 --- .../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 - .../snippets/Gemfile | 32 - .../acknowledge_violation.rb | 47 - .../create_workload.rb | 54 - .../delete_workload.rb | 47 - .../get_violation.rb | 47 - .../assured_workloads_service/get_workload.rb | 47 - .../list_violations.rb | 51 - .../list_workloads.rb | 51 - .../restrict_allowed_resources.rb | 47 - .../update_workload.rb | 47 - ...data_google.cloud.assuredworkloads.v1.json | 375 -- ...sured_workloads_service_operations_test.rb | 400 -- .../assured_workloads_service_paths_test.rb | 79 - .../v1/assured_workloads_service_rest_test.rb | 431 -- .../v1/assured_workloads_service_test.rb | 683 -- .../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 | 53 - ...le-cloud-assured_workloads-v1beta1.gemspec | 28 - .../google-cloud-assured_workloads-v1beta1.rb | 21 - .../google/cloud/assured_workloads/v1beta1.rb | 45 - .../v1beta1/assured_workloads_service.rb | 56 - .../assured_workloads_service/client.rb | 1123 ---- .../assured_workloads_service/credentials.rb | 51 - .../assured_workloads_service/operations.rb | 843 --- .../assured_workloads_service/paths.rb | 69 - .../v1beta1/assured_workloads_service/rest.rb | 53 - .../assured_workloads_service/rest/client.rb | 655 -- .../rest/operations.rb | 927 --- .../rest/service_stub.rb | 266 - .../cloud/assured_workloads/v1beta1/rest.rb | 37 - .../assured_workloads/v1beta1/version.rb | 28 - .../v1beta1/assuredworkloads_pb.rb | 52 - .../v1beta1/assuredworkloads_service_pb.rb | 26 - .../assuredworkloads_service_services_pb.rb | 71 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1beta1/assuredworkloads.rb | 557 -- .../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 - .../snippets/Gemfile | 32 - .../analyze_workload_move.rb | 47 - .../create_workload.rb | 54 - .../delete_workload.rb | 47 - .../assured_workloads_service/get_workload.rb | 47 - .../list_workloads.rb | 51 - .../restrict_allowed_resources.rb | 47 - .../update_workload.rb | 47 - ...google.cloud.assuredworkloads.v1beta1.json | 295 - ...sured_workloads_service_operations_test.rb | 400 -- .../assured_workloads_service_paths_test.rb | 67 - .../assured_workloads_service_rest_test.rb | 265 - .../v1beta1/assured_workloads_service_test.rb | 553 -- .../test/helper.rb | 35 - .../google-cloud-audit_manager-v1/.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-audit_manager-v1/.toys.rb | 28 - .../google-cloud-audit_manager-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-audit_manager-v1/Gemfile | 15 - .../google-cloud-audit_manager-v1/LICENSE.md | 201 - .../google-cloud-audit_manager-v1/README.md | 154 - .../google-cloud-audit_manager-v1/Rakefile | 169 - .../gapic_metadata.json | 58 - .../google-cloud-audit_manager-v1.gemspec | 29 - .../lib/google-cloud-audit_manager-v1.rb | 21 - .../lib/google/cloud/audit_manager/v1.rb | 45 - .../cloud/audit_manager/v1/audit_manager.rb | 56 - .../audit_manager/v1/audit_manager/client.rb | 1275 ---- .../v1/audit_manager/credentials.rb | 47 - .../v1/audit_manager/operations.rb | 843 --- .../audit_manager/v1/audit_manager/paths.rb | 265 - .../audit_manager/v1/audit_manager/rest.rb | 54 - .../v1/audit_manager/rest/client.rb | 1184 ---- .../v1/audit_manager/rest/operations.rb | 956 --- .../v1/audit_manager/rest/service_stub.rb | 660 -- .../audit_manager/v1/bindings_override.rb | 75 - .../lib/google/cloud/audit_manager/v1/rest.rb | 38 - .../google/cloud/audit_manager/v1/version.rb | 28 - .../cloud/auditmanager/v1/auditmanager_pb.rb | 57 - .../v1/auditmanager_services_pb.rb | 66 - .../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/auditmanager/v1/auditmanager.rb | 648 -- .../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 - .../snippets/Gemfile | 32 - .../snippets/audit_manager/enroll_resource.rb | 47 - .../audit_manager/generate_audit_report.rb | 54 - .../generate_audit_scope_report.rb | 47 - .../audit_manager/get_audit_report.rb | 47 - .../get_resource_enrollment_status.rb | 47 - .../audit_manager/list_audit_reports.rb | 51 - .../snippets/audit_manager/list_controls.rb | 51 - .../list_resource_enrollment_statuses.rb | 51 - ...metadata_google.cloud.auditmanager.v1.json | 335 - .../v1/audit_manager_operations_test.rb | 400 -- .../v1/audit_manager_paths_test.rb | 133 - .../v1/audit_manager_rest_test.rb | 545 -- .../audit_manager/v1/audit_manager_test.rb | 631 -- .../test/helper.rb | 35 - .../google-cloud-automl-v1/.gitignore | 20 - .../.repo-metadata.json | 20 - .../google-cloud-automl-v1/.rubocop.yml | 33 - .../google-cloud-automl-v1/.toys.rb | 28 - .../google-cloud-automl-v1/.yardopts | 12 - .../google-cloud-automl-v1/AUTHENTICATION.md | 122 - .../google-cloud-automl-v1/CHANGELOG.md | 2 - .../google-cloud-automl-v1/Gemfile | 15 - .../google-cloud-automl-v1/LICENSE.md | 201 - .../google-cloud-automl-v1/README.md | 154 - .../google-cloud-automl-v1/Rakefile | 168 - .../gapic_metadata.json | 127 - .../google-cloud-automl-v1.gemspec | 28 - .../lib/google-cloud-automl-v1.rb | 21 - .../lib/google/cloud/automl/v1.rb | 46 - .../cloud/automl/v1/annotation_payload_pb.rb | 27 - .../cloud/automl/v1/annotation_spec_pb.rb | 23 - .../lib/google/cloud/automl/v1/automl.rb | 69 - .../google/cloud/automl/v1/automl/client.rb | 2351 ------- .../cloud/automl/v1/automl/credentials.rb | 51 - .../cloud/automl/v1/automl/operations.rb | 851 --- .../google/cloud/automl/v1/automl/paths.rb | 130 - .../lib/google/cloud/automl/v1/automl/rest.rb | 66 - .../cloud/automl/v1/automl/rest/client.rb | 2182 ------- .../cloud/automl/v1/automl/rest/operations.rb | 1095 ---- .../automl/v1/automl/rest/service_stub.rb | 1188 ---- .../cloud/automl/v1/classification_pb.rb | 26 - .../google/cloud/automl/v1/data_items_pb.rb | 32 - .../lib/google/cloud/automl/v1/dataset_pb.rb | 27 - .../google/cloud/automl/v1/detection_pb.rb | 26 - .../lib/google/cloud/automl/v1/geometry_pb.rb | 22 - .../lib/google/cloud/automl/v1/image_pb.rb | 29 - .../lib/google/cloud/automl/v1/io_pb.rb | 30 - .../cloud/automl/v1/model_evaluation_pb.rb | 29 - .../lib/google/cloud/automl/v1/model_pb.rb | 28 - .../google/cloud/automl/v1/operations_pb.rb | 37 - .../cloud/automl/v1/prediction_service.rb | 59 - .../automl/v1/prediction_service/client.rb | 770 --- .../v1/prediction_service/credentials.rb | 51 - .../v1/prediction_service/operations.rb | 851 --- .../automl/v1/prediction_service/paths.rb | 52 - .../automl/v1/prediction_service/rest.rb | 56 - .../v1/prediction_service/rest/client.rb | 713 --- .../v1/prediction_service/rest/operations.rb | 1095 ---- .../prediction_service/rest/service_stub.rb | 205 - .../cloud/automl/v1/prediction_service_pb.rb | 33 - .../v1/prediction_service_services_pb.rb | 99 - .../lib/google/cloud/automl/v1/rest.rb | 38 - .../lib/google/cloud/automl/v1/service_pb.rb | 55 - .../cloud/automl/v1/service_services_pb.rb | 136 - .../cloud/automl/v1/text_extraction_pb.rb | 25 - .../lib/google/cloud/automl/v1/text_pb.rb | 28 - .../google/cloud/automl/v1/text_segment_pb.rb | 21 - .../cloud/automl/v1/text_sentiment_pb.rb | 24 - .../google/cloud/automl/v1/translation_pb.rb | 27 - .../lib/google/cloud/automl/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 - .../cloud/automl/v1/annotation_payload.rb | 70 - .../google/cloud/automl/v1/annotation_spec.rb | 45 - .../google/cloud/automl/v1/classification.rb | 189 - .../google/cloud/automl/v1/data_items.rb | 202 - .../google/cloud/automl/v1/dataset.rb | 106 - .../google/cloud/automl/v1/detection.rb | 97 - .../google/cloud/automl/v1/geometry.rb | 53 - .../google/cloud/automl/v1/image.rb | 215 - .../proto_docs/google/cloud/automl/v1/io.rb | 1345 ---- .../google/cloud/automl/v1/model.rb | 121 - .../cloud/automl/v1/model_evaluation.rb | 100 - .../google/cloud/automl/v1/operations.rb | 197 - .../cloud/automl/v1/prediction_service.rb | 270 - .../google/cloud/automl/v1/service.rb | 326 - .../proto_docs/google/cloud/automl/v1/text.rb | 76 - .../google/cloud/automl/v1/text_extraction.rb | 73 - .../google/cloud/automl/v1/text_segment.rb | 44 - .../google/cloud/automl/v1/text_sentiment.rb | 82 - .../google/cloud/automl/v1/translation.rb | 79 - .../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 - .../google-cloud-automl-v1/snippets/Gemfile | 32 - .../snippets/automl/create_dataset.rb | 54 - .../snippets/automl/create_model.rb | 54 - .../snippets/automl/delete_dataset.rb | 54 - .../snippets/automl/delete_model.rb | 54 - .../snippets/automl/deploy_model.rb | 54 - .../snippets/automl/export_data.rb | 54 - .../snippets/automl/export_model.rb | 54 - .../snippets/automl/get_annotation_spec.rb | 47 - .../snippets/automl/get_dataset.rb | 47 - .../snippets/automl/get_model.rb | 47 - .../snippets/automl/get_model_evaluation.rb | 47 - .../snippets/automl/import_data.rb | 54 - .../snippets/automl/list_datasets.rb | 51 - .../snippets/automl/list_model_evaluations.rb | 51 - .../snippets/automl/list_models.rb | 51 - .../snippets/automl/undeploy_model.rb | 54 - .../snippets/automl/update_dataset.rb | 47 - .../snippets/automl/update_model.rb | 47 - .../prediction_service/batch_predict.rb | 54 - .../snippets/prediction_service/predict.rb | 47 - ...ippet_metadata_google.cloud.automl.v1.json | 815 --- .../cloud/automl/v1/automl_operations_test.rb | 400 -- .../cloud/automl/v1/automl_paths_test.rb | 103 - .../cloud/automl/v1/automl_rest_test.rb | 1088 ---- .../google/cloud/automl/v1/automl_test.rb | 1257 ---- .../v1/prediction_service_operations_test.rb | 400 -- .../v1/prediction_service_paths_test.rb | 55 - .../automl/v1/prediction_service_rest_test.rb | 212 - .../automl/v1/prediction_service_test.rb | 249 - .../google-cloud-automl-v1/test/helper.rb | 35 - .../google-cloud-automl-v1beta1/.gitignore | 20 - .../.repo-metadata.json | 20 - .../google-cloud-automl-v1beta1/.rubocop.yml | 33 - .../google-cloud-automl-v1beta1/.toys.rb | 28 - .../google-cloud-automl-v1beta1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-automl-v1beta1/CHANGELOG.md | 2 - .../google-cloud-automl-v1beta1/Gemfile | 15 - .../google-cloud-automl-v1beta1/LICENSE.md | 201 - .../google-cloud-automl-v1beta1/README.md | 154 - .../google-cloud-automl-v1beta1/Rakefile | 169 - .../gapic_metadata.json | 157 - .../google-cloud-automl-v1beta1.gemspec | 28 - .../lib/google-cloud-automl-v1beta1.rb | 21 - .../lib/google/cloud/automl/v1beta1.rb | 46 - .../automl/v1beta1/annotation_payload_pb.rb | 28 - .../automl/v1beta1/annotation_spec_pb.rb | 23 - .../lib/google/cloud/automl/v1beta1/automl.rb | 69 - .../cloud/automl/v1beta1/automl/client.rb | 2985 --------- .../automl/v1beta1/automl/credentials.rb | 51 - .../cloud/automl/v1beta1/automl/operations.rb | 851 --- .../cloud/automl/v1beta1/automl/paths.rb | 174 - .../cloud/automl/v1beta1/automl/rest.rb | 66 - .../automl/v1beta1/automl/rest/client.rb | 2774 -------- .../automl/v1beta1/automl/rest/operations.rb | 1095 ---- .../v1beta1/automl/rest/service_stub.rb | 1556 ----- .../cloud/automl/v1beta1/classification_pb.rb | 29 - .../cloud/automl/v1beta1/column_spec_pb.rb | 26 - .../cloud/automl/v1beta1/data_items_pb.rb | 35 - .../cloud/automl/v1beta1/data_stats_pb.rb | 32 - .../cloud/automl/v1beta1/data_types_pb.rb | 23 - .../google/cloud/automl/v1beta1/dataset_pb.rb | 29 - .../cloud/automl/v1beta1/detection_pb.rb | 29 - .../cloud/automl/v1beta1/geometry_pb.rb | 22 - .../google/cloud/automl/v1beta1/image_pb.rb | 29 - .../lib/google/cloud/automl/v1beta1/io_pb.rb | 32 - .../automl/v1beta1/model_evaluation_pb.rb | 31 - .../google/cloud/automl/v1beta1/model_pb.rb | 30 - .../cloud/automl/v1beta1/operations_pb.rb | 40 - .../automl/v1beta1/prediction_service.rb | 59 - .../v1beta1/prediction_service/client.rb | 727 --- .../v1beta1/prediction_service/credentials.rb | 51 - .../v1beta1/prediction_service/operations.rb | 851 --- .../v1beta1/prediction_service/paths.rb | 52 - .../automl/v1beta1/prediction_service/rest.rb | 56 - .../v1beta1/prediction_service/rest/client.rb | 670 -- .../prediction_service/rest/operations.rb | 1095 ---- .../prediction_service/rest/service_stub.rb | 205 - .../automl/v1beta1/prediction_service_pb.rb | 34 - .../v1beta1/prediction_service_services_pb.rb | 79 - .../google/cloud/automl/v1beta1/ranges_pb.rb | 21 - .../cloud/automl/v1beta1/regression_pb.rb | 21 - .../lib/google/cloud/automl/v1beta1/rest.rb | 38 - .../google/cloud/automl/v1beta1/service_pb.rb | 66 - .../automl/v1beta1/service_services_pb.rb | 163 - .../cloud/automl/v1beta1/table_spec_pb.rb | 24 - .../google/cloud/automl/v1beta1/tables_pb.rb | 34 - .../cloud/automl/v1beta1/temporal_pb.rb | 23 - .../automl/v1beta1/text_extraction_pb.rb | 25 - .../google/cloud/automl/v1beta1/text_pb.rb | 28 - .../cloud/automl/v1beta1/text_segment_pb.rb | 21 - .../cloud/automl/v1beta1/text_sentiment_pb.rb | 24 - .../cloud/automl/v1beta1/translation_pb.rb | 27 - .../google/cloud/automl/v1beta1/version.rb | 28 - .../google/cloud/automl/v1beta1/video_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 - .../automl/v1beta1/annotation_payload.rb | 86 - .../cloud/automl/v1beta1/annotation_spec.rb | 46 - .../cloud/automl/v1beta1/classification.rb | 235 - .../cloud/automl/v1beta1/column_spec.rb | 77 - .../google/cloud/automl/v1beta1/data_items.rb | 239 - .../google/cloud/automl/v1beta1/data_stats.rb | 239 - .../google/cloud/automl/v1beta1/data_types.rb | 124 - .../google/cloud/automl/v1beta1/dataset.rb | 102 - .../google/cloud/automl/v1beta1/detection.rb | 152 - .../google/cloud/automl/v1beta1/geometry.rb | 53 - .../google/cloud/automl/v1beta1/image.rb | 205 - .../google/cloud/automl/v1beta1/io.rb | 1214 ---- .../google/cloud/automl/v1beta1/model.rb | 113 - .../cloud/automl/v1beta1/model_evaluation.rb | 117 - .../google/cloud/automl/v1beta1/operations.rb | 232 - .../automl/v1beta1/prediction_service.rb | 238 - .../google/cloud/automl/v1beta1/ranges.rb | 38 - .../google/cloud/automl/v1beta1/regression.rb | 48 - .../google/cloud/automl/v1beta1/service.rb | 452 -- .../google/cloud/automl/v1beta1/table_spec.rb | 75 - .../google/cloud/automl/v1beta1/tables.rb | 304 - .../google/cloud/automl/v1beta1/temporal.rb | 40 - .../google/cloud/automl/v1beta1/text.rb | 84 - .../cloud/automl/v1beta1/text_extraction.rb | 73 - .../cloud/automl/v1beta1/text_segment.rb | 44 - .../cloud/automl/v1beta1/text_sentiment.rb | 87 - .../cloud/automl/v1beta1/translation.rb | 79 - .../google/cloud/automl/v1beta1/video.rb | 51 - .../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 - .../snippets/Gemfile | 32 - .../snippets/automl/create_dataset.rb | 47 - .../snippets/automl/create_model.rb | 54 - .../snippets/automl/delete_dataset.rb | 54 - .../snippets/automl/delete_model.rb | 54 - .../snippets/automl/deploy_model.rb | 54 - .../snippets/automl/export_data.rb | 54 - .../automl/export_evaluated_examples.rb | 54 - .../snippets/automl/export_model.rb | 54 - .../snippets/automl/get_annotation_spec.rb | 47 - .../snippets/automl/get_column_spec.rb | 47 - .../snippets/automl/get_dataset.rb | 47 - .../snippets/automl/get_model.rb | 47 - .../snippets/automl/get_model_evaluation.rb | 47 - .../snippets/automl/get_table_spec.rb | 47 - .../snippets/automl/import_data.rb | 54 - .../snippets/automl/list_column_specs.rb | 51 - .../snippets/automl/list_datasets.rb | 51 - .../snippets/automl/list_model_evaluations.rb | 51 - .../snippets/automl/list_models.rb | 51 - .../snippets/automl/list_table_specs.rb | 51 - .../snippets/automl/undeploy_model.rb | 54 - .../snippets/automl/update_column_spec.rb | 47 - .../snippets/automl/update_dataset.rb | 47 - .../snippets/automl/update_table_spec.rb | 47 - .../prediction_service/batch_predict.rb | 54 - .../snippets/prediction_service/predict.rb | 47 - ..._metadata_google.cloud.automl.v1beta1.json | 1055 ---- .../automl/v1beta1/automl_operations_test.rb | 400 -- .../cloud/automl/v1beta1/automl_paths_test.rb | 127 - .../cloud/automl/v1beta1/automl_rest_test.rb | 1424 ----- .../cloud/automl/v1beta1/automl_test.rb | 1639 ----- .../prediction_service_operations_test.rb | 400 -- .../v1beta1/prediction_service_paths_test.rb | 55 - .../v1beta1/prediction_service_rest_test.rb | 212 - .../automl/v1beta1/prediction_service_test.rb | 249 - .../test/helper.rb | 35 - .../google-cloud-backupdr-v1/.gitignore | 20 - .../.repo-metadata.json | 19 - .../google-cloud-backupdr-v1/.rubocop.yml | 33 - .../google-cloud-backupdr-v1/.toys.rb | 28 - .../google-cloud-backupdr-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-backupdr-v1/CHANGELOG.md | 2 - .../google-cloud-backupdr-v1/Gemfile | 15 - .../google-cloud-backupdr-v1/LICENSE.md | 201 - .../google-cloud-backupdr-v1/README.md | 154 - .../google-cloud-backupdr-v1/Rakefile | 169 - .../gapic_metadata.json | 217 - .../google-cloud-backupdr-v1.gemspec | 30 - .../lib/google-cloud-backupdr-v1.rb | 21 - .../lib/google/cloud/backupdr/v1.rb | 46 - .../v1/backup_dr_protection_summary.rb | 55 - .../v1/backup_dr_protection_summary/client.rb | 532 -- .../credentials.rb | 47 - .../v1/backup_dr_protection_summary/paths.rb | 50 - .../v1/backup_dr_protection_summary/rest.rb | 53 - .../rest/client.rb | 491 -- .../rest/service_stub.rb | 142 - .../lib/google/cloud/backupdr/v1/backupdr.rb | 56 - .../cloud/backupdr/v1/backupdr/client.rb | 4788 -------------- .../cloud/backupdr/v1/backupdr/credentials.rb | 47 - .../cloud/backupdr/v1/backupdr/operations.rb | 843 --- .../cloud/backupdr/v1/backupdr/paths.rb | 309 - .../google/cloud/backupdr/v1/backupdr/rest.rb | 54 - .../cloud/backupdr/v1/backupdr/rest/client.rb | 4495 ------------- .../backupdr/v1/backupdr/rest/operations.rb | 927 --- .../backupdr/v1/backupdr/rest/service_stub.rb | 2350 ------- .../google/cloud/backupdr/v1/backupdr_pb.rb | 51 - .../cloud/backupdr/v1/backupdr_services_pb.rb | 119 - .../google/cloud/backupdr/v1/backupplan_pb.rb | 47 - .../backupdr/v1/backupplanassociation_pb.rb | 42 - .../backupdr/v1/backupvault_alloydb_pb.rb | 27 - .../cloud/backupdr/v1/backupvault_ba_pb.rb | 24 - .../backupdr/v1/backupvault_cloudsql_pb.rb | 30 - .../cloud/backupdr/v1/backupvault_disk_pb.rb | 32 - .../cloud/backupdr/v1/backupvault_gce_pb.rb | 66 - .../cloud/backupdr/v1/backupvault_pb.rb | 80 - .../cloud/backupdr/v1/bindings_override.rb | 108 - .../backupdr/v1/datasourcereference_pb.rb | 34 - .../backupdr/v1/protection_summary_pb.rb | 40 - .../v1/protection_summary_services_pb.rb | 45 - .../lib/google/cloud/backupdr/v1/rest.rb | 39 - .../lib/google/cloud/backupdr/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/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/backupdr/v1/backupdr.rb | 415 -- .../google/cloud/backupdr/v1/backupplan.rb | 588 -- .../backupdr/v1/backupplanassociation.rb | 388 -- .../google/cloud/backupdr/v1/backupvault.rb | 1364 ---- .../cloud/backupdr/v1/backupvault_alloydb.rb | 69 - .../cloud/backupdr/v1/backupvault_ba.rb | 47 - .../cloud/backupdr/v1/backupvault_cloudsql.rb | 131 - .../cloud/backupdr/v1/backupvault_disk.rb | 241 - .../cloud/backupdr/v1/backupvault_gce.rb | 1001 --- .../cloud/backupdr/v1/datasourcereference.rb | 228 - .../cloud/backupdr/v1/protection_summary.rb | 309 - .../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 - .../proto_docs/google/type/dayofweek.rb | 49 - .../proto_docs/google/type/expr.rb | 75 - .../proto_docs/google/type/month.rb | 64 - .../google-cloud-backupdr-v1/snippets/Gemfile | 32 - .../list_resource_backup_configs.rb | 51 - .../snippets/backupdr/create_backup_plan.rb | 54 - .../create_backup_plan_association.rb | 54 - .../snippets/backupdr/create_backup_vault.rb | 54 - .../backupdr/create_management_server.rb | 54 - .../snippets/backupdr/delete_backup.rb | 54 - .../snippets/backupdr/delete_backup_plan.rb | 54 - .../delete_backup_plan_association.rb | 54 - .../snippets/backupdr/delete_backup_vault.rb | 54 - .../backupdr/delete_management_server.rb | 54 - ...kup_plan_associations_for_resource_type.rb | 51 - .../fetch_backups_for_resource_type.rb | 51 - ...ata_source_references_for_resource_type.rb | 51 - .../backupdr/fetch_usable_backup_vaults.rb | 51 - .../snippets/backupdr/get_backup.rb | 47 - .../snippets/backupdr/get_backup_plan.rb | 47 - .../backupdr/get_backup_plan_association.rb | 47 - .../backupdr/get_backup_plan_revision.rb | 47 - .../snippets/backupdr/get_backup_vault.rb | 47 - .../snippets/backupdr/get_data_source.rb | 47 - .../backupdr/get_data_source_reference.rb | 47 - .../backupdr/get_management_server.rb | 47 - .../snippets/backupdr/initialize_service.rb | 54 - .../backupdr/list_backup_plan_associations.rb | 51 - .../backupdr/list_backup_plan_revisions.rb | 51 - .../snippets/backupdr/list_backup_plans.rb | 51 - .../snippets/backupdr/list_backup_vaults.rb | 51 - .../snippets/backupdr/list_backups.rb | 51 - .../backupdr/list_data_source_references.rb | 51 - .../snippets/backupdr/list_data_sources.rb | 51 - .../backupdr/list_management_servers.rb | 51 - .../snippets/backupdr/restore_backup.rb | 54 - .../snippets/backupdr/trigger_backup.rb | 54 - .../snippets/backupdr/update_backup.rb | 54 - .../snippets/backupdr/update_backup_plan.rb | 54 - .../update_backup_plan_association.rb | 54 - .../snippets/backupdr/update_backup_vault.rb | 54 - .../snippets/backupdr/update_data_source.rb | 54 - ...pet_metadata_google.cloud.backupdr.v1.json | 1535 ----- ...backup_dr_protection_summary_paths_test.rb | 55 - .../backup_dr_protection_summary_rest_test.rb | 157 - .../v1/backup_dr_protection_summary_test.rb | 175 - .../backupdr/v1/backupdr_operations_test.rb | 400 -- .../cloud/backupdr/v1/backupdr_paths_test.rb | 211 - .../cloud/backupdr/v1/backupdr_rest_test.rb | 2196 ------- .../google/cloud/backupdr/v1/backupdr_test.rb | 2613 -------- .../google-cloud-backupdr-v1/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 | 238 - ...oogle-cloud-bare_metal_solution-v2.gemspec | 30 - .../google-cloud-bare_metal_solution-v2.rb | 21 - .../google/cloud/bare_metal_solution/v2.rb | 45 - .../v2/bare_metal_solution.rb | 63 - .../v2/bare_metal_solution/client.rb | 4838 -------------- .../v2/bare_metal_solution/credentials.rb | 47 - .../v2/bare_metal_solution/operations.rb | 843 --- .../v2/bare_metal_solution/paths.rb | 301 - .../v2/bare_metal_solution/rest.rb | 61 - .../v2/bare_metal_solution/rest/client.rb | 4495 ------------- .../v2/bare_metal_solution/rest/operations.rb | 927 --- .../bare_metal_solution/rest/service_stub.rb | 2789 --------- .../v2/bindings_override.rb | 75 - .../cloud/bare_metal_solution/v2/rest.rb | 38 - .../cloud/bare_metal_solution/v2/version.rb | 28 - .../v2/baremetalsolution_pb.rb | 38 - .../v2/baremetalsolution_services_pb.rb | 154 - .../cloud/baremetalsolution/v2/common_pb.rb | 22 - .../cloud/baremetalsolution/v2/instance_pb.rb | 49 - .../cloud/baremetalsolution/v2/lun_pb.rb | 32 - .../cloud/baremetalsolution/v2/network_pb.rb | 43 - .../baremetalsolution/v2/nfs_share_pb.rb | 36 - .../cloud/baremetalsolution/v2/osimage_pb.rb | 26 - .../baremetalsolution/v2/provisioning_pb.rb | 53 - .../cloud/baremetalsolution/v2/ssh_key_pb.rb | 28 - .../cloud/baremetalsolution/v2/volume_pb.rb | 40 - .../v2/volume_snapshot_pb.rb | 32 - .../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 - .../baremetalsolution/v2/baremetalsolution.rb | 63 - .../cloud/baremetalsolution/v2/common.rb | 53 - .../cloud/baremetalsolution/v2/instance.rb | 354 -- .../google/cloud/baremetalsolution/v2/lun.rb | 161 - .../cloud/baremetalsolution/v2/network.rb | 379 -- .../cloud/baremetalsolution/v2/nfs_share.rb | 243 - .../cloud/baremetalsolution/v2/osimage.rb | 80 - .../baremetalsolution/v2/provisioning.rb | 603 -- .../cloud/baremetalsolution/v2/ssh_key.rb | 97 - .../cloud/baremetalsolution/v2/volume.rb | 325 - .../baremetalsolution/v2/volume_snapshot.rb | 134 - .../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 - .../bare_metal_solution/create_nfs_share.rb | 54 - .../create_provisioning_config.rb | 47 - .../bare_metal_solution/create_ssh_key.rb | 47 - .../create_volume_snapshot.rb | 47 - .../bare_metal_solution/delete_nfs_share.rb | 54 - .../bare_metal_solution/delete_ssh_key.rb | 47 - .../delete_volume_snapshot.rb | 47 - .../bare_metal_solution/detach_lun.rb | 54 - .../disable_interactive_serial_console.rb | 54 - .../enable_interactive_serial_console.rb | 54 - .../snippets/bare_metal_solution/evict_lun.rb | 54 - .../bare_metal_solution/evict_volume.rb | 54 - .../bare_metal_solution/get_instance.rb | 47 - .../snippets/bare_metal_solution/get_lun.rb | 47 - .../bare_metal_solution/get_network.rb | 47 - .../bare_metal_solution/get_nfs_share.rb | 47 - .../get_provisioning_config.rb | 47 - .../bare_metal_solution/get_volume.rb | 47 - .../get_volume_snapshot.rb | 47 - .../bare_metal_solution/list_instances.rb | 51 - .../snippets/bare_metal_solution/list_luns.rb | 51 - .../bare_metal_solution/list_network_usage.rb | 47 - .../bare_metal_solution/list_networks.rb | 51 - .../bare_metal_solution/list_nfs_shares.rb | 51 - .../bare_metal_solution/list_os_images.rb | 51 - .../list_provisioning_quotas.rb | 51 - .../bare_metal_solution/list_ssh_keys.rb | 51 - .../list_volume_snapshots.rb | 51 - .../bare_metal_solution/list_volumes.rb | 51 - .../bare_metal_solution/rename_instance.rb | 47 - .../bare_metal_solution/rename_network.rb | 47 - .../bare_metal_solution/rename_nfs_share.rb | 47 - .../bare_metal_solution/rename_volume.rb | 47 - .../bare_metal_solution/reset_instance.rb | 54 - .../bare_metal_solution/resize_volume.rb | 54 - .../restore_volume_snapshot.rb | 54 - .../bare_metal_solution/start_instance.rb | 54 - .../bare_metal_solution/stop_instance.rb | 54 - .../submit_provisioning_config.rb | 47 - .../bare_metal_solution/update_instance.rb | 54 - .../bare_metal_solution/update_network.rb | 54 - .../bare_metal_solution/update_nfs_share.rb | 54 - .../update_provisioning_config.rb | 47 - .../bare_metal_solution/update_volume.rb | 54 - ...ata_google.cloud.baremetalsolution.v2.json | 1775 ------ .../v2/bare_metal_solution_operations_test.rb | 400 -- .../v2/bare_metal_solution_paths_test.rb | 211 - .../v2/bare_metal_solution_rest_test.rb | 2518 -------- .../v2/bare_metal_solution_test.rb | 2881 --------- .../test/helper.rb | 35 - .../google-cloud-batch-v1/.gitignore | 20 - .../google-cloud-batch-v1/.repo-metadata.json | 15 - .../google-cloud-batch-v1/.rubocop.yml | 33 - .../google-cloud-batch-v1/.toys.rb | 28 - .../google-cloud-batch-v1/.yardopts | 12 - .../google-cloud-batch-v1/AUTHENTICATION.md | 122 - .../google-cloud-batch-v1/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-batch-v1/Gemfile | 15 - .../google-cloud-batch-v1/LICENSE.md | 201 - .../google-cloud-batch-v1/README.md | 151 - .../google-cloud-batch-v1/Rakefile | 169 - .../google-cloud-batch-v1/gapic_metadata.json | 53 - .../google-cloud-batch-v1.gemspec | 30 - .../lib/google-cloud-batch-v1.rb | 22 - .../lib/google/cloud/batch/v1.rb | 45 - .../lib/google/cloud/batch/v1/batch_pb.rb | 42 - .../google/cloud/batch/v1/batch_service.rb | 58 - .../cloud/batch/v1/batch_service/client.rb | 1192 ---- .../batch/v1/batch_service/credentials.rb | 47 - .../batch/v1/batch_service/operations.rb | 843 --- .../cloud/batch/v1/batch_service/paths.rb | 113 - .../cloud/batch/v1/batch_service/rest.rb | 56 - .../batch/v1/batch_service/rest/client.rb | 1108 ---- .../batch/v1/batch_service/rest/operations.rb | 927 --- .../v1/batch_service/rest/service_stub.rb | 510 -- .../cloud/batch/v1/batch_services_pb.rb | 59 - .../cloud/batch/v1/bindings_override.rb | 75 - .../lib/google/cloud/batch/v1/job_pb.rb | 51 - .../lib/google/cloud/batch/v1/rest.rb | 38 - .../lib/google/cloud/batch/v1/task_pb.rb | 42 - .../lib/google/cloud/batch/v1/version.rb | 28 - .../lib/google/cloud/batch/v1/volume_pb.rb | 23 - .../lib/google/iam/v1.rb | 43 - .../lib/google/iam/v1/bindings_override.rb | 73 - .../lib/google/iam/v1/iam_policy.rb | 76 - .../lib/google/iam/v1/iam_policy/client.rb | 729 --- .../google/iam/v1/iam_policy/credentials.rb | 42 - .../lib/google/iam/v1/iam_policy/rest.rb | 74 - .../google/iam/v1/iam_policy/rest/client.rb | 673 -- .../iam/v1/iam_policy/rest/service_stub.rb | 265 - .../lib/google/iam/v1/rest.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 - .../proto_docs/google/cloud/batch/v1/batch.rb | 246 - .../proto_docs/google/cloud/batch/v1/job.rb | 801 --- .../proto_docs/google/cloud/batch/v1/task.rb | 547 -- .../google/cloud/batch/v1/volume.rb | 92 - .../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 - .../proto_docs/google/type/expr.rb | 75 - .../google-cloud-batch-v1/snippets/Gemfile | 32 - .../snippets/batch_service/cancel_job.rb | 54 - .../snippets/batch_service/create_job.rb | 47 - .../snippets/batch_service/delete_job.rb | 54 - .../snippets/batch_service/get_job.rb | 47 - .../snippets/batch_service/get_task.rb | 47 - .../snippets/batch_service/list_jobs.rb | 51 - .../snippets/batch_service/list_tasks.rb | 51 - .../snippets/iam_policy/get_iam_policy.rb | 47 - .../snippets/iam_policy/set_iam_policy.rb | 47 - .../iam_policy/test_iam_permissions.rb | 47 - ...nippet_metadata_google.cloud.batch.v1.json | 295 - .../snippet_metadata_google.iam.v1.json | 135 - .../batch/v1/batch_service_operations_test.rb | 400 -- .../batch/v1/batch_service_paths_test.rb | 91 - .../cloud/batch/v1/batch_service_rest_test.rb | 490 -- .../cloud/batch/v1/batch_service_test.rb | 570 -- .../google/iam/v1/iam_policy_rest_test.rb | 265 - .../test/google/iam/v1/iam_policy_test.rb | 286 - .../google-cloud-batch-v1/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 | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 48 - ...oud-beyond_corp-app_connections-v1.gemspec | 30 - ...le-cloud-beyond_corp-app_connections-v1.rb | 21 - .../cloud/beyond_corp/app_connections/v1.rb | 42 - .../v1/app_connections_service.rb | 65 - .../v1/app_connections_service/client.rb | 1143 ---- .../v1/app_connections_service/credentials.rb | 49 - .../v1/app_connections_service/operations.rb | 845 --- .../v1/app_connections_service/paths.rb | 109 - .../beyond_corp/app_connections/v1/version.rb | 30 - .../v1/app_connections_service_pb.rb | 46 - .../v1/app_connections_service_services_pb.rb | 72 - .../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/app_connections_service.rb | 411 -- .../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 - .../create_app_connection.rb | 54 - .../delete_app_connection.rb | 54 - .../get_app_connection.rb | 47 - .../list_app_connections.rb | 51 - .../resolve_app_connections.rb | 51 - .../update_app_connection.rb | 54 - ...le.cloud.beyondcorp.appconnections.v1.json | 255 - ...app_connections_service_operations_test.rb | 400 -- .../v1/app_connections_service_paths_test.rb | 91 - .../v1/app_connections_service_test.rb | 525 -- .../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 | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 48 - ...loud-beyond_corp-app_connectors-v1.gemspec | 30 - ...gle-cloud-beyond_corp-app_connectors-v1.rb | 21 - .../cloud/beyond_corp/app_connectors/v1.rb | 42 - .../v1/app_connectors_service.rb | 65 - .../v1/app_connectors_service/client.rb | 1146 ---- .../v1/app_connectors_service/credentials.rb | 49 - .../v1/app_connectors_service/operations.rb | 845 --- .../v1/app_connectors_service/paths.rb | 71 - .../beyond_corp/app_connectors/v1/version.rb | 30 - .../v1/app_connector_instance_config_pb.rb | 29 - .../v1/app_connectors_service_pb.rb | 44 - .../v1/app_connectors_service_services_pb.rb | 70 - .../appconnectors/v1/resource_info_pb.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 - .../v1/app_connector_instance_config.rb | 82 - .../v1/app_connectors_service.rb | 341 - .../appconnectors/v1/resource_info.rb | 78 - .../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 - .../create_app_connector.rb | 54 - .../delete_app_connector.rb | 54 - .../get_app_connector.rb | 47 - .../list_app_connectors.rb | 51 - .../app_connectors_service/report_status.rb | 54 - .../update_app_connector.rb | 54 - ...gle.cloud.beyondcorp.appconnectors.v1.json | 255 - .../app_connectors_service_operations_test.rb | 400 -- .../v1/app_connectors_service_paths_test.rb | 67 - .../v1/app_connectors_service_test.rb | 523 -- .../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 | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 38 - ...-cloud-beyond_corp-app_gateways-v1.gemspec | 30 - ...oogle-cloud-beyond_corp-app_gateways-v1.rb | 21 - .../cloud/beyond_corp/app_gateways/v1.rb | 42 - .../app_gateways/v1/app_gateways_service.rb | 65 - .../v1/app_gateways_service/client.rb | 899 --- .../v1/app_gateways_service/credentials.rb | 49 - .../v1/app_gateways_service/operations.rb | 845 --- .../v1/app_gateways_service/paths.rb | 71 - .../beyond_corp/app_gateways/v1/version.rb | 30 - .../appgateways/v1/app_gateways_service_pb.rb | 40 - .../v1/app_gateways_service_services_pb.rb | 66 - .../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 - .../appgateways/v1/app_gateways_service.rb | 291 - .../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 - .../create_app_gateway.rb | 54 - .../delete_app_gateway.rb | 54 - .../app_gateways_service/get_app_gateway.rb | 47 - .../app_gateways_service/list_app_gateways.rb | 51 - ...oogle.cloud.beyondcorp.appgateways.v1.json | 175 - .../app_gateways_service_operations_test.rb | 400 -- .../v1/app_gateways_service_paths_test.rb | 67 - .../v1/app_gateways_service_test.rb | 385 -- .../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 | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 38 - ...oud-beyond_corp-client_gateways-v1.gemspec | 30 - ...le-cloud-beyond_corp-client_gateways-v1.rb | 21 - .../cloud/beyond_corp/client_gateways/v1.rb | 42 - .../v1/client_gateways_service.rb | 62 - .../v1/client_gateways_service/client.rb | 884 --- .../v1/client_gateways_service/credentials.rb | 49 - .../v1/client_gateways_service/operations.rb | 845 --- .../v1/client_gateways_service/paths.rb | 71 - .../beyond_corp/client_gateways/v1/version.rb | 30 - .../v1/client_gateways_service_pb.rb | 37 - .../v1/client_gateways_service_services_pb.rb | 63 - .../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/client_gateways_service.rb | 221 - .../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 - .../create_client_gateway.rb | 54 - .../delete_client_gateway.rb | 54 - .../get_client_gateway.rb | 47 - .../list_client_gateways.rb | 51 - ...le.cloud.beyondcorp.clientgateways.v1.json | 175 - ...client_gateways_service_operations_test.rb | 400 -- .../v1/client_gateways_service_paths_test.rb | 67 - .../v1/client_gateways_service_test.rb | 385 -- .../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 | 163 - ...le-cloud-bigquery-analytics_hub-v1.gemspec | 29 - .../google-cloud-bigquery-analytics_hub-v1.rb | 21 - .../google/cloud/bigquery/analytics_hub/v1.rb | 47 - .../analytics_hub/v1/analytics_hub_service.rb | 63 - .../v1/analytics_hub_service/client.rb | 3312 ---------- .../v1/analytics_hub_service/credentials.rb | 50 - .../v1/analytics_hub_service/operations.rb | 845 --- .../v1/analytics_hub_service/paths.rb | 218 - .../v1/analytics_hub_service/rest.rb | 60 - .../v1/analytics_hub_service/rest/client.rb | 3066 --------- .../analytics_hub_service/rest/operations.rb | 929 --- .../rest/service_stub.rb | 1914 ------ .../cloud/bigquery/analytics_hub/v1/rest.rb | 39 - .../bigquery/analytics_hub/v1/version.rb | 30 - .../analyticshub/v1/analyticshub_pb.rb | 108 - .../v1/analyticshub_services_pb.rb | 119 - .../bigquery/analyticshub/v1/pubsub_pb.rb | 40 - .../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 - .../bigquery/analyticshub/v1/analyticshub.rb | 1364 ---- .../cloud/bigquery/analyticshub/v1/pubsub.rb | 559 -- .../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/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../approve_query_template.rb | 47 - .../create_data_exchange.rb | 47 - .../analytics_hub_service/create_listing.rb | 47 - .../create_query_template.rb | 47 - .../delete_data_exchange.rb | 47 - .../analytics_hub_service/delete_listing.rb | 47 - .../delete_query_template.rb | 47 - .../delete_subscription.rb | 54 - .../get_data_exchange.rb | 47 - .../analytics_hub_service/get_iam_policy.rb | 47 - .../analytics_hub_service/get_listing.rb | 47 - .../get_query_template.rb | 47 - .../analytics_hub_service/get_subscription.rb | 47 - .../list_data_exchanges.rb | 51 - .../analytics_hub_service/list_listings.rb | 51 - .../list_org_data_exchanges.rb | 51 - .../list_query_templates.rb | 51 - .../list_shared_resource_subscriptions.rb | 51 - .../list_subscriptions.rb | 51 - .../refresh_subscription.rb | 54 - .../revoke_subscription.rb | 47 - .../analytics_hub_service/set_iam_policy.rb | 47 - .../submit_query_template.rb | 47 - .../subscribe_data_exchange.rb | 54 - .../subscribe_listing.rb | 47 - .../test_iam_permissions.rb | 47 - .../update_data_exchange.rb | 47 - .../analytics_hub_service/update_listing.rb | 47 - .../update_query_template.rb | 47 - ...google.cloud.bigquery.analyticshub.v1.json | 1175 ---- .../analytics_hub_service_operations_test.rb | 400 -- .../v1/analytics_hub_service_paths_test.rb | 163 - .../v1/analytics_hub_service_rest_test.rb | 1699 ----- .../v1/analytics_hub_service_test.rb | 1914 ------ .../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 | 168 - .../gapic_metadata.json | 98 - ...le-cloud-bigquery-data_transfer-v1.gemspec | 29 - .../google-cloud-bigquery-data_transfer-v1.rb | 21 - .../google/cloud/bigquery/data_transfer/v1.rb | 47 - .../data_transfer/v1/bindings_override.rb | 77 - .../data_transfer/v1/data_transfer_service.rb | 57 - .../v1/data_transfer_service/client.rb | 2172 ------- .../v1/data_transfer_service/credentials.rb | 53 - .../v1/data_transfer_service/paths.rb | 193 - .../v1/data_transfer_service/rest.rb | 55 - .../v1/data_transfer_service/rest/client.rb | 2023 ------ .../rest/service_stub.rb | 1177 ---- .../cloud/bigquery/data_transfer/v1/rest.rb | 40 - .../bigquery/data_transfer/v1/version.rb | 30 - .../datatransfer/v1/datatransfer_pb.rb | 63 - .../v1/datatransfer_services_pb.rb | 99 - .../bigquery/datatransfer/v1/transfer_pb.rb | 43 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../bigquery/datatransfer/v1/datatransfer.rb | 726 --- .../bigquery/datatransfer/v1/transfer.rb | 411 -- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../check_valid_creds.rb | 47 - .../create_transfer_config.rb | 47 - .../delete_transfer_config.rb | 47 - .../delete_transfer_run.rb | 47 - .../enroll_data_sources.rb | 47 - .../data_transfer_service/get_data_source.rb | 47 - .../get_transfer_config.rb | 47 - .../data_transfer_service/get_transfer_run.rb | 47 - .../list_data_sources.rb | 51 - .../list_transfer_configs.rb | 51 - .../list_transfer_logs.rb | 51 - .../list_transfer_runs.rb | 51 - .../schedule_transfer_runs.rb | 47 - .../start_manual_transfer_runs.rb | 47 - .../unenroll_data_sources.rb | 47 - .../update_transfer_config.rb | 47 - ...google.cloud.bigquery.datatransfer.v1.json | 655 -- .../v1/data_transfer_service_paths_test.rb | 112 - .../v1/data_transfer_service_rest_test.rb | 988 --- .../v1/data_transfer_service_test.rb | 1103 ---- .../test/helper.rb | 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 | 53 - ...google-cloud-bigquery-migration-v2.gemspec | 28 - .../lib/google-cloud-bigquery-migration-v2.rb | 21 - .../lib/google/cloud/bigquery/migration/v2.rb | 47 - .../migration/v2/assessment_task_pb.rb | 26 - .../migration/v2/migration_entities_pb.rb | 41 - .../v2/migration_error_details_pb.rb | 28 - .../migration/v2/migration_metrics_pb.rb | 31 - .../migration/v2/migration_service.rb | 57 - .../migration/v2/migration_service/client.rb | 1103 ---- .../v2/migration_service/credentials.rb | 49 - .../migration/v2/migration_service/paths.rb | 92 - .../migration/v2/migration_service/rest.rb | 54 - .../v2/migration_service/rest/client.rb | 1011 --- .../v2/migration_service/rest/service_stub.rb | 512 -- .../migration/v2/migration_service_pb.rb | 39 - .../v2/migration_service_services_pb.rb | 62 - .../cloud/bigquery/migration/v2/rest.rb | 39 - .../migration/v2/translation_config_pb.rb | 50 - .../migration/v2/translation_details_pb.rb | 34 - .../migration/v2/translation_suggestion_pb.rb | 27 - .../migration/v2/translation_usability_pb.rb | 26 - .../cloud/bigquery/migration/v2/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/distribution.rb | 233 - .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/label.rb | 49 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/metric.rb | 299 - .../proto_docs/google/api/resource.rb | 227 - .../bigquery/migration/v2/assessment_task.rb | 61 - .../migration/v2/migration_entities.rb | 297 - .../migration/v2/migration_error_details.rb | 72 - .../migration/v2/migration_metrics.rb | 129 - .../migration/v2/migration_service.rb | 166 - .../migration/v2/translation_config.rb | 389 -- .../migration/v2/translation_details.rb | 191 - .../migration/v2/translation_suggestion.rb | 67 - .../migration/v2/translation_usability.rb | 69 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/error_details.rb | 420 -- .../snippets/Gemfile | 32 - .../create_migration_workflow.rb | 47 - .../delete_migration_workflow.rb | 47 - .../get_migration_subtask.rb | 47 - .../get_migration_workflow.rb | 47 - .../list_migration_subtasks.rb | 51 - .../list_migration_workflows.rb | 51 - .../start_migration_workflow.rb | 47 - ...ta_google.cloud.bigquery.migration.v2.json | 295 - .../v2/migration_service_paths_test.rb | 79 - .../v2/migration_service_rest_test.rb | 487 -- .../migration/v2/migration_service_test.rb | 540 -- .../test/helper.rb | 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 - ...ogle-cloud-bigquery-reservation-v1.gemspec | 29 - .../google-cloud-bigquery-reservation-v1.rb | 21 - .../google/cloud/bigquery/reservation/v1.rb | 47 - .../bigquery/reservation/v1/reservation_pb.rb | 82 - .../reservation/v1/reservation_service.rb | 71 - .../v1/reservation_service/client.rb | 3516 ----------- .../v1/reservation_service/credentials.rb | 54 - .../v1/reservation_service/paths.rb | 147 - .../v1/reservation_service/rest.rb | 68 - .../v1/reservation_service/rest/client.rb | 3268 ---------- .../reservation_service/rest/service_stub.rb | 1889 ------ .../reservation/v1/reservation_services_pb.rb | 297 - .../cloud/bigquery/reservation/v1/rest.rb | 39 - .../cloud/bigquery/reservation/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../bigquery/reservation/v1/reservation.rb | 1207 ---- .../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/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../reservation_service/create_assignment.rb | 47 - .../create_capacity_commitment.rb | 47 - .../reservation_service/create_reservation.rb | 47 - .../create_reservation_group.rb | 47 - .../reservation_service/delete_assignment.rb | 47 - .../delete_capacity_commitment.rb | 47 - .../reservation_service/delete_reservation.rb | 47 - .../delete_reservation_group.rb | 47 - .../failover_reservation.rb | 47 - .../reservation_service/get_bi_reservation.rb | 47 - .../get_capacity_commitment.rb | 47 - .../reservation_service/get_iam_policy.rb | 47 - .../reservation_service/get_reservation.rb | 47 - .../get_reservation_group.rb | 47 - .../reservation_service/list_assignments.rb | 51 - .../list_capacity_commitments.rb | 51 - .../list_reservation_groups.rb | 51 - .../reservation_service/list_reservations.rb | 51 - .../merge_capacity_commitments.rb | 47 - .../reservation_service/move_assignment.rb | 47 - .../search_all_assignments.rb | 51 - .../reservation_service/search_assignments.rb | 51 - .../reservation_service/set_iam_policy.rb | 47 - .../split_capacity_commitment.rb | 47 - .../test_iam_permissions.rb | 47 - .../reservation_service/update_assignment.rb | 47 - .../update_bi_reservation.rb | 47 - .../update_capacity_commitment.rb | 47 - .../reservation_service/update_reservation.rb | 47 - ..._google.cloud.bigquery.reservation.v1.json | 1175 ---- .../v1/reservation_service_paths_test.rb | 115 - .../v1/reservation_service_rest_test.rb | 1703 ----- .../v1/reservation_service_test.rb | 1892 ------ .../test/helper.rb | 35 - 2744 files changed, 1286 insertions(+), 348842 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/application_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/attributes_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/service_project_attachment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/workload_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/README.md delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/google-cloud-app_optimize-v1beta.gemspec delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google-cloud-app_optimize-v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/app_optimize/v1beta/version.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/paths.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/cloud/appoptimize/v1beta/app_optimize.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/create_report.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/delete_report.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/get_report.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/list_reports.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/read_report.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/snippet_metadata_google.cloud.appoptimize.v1beta.json delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_optimize-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/google-cloud-audit_manager-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google-cloud-audit_manager-v1.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/client.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/operations.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/paths.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/auditmanager/v1/auditmanager_pb.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/auditmanager/v1/auditmanager_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/cloud/auditmanager/v1/auditmanager.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/enroll_resource.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_report.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_scope_report.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_audit_report.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_resource_enrollment_status.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_audit_reports.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_controls.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_resource_enrollment_statuses.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/snippets/snippet_metadata_google.cloud.auditmanager.v1.json delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_test.rb delete mode 100644 owl-bot-staging/google-cloud-audit_manager-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-automl-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-automl-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/ranges_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/regression_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-batch-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-batch-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-batch-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-batch-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-batch-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-batch-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_error_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_metrics_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb diff --git a/google-cloud-app_hub-v1/.owlbot-manifest.json b/google-cloud-app_hub-v1/.owlbot-manifest.json index 144e64ce4d8a..9033bfa24edf 100644 --- a/google-cloud-app_hub-v1/.owlbot-manifest.json +++ b/google-cloud-app_hub-v1/.owlbot-manifest.json @@ -90,6 +90,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-app_hub-v1/.toys.rb b/google-cloud-app_hub-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-app_hub-v1/.toys.rb +++ b/google-cloud-app_hub-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-app_hub-v1/Rakefile b/google-cloud-app_hub-v1/Rakefile index 324e67a3cd41..6f86b00de1d7 100644 --- a/google-cloud-app_hub-v1/Rakefile +++ b/google-cloud-app_hub-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-app_hub-v1/lib/google-cloud-app_hub-v1.rb b/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb index bcca01af4f4b..2bd20cb40c59 100644 --- a/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb +++ b/google-cloud-app_hub-v1/lib/google-cloud-app_hub-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-app_hub-v1/lib/google/cloud/app_hub/v1.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb index fe563a1e205f..ebab4dae51e0 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb index 930909b80ac2..8fa01251c081 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb index 74cc474fc21b..9722a209e19a 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb index 3d62e12bd671..541dcc24d08f 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb index 9d2f2c7c81c9..77b788f9db27 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb index b21cd612451a..de11b2b871b2 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb index df909f22c353..41025e868601 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb index 14350e8e7812..eed67b697cee 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb index f902039949df..c65c0c87c00c 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb index 1aa2e21964f5..8c21b329cfc6 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb index f2ca06629fae..126149ab3449 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/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-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb index 82e67cf4076a..722942549fd1 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/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-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_services_pb.rb b/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_services_pb.rb index 7e4c939a90cc..f694822eccfc 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_services_pb.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/apphub/v1/apphub_service.proto for package 'Google.Cloud.AppHub.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-app_hub-v1/proto_docs/google/api/client.rb b/google-cloud-app_hub-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/api/client.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/api/field_info.rb b/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb index d558fed6cef1..0f5acf0a5538 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb +++ b/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/api/resource.rb b/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb index 60db47bf08bc..1b34c270e2f9 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb +++ b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_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-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb index 1904e8372e37..e67a1568db65 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb +++ b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/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-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb index 3f3e255555ca..841a166336a3 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb +++ b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb index 2388613c4099..78a43787310d 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb +++ b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/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-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb index df9b0137664a..2da9f70c19b1 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb +++ b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb index bdec37bec404..9d71177bf824 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb +++ b/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb index f6e867136403..7a757f512165 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/protobuf/any.rb b/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/rpc/status.rb b/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb index 09acc69b6125..c1a1c07eb2db 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/type/expr.rb b/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb index 41c8c3a565cc..53e7733b6592 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-app_hub-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-app_hub-v1/snippets/Gemfile b/google-cloud-app_hub-v1/snippets/Gemfile index 1f684e56e1e4..01e4ee88000f 100644 --- a/google-cloud-app_hub-v1/snippets/Gemfile +++ b/google-cloud-app_hub-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-app_hub-v1/snippets/app_hub/create_application.rb b/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb index c7f442a1162e..ecb6729ae83a 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/create_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-app_hub-v1/snippets/app_hub/create_service.rb b/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb index 1d4acc13e6a0..909a8e44c897 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/create_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-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb b/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb index 3610396405aa..bef16146076a 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb b/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb index 43bd138498ea..09e9695fc333 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb b/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb index d7de8dbcca77..246fde1039c5 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/delete_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-app_hub-v1/snippets/app_hub/delete_service.rb b/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb index 2f6fc39f41c0..96f1cd39b61c 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/delete_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-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb b/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb index 5889f97c3de5..76b3adb08c91 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb b/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb index 7289a3bd0878..438e272456a7 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb b/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb index ee321b26034f..fd0a2727844c 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb b/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb index 4b5da07f05dd..b24e9656c575 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/get_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-app_hub-v1/snippets/app_hub/get_discovered_service.rb b/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb index e82f7caabfbd..8d6b3faca3aa 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_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-app_hub-v1/snippets/app_hub/get_discovered_workload.rb b/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb index f8e97936d318..d5a7376701be 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb b/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb index 60bdafadb106..cf9240d27574 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/get_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-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb b/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb index d51f445d02fd..d913e0dd0077 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb b/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb index 84fb2037fa7b..981d5001c644 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb b/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb index c9f04d30430e..a0c9e9dc43c5 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb b/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb index a42e2021dbe9..16595dffd427 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_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-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb b/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb index 8c6f87c64be4..8af6d5b9a9e5 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb b/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb index 0c1bee0f81ec..c9dc10bc0854 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb b/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb index b6fa8a953a66..f63e8b919d25 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/list_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-app_hub-v1/snippets/app_hub/list_workloads.rb b/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb index 2247a713eb0d..98bee1c64a09 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb b/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb index 2aa48506f274..70e65424d4a7 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_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-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb b/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb index b56481df5aa8..d1d638e8c7dc 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb b/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb index 6f88b3a14446..86dc1e535b27 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb b/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb index 2368fd9baad3..b2ddfd7fe664 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/update_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-app_hub-v1/snippets/app_hub/update_service.rb b/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb index 88027fbae17e..e0a74c946803 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/update_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-app_hub-v1/snippets/app_hub/update_workload.rb b/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb index 866e6271bc4b..fc6d58bbc083 100644 --- a/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb +++ b/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb b/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb index e90fd76f6385..92b4bb44b49c 100644 --- a/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb +++ b/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_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-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb b/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb index 11cf64fbf634..546a7a4d6b65 100644 --- a/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb +++ b/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_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-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb b/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb index a14552c8b606..4b7d70cebacb 100644 --- a/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb +++ b/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_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-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb b/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb index 1e3d731db471..2c384f85efa9 100644 --- a/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb +++ b/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_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-app_hub-v1/test/helper.rb b/google-cloud-app_hub-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-app_hub-v1/test/helper.rb +++ b/google-cloud-app_hub-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-app_optimize-v1beta/.owlbot-manifest.json b/google-cloud-app_optimize-v1beta/.owlbot-manifest.json index 4159bafefc34..d1cda4f1b00e 100644 --- a/google-cloud-app_optimize-v1beta/.owlbot-manifest.json +++ b/google-cloud-app_optimize-v1beta/.owlbot-manifest.json @@ -56,6 +56,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/timestamp.rb index 74352be9c58c..e58202461f88 100644 --- a/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -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-artifact_registry-v1/.owlbot-manifest.json b/google-cloud-artifact_registry-v1/.owlbot-manifest.json index 9971f02b364e..e11a3949c249 100644 --- a/google-cloud-artifact_registry-v1/.owlbot-manifest.json +++ b/google-cloud-artifact_registry-v1/.owlbot-manifest.json @@ -138,6 +138,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-artifact_registry-v1/.toys.rb b/google-cloud-artifact_registry-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-artifact_registry-v1/.toys.rb +++ b/google-cloud-artifact_registry-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-artifact_registry-v1/Rakefile b/google-cloud-artifact_registry-v1/Rakefile index 4185117d6f1b..4148fa14709c 100644 --- a/google-cloud-artifact_registry-v1/Rakefile +++ b/google-cloud-artifact_registry-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-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb b/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb index 04945dd9f583..81605be80ce5 100644 --- a/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb +++ b/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb index 0ad712a7a6a8..0fa4b7bfbe28 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb index 019f4f6fe020..ee43fe7eedff 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb index 309e4ca8ec7b..e71cc0cd853d 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb index b9dd9afe5e8f..808d2715f8ee 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb index 0d6e57d0e7fa..57d67f3b167a 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb index e74fef94f11f..624a366f2e6a 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb index 54bbfe76fc19..64924d2a2ee7 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb index e91429d19869..735735a49314 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb index 75df6321ac9c..f3b03abb527f 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb index ba967c474dab..fa04cece7736 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb index 9db3336f3de3..5cb15289f659 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb index 75e1df64c736..d0a4958ba59d 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb b/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb index 43a7235b7680..cd63f995e427 100644 --- a/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb +++ b/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/devtools/artifactregistry/v1/service.proto for package 'Google.Cloud.ArtifactRegistry.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-artifact_registry-v1/proto_docs/google/api/client.rb b/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb +++ b/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb index 6be3cb0ed6c3..582be187d115 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/api/resource.rb b/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb index 1fbe722fc8bc..a312b90573bf 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb index 2f09f6c18b2c..19aa2ab91f75 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb index a88cb2134626..4f4aa4117723 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb index 08b7e3644546..a94ff905b658 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb index cea09635d81a..e07c055ac9d5 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb index c2044392f0c9..e851d178d658 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb index e01b46fffab7..ad71da265c27 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb index 3b3043a9b12e..2b69b5b6bb0d 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb index e4a14200b204..b7e1ad069172 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb index 7f16279e6bae..4f78625826fd 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb index 9b0c8403e70d..0bdb1d2172c8 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb index c1f20e578b2d..2ee4fa0cdea8 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb index 1ef1903ce3ff..a545ef0668e5 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb index 2f702ac20292..a9a41f7a2b11 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb index 82f2cd70daf7..9c9c3ee8a90f 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb index 24376892f355..ddeb66c66eaa 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb index f57e95a154f3..dac974efbbdf 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.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-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb index 447ba2367b16..5445c77f8258 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.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-artifact_registry-v1/proto_docs/google/iam/v1/options.rb b/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb index 79dae8815aca..60713d995b86 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.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-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb index 47d11893ed7b..999575b797df 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/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-artifact_registry-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb index 1a586e810a23..7a757f512165 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/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-artifact_registry-v1/proto_docs/google/protobuf/any.rb b/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb index 2c946be5a11d..58691995f02e 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.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-artifact_registry-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-artifact_registry-v1/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-artifact_registry-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.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-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb index 5f816f4a2702..7f3ffc78601a 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/struct.rb b/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb index 8728b4a20517..39e1aca868d2 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.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-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/rpc/status.rb b/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb index f976dec8daa9..c1a1c07eb2db 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.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-artifact_registry-v1/proto_docs/google/type/expr.rb b/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb index 650a5ad04e68..53e7733b6592 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-artifact_registry-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-artifact_registry-v1/snippets/Gemfile b/google-cloud-artifact_registry-v1/snippets/Gemfile index 16de8325a6f7..459cdcd60fe7 100755 --- a/google-cloud-artifact_registry-v1/snippets/Gemfile +++ b/google-cloud-artifact_registry-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-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb index b944df6ae5ef..3551d1fea5e3 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.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-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb index 9ecab3ba5866..faa2d06ad650 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb index dcc0dc084da7..da79982e2f09 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.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-artifact_registry-v1/snippets/artifact_registry/create_rule.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb index de320d1eac3c..446cae77d141 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_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-artifact_registry-v1/snippets/artifact_registry/create_tag.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb index e417752a30a3..614917acd763 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.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-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb index 0e492d598d96..a5a7848c4daa 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb index d5ca5d06f836..fdcd3ccaa467 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_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-artifact_registry-v1/snippets/artifact_registry/delete_package.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb index 10eebea61249..5a655c2e4962 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.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-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb index ceaf3e1e8e93..640b18b6b3c2 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.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-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb index 84d81870e9ee..558ed7cef6e8 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_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-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb index 01a863f332ce..91e16a183ca6 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.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-artifact_registry-v1/snippets/artifact_registry/delete_version.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb index d701a9071961..3eaddca23f51 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.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-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb index 67f78a084fa0..5f1daba9d5a5 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.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-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb index eb432ebbe2d2..b5b108c71355 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb index f816e1615437..0ef05ed884cb 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.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-artifact_registry-v1/snippets/artifact_registry/get_file.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb index 81994a747f91..197816935c4b 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_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-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb index b6e375276d83..1afea8a55d98 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.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-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb index a5160f260cdc..565ab113d0f9 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.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-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb index bdc65fb53c82..e3fb548ad087 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.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-artifact_registry-v1/snippets/artifact_registry/get_package.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb index 135b510c560e..e8bca8350df6 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.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-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb index 5084cfa8e378..cfb98bbd9209 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.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-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb index 13d349d0f203..df5c6449c907 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.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-artifact_registry-v1/snippets/artifact_registry/get_repository.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb index 6aefe1a1c597..4919f715af65 100755 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb index 5c536d514b05..64edea734465 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_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-artifact_registry-v1/snippets/artifact_registry/get_tag.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb index 3011db115dd7..38020d4c9027 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.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-artifact_registry-v1/snippets/artifact_registry/get_version.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb index 51cf872b0c3e..ebfc4996d184 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.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-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb index 39a1e10f66e4..6396617d1fd4 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_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-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb index 17863bb79515..1d1c19f659e9 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.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-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb index f0ab00c130fa..3b576e4026b4 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.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-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb index f4f6eadd74e2..c0e7bcf3df0d 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb index a6c0b9d84a6e..f5ae43a24fcb 100755 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb index b5ea7f8d96ea..ef775fe14faa 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.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-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb index 162b94160107..9485dc527e7e 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.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-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb index 9821e894eb95..5139dde54193 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.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-artifact_registry-v1/snippets/artifact_registry/list_packages.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb index d4542649ccbd..13c4c0a14971 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.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-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb index da9c807a436a..d87b40b2c0cf 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.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-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb index eacb2acb7b88..097d7c46cbf1 100755 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb index 5ae8cea918ac..0e2f6de5c8fe 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_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-artifact_registry-v1/snippets/artifact_registry/list_tags.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb index b1d8a37a9fb7..0e0ed6c2658e 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.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-artifact_registry-v1/snippets/artifact_registry/list_versions.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb index 2e26a842fdae..4c0c49ab3fe0 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.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-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb index 2a1773927742..976e507f153a 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.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-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb index db5356cce4c8..df231fd7b342 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.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-artifact_registry-v1/snippets/artifact_registry/update_file.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb index 61410833c31b..b45c4176571a 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_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-artifact_registry-v1/snippets/artifact_registry/update_package.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb index bef9cbf6e958..39121b1eecdd 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb index 6b469b929628..fbc2f9584b3c 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.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-artifact_registry-v1/snippets/artifact_registry/update_repository.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb index b31d6a33f17e..7831d02528b2 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.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-artifact_registry-v1/snippets/artifact_registry/update_rule.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb index 8bbb88c08268..3304a6d9f6f3 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_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-artifact_registry-v1/snippets/artifact_registry/update_tag.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb index 0b3f3026d3e0..658e94dda101 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.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-artifact_registry-v1/snippets/artifact_registry/update_version.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb index 9d37107892e4..b1e1b1b96fea 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_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-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb index 8725fb8276d6..2d206b7333ad 100644 --- a/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb +++ b/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_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-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb b/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb index f76841c5b7f8..4fabdd26d3a5 100644 --- a/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb +++ b/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_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-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb b/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb index 9e58ba9c756d..ee6f6455b726 100644 --- a/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb +++ b/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_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-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb b/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb index 3a1df897e16c..2a53db24bba7 100644 --- a/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb +++ b/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_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-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb b/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb index 82ca5fc8e0d0..ddbb91ec308d 100644 --- a/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb +++ b/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_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-artifact_registry-v1/test/helper.rb b/google-cloud-artifact_registry-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-artifact_registry-v1/test/helper.rb +++ b/google-cloud-artifact_registry-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-artifact_registry-v1beta2/.owlbot-manifest.json b/google-cloud-artifact_registry-v1beta2/.owlbot-manifest.json index 59f319b025e1..d4b9bbd0c38d 100644 --- a/google-cloud-artifact_registry-v1beta2/.owlbot-manifest.json +++ b/google-cloud-artifact_registry-v1beta2/.owlbot-manifest.json @@ -97,6 +97,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-artifact_registry-v1beta2/.toys.rb b/google-cloud-artifact_registry-v1beta2/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-artifact_registry-v1beta2/.toys.rb +++ b/google-cloud-artifact_registry-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-artifact_registry-v1beta2/Rakefile b/google-cloud-artifact_registry-v1beta2/Rakefile index a16e567a1ea0..1d749b6abb41 100644 --- a/google-cloud-artifact_registry-v1beta2/Rakefile +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb b/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb index 9fd95f90a8c7..42773d56b713 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb index 0f8e70de5cfb..5a48465dc9de 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb index 201a6a991fbb..de5f1fa1ee86 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb index 4a2163a1a9b2..a334974e17a3 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb index 4a72b7dbf712..bca5d7763a5e 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb index 395e41516241..3d15132574aa 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb index 845b4eed6ce7..4b937ff38983 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb index 8ff58f0835eb..4e4826632d6d 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb index 764fd508a2a6..8fde50261255 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb index fa00cfab9173..2177e2eb1d4d 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb index f31ae534d47b..ec6f1a7ce763 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb index 81cb12ec86f7..51f57d10ff56 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb index 9333c236b0ce..d25e48a6eb93 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/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-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb b/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb index aa4a6637b1f9..aaa057d35013 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/devtools/artifactregistry/v1beta2/service.proto for package 'Google.Cloud.ArtifactRegistry.V1beta2' # 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-artifact_registry-v1beta2/proto_docs/google/api/client.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/api/resource.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb index 85eb0519e9e7..87bcf0a3806a 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.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-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb index 618b28730544..b01bb4f451a4 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb index 8f9efe375173..24ee1b9b6dc3 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb index b8a5a169ef14..30184abcdddf 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb index 52723e944418..cf0245f23a64 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/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-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb index cf186ca2f3cf..b2fdc4b27fd1 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.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-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb index 9f9ec719d650..2a6ea04aff2a 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb index 5711c0a7f477..51bc9a408b69 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb index 90e6408bdf8f..1bf31d939f3d 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.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-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb index 3999076cd8c2..5445c77f8258 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb index e8720a105bca..60713d995b86 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb index 3e6a8d5d47d9..999575b797df 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb index 8728b4a20517..39e1aca868d2 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.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-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/type/expr.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb index 066f228c22f0..53e7733b6592 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/snippets/Gemfile b/google-cloud-artifact_registry-v1beta2/snippets/Gemfile index d1bbb880b275..6aaca3591deb 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/Gemfile +++ b/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb index 550ec254cf48..b4aec628bdf3 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb index 39132a89a31b..ea333cf7fe5d 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb index b6291bfccde8..3a5fe36a176f 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb index e48e305cebe6..9d4a02cbddc5 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb index ed21c8d30ae8..f712c0a18063 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb index 9f01948d06c0..1240bb6fbb67 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_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-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb index 8ffadf063bdd..b69d234386f5 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb index 6bd54234fd7c..75c9dd1f58a6 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb index 0d58be8b27fe..24c3dd6d088f 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb index b27cec4e0520..1504ae352b97 100644 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.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-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb index 44d98760bc36..6b62a92d27cf 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb index 71967cee5ade..227f1cb970c6 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb index 25f1e1194446..053bede11d21 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_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-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb index cc7eb91b06dc..749491500cbe 100644 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.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-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb index 64c695988828..b177cea98dc7 100644 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.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-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb index be2a991dbcfa..0cccd6b55a02 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb index bf9dc81e7de4..3d5971af0c9d 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb index 230148788cd3..b371d20afeb1 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb index 9939ca80573c..ba98059582c0 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb index 83fd6b75bc59..f1ec20f158bd 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_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-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb index c3c30ac608c4..dca645f107d7 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb index b7de3afbff05..7990b39f1d6a 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb index 44ec4ba575c1..0aca5331f573 100644 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.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-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb index d4187c7a30b8..b49bb58893ec 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb index b51f974d2887..477573a098df 100755 --- a/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb +++ b/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb b/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb index 42be75b66c28..fbe142f1b655 100644 --- a/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb +++ b/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_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-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb b/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb index 85c34004a4b8..81fee8ae756c 100644 --- a/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb +++ b/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_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-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb b/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb index 3553ff4b5eeb..31d16e9467ad 100644 --- a/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb +++ b/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_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-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb b/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb index 0cc9c66955e4..160cd4e1338f 100644 --- a/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb +++ b/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_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-artifact_registry-v1beta2/test/helper.rb b/google-cloud-artifact_registry-v1beta2/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-artifact_registry-v1beta2/test/helper.rb +++ b/google-cloud-artifact_registry-v1beta2/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-assured_workloads-v1/.owlbot-manifest.json b/google-cloud-assured_workloads-v1/.owlbot-manifest.json index aa29e52e9936..78e4bae970b7 100644 --- a/google-cloud-assured_workloads-v1/.owlbot-manifest.json +++ b/google-cloud-assured_workloads-v1/.owlbot-manifest.json @@ -59,6 +59,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-assured_workloads-v1/.toys.rb b/google-cloud-assured_workloads-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-assured_workloads-v1/.toys.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/Rakefile b/google-cloud-assured_workloads-v1/Rakefile index 6ca27e769c98..e8a4e1de245c 100644 --- a/google-cloud-assured_workloads-v1/Rakefile +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb b/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb index a5d9504504f1..24f2ce22bdb4 100644 --- a/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb +++ b/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb index e1e7f39bbc80..8a860900f3a7 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb index 95b72ddfa310..ea39cd61c3bf 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb index 542141e2ee02..d7c596a875d2 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb index a4e5bef1fe53..51ac08fa7943 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb index b6a1ecd74fd0..37716c9322d8 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb index b1f31c8476df..14045503975a 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb index 33dcd1e62e7f..277bb37f1f6d 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb index d3d45e76abee..83406c2c4a70 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb index c4df51db4e7f..0efaf6545122 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb index 0ad8306b2583..54af58066810 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb index 95fe04b00de3..159eef6467bf 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/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-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb b/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb index 18d55aa2d857..438ddf9b93f1 100644 --- a/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb +++ b/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/assuredworkloads/v1/assuredworkloads.proto for package 'Google.Cloud.AssuredWorkloads.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-assured_workloads-v1/proto_docs/google/api/client.rb b/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb index 6be3cb0ed6c3..582be187d115 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/api/resource.rb b/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb b/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb index c0ccc839244a..29b652613713 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb +++ b/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb index 50f11f9f36d6..7a757f512165 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/any.rb b/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb index 4fde75cec2aa..58691995f02e 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb index e63eb943257a..83e4481834a6 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb index 3db2d8f80bab..7f3ffc78601a 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/rpc/status.rb b/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb index 1db3524e2da2..c1a1c07eb2db 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/snippets/Gemfile b/google-cloud-assured_workloads-v1/snippets/Gemfile index 778256f79afb..49bd814d146e 100755 --- a/google-cloud-assured_workloads-v1/snippets/Gemfile +++ b/google-cloud-assured_workloads-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-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb index 5496bfe62b05..e2828db3324c 100644 --- a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb +++ b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.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-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb index f88a4aa802ea..c3ab7fb1bcf6 100755 --- a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb +++ b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb index 7b4aecbdd3d6..9b95aca15297 100755 --- a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb +++ b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb index ad1c0a730049..c957fe2e6f20 100644 --- a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb +++ b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.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-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb index d15127b0d371..4c570c4bf025 100755 --- a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb +++ b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb index baea8f46bce5..8592a9b4a1c6 100644 --- a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb +++ b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.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-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb index 3c7408d0435b..480c6982ac6a 100755 --- a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb +++ b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb index d9923b95e81e..e6804ae174be 100644 --- a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb +++ b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.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-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb index 9495e340b967..6a0d2952fd66 100755 --- a/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb +++ b/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb b/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb index a791d63d5fdc..5527cbf0077f 100644 --- a/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb +++ b/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb b/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb index 99d7a938c499..a6a2edfb3038 100644 --- a/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb +++ b/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb b/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb index 1b8d3952ef74..7154f9af9842 100644 --- a/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb +++ b/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb b/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb index d09760066c8e..d79badf210d5 100644 --- a/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb +++ b/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_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-assured_workloads-v1/test/helper.rb b/google-cloud-assured_workloads-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-assured_workloads-v1/test/helper.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/.owlbot-manifest.json b/google-cloud-assured_workloads-v1beta1/.owlbot-manifest.json index fa66bd647756..2a93afa12921 100644 --- a/google-cloud-assured_workloads-v1beta1/.owlbot-manifest.json +++ b/google-cloud-assured_workloads-v1beta1/.owlbot-manifest.json @@ -58,6 +58,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-assured_workloads-v1beta1/.toys.rb b/google-cloud-assured_workloads-v1beta1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-assured_workloads-v1beta1/.toys.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/Rakefile b/google-cloud-assured_workloads-v1beta1/Rakefile index f150aa16c98a..d453b207ad79 100644 --- a/google-cloud-assured_workloads-v1beta1/Rakefile +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb b/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb index 219d435e73b0..4b23acdd7178 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb index e3c5b5d1a0b4..4395df713d7c 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb index 6fbfa8a012bd..077d6ddf1b47 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb index aa9669440129..e6d7c99a4c68 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb index 407c086298e0..c940ead393b1 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb index c4ffd97c2b0e..2ff113682d1a 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb index 0e242cb7690d..abdcfdd68cde 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb index 4e6f90db635b..6c4602274f15 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb index 1432ce1c4d85..40d652c51c19 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb index 0682b942487b..95867d5f579e 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb index 2a0ec84992c5..e3b6724a99f7 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb index 33652a356d7e..8e2c6c93872f 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/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-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb.rb index a4c06d2d567c..6e7b4cfb1344 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto for package 'Google.Cloud.AssuredWorkloads.V1beta1' # 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-assured_workloads-v1beta1/proto_docs/google/api/client.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/api/resource.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb index 3507c928e0dc..dac4e9559b55 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb +++ b/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.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-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/snippets/Gemfile b/google-cloud-assured_workloads-v1beta1/snippets/Gemfile index 2558b61256b6..fa17d8d9c654 100755 --- a/google-cloud-assured_workloads-v1beta1/snippets/Gemfile +++ b/google-cloud-assured_workloads-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-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb index a66d7891b11a..81b408eee261 100644 --- a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb +++ b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.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-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb index 68bec805cb82..014d6ac23a14 100755 --- a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb +++ b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb index 0defce31c8a1..4f48c90e6969 100755 --- a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb +++ b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb index c26c7d6b9e71..32cce0425b59 100755 --- a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb +++ b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb index ff9833b2113f..f5978bf7a2ef 100755 --- a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb +++ b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb index 3fc749600a04..4323e4795eac 100644 --- a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb +++ b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.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-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb index 1cd20e73d131..3f066388fe20 100755 --- a/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb +++ b/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb b/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb index 3e1a5195ff5f..37e84aaa124c 100644 --- a/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb +++ b/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb b/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb index a5dfed6c0190..e911089b4572 100644 --- a/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb +++ b/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb b/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb index a868b5209bb4..3f1893f059fe 100644 --- a/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb +++ b/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb b/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb index 7469c0820cc9..2c16e5d2cfde 100644 --- a/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb +++ b/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_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-assured_workloads-v1beta1/test/helper.rb b/google-cloud-assured_workloads-v1beta1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-assured_workloads-v1beta1/test/helper.rb +++ b/google-cloud-assured_workloads-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-audit_manager-v1/.owlbot-manifest.json b/google-cloud-audit_manager-v1/.owlbot-manifest.json index 0148a8bd1d27..f7bb56013a2b 100644 --- a/google-cloud-audit_manager-v1/.owlbot-manifest.json +++ b/google-cloud-audit_manager-v1/.owlbot-manifest.json @@ -58,6 +58,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-audit_manager-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-audit_manager-v1/proto_docs/google/protobuf/timestamp.rb index 74352be9c58c..e58202461f88 100644 --- a/google-cloud-audit_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-audit_manager-v1/proto_docs/google/protobuf/timestamp.rb @@ -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-automl-v1/.owlbot-manifest.json b/google-cloud-automl-v1/.owlbot-manifest.json index 7065c389c274..0b7be8937f9e 100644 --- a/google-cloud-automl-v1/.owlbot-manifest.json +++ b/google-cloud-automl-v1/.owlbot-manifest.json @@ -122,6 +122,7 @@ "static": [ ".OwlBot.yaml", ".owlbot.rb", + "Gemfile.lock", "lib/google/cloud/automl/v1/_helpers.rb" ] } diff --git a/google-cloud-automl-v1/.toys.rb b/google-cloud-automl-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-automl-v1/.toys.rb +++ b/google-cloud-automl-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-automl-v1/Rakefile b/google-cloud-automl-v1/Rakefile index ded328e2c2f2..9dd468f3830e 100644 --- a/google-cloud-automl-v1/Rakefile +++ b/google-cloud-automl-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-automl-v1/lib/google-cloud-automl-v1.rb b/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb index b2fc19e0fd7c..0639f3bfe935 100644 --- a/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb +++ b/google-cloud-automl-v1/lib/google-cloud-automl-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-automl-v1/lib/google/cloud/automl/v1.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb index 4e033b08192c..70b770d6ce68 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/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-automl-v1/lib/google/cloud/automl/v1/automl.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb index 5d0ecd1ede54..62e9c8a5a030 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb index 082ba15172df..7ecc77f69219 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb index 4f9dc1ebf97c..bafb75c5f4ab 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb index 9306c540d056..ec9bb5dce369 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb index 9d1f32048192..7cfa7f1b018d 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb index 11975ed74b9c..fe9133837455 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb index c70cc1ac45ad..7198b59b74d4 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb index dd693e28fff6..bbabcd436e9d 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb index 9cf713180308..55b031b23a36 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb index b95672859aa9..6c5045916cb7 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb index 77a6e140007f..6b3f20499814 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb index ba91ce7f1226..4fe31b05d81c 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb index f53c10aaf6ba..d1c4f5788ef3 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb index 79ca710a7def..b529a1fcf51f 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb index 26efc2f24f8d..566a8b946d44 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb index 4ba04fdd1493..e9f9264051f9 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb index 2320be84bdfa..9d66ea3048ba 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb index a1fc88e01bbe..ed831fb87e44 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb index b9fffca5e55e..fa9f4cd6c333 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/automl/v1/prediction_service.proto for package 'Google.Cloud.AutoML.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-automl-v1/lib/google/cloud/automl/v1/rest.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb index 8fce938f5a2c..e7f6441bacb9 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/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-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb index 02fd14fc8f96..da906eec628a 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/automl/v1/service.proto for package 'Google.Cloud.AutoML.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-automl-v1/proto_docs/google/api/client.rb b/google-cloud-automl-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-automl-v1/proto_docs/google/api/client.rb +++ b/google-cloud-automl-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-automl-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-automl-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-automl-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-automl-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-automl-v1/proto_docs/google/api/resource.rb b/google-cloud-automl-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-automl-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-automl-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-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb index 3640c3de65d5..9bd24ebc2a4b 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb index 90a3ab4a93ce..942cbd6b09ad 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb index 1bac9d0a3248..9044a0c41bef 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb index a064cc3f32b2..27054977211d 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb index b7d935f33786..afaccfc1a7d1 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb index 3997d2b03d43..3a1323a1c88d 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb index 67d56fad1bd0..74a562769bfa 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb index e9d496c78998..4e520cdd2e8b 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb index ed53398903e1..374a8f62bc10 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb index 887f6ed35371..37165c8fbf69 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb index 6bc101380027..729817ff4233 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb index 5dc5c94ba01c..78d79e45a942 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/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-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb index 04407c875664..0811f3318b09 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_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-automl-v1/proto_docs/google/cloud/automl/v1/service.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb index c2fe8c22b1ac..3185ecd7a149 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/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-automl-v1/proto_docs/google/cloud/automl/v1/text.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb index aac703625549..aa705d31cb5d 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb index e4211a003543..817c0921c657 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb index af0fc0294e1f..93eddac0a79f 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb index 63ccbbe928d3..1c4bc080ceb3 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb index 4fd14ad997b9..b41617bc0ea1 100644 --- a/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb +++ b/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/any.rb b/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-automl-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-automl-v1/proto_docs/google/rpc/status.rb b/google-cloud-automl-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-automl-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-automl-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-automl-v1/snippets/Gemfile b/google-cloud-automl-v1/snippets/Gemfile index c84461c17b0f..a30bcdf1095a 100755 --- a/google-cloud-automl-v1/snippets/Gemfile +++ b/google-cloud-automl-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-automl-v1/snippets/automl/create_dataset.rb b/google-cloud-automl-v1/snippets/automl/create_dataset.rb index a35699d8732e..b5039ab44d72 100755 --- a/google-cloud-automl-v1/snippets/automl/create_dataset.rb +++ b/google-cloud-automl-v1/snippets/automl/create_dataset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/create_model.rb b/google-cloud-automl-v1/snippets/automl/create_model.rb index 23f5be8c3beb..5d3c31c2a84e 100755 --- a/google-cloud-automl-v1/snippets/automl/create_model.rb +++ b/google-cloud-automl-v1/snippets/automl/create_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/delete_dataset.rb b/google-cloud-automl-v1/snippets/automl/delete_dataset.rb index 0f1f75338a9f..5d9f3bddfa4c 100755 --- a/google-cloud-automl-v1/snippets/automl/delete_dataset.rb +++ b/google-cloud-automl-v1/snippets/automl/delete_dataset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/delete_model.rb b/google-cloud-automl-v1/snippets/automl/delete_model.rb index fc59be0be0c5..31d572dc4ae4 100755 --- a/google-cloud-automl-v1/snippets/automl/delete_model.rb +++ b/google-cloud-automl-v1/snippets/automl/delete_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/deploy_model.rb b/google-cloud-automl-v1/snippets/automl/deploy_model.rb index 495c3e65bfb7..6bf6b9d1894a 100755 --- a/google-cloud-automl-v1/snippets/automl/deploy_model.rb +++ b/google-cloud-automl-v1/snippets/automl/deploy_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/export_data.rb b/google-cloud-automl-v1/snippets/automl/export_data.rb index ccd315bcaa8f..0c6ccde37676 100755 --- a/google-cloud-automl-v1/snippets/automl/export_data.rb +++ b/google-cloud-automl-v1/snippets/automl/export_data.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/export_model.rb b/google-cloud-automl-v1/snippets/automl/export_model.rb index 361a3bc22240..a8d8b903e76d 100755 --- a/google-cloud-automl-v1/snippets/automl/export_model.rb +++ b/google-cloud-automl-v1/snippets/automl/export_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb b/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb index 769922797650..1370dd7f6de2 100755 --- a/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb +++ b/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/get_dataset.rb b/google-cloud-automl-v1/snippets/automl/get_dataset.rb index 757334ffac97..653b941b6763 100755 --- a/google-cloud-automl-v1/snippets/automl/get_dataset.rb +++ b/google-cloud-automl-v1/snippets/automl/get_dataset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/get_model.rb b/google-cloud-automl-v1/snippets/automl/get_model.rb index d2899d5151d4..3cfec8bd9f5b 100755 --- a/google-cloud-automl-v1/snippets/automl/get_model.rb +++ b/google-cloud-automl-v1/snippets/automl/get_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb b/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb index 5f0afe272d27..66b9f5107d85 100755 --- a/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb +++ b/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/import_data.rb b/google-cloud-automl-v1/snippets/automl/import_data.rb index e4f986054a56..69bb6c83c5dc 100755 --- a/google-cloud-automl-v1/snippets/automl/import_data.rb +++ b/google-cloud-automl-v1/snippets/automl/import_data.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/list_datasets.rb b/google-cloud-automl-v1/snippets/automl/list_datasets.rb index 47a88bc6ffb4..c5a76dbcd997 100755 --- a/google-cloud-automl-v1/snippets/automl/list_datasets.rb +++ b/google-cloud-automl-v1/snippets/automl/list_datasets.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb b/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb index 5fd29a9e4860..c9798178e36c 100755 --- a/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb +++ b/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/list_models.rb b/google-cloud-automl-v1/snippets/automl/list_models.rb index afc14e4c55d9..9b3102e77406 100755 --- a/google-cloud-automl-v1/snippets/automl/list_models.rb +++ b/google-cloud-automl-v1/snippets/automl/list_models.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/undeploy_model.rb b/google-cloud-automl-v1/snippets/automl/undeploy_model.rb index fae8c91515be..9044e6b31e6d 100755 --- a/google-cloud-automl-v1/snippets/automl/undeploy_model.rb +++ b/google-cloud-automl-v1/snippets/automl/undeploy_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/update_dataset.rb b/google-cloud-automl-v1/snippets/automl/update_dataset.rb index 467d91435ba9..097b11573307 100755 --- a/google-cloud-automl-v1/snippets/automl/update_dataset.rb +++ b/google-cloud-automl-v1/snippets/automl/update_dataset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/automl/update_model.rb b/google-cloud-automl-v1/snippets/automl/update_model.rb index e53619c657de..8b945e7f28c5 100755 --- a/google-cloud-automl-v1/snippets/automl/update_model.rb +++ b/google-cloud-automl-v1/snippets/automl/update_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb b/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb index 6435859fd93a..97f5c94f0b1a 100755 --- a/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb +++ b/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/snippets/prediction_service/predict.rb b/google-cloud-automl-v1/snippets/prediction_service/predict.rb index 3b6e20a8eca3..bc742b1e85e0 100755 --- a/google-cloud-automl-v1/snippets/prediction_service/predict.rb +++ b/google-cloud-automl-v1/snippets/prediction_service/predict.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb b/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb index aec0676e1e86..856cda1fb3b2 100644 --- a/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb +++ b/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_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-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb b/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb index 15c0dc3a978a..be60ed069bd5 100644 --- a/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb +++ b/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_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-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb b/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb index b2820b4f66b4..433cd2fb25dd 100644 --- a/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb +++ b/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_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-automl-v1/test/google/cloud/automl/v1/automl_test.rb b/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb index 31792ab60593..a8f7d67c1702 100644 --- a/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb +++ b/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_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-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb b/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb index 9adefd55407b..7cc57a046005 100644 --- a/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb +++ b/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_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-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb b/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb index 4cc706535fb9..f5f666866b67 100644 --- a/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb +++ b/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_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-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb b/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb index 34835e8ba397..5a2ef57b39ce 100644 --- a/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb +++ b/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_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-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb b/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb index 5836ee69e5d9..74ff6f3b9cb7 100644 --- a/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb +++ b/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_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-automl-v1/test/helper.rb b/google-cloud-automl-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-automl-v1/test/helper.rb +++ b/google-cloud-automl-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-automl-v1beta1/.owlbot-manifest.json b/google-cloud-automl-v1beta1/.owlbot-manifest.json index 13cf6710019d..ae03b5a99882 100644 --- a/google-cloud-automl-v1beta1/.owlbot-manifest.json +++ b/google-cloud-automl-v1beta1/.owlbot-manifest.json @@ -147,6 +147,7 @@ "static": [ ".OwlBot.yaml", ".owlbot.rb", + "Gemfile.lock", "lib/google/cloud/automl/v1beta1/_helpers.rb" ] } diff --git a/google-cloud-automl-v1beta1/.toys.rb b/google-cloud-automl-v1beta1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-automl-v1beta1/.toys.rb +++ b/google-cloud-automl-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-automl-v1beta1/Rakefile b/google-cloud-automl-v1beta1/Rakefile index 2edbca58db2d..0809ccb14b35 100644 --- a/google-cloud-automl-v1beta1/Rakefile +++ b/google-cloud-automl-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-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb b/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb index 8fb8f46ea196..ac7d092bf31e 100644 --- a/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb +++ b/google-cloud-automl-v1beta1/lib/google-cloud-automl-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-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb index a735ae363501..78a600ce0c87 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb index 0fe5c241e692..3e41d90e7a98 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb index de974c0efcd6..9c7504318c76 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb index 331b5018bae5..59c4eb1fb2be 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb index eeb21d78cc38..b166dda91efe 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb index fc436ea6a599..f9a7d5efd31e 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb index d684520134b3..da55991d354b 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb index 6a391fc4021b..2d1ec590f207 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb index 0f58db725baa..8722d3172d66 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb index 53dfa0e1f4d0..774d061a2484 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb index 80a9c19ebc8d..3ef3fce3b376 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb index 4fd9b973e92d..a82dd9c0abbb 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb index c0378d05e8d6..a5db32e08e4d 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb index 2ddfb98adcae..fc03f007a693 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb index 31f6169daac3..a43bf51c919f 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb index fa12085e637c..7d3604f143b4 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb index 5638004a3da8..43ddbdebe172 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb index 80ed5579a8a0..f5e618e44755 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb index bc9dd8bc97b3..4d4927cfe5ad 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb index 4c594572849c..9e3ff65acdf4 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/automl/v1beta1/prediction_service.proto for package 'Google.Cloud.AutoML.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-automl-v1beta1/lib/google/cloud/automl/v1beta1/rest.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/rest.rb index 636fe781bc70..536e784f6434 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/rest.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/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-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb index f9ab186c27bf..3058d28ba237 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/automl/v1beta1/service.proto for package 'Google.Cloud.AutoML.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-automl-v1beta1/proto_docs/google/api/client.rb b/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-automl-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-automl-v1beta1/proto_docs/google/api/field_behavior.rb b/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-automl-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-automl-v1beta1/proto_docs/google/api/launch_stage.rb b/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-automl-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-automl-v1beta1/proto_docs/google/api/resource.rb b/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb +++ b/google-cloud-automl-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-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb index 3628dbdf28bc..a5d64336682a 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb index 5d5af36c8d74..fef4ea17d2ba 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb index c8952c8cbc5a..ddcb7dbb8d85 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb index 6a2f2e03d7e1..5a49f3139bdf 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb index ec1e57f53569..c6d3145ce607 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb index e7e1497d742a..69d1de9e2ebe 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb index b93fb5b9e7e4..487ca044c5e5 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb index 4e7c642c58db..66f98e62fd51 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb index 1cc950d2cb8c..6f569cb06b5e 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb index 23c78eb4b184..64cc3c7ae1f9 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb index ec64ae507b24..e75d8c471c72 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb index b11b6b22e289..cda70b79c2b2 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb index fea74d217603..6e167f65d37b 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb index b3f32b4ed5ab..86132556d0f6 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb index b6fbf4209888..6920b67fbe65 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/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-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb index 8fddc9c2c472..87c78db799ad 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb index b561086d2c9a..7fc488386a6c 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb index 586dacfeb3e0..147832f1fabb 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb index 44095de30726..1c76959322fb 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/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-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb index f44ef287cefc..adc8f6e775c4 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb index 16af52b7b3ee..cb70cab357c4 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb index 9fbef5af57ea..0214a830f15a 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb index f13910f2d96c..1c3b18d079ef 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb index ac96ff3d316e..ca5b21931f3b 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb index 4ce0f5e117ef..0ab880d1d0de 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb index 0e934f96e569..9b48bef95e98 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb index 503926c8aeb8..4826f3a2fb6f 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb index 53264891c9e7..8c029ee5303b 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb b/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/any.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/duration.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/empty.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/struct.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb index 6fd3d60d108d..39e1aca868d2 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-automl-v1beta1/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-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-automl-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-automl-v1beta1/proto_docs/google/rpc/status.rb b/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb +++ b/google-cloud-automl-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-automl-v1beta1/snippets/Gemfile b/google-cloud-automl-v1beta1/snippets/Gemfile index 6440d7d8410d..4af8ecce5fb8 100755 --- a/google-cloud-automl-v1beta1/snippets/Gemfile +++ b/google-cloud-automl-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-automl-v1beta1/snippets/automl/create_dataset.rb b/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb index 04a5d65fae8a..0a974be0868c 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/create_model.rb b/google-cloud-automl-v1beta1/snippets/automl/create_model.rb index cfdaa415f64a..22cb436527e3 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/create_model.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/create_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb b/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb index 69eb73b7b11a..628da07c0d25 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb b/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb index c0fce084df1b..15ca9acb6cac 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb b/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb index 999617dd0b5d..140df82eb01c 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/export_data.rb b/google-cloud-automl-v1beta1/snippets/automl/export_data.rb index 9b07f7f9035c..d2be3e5b1a63 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/export_data.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/export_data.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb b/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb index ddbde6b1f128..ba25ff7ba592 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/export_model.rb b/google-cloud-automl-v1beta1/snippets/automl/export_model.rb index 93b7faa0610d..7c6e81cc84b0 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/export_model.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/export_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb b/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb index 4a5caf77b41c..9a97355601b2 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb b/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb index 1dd300ff40b2..2a52e3c32551 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb b/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb index f8de9a0e2865..68d3e53aa211 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_model.rb b/google-cloud-automl-v1beta1/snippets/automl/get_model.rb index 9e73bb200979..e50cdc32d622 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/get_model.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/get_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb b/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb index c4889d47f33a..ca4f8591f907 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb b/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb index 4cea80727d79..cfe8b2137d84 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/import_data.rb b/google-cloud-automl-v1beta1/snippets/automl/import_data.rb index fc38e935020a..1cb0abe33861 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/import_data.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/import_data.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb b/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb index c415686f5284..c74afd3280ca 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb b/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb index 35d0bc7a12d2..87378a8792fc 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb b/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb index e64ccdb95beb..528ea60d5c5d 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/list_models.rb b/google-cloud-automl-v1beta1/snippets/automl/list_models.rb index e266955cb2a4..82eec30e8372 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/list_models.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/list_models.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb b/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb index 28ee98d76de0..b3ce41523371 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb b/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb index 18ff177fc70e..c4dd0d5ccf13 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb b/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb index f12c74ef6875..e2f0d1af6b69 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb b/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb index 1177989667db..a8a8c79b852f 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb b/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb index d940a2dfa144..66268b4bfcd3 100755 --- a/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb +++ b/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb b/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb index 41199d2c873c..181699c503a9 100755 --- a/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb +++ b/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb b/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb index 1e771be5c20a..aaba4299f11f 100755 --- a/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb +++ b/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb index cd0e722e267c..75d1640c3c69 100644 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb +++ b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_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-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb index 0f2d0bdbf4f2..267b97d1fab1 100644 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb +++ b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_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-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb index dda8aec9f5bb..76cbacb1181f 100644 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb +++ b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_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-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb index 1d0e7d28d5ba..e43526b6361c 100644 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb +++ b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_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-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb index 3f6fb8f3f9d2..63bf5ca8cd95 100644 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb +++ b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb index a702d2158e30..f82674af6532 100644 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb +++ b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb index 2b863619f0ca..40557dac392a 100644 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb +++ b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb index 22607d07a240..9c66c7b2e013 100644 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb +++ b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_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-automl-v1beta1/test/helper.rb b/google-cloud-automl-v1beta1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-automl-v1beta1/test/helper.rb +++ b/google-cloud-automl-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-backupdr-v1/.owlbot-manifest.json b/google-cloud-backupdr-v1/.owlbot-manifest.json index 5ee054d6bca1..ef392a0297b1 100644 --- a/google-cloud-backupdr-v1/.owlbot-manifest.json +++ b/google-cloud-backupdr-v1/.owlbot-manifest.json @@ -125,6 +125,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-backupdr-v1/.toys.rb b/google-cloud-backupdr-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-backupdr-v1/.toys.rb +++ b/google-cloud-backupdr-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-backupdr-v1/Rakefile b/google-cloud-backupdr-v1/Rakefile index c958ce5eaf9b..7990877ac4bf 100644 --- a/google-cloud-backupdr-v1/Rakefile +++ b/google-cloud-backupdr-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-backupdr-v1/lib/google-cloud-backupdr-v1.rb b/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb index fef354598d9f..7bea88dbd327 100644 --- a/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb +++ b/google-cloud-backupdr-v1/lib/google-cloud-backupdr-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-backupdr-v1/lib/google/cloud/backupdr/v1.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb index 76959762c891..978a9a0cc88f 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb index 11a8a6f36f8d..9807b8cc2845 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb index f2d2290257ca..30e7a373b7e0 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb index a48b5a6642d0..f6fc3fd1ca69 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb index 32efc06338f9..ad52ac7ba1c1 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb index 638888c7a48b..298a5882fa27 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb index dd84097e8cb4..5b7fba263be4 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb index d2e003bb582d..b3b3918968ab 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb index b2fb0ec8f6d2..571ade73a8ae 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb index 28138b84f8b3..c6ef2555cab9 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb index 5a2d706683bb..91bbec9bb35d 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/backupdr/v1/backupdr.proto for package 'Google.Cloud.BackupDR.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-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb index 48941e26616d..ecfc1771ff13 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/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-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb index 84f3712fd28f..9cc488ca2ae8 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/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-backupdr-v1/proto_docs/google/api/client.rb b/google-cloud-backupdr-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/api/client.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/field_info.rb b/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb index d558fed6cef1..0f5acf0a5538 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/resource.rb b/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb index 49d0774423dc..de97c93454cf 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb index be368ae3766f..f7ce82fba389 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb index 7eb40bc244f8..b6e38383477c 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb index b045ef8ee387..02c9559e5abc 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb index 125503439c60..787b36f74c08 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb index a3d235694f2d..c11daec87a93 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.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-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb index 7a9cf2728530..d5590a9a587f 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_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-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb index 32fa7a4ac467..bc9fe21300c3 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb index bc7c911141d9..d6e8a8da44c0 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.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-backupdr-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb index f6e867136403..7a757f512165 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/any.rb b/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/wrappers.rb b/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb index 6319e2207883..9a7c0269fa42 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb b/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb index 09acc69b6125..c1a1c07eb2db 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/type/dayofweek.rb b/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb index 4fd080d9b331..973211b9ffe7 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb b/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb index 41c8c3a565cc..53e7733b6592 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/type/month.rb b/google-cloud-backupdr-v1/proto_docs/google/type/month.rb index 17a31b7f2e22..3e27c902551d 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/type/month.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/type/month.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/Gemfile b/google-cloud-backupdr-v1/snippets/Gemfile index 2c2877fc5a34..4febd3ff4e67 100644 --- a/google-cloud-backupdr-v1/snippets/Gemfile +++ b/google-cloud-backupdr-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-backupdr-v1/snippets/backupdr/create_backup_plan.rb b/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb index dc67f27a1a48..e5b889a4dfa1 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb b/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb index 2f079eb00f9d..628c925da9e2 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb b/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb index c572a596a66a..30f7bcaa3098 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb b/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb index 348a4efb55de..8eb6c732f376 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb b/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb index 5d2d21ec46c7..d920bccbb83b 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb b/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb index 88fcfcf36484..a1585e7a803b 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb b/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb index 0f39b1847eaf..68037dc3c1c4 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb b/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb index c645fa668ef5..bfc3d415812f 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb b/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb index b59231464e4d..6e0a6c8cea65 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb b/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb index 047f63eeec6a..0caa4cac2125 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.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-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb b/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb index c384a91ebf0d..8cd5de148567 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.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-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb b/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb index 6202b0f0c269..dfcab2575125 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.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-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb b/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb index a05fdbc15548..a69bc309bc34 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb b/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb index 18aa5a181fee..657958fff3c2 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb b/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb index 3f9c224cabfa..7f12d19c6466 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb b/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb index cb50ab0a3a55..95a3715c6d53 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb b/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb index 2226a8657426..d9bdfc3ff576 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.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-backupdr-v1/snippets/backupdr/get_backup_vault.rb b/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb index 251c88310e93..b42028f7c351 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb b/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb index 2fb22a733522..d86a885d8a7f 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/get_data_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-backupdr-v1/snippets/backupdr/get_data_source_reference.rb b/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb index 73cd013d67e1..789a665be9b7 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.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-backupdr-v1/snippets/backupdr/get_management_server.rb b/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb index 44b2578f3398..0ab70b155c06 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb b/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb index a9883b20b30e..1a6248e10433 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.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-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb b/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb index c9b7cf355591..1be14c9502b1 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb b/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb index abdbe815c078..523bdada0405 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.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-backupdr-v1/snippets/backupdr/list_backup_plans.rb b/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb index e7bdf31a3126..68a2931714bf 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb b/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb index 52d945aea96b..bd68d0f95f72 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb b/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb index 628cc9796357..865ebe38ae19 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb b/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb index 79947ab225d6..c0cbb790e2d0 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.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-backupdr-v1/snippets/backupdr/list_data_sources.rb b/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb index aaf57dc6a184..5607c9beb443 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/list_data_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-backupdr-v1/snippets/backupdr/list_management_servers.rb b/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb index fe9cf78ae351..c026e846fb03 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb b/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb index 015c0f96ae15..0f57a119d916 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb b/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb index c19987ae3f33..d5b2a0664bef 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb b/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb index 50d1a5cc6946..90ba04ae397e 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb b/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb index ba37a70f2a27..f2bdd1d70e64 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.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-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb b/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb index 3c7e44b4b31d..eaf3f010e273 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.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-backupdr-v1/snippets/backupdr/update_backup_vault.rb b/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb index dd3f1aabfc8d..5b0d5a057c05 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb b/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb index b7028905f638..1167757bc2d9 100644 --- a/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb +++ b/google-cloud-backupdr-v1/snippets/backupdr/update_data_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-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb index 3960511b8be2..afa3cdaab7ae 100644 --- a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb +++ b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_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-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb index fd13a017d1cb..5c155040928d 100644 --- a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb +++ b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_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-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb index df35a19b753b..24065daa0da5 100644 --- a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb +++ b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_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-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb index b0734231cc78..15150c279ece 100644 --- a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb +++ b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_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-backupdr-v1/test/helper.rb b/google-cloud-backupdr-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-backupdr-v1/test/helper.rb +++ b/google-cloud-backupdr-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-bare_metal_solution-v2/.owlbot-manifest.json b/google-cloud-bare_metal_solution-v2/.owlbot-manifest.json index d21fa769182a..d7b4ca4d1014 100644 --- a/google-cloud-bare_metal_solution-v2/.owlbot-manifest.json +++ b/google-cloud-bare_metal_solution-v2/.owlbot-manifest.json @@ -116,6 +116,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-bare_metal_solution-v2/.toys.rb b/google-cloud-bare_metal_solution-v2/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-bare_metal_solution-v2/.toys.rb +++ b/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/Rakefile b/google-cloud-bare_metal_solution-v2/Rakefile index b30a40cff3ce..c38c913d0c54 100644 --- a/google-cloud-bare_metal_solution-v2/Rakefile +++ b/google-cloud-bare_metal_solution-v2/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb b/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb index 285461257812..e3cbed72515b 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb index ceb62ba5756e..4decd222cabc 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb index 0e784858f058..0ef9b283c295 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb index a437d60fcd46..e8a36e013d7a 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb index b93a027c215f..ca17fd2fa097 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb index 5d72639aad4c..7057baa137f4 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb index cc7354555681..ed6067ff8440 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb index 3c5c834a9d02..7f95f0aebf5e 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb index 47ee34840a03..e4e2ec63cc78 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb index 488dcc78d166..0cfaa78087af 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb index 637d75896c21..5dc3748f6217 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb index 8e07f319f574..37345efedc50 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb index b4a7258c4378..980745ed179a 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/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-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb index f46128816eb2..7a1a2a562afe 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/baremetalsolution/v2/baremetalsolution.proto for package 'Google.Cloud.BareMetalSolution.V2' # 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-bare_metal_solution-v2/proto_docs/google/api/client.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb +++ b/google-cloud-bare_metal_solution-v2/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-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb index e4dd25d9abf0..582be187d115 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.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-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-bare_metal_solution-v2/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-bare_metal_solution-v2/proto_docs/google/api/resource.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb index 4c81798041c0..25dec4847ac1 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb index 0d867d867b78..78d8f06ad169 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb index ad152c397747..0213f58e1483 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb index cba1cc7fdf8a..71f94868fea9 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb index 4303f341b83b..f7a9d2d4263b 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb index e6e1ccde4976..8448a21a3ceb 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb index 4cdba26645fe..a40034963b4f 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb index 5348ae7045af..b4785e50e209 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb index c9728ed7b82a..423eea65f0f8 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb index c7d41c514977..b01344ba719c 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb index 8d414dadd210..d1e0bc7a2db8 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb index 367f5b1d0fbf..0525748dfd87 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.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-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb index 1a586e810a23..7a757f512165 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/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-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb index 2c946be5a11d..58691995f02e 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.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-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-bare_metal_solution-v2/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-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.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-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb index 5f816f4a2702..7f3ffc78601a 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-bare_metal_solution-v2/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-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb index dc016e2c9eca..e58202461f88 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.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. @@ -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-bare_metal_solution-v2/proto_docs/google/rpc/status.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb index f976dec8daa9..c1a1c07eb2db 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.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-bare_metal_solution-v2/proto_docs/google/type/expr.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb index a9f8fd727691..53e7733b6592 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb +++ b/google-cloud-bare_metal_solution-v2/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-bare_metal_solution-v2/snippets/Gemfile b/google-cloud-bare_metal_solution-v2/snippets/Gemfile index 735b2ae51454..5d699c275013 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/Gemfile +++ b/google-cloud-bare_metal_solution-v2/snippets/Gemfile @@ -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-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb index 10a2bf2fb4a2..358c745fc756 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.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-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb index 886ad96a0cca..a06fe4fb4bde 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_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-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb index 287e960747be..d8bb10ff6bad 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.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-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb index 459735bc24f5..d476c4950cff 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.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-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb index 7693043c0929..d93b24926574 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.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-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb index cca07c6349ce..3439a897492e 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.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-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb index 7f0558771c72..2adfa46b129e 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.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-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb index 9230983aa74d..3883f7f5756b 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.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-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb index b68bb793a94f..18430c661223 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.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-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb index 0f51adc3c3b6..169e030b544f 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.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-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb index a7df143f7db1..916a0b294499 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.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-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb index 0a534ad17d77..d7d6e882e4a6 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.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-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb index d692f25e58f5..716e61b4abcd 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.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-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb index e6c7a60d9b8f..58f24d70f77f 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.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-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb index 9ee32febb047..5df941d15772 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.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-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb index 9597a471398f..d2c6e1709af7 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.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-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb index 3b3462f90b59..986b6c62e235 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_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-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb index 7c886d846aba..939f442e87ae 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.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-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb index fb3b5ad404dd..001c45e34f3b 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.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-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb index 57bc11445bab..3e017bcb7a63 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.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-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb index 52200057d2d8..6a79522dc049 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.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-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb index 5fca26651d09..3c008bae622a 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.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-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb index 1fd28f4550d7..b98c7b7f9d00 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.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-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb index a1c30a5fe916..a865e2f86d3f 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.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-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb index 1ff83de06701..12e6f9f047d6 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.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-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb index 18357698ba60..0dca5eff2d85 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.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-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb index 9aec3afb5485..158656b868d3 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.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-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb index 0e75cac559b1..58b170292d00 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.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-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb index d59e41dea4bf..a423d77af7e6 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.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-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb index 5851c45ed284..94dbdb0a41ad 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.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-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb index 6a34aeb50816..da01cd4cae26 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.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-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb index 01814ac6c485..32ec197121d8 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.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-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb index 36fcb0aebd16..150aa2cb0fbb 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.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-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb index f1e0f1f90d03..c1010158d5fc 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.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-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb index 89a3b34f2257..c79249eb863d 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.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-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb index 3a6d18d8b05e..d37a07635475 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.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-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb index d562b431afa5..7beed0235a9a 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.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-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb index 3c46295f4602..6728055e6fe6 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.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-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb index 675526dc75e6..f35b9ef72741 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_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-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb index e5324a097603..f95a8f3457e7 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.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-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb index ec61c2958262..b4c3d334f859 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.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-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb index 96fc1d121b42..6caf796b8964 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.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-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb index 537f6ac7b20e..3c5676e4d0fe 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_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-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb index b26d80d469ea..a6f74e17e36c 100644 --- a/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb +++ b/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.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-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb b/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb index ac0469c2473f..d0c2f98192c9 100644 --- a/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb +++ b/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_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-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb b/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb index 588f0734b911..0969c53605e0 100644 --- a/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb +++ b/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_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-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb b/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb index b0d392bbbf4b..2565ded3d7fb 100644 --- a/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb +++ b/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_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-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb b/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb index 58af19158d1e..8c8eb4f1435b 100644 --- a/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb +++ b/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_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-bare_metal_solution-v2/test/helper.rb b/google-cloud-bare_metal_solution-v2/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-cloud-bare_metal_solution-v2/test/helper.rb +++ b/google-cloud-bare_metal_solution-v2/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-batch-v1/.owlbot-manifest.json b/google-cloud-batch-v1/.owlbot-manifest.json index d956fc38d598..96cabe4a2663 100644 --- a/google-cloud-batch-v1/.owlbot-manifest.json +++ b/google-cloud-batch-v1/.owlbot-manifest.json @@ -84,6 +84,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-batch-v1/.toys.rb b/google-cloud-batch-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-batch-v1/.toys.rb +++ b/google-cloud-batch-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-batch-v1/Rakefile b/google-cloud-batch-v1/Rakefile index 82496aad48ce..639b120c30c6 100644 --- a/google-cloud-batch-v1/Rakefile +++ b/google-cloud-batch-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb b/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb index 742335afbd95..d1d4a294e405 100644 --- a/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb +++ b/google-cloud-batch-v1/lib/google-cloud-batch-v1.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-batch-v1/lib/google/cloud/batch/v1.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb index 1fd2122e8843..fe260a4306e2 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1.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-batch-v1/lib/google/cloud/batch/v1/batch_service.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb index 62e74e7fc107..d6104f270747 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.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-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb index 809064bc64d7..72b6b44bd7a6 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/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-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb index bbe3da2a3756..6a4be9120312 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/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-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb index 4b6ba8b5db7d..901498db28be 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/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-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb index 3a063fb929e7..b30e342ea480 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/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-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb index 39132f3e4c9f..8c251def07d4 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_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-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb index e41dced0a84f..907bbca3ee39 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_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-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb index 0f189f534d87..1240267dbffc 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_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-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb index 6301d722a0c3..c5de3cdedd51 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_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-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb index 6a8b3a578a93..6619a0c9e9fb 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/batch/v1/batch.proto for package 'Google.Cloud.Batch.V1' # Original file comments: -# 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-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb index 8c7198e42d32..16f6486ef2cf 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/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-batch-v1/lib/google/cloud/batch/v1/rest.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb index d293033d860d..4c1a51eb92d3 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/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-batch-v1/lib/google/iam/v1.rb b/google-cloud-batch-v1/lib/google/iam/v1.rb index 17f068d29a09..0cf0d5bd1303 100644 --- a/google-cloud-batch-v1/lib/google/iam/v1.rb +++ b/google-cloud-batch-v1/lib/google/iam/v1.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-batch-v1/lib/google/iam/v1/bindings_override.rb b/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb index 74a624be6a38..9797016a6751 100644 --- a/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb +++ b/google-cloud-batch-v1/lib/google/iam/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-batch-v1/lib/google/iam/v1/iam_policy.rb b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb index b307c8fdf28f..e4bdf8b4e266 100644 --- a/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb +++ b/google-cloud-batch-v1/lib/google/iam/v1/iam_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-batch-v1/lib/google/iam/v1/iam_policy/client.rb b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb index bbb60523f7f8..d3ee0a26ee84 100644 --- a/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb +++ b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/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-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb index 793fad3325ef..ae4df78450b3 100644 --- a/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb +++ b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.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-batch-v1/lib/google/iam/v1/iam_policy/rest.rb b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb index a5d594282dab..cd6d6cbdd883 100644 --- a/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb +++ b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/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-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb index b2d0b9037d34..ce59c5c8c1f4 100644 --- a/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb +++ b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/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-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb index 55714bc35ad2..913f9d5fd09f 100644 --- a/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb +++ b/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/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-batch-v1/lib/google/iam/v1/rest.rb b/google-cloud-batch-v1/lib/google/iam/v1/rest.rb index ce434f9ca0ea..548e0e659b74 100644 --- a/google-cloud-batch-v1/lib/google/iam/v1/rest.rb +++ b/google-cloud-batch-v1/lib/google/iam/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-batch-v1/proto_docs/google/api/client.rb b/google-cloud-batch-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-batch-v1/proto_docs/google/api/client.rb +++ b/google-cloud-batch-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-batch-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb index e4dd25d9abf0..582be187d115 100644 --- a/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-batch-v1/proto_docs/google/api/field_behavior.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-batch-v1/proto_docs/google/api/field_info.rb b/google-cloud-batch-v1/proto_docs/google/api/field_info.rb index d558fed6cef1..0f5acf0a5538 100644 --- a/google-cloud-batch-v1/proto_docs/google/api/field_info.rb +++ b/google-cloud-batch-v1/proto_docs/google/api/field_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-batch-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-batch-v1/proto_docs/google/api/resource.rb b/google-cloud-batch-v1/proto_docs/google/api/resource.rb index 4c81798041c0..25dec4847ac1 100644 --- a/google-cloud-batch-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-batch-v1/proto_docs/google/api/resource.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-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb b/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb index e06523914a72..2c6e39a147a3 100644 --- a/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb +++ b/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.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-batch-v1/proto_docs/google/cloud/batch/v1/job.rb b/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb index 4aaee777b6a3..3096f4fede93 100644 --- a/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb +++ b/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.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-batch-v1/proto_docs/google/cloud/batch/v1/task.rb b/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb index c2406ffd996a..4f4c80930d3c 100644 --- a/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb +++ b/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.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-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb b/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb index ad7a3213a1c3..5c9f7a233fea 100644 --- a/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb +++ b/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.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-batch-v1/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb index b1995c4fd769..5445c77f8258 100644 --- a/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_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-batch-v1/proto_docs/google/iam/v1/options.rb b/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb index e1403ee228d3..60713d995b86 100644 --- a/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-batch-v1/proto_docs/google/iam/v1/options.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-batch-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb index 94233fb73c36..999575b797df 100644 --- a/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-batch-v1/proto_docs/google/iam/v1/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-batch-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb index 1a586e810a23..7a757f512165 100644 --- a/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-batch-v1/proto_docs/google/longrunning/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-batch-v1/proto_docs/google/protobuf/any.rb b/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb index 2c946be5a11d..58691995f02e 100644 --- a/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-batch-v1/proto_docs/google/protobuf/any.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-batch-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-batch-v1/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-batch-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-batch-v1/proto_docs/google/protobuf/empty.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-batch-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb index 5f816f4a2702..7f3ffc78601a 100644 --- a/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb index dc016e2c9eca..e58202461f88 100644 --- a/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.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. @@ -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-batch-v1/proto_docs/google/rpc/status.rb b/google-cloud-batch-v1/proto_docs/google/rpc/status.rb index f976dec8daa9..c1a1c07eb2db 100644 --- a/google-cloud-batch-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-batch-v1/proto_docs/google/rpc/status.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-batch-v1/proto_docs/google/type/expr.rb b/google-cloud-batch-v1/proto_docs/google/type/expr.rb index 0602180c6ada..53e7733b6592 100644 --- a/google-cloud-batch-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-batch-v1/proto_docs/google/type/expr.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-batch-v1/snippets/Gemfile b/google-cloud-batch-v1/snippets/Gemfile index 968f33b258b5..da55e968f9ea 100644 --- a/google-cloud-batch-v1/snippets/Gemfile +++ b/google-cloud-batch-v1/snippets/Gemfile @@ -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-batch-v1/snippets/batch_service/cancel_job.rb b/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb index d5f3ad92948d..4025c81c42d8 100644 --- a/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb +++ b/google-cloud-batch-v1/snippets/batch_service/cancel_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-batch-v1/snippets/batch_service/create_job.rb b/google-cloud-batch-v1/snippets/batch_service/create_job.rb index 9d6fe615916f..2c18c23c163e 100644 --- a/google-cloud-batch-v1/snippets/batch_service/create_job.rb +++ b/google-cloud-batch-v1/snippets/batch_service/create_job.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-batch-v1/snippets/batch_service/delete_job.rb b/google-cloud-batch-v1/snippets/batch_service/delete_job.rb index ac53a8966080..a4dac580732e 100644 --- a/google-cloud-batch-v1/snippets/batch_service/delete_job.rb +++ b/google-cloud-batch-v1/snippets/batch_service/delete_job.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-batch-v1/snippets/batch_service/get_job.rb b/google-cloud-batch-v1/snippets/batch_service/get_job.rb index d2d773677571..51b591988ead 100644 --- a/google-cloud-batch-v1/snippets/batch_service/get_job.rb +++ b/google-cloud-batch-v1/snippets/batch_service/get_job.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-batch-v1/snippets/batch_service/get_task.rb b/google-cloud-batch-v1/snippets/batch_service/get_task.rb index f162a37697b9..fb681197281e 100644 --- a/google-cloud-batch-v1/snippets/batch_service/get_task.rb +++ b/google-cloud-batch-v1/snippets/batch_service/get_task.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-batch-v1/snippets/batch_service/list_jobs.rb b/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb index 502e42bb12bd..27e5f50995a4 100644 --- a/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb +++ b/google-cloud-batch-v1/snippets/batch_service/list_jobs.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-batch-v1/snippets/batch_service/list_tasks.rb b/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb index 642762a83c2f..a94c440293e7 100644 --- a/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb +++ b/google-cloud-batch-v1/snippets/batch_service/list_tasks.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-batch-v1/snippets/iam_policy/get_iam_policy.rb b/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb index e44e6fac81d9..1ad5b84a516b 100644 --- a/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb +++ b/google-cloud-batch-v1/snippets/iam_policy/get_iam_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-batch-v1/snippets/iam_policy/set_iam_policy.rb b/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb index db6146c4ef71..7fb1c919b8da 100644 --- a/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb +++ b/google-cloud-batch-v1/snippets/iam_policy/set_iam_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-batch-v1/snippets/iam_policy/test_iam_permissions.rb b/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb index 4f73da23ea34..722df828728f 100644 --- a/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb +++ b/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.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-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb b/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb index 7ab083fa30a4..a030912c842e 100644 --- a/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb +++ b/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_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-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb b/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb index 4b7467c4595d..094400644c40 100644 --- a/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb +++ b/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_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-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb b/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb index afa3fed39ea7..12a63083daf3 100644 --- a/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb +++ b/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_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-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb b/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb index caab2b12534d..e1a4d725a308 100644 --- a/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb +++ b/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_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-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb b/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb index a6f3417916b2..d00eb93071e6 100644 --- a/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb +++ b/google-cloud-batch-v1/test/google/iam/v1/iam_policy_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-batch-v1/test/google/iam/v1/iam_policy_test.rb b/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb index 81c1b6e5eed5..86b551f1cfd6 100644 --- a/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb +++ b/google-cloud-batch-v1/test/google/iam/v1/iam_policy_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-batch-v1/test/helper.rb b/google-cloud-batch-v1/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-cloud-batch-v1/test/helper.rb +++ b/google-cloud-batch-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-beyond_corp-app_connections-v1/.owlbot-manifest.json b/google-cloud-beyond_corp-app_connections-v1/.owlbot-manifest.json index 0701964c82a8..db2c42b8063f 100644 --- a/google-cloud-beyond_corp-app_connections-v1/.owlbot-manifest.json +++ b/google-cloud-beyond_corp-app_connections-v1/.owlbot-manifest.json @@ -51,6 +51,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-beyond_corp-app_connections-v1/.toys.rb b/google-cloud-beyond_corp-app_connections-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-beyond_corp-app_connections-v1/.toys.rb +++ b/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/Rakefile b/google-cloud-beyond_corp-app_connections-v1/Rakefile index bff7c14da436..31baa9b2971f 100644 --- a/google-cloud-beyond_corp-app_connections-v1/Rakefile +++ b/google-cloud-beyond_corp-app_connections-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb b/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb index b4440e3ebd40..1ac7623cc398 100644 --- a/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb +++ b/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.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-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb index 821bc3ba2166..bcc50c2b3a0a 100644 --- a/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb +++ b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.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-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb index 326c8645b34c..41f69b3c5f7e 100644 --- a/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb +++ b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.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-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb index 1e46a2652ebb..ae05eeca3f7e 100644 --- a/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb +++ b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/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-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb index c100277ffae0..d8c727b63578 100644 --- a/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb +++ b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/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-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb index 6539347f9881..b87df03b9fef 100644 --- a/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb +++ b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/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-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb index 58391feefd39..52ef4c16714c 100644 --- a/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb +++ b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/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-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb index 8cfb93516fad..e5383bb39ab7 100644 --- a/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb +++ b/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto for package 'Google.Cloud.BeyondCorp.AppConnections.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-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb +++ b/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb index e4dd25d9abf0..582be187d115 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.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-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb index 4c81798041c0..25dec4847ac1 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.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-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb index c7f8ebd0d3da..9d00efe6f19d 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb +++ b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.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-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb index 1a586e810a23..7a757f512165 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb index 2c946be5a11d..58691995f02e 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-beyond_corp-app_connections-v1/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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb index 5f816f4a2702..7f3ffc78601a 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb index dc016e2c9eca..e58202461f88 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.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. @@ -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-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb index f976dec8daa9..c1a1c07eb2db 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.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-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb index 0602180c6ada..53e7733b6592 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.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-beyond_corp-app_connections-v1/snippets/Gemfile b/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile index e9b3dc1f9a0b..50af8c28bf87 100644 --- a/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile +++ b/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile @@ -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-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb index 8f2d71e1c204..b4dde20ea729 100644 --- a/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb +++ b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_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-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb index 1242bdbb2a57..00ee3ec93ef7 100644 --- a/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb +++ b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_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-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb index 7fce7e06d6ee..c7a6da25f24b 100644 --- a/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb +++ b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_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-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb index 5d6bc2fefad0..89cc6f1a0e02 100644 --- a/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb +++ b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.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-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb index 1cc296976c77..a68f644a3648 100644 --- a/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb +++ b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.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-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb index 7ab9de791d45..66b87a042ff8 100644 --- a/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb +++ b/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_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-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb b/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb index 22df49aa00dc..117c58b9ea9e 100644 --- a/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb +++ b/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_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-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb b/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb index b8f2011a3b64..8dbd4e5cb9e4 100644 --- a/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb +++ b/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_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-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb b/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb index affd80a33fe6..51c9b1f4be11 100644 --- a/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb +++ b/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_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-beyond_corp-app_connections-v1/test/helper.rb b/google-cloud-beyond_corp-app_connections-v1/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-cloud-beyond_corp-app_connections-v1/test/helper.rb +++ b/google-cloud-beyond_corp-app_connections-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-beyond_corp-app_connectors-v1/.owlbot-manifest.json b/google-cloud-beyond_corp-app_connectors-v1/.owlbot-manifest.json index 94ca9be172d8..f9fac2790bfb 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/.owlbot-manifest.json +++ b/google-cloud-beyond_corp-app_connectors-v1/.owlbot-manifest.json @@ -55,6 +55,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-beyond_corp-app_connectors-v1/.toys.rb b/google-cloud-beyond_corp-app_connectors-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/.toys.rb +++ b/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/Rakefile b/google-cloud-beyond_corp-app_connectors-v1/Rakefile index 9e58d7742d0f..73cfd1f9a5c4 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/Rakefile +++ b/google-cloud-beyond_corp-app_connectors-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb b/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb index f82db2847fbc..d557f7c0d50f 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.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-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb index babf03ff8d9c..96a31864e164 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.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-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb index ea9225c42bd9..e9d2c90330e5 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.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-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb index 0ebf439cc3ae..ce6660869d98 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/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-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb index 8f9b8792e7be..8e856ab92cab 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/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-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb index 19cd9212336a..1ba6b0b25b21 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/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-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb index 8f7ceb37b909..dd5a91475be8 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/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-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb index f0b610800a88..dfa57a816cd2 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto for package 'Google.Cloud.BeyondCorp.AppConnectors.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-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb +++ b/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb index e4dd25d9abf0..582be187d115 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.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-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb index 4c81798041c0..25dec4847ac1 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.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-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb index bc3f8f8b7e4a..01f0871d5362 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_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-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb index ee05b1c38573..ec8d597ea2e1 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.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-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb index f63242a65f2d..044fddd4161e 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.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-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb index 1a586e810a23..7a757f512165 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb index 2c946be5a11d..58691995f02e 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb index 5f816f4a2702..7f3ffc78601a 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb index dc016e2c9eca..e58202461f88 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.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. @@ -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-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb index f976dec8daa9..c1a1c07eb2db 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.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-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb index 0602180c6ada..53e7733b6592 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.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-beyond_corp-app_connectors-v1/snippets/Gemfile b/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile index 3a7bc18eac83..43e9ab898138 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile +++ b/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile @@ -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-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb index dade8039bb08..70f0d140058b 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.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-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb index 7e40adfb8a45..b3a1d87b3402 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.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-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb index 0b6c39a88663..1edebaac1f69 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.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-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb index cdcc37b87137..259b2f32126e 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.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-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb index d4f11a451bc1..fb94bff32e92 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.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-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb index 759063fb4333..cccaafa23d82 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.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-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb b/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb index df588b2a68e4..e42ccbf0dca8 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_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-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb b/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb index 4e78c8af0f5a..ccd8bc1d885a 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_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-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb b/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb index 387c2a74ce38..777295b263b9 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_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-beyond_corp-app_connectors-v1/test/helper.rb b/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-beyond_corp-app_gateways-v1/.owlbot-manifest.json b/google-cloud-beyond_corp-app_gateways-v1/.owlbot-manifest.json index 79c9f6a0712b..73f814c51a41 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/.owlbot-manifest.json +++ b/google-cloud-beyond_corp-app_gateways-v1/.owlbot-manifest.json @@ -49,6 +49,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-beyond_corp-app_gateways-v1/.toys.rb b/google-cloud-beyond_corp-app_gateways-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/.toys.rb +++ b/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/Rakefile b/google-cloud-beyond_corp-app_gateways-v1/Rakefile index d05b20adca66..d8cc75327511 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/Rakefile +++ b/google-cloud-beyond_corp-app_gateways-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb b/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb index dbca6906bce5..ea08e44ab15a 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.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-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb index 40ef74e1772c..735979b372cd 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.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-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb index aa811b0b8817..2c44fc4c710b 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.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-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb index 560b15f04ccf..3ca0ea7ef22f 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/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-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb index da90f2e55d12..26871bd26e4d 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/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-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb index 4392371ffc9b..0ca22508a12e 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/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-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb index d3164c1b4c52..820a03051f4e 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/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-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb index d5e8a62185d8..d3df1c0984d4 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto for package 'Google.Cloud.BeyondCorp.AppGateways.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-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb +++ b/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb index e4dd25d9abf0..582be187d115 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.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-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb index 4c81798041c0..25dec4847ac1 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.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-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb index b9976f7b999b..94e62975802d 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.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-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb index 1a586e810a23..7a757f512165 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb index 2c946be5a11d..58691995f02e 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb index 5f816f4a2702..7f3ffc78601a 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb index dc016e2c9eca..e58202461f88 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.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. @@ -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-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb index f976dec8daa9..c1a1c07eb2db 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.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-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb index 0602180c6ada..53e7733b6592 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.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-beyond_corp-app_gateways-v1/snippets/Gemfile b/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile index e17aad9171fd..885230800eb1 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile +++ b/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile @@ -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-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb b/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb index 0d595645b29f..d219a1bc69bf 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.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-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb b/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb index 96d9860c08c7..f68a23b0f94b 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.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-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb b/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb index a7b75efc99c6..a733a0e2c1ab 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.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-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb b/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb index 41648bb18463..5f5e6577f4a7 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.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-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb b/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb index 5b20cd661b77..cb69006d8cf2 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_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-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb b/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb index a47be6e9aaf1..e122fab5a1b2 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_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-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb b/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb index 8eeae706d03c..b9f624cfdb32 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_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-beyond_corp-app_gateways-v1/test/helper.rb b/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-beyond_corp-client_gateways-v1/.owlbot-manifest.json b/google-cloud-beyond_corp-client_gateways-v1/.owlbot-manifest.json index b95091aba2e4..9fd795534f60 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/.owlbot-manifest.json +++ b/google-cloud-beyond_corp-client_gateways-v1/.owlbot-manifest.json @@ -49,6 +49,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-beyond_corp-client_gateways-v1/.toys.rb b/google-cloud-beyond_corp-client_gateways-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/.toys.rb +++ b/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/Rakefile b/google-cloud-beyond_corp-client_gateways-v1/Rakefile index 94962f43e4d3..7797016444d0 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/Rakefile +++ b/google-cloud-beyond_corp-client_gateways-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb b/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb index 357d369d7963..8df80233c89e 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.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-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb index e61538b60643..c271d92c8367 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.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-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb index df427f42e93a..56ca51678808 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.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-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb index de5fe3c950af..94bf30c36760 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/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-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb index 04cb9f27f241..3fce6bd8e91e 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/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-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb index 1233195a3f09..082176491bbe 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/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-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb index 0cf6da76075e..e1051c10e318 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/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-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb index 730c19895952..95cc1f1b36c5 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto for package 'Google.Cloud.BeyondCorp.ClientGateways.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-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb +++ b/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb index e4dd25d9abf0..582be187d115 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.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-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb index 4c81798041c0..25dec4847ac1 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.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-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb index 8bcf32962c38..a78c841fea07 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.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-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb index 1a586e810a23..7a757f512165 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb index 2c946be5a11d..58691995f02e 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb index 5f816f4a2702..7f3ffc78601a 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb index dc016e2c9eca..e58202461f88 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.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. @@ -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-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb index f976dec8daa9..c1a1c07eb2db 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.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-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb index 0602180c6ada..53e7733b6592 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.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-beyond_corp-client_gateways-v1/snippets/Gemfile b/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile index 287afb389211..d1f6da5a786b 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile +++ b/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile @@ -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-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb b/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb index a3e84df22fd7..2ab90c3ca3f0 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.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-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb b/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb index a63858085d3e..b7bb4a3cbfbe 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.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-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb b/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb index 05e346bbd53b..c4c652903450 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.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-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb b/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb index 124ce4d2740e..129dd2041739 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.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-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb b/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb index c9e07afbeaf4..6800c3abb49c 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_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-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb b/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb index 9a6bbfc06276..07d42d2a5895 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_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-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb b/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb index 6a08606decc7..bac47122b4d0 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_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-beyond_corp-client_gateways-v1/test/helper.rb b/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-analytics_hub-v1/.owlbot-manifest.json b/google-cloud-bigquery-analytics_hub-v1/.owlbot-manifest.json index fe5a046bb4a6..a93012a73f8f 100644 --- a/google-cloud-bigquery-analytics_hub-v1/.owlbot-manifest.json +++ b/google-cloud-bigquery-analytics_hub-v1/.owlbot-manifest.json @@ -86,6 +86,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-bigquery-analytics_hub-v1/.toys.rb b/google-cloud-bigquery-analytics_hub-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-bigquery-analytics_hub-v1/.toys.rb +++ b/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/Rakefile b/google-cloud-bigquery-analytics_hub-v1/Rakefile index f7410d0f50e3..8e449aebabe6 100644 --- a/google-cloud-bigquery-analytics_hub-v1/Rakefile +++ b/google-cloud-bigquery-analytics_hub-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb index e93a439ec45d..deca319c25cf 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb index 9c9b57037718..b6966426b9a3 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb index 8b81f9dbc1e0..7454ae504b54 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb index ec62dd70f41f..31225b25b7ce 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb index 79dcae547502..e332f7d1ae56 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb index 056ee6af5e58..b71c5314e7d9 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb index 4adced61424a..b65b9b2e215e 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb index 1dacca9f47ff..e28b43473888 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb index d283b38bad79..e10fc4ef219f 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb index 8aac14475208..65ac6b2da261 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb index 3cb9ab1c6b62..eb7052b18758 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb index 36b5339c91b3..956e85f4e541 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb index df9d1b5dbfdb..4b03fbc5f859 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto for package 'Google.Cloud.Bigquery.AnalyticsHub.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-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb index e4dd25d9abf0..582be187d115 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.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-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb index 4c81798041c0..25dec4847ac1 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.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-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb index 52b0de1960e8..981ea58df2f8 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.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-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb index c184910b4121..e75b3b67c28e 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.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-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb index 447ba2367b16..5445c77f8258 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.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-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb index 79dae8815aca..60713d995b86 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.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-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb index 49cc5ebe1a2d..999575b797df 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.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-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb index 47eb12eba62b..7a757f512165 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/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-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb index 39ec3bcf883f..58691995f02e 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-bigquery-analytics_hub-v1/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-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-bigquery-analytics_hub-v1/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-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.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-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb index 5f816f4a2702..7f3ffc78601a 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb index b7de80e5ed7f..e58202461f88 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.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. @@ -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-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb index d63449765bf1..9a7c0269fa42 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.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-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb index 6f72e88c418d..c1a1c07eb2db 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.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-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb index 0602180c6ada..53e7733b6592 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.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-bigquery-analytics_hub-v1/snippets/Gemfile b/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile index c9671292e703..cf511377acd7 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile @@ -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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb index 551a16399ce6..0a39e6316666 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb index 4634aa5690ba..2a8628d7604c 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb index 453237a828c8..d1a606f4b1cd 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb index 71680fa4ea12..9c25b4f508b6 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb index ae558c69ed8f..5952012c10af 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb index c2841b548c8e..f649ca2e5739 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb index 4f9c731ebe4f..ade5d81b6792 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb index 6fc715478943..be4fcc5a0ef2 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb index 26c2d76e6295..7c5f0f889dca 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb index 914aab214ae6..41e6e64e7742 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb index 3f0f33ada32f..6bf1cd0ebe75 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb index 37fb60db4b4e..94f813894a65 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb index 464d93d980ec..1f80e69970ce 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb index 7790510fefa0..1fcb44b39af1 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb index b95edbe6fbb8..0a7a606ae5f4 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb index 493ee90a0776..b6f2cb9a9187 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb index 8d50cfd7d2aa..485a075ad969 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb index ee1916e4765a..eb88901d590b 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb index 8cd4787206e5..83a559cfd40e 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb index 1fea7b0ba14b..6f0d8291ad7a 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb index 0153c119db3b..79f5d7d7fd2e 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb index 578b2960263e..e90e15b23996 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb index 8bd9da6d3aa7..0853f509ac77 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb index 3f9caa2f0864..4b8d255e1cb0 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb index 3d1a7241e8f7..9d570b4f1d94 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb index 09c8ff199ee0..8d57f424d123 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb index 935e66a6d78b..8736361663e5 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb index 5ad895f5ff35..8c5f1849b359 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.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-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb index dbc645c5e346..880478732dd5 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.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-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb b/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb index fa9adb20fd15..dc1543dc3010 100644 --- a/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb +++ b/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_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-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb b/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb index 291e1d391747..bda4e477568d 100644 --- a/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb +++ b/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_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-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb b/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb index 8b61dae30ef6..17161e9f3671 100644 --- a/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb +++ b/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb b/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb index 86c2889392ec..717c81a3d52c 100644 --- a/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb +++ b/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_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-bigquery-analytics_hub-v1/test/helper.rb b/google-cloud-bigquery-analytics_hub-v1/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-cloud-bigquery-analytics_hub-v1/test/helper.rb +++ b/google-cloud-bigquery-analytics_hub-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-data_transfer-v1/.owlbot-manifest.json b/google-cloud-bigquery-data_transfer-v1/.owlbot-manifest.json index f69eb95a2d77..68a2da19cd60 100644 --- a/google-cloud-bigquery-data_transfer-v1/.owlbot-manifest.json +++ b/google-cloud-bigquery-data_transfer-v1/.owlbot-manifest.json @@ -67,6 +67,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-bigquery-data_transfer-v1/.toys.rb b/google-cloud-bigquery-data_transfer-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-bigquery-data_transfer-v1/.toys.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/Rakefile b/google-cloud-bigquery-data_transfer-v1/Rakefile index 2f712ef67c00..0be31481319e 100644 --- a/google-cloud-bigquery-data_transfer-v1/Rakefile +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb b/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb index fee9354ee307..78206ec74e36 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb index 6d4d111cfc87..3d075d750da4 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb index 4409604ec38a..40a072a3828e 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb index 30c15cbdc37a..6800f1bff3af 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb index 3c7ebf359918..f854007058a8 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb index a77d526fbaeb..bc7f9b48f764 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb index 4b4670bfa550..ad6b7baec0f5 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb index 1f5e5e683cd2..542bca69647b 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb index 1021e5e8defb..182ea44165f5 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb index 3c088adedaca..0683fbfed415 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb index d9c59f8221f1..f6e1e405ec02 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/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-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb index 9f215733d0d4..87f710bad15b 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto for package 'Google.Cloud.Bigquery.DataTransfer.V1' # Original file comments: -# Copyright 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-bigquery-data_transfer-v1/proto_docs/google/api/client.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb @@ -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-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb index 29c685f7dab7..8aee7c146a1f 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb +++ b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb index 5deabca754e2..f655c166e495 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb +++ b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb index 6fd3d60d108d..39e1aca868d2 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb index 4f428b97acd5..9a7c0269fa42 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/snippets/Gemfile b/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile index d8c924150014..f317b2ca6a31 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile +++ b/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb index 568ddcc713fe..c280cada5a84 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb index 9127c3b09873..8d85ed804920 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_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-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb index 8e12018bc1ec..5b85f2a09133 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_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-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb index 5d17b536070c..96cbd5325d48 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb index 1de514816e9a..0aa1d48f390c 100644 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.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-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb index e9efed81d09d..0883819624a5 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_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-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb index 18e9ce6e97ac..0a34e0c405ac 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_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-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb index 5791ac1d0562..76369885f83e 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb index 4a8a15dff836..5d17514eec9d 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_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-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb index 81495445717c..1d837326d842 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_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-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb index a25bd4d2e096..5b6589ed7c49 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb index 6b43e2659c62..7bdea24c0b01 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb index d5e89c047cc4..0f581bd7b3d2 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb index 931ef822b554..5eae9585a6dc 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb index 357c7fb83f83..0f13ef52ede7 100644 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_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-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb index c90affb1eac7..78cd53878f8c 100755 --- a/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb +++ b/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_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-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb b/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb index 3ce05ad260c7..5d878393639f 100644 --- a/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb +++ b/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_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-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb b/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb index 2df37b7eace1..361722fbe258 100644 --- a/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb +++ b/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_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-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb b/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb index 5d82dd0fe8fa..6cfbc0d06bce 100644 --- a/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb +++ b/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_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-bigquery-data_transfer-v1/test/helper.rb b/google-cloud-bigquery-data_transfer-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-bigquery-data_transfer-v1/test/helper.rb +++ b/google-cloud-bigquery-data_transfer-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-bigquery-migration-v2/.owlbot-manifest.json b/google-cloud-bigquery-migration-v2/.owlbot-manifest.json index eafbfacbb54f..c4f47ad0b8f7 100644 --- a/google-cloud-bigquery-migration-v2/.owlbot-manifest.json +++ b/google-cloud-bigquery-migration-v2/.owlbot-manifest.json @@ -72,6 +72,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-bigquery-migration-v2/.toys.rb b/google-cloud-bigquery-migration-v2/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-bigquery-migration-v2/.toys.rb +++ b/google-cloud-bigquery-migration-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-bigquery-migration-v2/Rakefile b/google-cloud-bigquery-migration-v2/Rakefile index 68bdab0fa419..22b1470bce3b 100644 --- a/google-cloud-bigquery-migration-v2/Rakefile +++ b/google-cloud-bigquery-migration-v2/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb b/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb index 21463cc39e4f..c91652afe47e 100644 --- a/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb +++ b/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.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-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb index 4f627cef7938..a9ad338b1127 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.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-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb index b3b0dfcc5937..2d48893a2487 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.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-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb index 9eb89cb04490..13235e1d3d21 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/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-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb index 8d17056e3780..db5d89803933 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/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-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb index 8b67a7e11b28..21bfeb2669a0 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/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-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb index a9c210883962..d298ae4f0452 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_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-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb index 78c0b83d1016..ac684cdcb8fa 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_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-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb index 4120fff0d2c2..21756920f3bf 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_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-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb index ab4561eefaf8..8984838dfd6d 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/bigquery/migration/v2/migration_service.proto for package 'google.cloud.bigquery.migration.v2' # Original file comments: -# Copyright 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-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb index 6519395c4d8f..76d58e045e9e 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/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-bigquery-migration-v2/proto_docs/google/api/client.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb @@ -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-bigquery-migration-v2/proto_docs/google/api/distribution.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb index 565c9443147d..e4f870d5ad0d 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.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-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb index e4dd25d9abf0..582be187d115 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.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-bigquery-migration-v2/proto_docs/google/api/label.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb index e13b5a30e4d5..02d2f8d451f9 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/api/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-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/api/metric.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb index 51a61051edb8..56510feeee0f 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.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-bigquery-migration-v2/proto_docs/google/api/resource.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb index 4c81798041c0..25dec4847ac1 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.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-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb index 1002a735d612..2e38004a68f2 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.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-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb index 625a181e91cf..29dfe6d0ee40 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_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-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb index ff7dbd8dc72b..41e34dd60654 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.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-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb index 39e1a255fcdc..d833be3e5b1d 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.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-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb index 66ebd16bfcce..d0c7dde5e35b 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_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-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb index 4921fcd4f8ed..43810632c46b 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_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-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb index 7bfc81b678b6..ba08b1dfb393 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb index 5d5897a35e26..13d55b41ed54 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb index 2c946be5a11d..58691995f02e 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.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-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.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-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb index 5f816f4a2702..7f3ffc78601a 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb index dc016e2c9eca..e58202461f88 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.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. @@ -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-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb index 2af9829f0062..507d2b54094a 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_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-bigquery-migration-v2/snippets/Gemfile b/google-cloud-bigquery-migration-v2/snippets/Gemfile index 5ff81d7f35f5..4d1b3eac9aa1 100644 --- a/google-cloud-bigquery-migration-v2/snippets/Gemfile +++ b/google-cloud-bigquery-migration-v2/snippets/Gemfile @@ -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-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb b/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb index 84ba9a576e2a..eb3b21d627fc 100644 --- a/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb +++ b/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.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-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb b/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb index 2d7fec9ae388..add86a0f96f7 100644 --- a/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb +++ b/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.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-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb b/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb index 544aee988d8e..1e668aecb17b 100644 --- a/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb +++ b/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.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-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb b/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb index 714b57c82d72..835a5af7a227 100644 --- a/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb +++ b/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.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-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb b/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb index efb1e442562f..b526522af82b 100644 --- a/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb +++ b/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.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-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb b/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb index 64744a631d32..acc8872c9867 100644 --- a/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb +++ b/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.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-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb b/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb index 767122a987a4..db1b4071ef4d 100644 --- a/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb +++ b/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.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-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb b/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb index ec3ede14cff0..930bdb76bea3 100644 --- a/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb +++ b/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_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-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb b/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb index 9fd769e349d6..9012c7921707 100644 --- a/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb +++ b/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_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-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb b/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb index 322f88b2f51a..16e72e64171e 100644 --- a/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb +++ b/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_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-bigquery-migration-v2/test/helper.rb b/google-cloud-bigquery-migration-v2/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-cloud-bigquery-migration-v2/test/helper.rb +++ b/google-cloud-bigquery-migration-v2/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/.owlbot-manifest.json b/google-cloud-bigquery-reservation-v1/.owlbot-manifest.json index 787a20056db1..a8e0fdcfca63 100644 --- a/google-cloud-bigquery-reservation-v1/.owlbot-manifest.json +++ b/google-cloud-bigquery-reservation-v1/.owlbot-manifest.json @@ -79,6 +79,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-bigquery-reservation-v1/.toys.rb b/google-cloud-bigquery-reservation-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-bigquery-reservation-v1/.toys.rb +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/Rakefile b/google-cloud-bigquery-reservation-v1/Rakefile index b73ad88e0cfb..9f80b229812a 100644 --- a/google-cloud-bigquery-reservation-v1/Rakefile +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb b/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb index 04d7b83a4d4c..2ad2aa32f13c 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb index 2c63b7988da3..155fb2af6d91 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/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-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb index 9a20eaca167f..2f3df98d3356 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_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-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb index 97e0e03a4dc0..71c3545c8e3a 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_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-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb index 92ae0500b332..a7158a1de8b0 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_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-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb index c9ff42d4ff58..24dc5bcf219f 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_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-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb index 888f15d29284..41e991c06c3e 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_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-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb index ffb0fe4b812f..d225ac8bf66e 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_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-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb index 8909ac14d29c..546513e1180a 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_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-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb index 536fc4aa3a42..2edd21e05187 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/bigquery/reservation/v1/reservation.proto for package 'google.cloud.bigquery.reservation.v1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb index 48f36e490186..bb32a525c996 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/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-bigquery-reservation-v1/proto_docs/google/api/client.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb @@ -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-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/api/resource.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb index 7f0b816a48fb..e49ef9709d5c 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb +++ b/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb index fbee4c39d435..5445c77f8258 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.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-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb index 848f8c2f7895..60713d995b86 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.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-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb index 79fdbd1e2eff..999575b797df 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.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-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-bigquery-reservation-v1/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-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/rpc/status.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/type/expr.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb index 9505eeb8657e..53e7733b6592 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.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-bigquery-reservation-v1/snippets/Gemfile b/google-cloud-bigquery-reservation-v1/snippets/Gemfile index 06df9d1e22aa..d0e18bc92cd2 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/Gemfile +++ b/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb index 04f9251fdbdd..521034bd4bbb 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb index 2c281cab06f9..009f27435599 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb index ff8f33fed695..085d3fc69e50 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb index 2798b7b6821c..bce27da2456d 100644 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.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-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb index ca420596f330..bcd9a3be93fc 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb index bf2879f5f88e..b0c78a4fd165 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb index 8a9c1188e5c8..d8bac2d9baf1 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb index b54f2a5229b5..fe6838172e60 100644 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.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-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb index 574377b2c304..80443f502d44 100644 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb index 2d8a1137271f..2b549c493903 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb index 7657f15f4cf4..bf907ad51799 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb index e6b4fb3c22d4..e3861739e77e 100644 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.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-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb index e64474248298..accd2421609b 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb index 8d3a33dc524f..0c3d3ef808b9 100644 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.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-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb index e26600ef4947..f1f669f1ff95 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb index e6260fce824b..bcfb6bd8ea92 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb index 473939033c10..f06ea8557380 100644 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.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-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb index b8ed610f7609..a33941e64425 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb index 726f5ce39af1..e613421e5c07 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb index a4f86a333198..bfde018b1dbe 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb index b34fd778209d..b44239d089c1 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb index b55f319e63bf..de534b544c70 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb index 4dc12130d309..87068c26b062 100644 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.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-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb index 40726c09fce2..d162341ed27b 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb index 2b711103c270..a178dceda953 100644 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.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-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb index b7a6deb81c9e..6f60f2e93e93 100644 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.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-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb index 1b609a3e1943..c3b37b5568d5 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb index 77df57e38b44..47aea627cc66 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb index 3adcdc6da2a7..a607011a6c50 100755 --- a/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb +++ b/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb b/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb index 4e2cd38f818e..f56e3454b155 100644 --- a/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb +++ b/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_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-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb b/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb index 6b5e7150ba98..de701638258c 100644 --- a/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb +++ b/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_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-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb b/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb index 9cb546f5ee99..83f89c3b1580 100644 --- a/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb +++ b/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_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-bigquery-reservation-v1/test/helper.rb b/google-cloud-bigquery-reservation-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-bigquery-reservation-v1/test/helper.rb +++ b/google-cloud-bigquery-reservation-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/owl-bot-staging/google-cloud-app_hub-v1/.gitignore b/owl-bot-staging/google-cloud-app_hub-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-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-app_hub-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json deleted file mode 100644 index 118640b1b4b6..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "apphub.googleapis.com", - "api_shortname": "apphub", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest", - "distribution_name": "google-cloud-app_hub-v1", - "is_cloud": true, - "language": "ruby", - "name": "apphub", - "name_pretty": "App Hub V1 API", - "product_documentation": "https://cloud.google.com/app-hub/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. Note that google-cloud-app_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_hub instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/app-hub/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml b/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml deleted file mode 100644 index aac5e1a2d3f1..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-app_hub-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-app_hub-v1.rb" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb b/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.yardopts b/owl-bot-staging/google-cloud-app_hub-v1/.yardopts deleted file mode 100644 index 47c312defbe7..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="App Hub V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md deleted file mode 100644 index 56078e3eba52..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-app_hub-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-app_hub-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/app_hub/v1" - -client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/app_hub/v1" - -::Google::Cloud::AppHub::V1::AppHub::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AppHub::V1::AppHub::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-app_hub-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/app_hub/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AppHub::V1::AppHub::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-app_hub-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-app_hub-v1/Gemfile b/owl-bot-staging/google-cloud-app_hub-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-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-app_hub-v1/LICENSE.md b/owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-app_hub-v1/README.md b/owl-bot-staging/google-cloud-app_hub-v1/README.md deleted file mode 100644 index 0e429745cbc4..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the App Hub V1 API - -API Client library for the App Hub V1 API - -google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the App Hub V1 API. Most users should consider using -the main client gem, -[google-cloud-app_hub](https://rubygems.org/gems/google-cloud-app_hub). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-app_hub-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/apphub.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/app_hub/v1" - -client = ::Google::Cloud::AppHub::V1::AppHub::Client.new -request = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new # (request fields as keyword arguments...) -response = client.lookup_service_project_attachment request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/app-hub/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/app_hub/v1" -require "logger" - -client = ::Google::Cloud::AppHub::V1::AppHub::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-app_hub`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-app_hub-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-app_hub`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-app_hub-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-app_hub-v1/Rakefile b/owl-bot-staging/google-cloud-app_hub-v1/Rakefile deleted file mode 100644 index 6f86b00de1d7..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-app_hub-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/app_hub/v1/app_hub/credentials" - ::Google::Cloud::AppHub::V1::AppHub::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-app_hub-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-app_hub-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-app_hub-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-app_hub-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-app_hub-v1" - header "google-cloud-app_hub-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-app_hub-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-app_hub-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-app_hub-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-app_hub-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json deleted file mode 100644 index b9d4fe1df12e..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-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.cloud.apphub.v1", - "libraryPackage": "::Google::Cloud::AppHub::V1", - "services": { - "AppHub": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AppHub::V1::AppHub::Client", - "rpcs": { - "LookupServiceProjectAttachment": { - "methods": [ - "lookup_service_project_attachment" - ] - }, - "ListServiceProjectAttachments": { - "methods": [ - "list_service_project_attachments" - ] - }, - "CreateServiceProjectAttachment": { - "methods": [ - "create_service_project_attachment" - ] - }, - "GetServiceProjectAttachment": { - "methods": [ - "get_service_project_attachment" - ] - }, - "DeleteServiceProjectAttachment": { - "methods": [ - "delete_service_project_attachment" - ] - }, - "DetachServiceProjectAttachment": { - "methods": [ - "detach_service_project_attachment" - ] - }, - "ListDiscoveredServices": { - "methods": [ - "list_discovered_services" - ] - }, - "GetDiscoveredService": { - "methods": [ - "get_discovered_service" - ] - }, - "LookupDiscoveredService": { - "methods": [ - "lookup_discovered_service" - ] - }, - "ListServices": { - "methods": [ - "list_services" - ] - }, - "CreateService": { - "methods": [ - "create_service" - ] - }, - "GetService": { - "methods": [ - "get_service" - ] - }, - "UpdateService": { - "methods": [ - "update_service" - ] - }, - "DeleteService": { - "methods": [ - "delete_service" - ] - }, - "ListDiscoveredWorkloads": { - "methods": [ - "list_discovered_workloads" - ] - }, - "GetDiscoveredWorkload": { - "methods": [ - "get_discovered_workload" - ] - }, - "LookupDiscoveredWorkload": { - "methods": [ - "lookup_discovered_workload" - ] - }, - "ListWorkloads": { - "methods": [ - "list_workloads" - ] - }, - "CreateWorkload": { - "methods": [ - "create_workload" - ] - }, - "GetWorkload": { - "methods": [ - "get_workload" - ] - }, - "UpdateWorkload": { - "methods": [ - "update_workload" - ] - }, - "DeleteWorkload": { - "methods": [ - "delete_workload" - ] - }, - "ListApplications": { - "methods": [ - "list_applications" - ] - }, - "CreateApplication": { - "methods": [ - "create_application" - ] - }, - "GetApplication": { - "methods": [ - "get_application" - ] - }, - "UpdateApplication": { - "methods": [ - "update_application" - ] - }, - "DeleteApplication": { - "methods": [ - "delete_application" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec b/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec deleted file mode 100644 index 749c0a6e2eaa..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/app_hub/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-app_hub-v1" - gem.version = Google::Cloud::AppHub::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. Note that google-cloud-app_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_hub instead. See the readme for more details." - gem.summary = "API Client library for the App Hub V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.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-app_hub-v1/lib/google-cloud-app_hub-v1.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb deleted file mode 100644 index 2bd20cb40c59..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/app_hub/v1" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb deleted file mode 100644 index ebab4dae51e0..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/app_hub/v1/app_hub" -require "google/cloud/app_hub/v1/version" - -module Google - module Cloud - module AppHub - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/app_hub/v1" - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/app_hub/v1" - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/app_hub/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb deleted file mode 100644 index 8fa01251c081..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.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/app_hub/v1/version" - -require "google/cloud/app_hub/v1/app_hub/credentials" -require "google/cloud/app_hub/v1/app_hub/paths" -require "google/cloud/app_hub/v1/app_hub/operations" -require "google/cloud/app_hub/v1/app_hub/client" -require "google/cloud/app_hub/v1/app_hub/rest" - -module Google - module Cloud - module AppHub - module V1 - ## - # The App Hub API allows you to manage App Hub resources. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/app_hub/v1/app_hub" - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/app_hub/v1/app_hub/rest" - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - module AppHub - end - end - end - end -end - -helper_path = ::File.join __dir__, "app_hub", "helpers.rb" -require "google/cloud/app_hub/v1/app_hub/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb deleted file mode 100644 index 9722a209e19a..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb +++ /dev/null @@ -1,3470 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/apphub/v1/apphub_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module AppHub - module V1 - module AppHub - ## - # Client for the AppHub service. - # - # The App Hub API allows you to manage App Hub resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_hub_stub - - ## - # Configure the AppHub Client class. - # - # See {::Google::Cloud::AppHub::V1::AppHub::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppHub clients - # ::Google::Cloud::AppHub::V1::AppHub::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", "AppHub", "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.lookup_service_project_attachment.timeout = 60.0 - default_config.rpcs.lookup_service_project_attachment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_service_project_attachments.timeout = 60.0 - default_config.rpcs.list_service_project_attachments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_service_project_attachment.timeout = 60.0 - - default_config.rpcs.get_service_project_attachment.timeout = 60.0 - default_config.rpcs.get_service_project_attachment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_service_project_attachment.timeout = 60.0 - - default_config.rpcs.detach_service_project_attachment.timeout = 60.0 - - default_config.rpcs.list_discovered_services.timeout = 60.0 - default_config.rpcs.list_discovered_services.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_discovered_service.timeout = 60.0 - default_config.rpcs.get_discovered_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.lookup_discovered_service.timeout = 60.0 - default_config.rpcs.lookup_discovered_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_services.timeout = 60.0 - default_config.rpcs.list_services.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_service.timeout = 60.0 - - default_config.rpcs.get_service.timeout = 60.0 - default_config.rpcs.get_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_service.timeout = 60.0 - - default_config.rpcs.delete_service.timeout = 60.0 - - default_config.rpcs.list_discovered_workloads.timeout = 60.0 - default_config.rpcs.list_discovered_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_discovered_workload.timeout = 60.0 - default_config.rpcs.get_discovered_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.lookup_discovered_workload.timeout = 60.0 - default_config.rpcs.lookup_discovered_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workload.timeout = 60.0 - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_workload.timeout = 60.0 - - default_config.rpcs.delete_workload.timeout = 60.0 - - default_config.rpcs.list_applications.timeout = 60.0 - default_config.rpcs.list_applications.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_application.timeout = 60.0 - - default_config.rpcs.get_application.timeout = 60.0 - default_config.rpcs.get_application.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_application.timeout = 60.0 - - default_config.rpcs.delete_application.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AppHub 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::AppHub::V1::AppHub::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 - @app_hub_stub.universe_domain - end - - ## - # Create a new AppHub client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppHub 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/apphub/v1/apphub_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 - - @app_hub_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AppHub::V1::AppHub::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 - ) - - @app_hub_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_hub_stub.endpoint - config.universe_domain = @app_hub_stub.universe_domain - config.logger = @app_hub_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 = @app_hub_stub.endpoint - config.universe_domain = @app_hub_stub.universe_domain - config.logger = @app_hub_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppHub::V1::AppHub::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 - @app_hub_stub.logger - end - - # Service calls - - ## - # Lists a service project attachment for a given service project. You can - # call this API from any project to find if it is attached to a host project. - # - # @overload lookup_service_project_attachment(request, options = nil) - # Pass arguments to `lookup_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lookup_service_project_attachment(name: nil) - # Pass arguments to `lookup_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Service project ID and location to lookup service project - # attachment for. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new - # - # # Call the lookup_service_project_attachment method. - # result = client.lookup_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. - # p result - # - def lookup_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lookup_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.lookup_service_project_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :lookup_service_project_attachment, request, 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 service projects attached to the host project. - # - # @overload list_service_project_attachments(request, options = nil) - # Pass arguments to `list_service_project_attachments` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_service_project_attachments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to list service project attachments. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @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. 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::AppHub::V1::ServiceProjectAttachment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new - # - # # Call the list_service_project_attachments method. - # result = client.list_service_project_attachments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. - # p item - # end - # - def list_service_project_attachments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest - - # Converts hash and nil to an 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_project_attachments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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_project_attachments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_project_attachments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_service_project_attachments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_service_project_attachments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Attaches a service project to the host project. - # - # @overload create_service_project_attachment(request, options = nil) - # Pass arguments to `create_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_project_attachment(parent: nil, service_project_attachment_id: nil, service_project_attachment: nil, request_id: nil) - # Pass arguments to `create_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to which service project is being - # attached. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @param service_project_attachment_id [::String] - # Required. The service project attachment identifier must contain the - # project id of the service project specified in the - # service_project_attachment.service_project field. - # @param service_project_attachment [::Google::Cloud::AppHub::V1::ServiceProjectAttachment, ::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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new - # - # # Call the create_service_project_attachment method. - # result = client.create_service_project_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest - - # Converts hash and nil to 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_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_project_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :create_service_project_attachment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 service project attachment. - # - # @overload get_service_project_attachment(request, options = nil) - # Pass arguments to `get_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_project_attachment(name: nil) - # Pass arguments to `get_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the service project attachment to - # retrieve. Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new - # - # # Call the get_service_project_attachment method. - # result = client.get_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. - # p result - # - def get_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest - - # Converts hash and nil to an 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_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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_project_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_service_project_attachment, request, 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 project attachment. - # - # @overload delete_service_project_attachment(request, options = nil) - # Pass arguments to `delete_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_project_attachment(name: nil, request_id: nil) - # Pass arguments to `delete_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the service project attachment to delete. - # Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - # @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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new - # - # # Call the delete_service_project_attachment method. - # result = client.delete_service_project_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest - - # Converts hash and nil to 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_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_project_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :delete_service_project_attachment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Detaches a service project from a host project. - # You can call this API from any service project without needing access to - # the host project that it is attached to. - # - # @overload detach_service_project_attachment(request, options = nil) - # Pass arguments to `detach_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload detach_service_project_attachment(name: nil) - # Pass arguments to `detach_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Service project id and location to detach from a host project. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new - # - # # Call the detach_service_project_attachment method. - # result = client.detach_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. - # p result - # - def detach_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.detach_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.detach_service_project_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.detach_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :detach_service_project_attachment, request, 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 Discovered Services that can be added to an Application in a host - # project and location. - # - # @overload list_discovered_services(request, options = nil) - # Pass arguments to `list_discovered_services` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_discovered_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_discovered_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. Project and location to list Discovered Services on. - # Expected format: `projects/{project}/locations/{location}`. - # @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. 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::AppHub::V1::DiscoveredService>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new - # - # # Call the list_discovered_services method. - # result = client.list_discovered_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::AppHub::V1::DiscoveredService. - # p item - # end - # - def list_discovered_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_discovered_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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_discovered_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_discovered_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_discovered_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_discovered_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 Discovered Service in a host project and location. - # - # @overload get_discovered_service(request, options = nil) - # Pass arguments to `get_discovered_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_discovered_service(name: nil) - # Pass arguments to `get_discovered_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. Fully qualified name of the Discovered Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::DiscoveredService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new - # - # # Call the get_discovered_service method. - # result = client.get_discovered_service request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. - # p result - # - def get_discovered_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_discovered_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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_discovered_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_discovered_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_discovered_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 a Discovered Service in a host project and location, with a - # given resource URI. - # - # @overload lookup_discovered_service(request, options = nil) - # Pass arguments to `lookup_discovered_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lookup_discovered_service(parent: nil, uri: nil) - # Pass arguments to `lookup_discovered_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. Host project ID and location to lookup Discovered Service in. - # Expected format: `projects/{project}/locations/{location}`. - # @param uri [::String] - # Required. Resource URI to find DiscoveredService for. - # Accepts both project number and project ID and does translation when - # needed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new - # - # # Call the lookup_discovered_service method. - # result = client.lookup_discovered_service request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. - # p result - # - def lookup_discovered_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lookup_discovered_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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.lookup_discovered_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_discovered_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :lookup_discovered_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 Services in an Application. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::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, 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. Fully qualified name of the parent Application to list Services - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @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. 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::AppHub::V1::Service>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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 - - @app_hub_stub.call_rpc :list_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_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 - - ## - # Creates a Service in an Application. - # - # @overload create_service(request, options = nil) - # Pass arguments to `create_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::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(parent: nil, service_id: nil, service: nil, request_id: 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. Fully qualified name of the parent Application to create the - # Service in. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param service_id [::String] - # Required. The Service identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param service [::Google::Cloud::AppHub::V1::Service, ::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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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 - - @app_hub_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 - - ## - # Gets a Service in an Application. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::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] - # Required. Fully qualified name of the Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::Service] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::Service] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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 - - @app_hub_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 in an Application. - # - # @overload update_service(request, options = nil) - # Pass arguments to `update_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::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(update_mask: nil, service: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Service resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] - # Required. The resource being updated. - # @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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new - # - # # Call the update_service method. - # result = client.update_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 update_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::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::AppHub::V1::VERSION - metadata[:"x-goog-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 - - @app_hub_stub.call_rpc :update_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 Service from an Application. - # - # @overload delete_service(request, options = nil) - # Pass arguments to `delete_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::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(name: nil, request_id: 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. Fully qualified name of the Service to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # @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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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 - - @app_hub_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 - - ## - # Lists Discovered Workloads that can be added to an Application in a host - # project and location. - # - # @overload list_discovered_workloads(request, options = nil) - # Pass arguments to `list_discovered_workloads` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_discovered_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_discovered_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to list Discovered Workloads on. - # Expected format: `projects/{project}/locations/{location}`. - # @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. 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::AppHub::V1::DiscoveredWorkload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new - # - # # Call the list_discovered_workloads method. - # result = client.list_discovered_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. - # p item - # end - # - def list_discovered_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_discovered_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_discovered_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_discovered_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_discovered_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_discovered_workloads, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a Discovered Workload in a host project and location. - # - # @overload get_discovered_workload(request, options = nil) - # Pass arguments to `get_discovered_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_discovered_workload(name: nil) - # Pass arguments to `get_discovered_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Discovered Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new - # - # # Call the get_discovered_workload method. - # result = client.get_discovered_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. - # p result - # - def get_discovered_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_discovered_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_discovered_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_discovered_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_discovered_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists a Discovered Workload in a host project and location, with a - # given resource URI. - # - # @overload lookup_discovered_workload(request, options = nil) - # Pass arguments to `lookup_discovered_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lookup_discovered_workload(parent: nil, uri: nil) - # Pass arguments to `lookup_discovered_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to lookup Discovered Workload in. - # Expected format: `projects/{project}/locations/{location}`. - # @param uri [::String] - # Required. Resource URI to find Discovered Workload for. - # Accepts both project number and project ID and does translation when - # needed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new - # - # # Call the lookup_discovered_workload method. - # result = client.lookup_discovered_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. - # p result - # - def lookup_discovered_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lookup_discovered_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.lookup_discovered_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_discovered_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :lookup_discovered_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Workloads in an Application. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the parent Application to list Workloads - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @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. 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::AppHub::V1::Workload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_workloads, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Workload in an Application. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workload(parent: nil, workload_id: nil, workload: nil, request_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the Application to create Workload in. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param workload_id [::String] - # Required. The Workload identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param workload [::Google::Cloud::AppHub::V1::Workload, ::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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateWorkloadRequest - - # Converts hash and nil to 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :create_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Workload in an Application. - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Workload in an Application. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workload(update_mask: nil, workload: nil, request_id: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Workload resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] - # Required. The resource being updated. - # @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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest - - # Converts hash and nil to 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.workload&.name - header_params["workload.name"] = request.workload.name - end - - request_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_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :update_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Workload from an Application. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workload(name: nil, request_id: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Workload to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # @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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest - - # Converts hash and nil to 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :delete_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Applications in a host project and location. - # - # @overload list_applications(request, options = nil) - # Pass arguments to `list_applications` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListApplicationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListApplicationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_applications` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to list Applications on. - # Expected format: `projects/{project}/locations/{location}`. - # @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. 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::AppHub::V1::Application>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new - # - # # Call the list_applications method. - # result = client.list_applications request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::Application. - # p item - # end - # - def list_applications request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListApplicationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_applications.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_applications.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_applications.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_applications, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_applications, request, response, 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 an Application in a host project and location. - # - # @overload create_application(request, options = nil) - # Pass arguments to `create_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_application(parent: nil, application_id: nil, application: nil, request_id: nil) - # Pass arguments to `create_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to create Application in. - # Expected format: `projects/{project}/locations/{location}`. - # @param application_id [::String] - # Required. The Application identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param application [::Google::Cloud::AppHub::V1::Application, ::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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new - # - # # Call the create_application method. - # result = client.create_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateApplicationRequest - - # Converts hash and nil to 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_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :create_application, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Application in a host project and location. - # - # @overload get_application(request, options = nil) - # Pass arguments to `get_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_application(name: nil) - # Pass arguments to `get_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Application to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::Application] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::Application] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetApplicationRequest.new - # - # # Call the get_application method. - # result = client.get_application request - # - # # The returned object is of type Google::Cloud::AppHub::V1::Application. - # p result - # - def get_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_application, request, 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 Application in a host project and location. - # - # @overload update_application(request, options = nil) - # Pass arguments to `update_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::UpdateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_application(update_mask: nil, application: nil, request_id: nil) - # Pass arguments to `update_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Application resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] - # Required. The resource being updated. - # @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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new - # - # # Call the update_application method. - # result = client.update_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateApplicationRequest - - # Converts hash and nil to 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_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.application&.name - header_params["application.name"] = request.application.name - end - - request_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_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :update_application, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Application in a host project and location. - # - # @overload delete_application(request, options = nil) - # Pass arguments to `delete_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_application(name: nil, request_id: nil) - # Pass arguments to `delete_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Application to delete. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new - # - # # Call the delete_application method. - # result = client.delete_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteApplicationRequest - - # Converts hash and nil to 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_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :delete_application, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 AppHub API. - # - # This class represents the configuration for AppHub, - # providing control 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::AppHub::V1::AppHub::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # lookup_service_project_attachment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppHub::V1::AppHub::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.lookup_service_project_attachment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.lookup_service_project_attachment.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::AppHub::V1::AppHub::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 = "apphub.googleapis.com" - - config_attr :endpoint, nil, ::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 AppHub API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `lookup_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_service_project_attachment - ## - # RPC-specific configuration for `list_service_project_attachments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_project_attachments - ## - # RPC-specific configuration for `create_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_project_attachment - ## - # RPC-specific configuration for `get_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_project_attachment - ## - # RPC-specific configuration for `delete_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_project_attachment - ## - # RPC-specific configuration for `detach_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :detach_service_project_attachment - ## - # RPC-specific configuration for `list_discovered_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_discovered_services - ## - # RPC-specific configuration for `get_discovered_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_discovered_service - ## - # RPC-specific configuration for `lookup_discovered_service` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_discovered_service - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `create_service` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service - ## - # 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 `list_discovered_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_discovered_workloads - ## - # RPC-specific configuration for `get_discovered_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_discovered_workload - ## - # RPC-specific configuration for `lookup_discovered_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_discovered_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - ## - # RPC-specific configuration for `create_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `list_applications` - # @return [::Gapic::Config::Method] - # - attr_reader :list_applications - ## - # RPC-specific configuration for `create_application` - # @return [::Gapic::Config::Method] - # - attr_reader :create_application - ## - # RPC-specific configuration for `get_application` - # @return [::Gapic::Config::Method] - # - attr_reader :get_application - ## - # RPC-specific configuration for `update_application` - # @return [::Gapic::Config::Method] - # - attr_reader :update_application - ## - # RPC-specific configuration for `delete_application` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_application - - # @private - def initialize parent_rpcs = nil - lookup_service_project_attachment_config = parent_rpcs.lookup_service_project_attachment if parent_rpcs.respond_to? :lookup_service_project_attachment - @lookup_service_project_attachment = ::Gapic::Config::Method.new lookup_service_project_attachment_config - list_service_project_attachments_config = parent_rpcs.list_service_project_attachments if parent_rpcs.respond_to? :list_service_project_attachments - @list_service_project_attachments = ::Gapic::Config::Method.new list_service_project_attachments_config - create_service_project_attachment_config = parent_rpcs.create_service_project_attachment if parent_rpcs.respond_to? :create_service_project_attachment - @create_service_project_attachment = ::Gapic::Config::Method.new create_service_project_attachment_config - get_service_project_attachment_config = parent_rpcs.get_service_project_attachment if parent_rpcs.respond_to? :get_service_project_attachment - @get_service_project_attachment = ::Gapic::Config::Method.new get_service_project_attachment_config - delete_service_project_attachment_config = parent_rpcs.delete_service_project_attachment if parent_rpcs.respond_to? :delete_service_project_attachment - @delete_service_project_attachment = ::Gapic::Config::Method.new delete_service_project_attachment_config - detach_service_project_attachment_config = parent_rpcs.detach_service_project_attachment if parent_rpcs.respond_to? :detach_service_project_attachment - @detach_service_project_attachment = ::Gapic::Config::Method.new detach_service_project_attachment_config - list_discovered_services_config = parent_rpcs.list_discovered_services if parent_rpcs.respond_to? :list_discovered_services - @list_discovered_services = ::Gapic::Config::Method.new list_discovered_services_config - get_discovered_service_config = parent_rpcs.get_discovered_service if parent_rpcs.respond_to? :get_discovered_service - @get_discovered_service = ::Gapic::Config::Method.new get_discovered_service_config - lookup_discovered_service_config = parent_rpcs.lookup_discovered_service if parent_rpcs.respond_to? :lookup_discovered_service - @lookup_discovered_service = ::Gapic::Config::Method.new lookup_discovered_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 - create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service - @create_service = ::Gapic::Config::Method.new create_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 - 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 - list_discovered_workloads_config = parent_rpcs.list_discovered_workloads if parent_rpcs.respond_to? :list_discovered_workloads - @list_discovered_workloads = ::Gapic::Config::Method.new list_discovered_workloads_config - get_discovered_workload_config = parent_rpcs.get_discovered_workload if parent_rpcs.respond_to? :get_discovered_workload - @get_discovered_workload = ::Gapic::Config::Method.new get_discovered_workload_config - lookup_discovered_workload_config = parent_rpcs.lookup_discovered_workload if parent_rpcs.respond_to? :lookup_discovered_workload - @lookup_discovered_workload = ::Gapic::Config::Method.new lookup_discovered_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - list_applications_config = parent_rpcs.list_applications if parent_rpcs.respond_to? :list_applications - @list_applications = ::Gapic::Config::Method.new list_applications_config - create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application - @create_application = ::Gapic::Config::Method.new create_application_config - get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application - @get_application = ::Gapic::Config::Method.new get_application_config - update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application - @update_application = ::Gapic::Config::Method.new update_application_config - delete_application_config = parent_rpcs.delete_application if parent_rpcs.respond_to? :delete_application - @delete_application = ::Gapic::Config::Method.new delete_application_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb deleted file mode 100644 index 541dcc24d08f..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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 AppHub - module V1 - module AppHub - # Credentials for the AppHub 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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb deleted file mode 100644 index 77b788f9db27..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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 AppHub - module V1 - module AppHub - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppHub 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 AppHub 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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AppHub::V1::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 = "apphub.googleapis.com" - - config_attr :endpoint, nil, ::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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb deleted file mode 100644 index de11b2b871b2..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb +++ /dev/null @@ -1,182 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - module AppHub - # Path helper methods for the AppHub API. - module Paths - ## - # Create a fully-qualified Application resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/applications/{application}` - # - # @param project [String] - # @param location [String] - # @param application [String] - # - # @return [::String] - def application_path project:, location:, application: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/applications/#{application}" - end - - ## - # Create a fully-qualified DiscoveredService resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/discoveredServices/{discovered_service}` - # - # @param project [String] - # @param location [String] - # @param discovered_service [String] - # - # @return [::String] - def discovered_service_path project:, location:, discovered_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}/discoveredServices/#{discovered_service}" - end - - ## - # Create a fully-qualified DiscoveredWorkload resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/discoveredWorkloads/{discovered_workload}` - # - # @param project [String] - # @param location [String] - # @param discovered_workload [String] - # - # @return [::String] - def discovered_workload_path project:, location:, discovered_workload: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/discoveredWorkloads/#{discovered_workload}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/applications/{application}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param application [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, application:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "application cannot contain /" if application.to_s.include? "/" - - "projects/#{project}/locations/#{location}/applications/#{application}/services/#{service}" - end - - ## - # Create a fully-qualified ServiceProjectAttachment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/serviceProjectAttachments/{service_project_attachment}` - # - # @param project [String] - # @param location [String] - # @param service_project_attachment [String] - # - # @return [::String] - def service_project_attachment_path project:, location:, service_project_attachment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/serviceProjectAttachments/#{service_project_attachment}" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}` - # - # @param project [String] - # @param location [String] - # @param application [String] - # @param workload [String] - # - # @return [::String] - def workload_path project:, location:, application:, workload: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "application cannot contain /" if application.to_s.include? "/" - - "projects/#{project}/locations/#{location}/applications/#{application}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb deleted file mode 100644 index 41025e868601..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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/app_hub/v1/version" -require "google/cloud/app_hub/v1/bindings_override" - -require "google/cloud/app_hub/v1/app_hub/credentials" -require "google/cloud/app_hub/v1/app_hub/paths" -require "google/cloud/app_hub/v1/app_hub/rest/operations" -require "google/cloud/app_hub/v1/app_hub/rest/client" - -module Google - module Cloud - module AppHub - module V1 - ## - # The App Hub API allows you to manage App Hub resources. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/app_hub/v1/app_hub/rest" - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - module AppHub - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/app_hub/v1/app_hub/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb deleted file mode 100644 index eed67b697cee..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb +++ /dev/null @@ -1,3247 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/apphub/v1/apphub_service_pb" -require "google/cloud/app_hub/v1/app_hub/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module AppHub - module V1 - module AppHub - module Rest - ## - # REST client for the AppHub service. - # - # The App Hub API allows you to manage App Hub resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_hub_stub - - ## - # Configure the AppHub Client class. - # - # See {::Google::Cloud::AppHub::V1::AppHub::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppHub clients - # ::Google::Cloud::AppHub::V1::AppHub::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", "AppHub", "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.lookup_service_project_attachment.timeout = 60.0 - default_config.rpcs.lookup_service_project_attachment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_service_project_attachments.timeout = 60.0 - default_config.rpcs.list_service_project_attachments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_service_project_attachment.timeout = 60.0 - - default_config.rpcs.get_service_project_attachment.timeout = 60.0 - default_config.rpcs.get_service_project_attachment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_service_project_attachment.timeout = 60.0 - - default_config.rpcs.detach_service_project_attachment.timeout = 60.0 - - default_config.rpcs.list_discovered_services.timeout = 60.0 - default_config.rpcs.list_discovered_services.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_discovered_service.timeout = 60.0 - default_config.rpcs.get_discovered_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.lookup_discovered_service.timeout = 60.0 - default_config.rpcs.lookup_discovered_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_services.timeout = 60.0 - default_config.rpcs.list_services.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_service.timeout = 60.0 - - default_config.rpcs.get_service.timeout = 60.0 - default_config.rpcs.get_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_service.timeout = 60.0 - - default_config.rpcs.delete_service.timeout = 60.0 - - default_config.rpcs.list_discovered_workloads.timeout = 60.0 - default_config.rpcs.list_discovered_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_discovered_workload.timeout = 60.0 - default_config.rpcs.get_discovered_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.lookup_discovered_workload.timeout = 60.0 - default_config.rpcs.lookup_discovered_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workload.timeout = 60.0 - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_workload.timeout = 60.0 - - default_config.rpcs.delete_workload.timeout = 60.0 - - default_config.rpcs.list_applications.timeout = 60.0 - default_config.rpcs.list_applications.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_application.timeout = 60.0 - - default_config.rpcs.get_application.timeout = 60.0 - default_config.rpcs.get_application.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_application.timeout = 60.0 - - default_config.rpcs.delete_application.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AppHub 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::AppHub::V1::AppHub::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 - @app_hub_stub.universe_domain - end - - ## - # Create a new AppHub REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppHub 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::AppHub::V1::AppHub::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 - - @app_hub_stub = ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @app_hub_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_hub_stub.endpoint - config.universe_domain = @app_hub_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @app_hub_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 = @app_hub_stub.endpoint - config.universe_domain = @app_hub_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @app_hub_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppHub::V1::AppHub::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 - @app_hub_stub.logger - end - - # Service calls - - ## - # Lists a service project attachment for a given service project. You can - # call this API from any project to find if it is attached to a host project. - # - # @overload lookup_service_project_attachment(request, options = nil) - # Pass arguments to `lookup_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lookup_service_project_attachment(name: nil) - # Pass arguments to `lookup_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Service project ID and location to lookup service project - # attachment for. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new - # - # # Call the lookup_service_project_attachment method. - # result = client.lookup_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. - # p result - # - def lookup_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lookup_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.lookup_service_project_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.lookup_service_project_attachment request, 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 service projects attached to the host project. - # - # @overload list_service_project_attachments(request, options = nil) - # Pass arguments to `list_service_project_attachments` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_service_project_attachments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to list service project attachments. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @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. 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::AppHub::V1::ServiceProjectAttachment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new - # - # # Call the list_service_project_attachments method. - # result = client.list_service_project_attachments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. - # p item - # end - # - def list_service_project_attachments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest - - # Converts hash and nil to an options 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_project_attachments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_project_attachments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_project_attachments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_service_project_attachments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_service_project_attachments, "service_project_attachments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Attaches a service project to the host project. - # - # @overload create_service_project_attachment(request, options = nil) - # Pass arguments to `create_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_project_attachment(parent: nil, service_project_attachment_id: nil, service_project_attachment: nil, request_id: nil) - # Pass arguments to `create_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to which service project is being - # attached. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @param service_project_attachment_id [::String] - # Required. The service project attachment identifier must contain the - # project id of the service project specified in the - # service_project_attachment.service_project field. - # @param service_project_attachment [::Google::Cloud::AppHub::V1::ServiceProjectAttachment, ::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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new - # - # # Call the create_service_project_attachment method. - # result = client.create_service_project_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest - - # Converts hash and nil to an 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_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_project_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.create_service_project_attachment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 project attachment. - # - # @overload get_service_project_attachment(request, options = nil) - # Pass arguments to `get_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_project_attachment(name: nil) - # Pass arguments to `get_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the service project attachment to - # retrieve. Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new - # - # # Call the get_service_project_attachment method. - # result = client.get_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. - # p result - # - def get_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest - - # Converts hash and nil to an options 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_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_project_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_service_project_attachment request, 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 project attachment. - # - # @overload delete_service_project_attachment(request, options = nil) - # Pass arguments to `delete_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_project_attachment(name: nil, request_id: nil) - # Pass arguments to `delete_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the service project attachment to delete. - # Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - # @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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new - # - # # Call the delete_service_project_attachment method. - # result = client.delete_service_project_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest - - # Converts hash and nil to an 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_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_project_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.delete_service_project_attachment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Detaches a service project from a host project. - # You can call this API from any service project without needing access to - # the host project that it is attached to. - # - # @overload detach_service_project_attachment(request, options = nil) - # Pass arguments to `detach_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload detach_service_project_attachment(name: nil) - # Pass arguments to `detach_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Service project id and location to detach from a host project. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new - # - # # Call the detach_service_project_attachment method. - # result = client.detach_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. - # p result - # - def detach_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.detach_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.detach_service_project_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.detach_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.detach_service_project_attachment request, 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 Discovered Services that can be added to an Application in a host - # project and location. - # - # @overload list_discovered_services(request, options = nil) - # Pass arguments to `list_discovered_services` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_discovered_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_discovered_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. Project and location to list Discovered Services on. - # Expected format: `projects/{project}/locations/{location}`. - # @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. 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::AppHub::V1::DiscoveredService>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new - # - # # Call the list_discovered_services method. - # result = client.list_discovered_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::AppHub::V1::DiscoveredService. - # p item - # end - # - def list_discovered_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_discovered_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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_discovered_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_discovered_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_discovered_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_discovered_services, "discovered_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 Discovered Service in a host project and location. - # - # @overload get_discovered_service(request, options = nil) - # Pass arguments to `get_discovered_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_discovered_service(name: nil) - # Pass arguments to `get_discovered_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. Fully qualified name of the Discovered Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new - # - # # Call the get_discovered_service method. - # result = client.get_discovered_service request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. - # p result - # - def get_discovered_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_discovered_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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_discovered_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_discovered_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_discovered_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 a Discovered Service in a host project and location, with a - # given resource URI. - # - # @overload lookup_discovered_service(request, options = nil) - # Pass arguments to `lookup_discovered_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lookup_discovered_service(parent: nil, uri: nil) - # Pass arguments to `lookup_discovered_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. Host project ID and location to lookup Discovered Service in. - # Expected format: `projects/{project}/locations/{location}`. - # @param uri [::String] - # Required. Resource URI to find DiscoveredService for. - # Accepts both project number and project ID and does translation when - # needed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new - # - # # Call the lookup_discovered_service method. - # result = client.lookup_discovered_service request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. - # p result - # - def lookup_discovered_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lookup_discovered_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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.lookup_discovered_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_discovered_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.lookup_discovered_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 Services in an Application. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::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, 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. Fully qualified name of the parent Application to list Services - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @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. 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::AppHub::V1::Service>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @app_hub_stub.list_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_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 - - ## - # Creates a Service in an Application. - # - # @overload create_service(request, options = nil) - # Pass arguments to `create_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::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(parent: nil, service_id: nil, service: nil, request_id: 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. Fully qualified name of the parent Application to create the - # Service in. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param service_id [::String] - # Required. The Service identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param service [::Google::Cloud::AppHub::V1::Service, ::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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @app_hub_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 - - ## - # Gets a Service in an Application. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::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] - # Required. Fully qualified name of the Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Service] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @app_hub_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 in an Application. - # - # @overload update_service(request, options = nil) - # Pass arguments to `update_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::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(update_mask: nil, service: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Service resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] - # Required. The resource being updated. - # @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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new - # - # # Call the update_service method. - # result = client.update_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 update_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @app_hub_stub.update_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 Service from an Application. - # - # @overload delete_service(request, options = nil) - # Pass arguments to `delete_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::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(name: nil, request_id: 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. Fully qualified name of the Service to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # @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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @app_hub_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 - - ## - # Lists Discovered Workloads that can be added to an Application in a host - # project and location. - # - # @overload list_discovered_workloads(request, options = nil) - # Pass arguments to `list_discovered_workloads` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_discovered_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_discovered_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to list Discovered Workloads on. - # Expected format: `projects/{project}/locations/{location}`. - # @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. 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::AppHub::V1::DiscoveredWorkload>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new - # - # # Call the list_discovered_workloads method. - # result = client.list_discovered_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. - # p item - # end - # - def list_discovered_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_discovered_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_discovered_workloads.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_discovered_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_discovered_workloads request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_discovered_workloads, "discovered_workloads", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a Discovered Workload in a host project and location. - # - # @overload get_discovered_workload(request, options = nil) - # Pass arguments to `get_discovered_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_discovered_workload(name: nil) - # Pass arguments to `get_discovered_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Discovered Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new - # - # # Call the get_discovered_workload method. - # result = client.get_discovered_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. - # p result - # - def get_discovered_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_discovered_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_discovered_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_discovered_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_discovered_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists a Discovered Workload in a host project and location, with a - # given resource URI. - # - # @overload lookup_discovered_workload(request, options = nil) - # Pass arguments to `lookup_discovered_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lookup_discovered_workload(parent: nil, uri: nil) - # Pass arguments to `lookup_discovered_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to lookup Discovered Workload in. - # Expected format: `projects/{project}/locations/{location}`. - # @param uri [::String] - # Required. Resource URI to find Discovered Workload for. - # Accepts both project number and project ID and does translation when - # needed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new - # - # # Call the lookup_discovered_workload method. - # result = client.lookup_discovered_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. - # p result - # - def lookup_discovered_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lookup_discovered_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.lookup_discovered_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_discovered_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.lookup_discovered_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Workloads in an Application. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the parent Application to list Workloads - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @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. 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::AppHub::V1::Workload>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_workloads request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_workloads, "workloads", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Workload in an Application. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workload(parent: nil, workload_id: nil, workload: nil, request_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the Application to create Workload in. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param workload_id [::String] - # Required. The Workload identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param workload [::Google::Cloud::AppHub::V1::Workload, ::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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateWorkloadRequest - - # Converts hash and nil to an 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.create_workload request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Workload in an Application. - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Workload in an Application. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workload(update_mask: nil, workload: nil, request_id: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Workload resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] - # Required. The resource being updated. - # @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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest - - # Converts hash and nil to an 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.update_workload request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Workload from an Application. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workload(name: nil, request_id: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Workload to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # @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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest - - # Converts hash and nil to an 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.delete_workload request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Applications in a host project and location. - # - # @overload list_applications(request, options = nil) - # Pass arguments to `list_applications` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListApplicationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListApplicationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_applications` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to list Applications on. - # Expected format: `projects/{project}/locations/{location}`. - # @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. 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::AppHub::V1::Application>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new - # - # # Call the list_applications method. - # result = client.list_applications request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::Application. - # p item - # end - # - def list_applications request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListApplicationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_applications.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_applications.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_applications.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_applications request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_applications, "applications", request, result, 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 Application in a host project and location. - # - # @overload create_application(request, options = nil) - # Pass arguments to `create_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_application(parent: nil, application_id: nil, application: nil, request_id: nil) - # Pass arguments to `create_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to create Application in. - # Expected format: `projects/{project}/locations/{location}`. - # @param application_id [::String] - # Required. The Application identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param application [::Google::Cloud::AppHub::V1::Application, ::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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new - # - # # Call the create_application method. - # result = client.create_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateApplicationRequest - - # Converts hash and nil to an 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_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.create_application request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Application in a host project and location. - # - # @overload get_application(request, options = nil) - # Pass arguments to `get_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_application(name: nil) - # Pass arguments to `get_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Application to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Application] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Application] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetApplicationRequest.new - # - # # Call the get_application method. - # result = client.get_application request - # - # # The returned object is of type Google::Cloud::AppHub::V1::Application. - # p result - # - def get_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_application request, 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 Application in a host project and location. - # - # @overload update_application(request, options = nil) - # Pass arguments to `update_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::UpdateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_application(update_mask: nil, application: nil, request_id: nil) - # Pass arguments to `update_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Application resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] - # Required. The resource being updated. - # @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/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new - # - # # Call the update_application method. - # result = client.update_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateApplicationRequest - - # Converts hash and nil to an 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_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.update_application request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Application in a host project and location. - # - # @overload delete_application(request, options = nil) - # Pass arguments to `delete_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_application(name: nil, request_id: nil) - # Pass arguments to `delete_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Application to delete. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new - # - # # Call the delete_application method. - # result = client.delete_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteApplicationRequest - - # Converts hash and nil to an 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_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.delete_application request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 AppHub REST API. - # - # This class represents the configuration for AppHub 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::AppHub::V1::AppHub::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 - # # lookup_service_project_attachment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.lookup_service_project_attachment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.lookup_service_project_attachment.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "apphub.googleapis.com" - - config_attr :endpoint, nil, ::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 AppHub API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `lookup_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_service_project_attachment - ## - # RPC-specific configuration for `list_service_project_attachments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_project_attachments - ## - # RPC-specific configuration for `create_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_project_attachment - ## - # RPC-specific configuration for `get_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_project_attachment - ## - # RPC-specific configuration for `delete_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_project_attachment - ## - # RPC-specific configuration for `detach_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :detach_service_project_attachment - ## - # RPC-specific configuration for `list_discovered_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_discovered_services - ## - # RPC-specific configuration for `get_discovered_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_discovered_service - ## - # RPC-specific configuration for `lookup_discovered_service` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_discovered_service - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `create_service` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service - ## - # 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 `list_discovered_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_discovered_workloads - ## - # RPC-specific configuration for `get_discovered_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_discovered_workload - ## - # RPC-specific configuration for `lookup_discovered_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_discovered_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - ## - # RPC-specific configuration for `create_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `list_applications` - # @return [::Gapic::Config::Method] - # - attr_reader :list_applications - ## - # RPC-specific configuration for `create_application` - # @return [::Gapic::Config::Method] - # - attr_reader :create_application - ## - # RPC-specific configuration for `get_application` - # @return [::Gapic::Config::Method] - # - attr_reader :get_application - ## - # RPC-specific configuration for `update_application` - # @return [::Gapic::Config::Method] - # - attr_reader :update_application - ## - # RPC-specific configuration for `delete_application` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_application - - # @private - def initialize parent_rpcs = nil - lookup_service_project_attachment_config = parent_rpcs.lookup_service_project_attachment if parent_rpcs.respond_to? :lookup_service_project_attachment - @lookup_service_project_attachment = ::Gapic::Config::Method.new lookup_service_project_attachment_config - list_service_project_attachments_config = parent_rpcs.list_service_project_attachments if parent_rpcs.respond_to? :list_service_project_attachments - @list_service_project_attachments = ::Gapic::Config::Method.new list_service_project_attachments_config - create_service_project_attachment_config = parent_rpcs.create_service_project_attachment if parent_rpcs.respond_to? :create_service_project_attachment - @create_service_project_attachment = ::Gapic::Config::Method.new create_service_project_attachment_config - get_service_project_attachment_config = parent_rpcs.get_service_project_attachment if parent_rpcs.respond_to? :get_service_project_attachment - @get_service_project_attachment = ::Gapic::Config::Method.new get_service_project_attachment_config - delete_service_project_attachment_config = parent_rpcs.delete_service_project_attachment if parent_rpcs.respond_to? :delete_service_project_attachment - @delete_service_project_attachment = ::Gapic::Config::Method.new delete_service_project_attachment_config - detach_service_project_attachment_config = parent_rpcs.detach_service_project_attachment if parent_rpcs.respond_to? :detach_service_project_attachment - @detach_service_project_attachment = ::Gapic::Config::Method.new detach_service_project_attachment_config - list_discovered_services_config = parent_rpcs.list_discovered_services if parent_rpcs.respond_to? :list_discovered_services - @list_discovered_services = ::Gapic::Config::Method.new list_discovered_services_config - get_discovered_service_config = parent_rpcs.get_discovered_service if parent_rpcs.respond_to? :get_discovered_service - @get_discovered_service = ::Gapic::Config::Method.new get_discovered_service_config - lookup_discovered_service_config = parent_rpcs.lookup_discovered_service if parent_rpcs.respond_to? :lookup_discovered_service - @lookup_discovered_service = ::Gapic::Config::Method.new lookup_discovered_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 - create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service - @create_service = ::Gapic::Config::Method.new create_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 - 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 - list_discovered_workloads_config = parent_rpcs.list_discovered_workloads if parent_rpcs.respond_to? :list_discovered_workloads - @list_discovered_workloads = ::Gapic::Config::Method.new list_discovered_workloads_config - get_discovered_workload_config = parent_rpcs.get_discovered_workload if parent_rpcs.respond_to? :get_discovered_workload - @get_discovered_workload = ::Gapic::Config::Method.new get_discovered_workload_config - lookup_discovered_workload_config = parent_rpcs.lookup_discovered_workload if parent_rpcs.respond_to? :lookup_discovered_workload - @lookup_discovered_workload = ::Gapic::Config::Method.new lookup_discovered_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - list_applications_config = parent_rpcs.list_applications if parent_rpcs.respond_to? :list_applications - @list_applications = ::Gapic::Config::Method.new list_applications_config - create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application - @create_application = ::Gapic::Config::Method.new create_application_config - get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application - @get_application = ::Gapic::Config::Method.new get_application_config - update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application - @update_application = ::Gapic::Config::Method.new update_application_config - delete_application_config = parent_rpcs.delete_application if parent_rpcs.respond_to? :delete_application - @delete_application = ::Gapic::Config::Method.new delete_application_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb deleted file mode 100644 index c65c0c87c00c..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/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 AppHub - module V1 - module AppHub - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppHub 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 AppHub 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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "apphub.googleapis.com" - - config_attr :endpoint, nil, ::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-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb deleted file mode 100644 index 8c21b329cfc6..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb +++ /dev/null @@ -1,1736 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apphub/v1/apphub_service_pb" - -module Google - module Cloud - module AppHub - module V1 - module AppHub - module Rest - ## - # REST service stub for the AppHub 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 lookup_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # A result object deserialized from the server's reply - def lookup_service_project_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_service_project_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "lookup_service_project_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.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_project_attachments REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse] - # A result object deserialized from the server's reply - def list_service_project_attachments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_project_attachments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_project_attachments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.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_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_project_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_project_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_project_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_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_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # A result object deserialized from the server's reply - def get_service_project_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_project_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_project_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.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_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_project_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_project_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_project_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the detach_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # A result object deserialized from the server's reply - def detach_service_project_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_detach_service_project_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "detach_service_project_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.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_discovered_services REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse] - # A result object deserialized from the server's reply - def list_discovered_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_discovered_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_discovered_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_discovered_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredService] - # A result object deserialized from the server's reply - def get_discovered_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_discovered_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_discovered_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::DiscoveredService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the lookup_discovered_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # A result object deserialized from the server's reply - def lookup_discovered_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_discovered_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: "lookup_discovered_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.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::AppHub::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::AppHub::V1::ListServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::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::AppHub::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 create_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::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 get_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::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::AppHub::V1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::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::AppHub::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 update_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # 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::Longrunning::Operation.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::AppHub::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 list_discovered_workloads REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse] - # A result object deserialized from the server's reply - def list_discovered_workloads request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_discovered_workloads_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_discovered_workloads", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_discovered_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # A result object deserialized from the server's reply - def get_discovered_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_discovered_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_discovered_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the lookup_discovered_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # A result object deserialized from the server's reply - def lookup_discovered_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_discovered_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "lookup_discovered_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workloads REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListWorkloadsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListWorkloadsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListWorkloadsResponse] - # A result object deserialized from the server's reply - def list_workloads request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_workloads", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Workload] - # A result object deserialized from the server's reply - def get_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::Workload.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_applications REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListApplicationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListApplicationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListApplicationsResponse] - # A result object deserialized from the server's reply - def list_applications request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_applications_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_applications", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.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_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Application] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Application] - # A result object deserialized from the server's reply - def get_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::Application.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_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::UpdateApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 lookup_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_service_project_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:lookupServiceProjectAttachment", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_project_attachments REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest] - # A 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_project_attachments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/serviceProjectAttachments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest] - # 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_project_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/serviceProjectAttachments", - body: "service_project_attachment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest] - # A 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_project_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest] - # 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_project_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the detach_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_detach_service_project_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:detachServiceProjectAttachment", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_discovered_services REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_discovered_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/discoveredServices", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_discovered_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_discovered_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/discoveredServices/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the lookup_discovered_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_discovered_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/discoveredServices:lookup", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_services REST call - # - # @param request_pb [::Google::Cloud::AppHub::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{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::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/{parent}/services", - body: "service", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::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{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::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: "/v1/{service.name}", - body: "service", - matches: [ - ["service.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::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/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_discovered_workloads REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_discovered_workloads_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/discoveredWorkloads", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_discovered_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_discovered_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/discoveredWorkloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the lookup_discovered_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_discovered_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/discoveredWorkloads:lookup", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workloads REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListWorkloadsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workloads_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workloads", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateWorkloadRequest] - # 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_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/workloads", - body: "workload", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest] - # 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_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{workload.name}", - body: "workload", - matches: [ - ["workload.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest] - # 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_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_applications REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListApplicationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_applications_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/applications", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateApplicationRequest] - # 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_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/applications", - body: "application", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetApplicationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::UpdateApplicationRequest] - # 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_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{application.name}", - body: "application", - matches: [ - ["application.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteApplicationRequest] - # 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_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb deleted file mode 100644 index 126149ab3449..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/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 AppHub - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/app_hub/v1/rest" - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppHub"] - 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/[^/]+/applications/[^/]+/?$}, 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/[^/]+/applications/[^/]+/?$}, 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/[^/]+/applications/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb deleted file mode 100644 index 722942549fd1..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/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/app_hub/v1/app_hub/rest" -require "google/cloud/app_hub/v1/bindings_override" -require "google/cloud/app_hub/v1/version" - -module Google - module Cloud - module AppHub - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/app_hub/v1/rest" - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb deleted file mode 100644 index 471b04475c54..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb deleted file mode 100644 index 12080e3972e6..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_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/apphub/v1/apphub_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/apphub/v1/application_pb' -require 'google/cloud/apphub/v1/service_pb' -require 'google/cloud/apphub/v1/service_project_attachment_pb' -require 'google/cloud/apphub/v1/workload_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/apphub/v1/apphub_service.proto\x12\x16google.cloud.apphub.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/apphub/v1/application.proto\x1a$google/cloud/apphub/v1/service.proto\x1a\x37google/cloud/apphub/v1/service_project_attachment.proto\x1a%google/cloud/apphub/v1/workload.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"`\n%LookupServiceProjectAttachmentRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"~\n&LookupServiceProjectAttachmentResponse\x12T\n\x1aservice_project_attachment\x18\x01 \x01(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachment\"\xcb\x01\n$ListServiceProjectAttachmentsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.apphub.googleapis.com/ServiceProjectAttachment\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\"\xac\x01\n%ListServiceProjectAttachmentsResponse\x12U\n\x1bservice_project_attachments\x18\x01 \x03(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8f\x02\n%CreateServiceProjectAttachmentRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.apphub.googleapis.com/ServiceProjectAttachment\x12*\n\x1dservice_project_attachment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x1aservice_project_attachment\x18\x03 \x01(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachmentB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\"GetServiceProjectAttachmentRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.apphub.googleapis.com/ServiceProjectAttachment\"\x86\x01\n%DeleteServiceProjectAttachmentRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.apphub.googleapis.com/ServiceProjectAttachment\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"`\n%DetachServiceProjectAttachmentRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"(\n&DetachServiceProjectAttachmentResponse\"\xa9\x01\n\x13ListServicesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x61pphub.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\"w\n\x14ListServicesResponse\x12\x31\n\x08services\x18\x01 \x03(\x0b\x32\x1f.google.cloud.apphub.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbd\x01\n\x1dListDiscoveredServicesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'apphub.googleapis.com/DiscoveredService\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\"\x96\x01\n\x1eListDiscoveredServicesResponse\x12\x46\n\x13\x64iscovered_services\x18\x01 \x03(\x0b\x32).google.cloud.apphub.v1.DiscoveredService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xb6\x01\n\x14\x43reateServiceRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x61pphub.googleapis.com/Service\x12\x17\n\nservice_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x35\n\x07service\x18\x03 \x01(\x0b\x32\x1f.google.cloud.apphub.v1.ServiceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"H\n\x11GetServiceRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61pphub.googleapis.com/Service\"\\\n\x1bGetDiscoveredServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'apphub.googleapis.com/DiscoveredService\"s\n\x1eLookupDiscoveredServiceRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'apphub.googleapis.com/DiscoveredService\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"h\n\x1fLookupDiscoveredServiceResponse\x12\x45\n\x12\x64iscovered_service\x18\x01 \x01(\x0b\x32).google.cloud.apphub.v1.DiscoveredService\"\x9c\x01\n\x14UpdateServiceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x07service\x18\x02 \x01(\x0b\x32\x1f.google.cloud.apphub.v1.ServiceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"d\n\x14\x44\x65leteServiceRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61pphub.googleapis.com/Service\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb1\x01\n\x17ListApplicationsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!apphub.googleapis.com/Application\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\"\x83\x01\n\x18ListApplicationsResponse\x12\x39\n\x0c\x61pplications\x18\x01 \x03(\x0b\x32#.google.cloud.apphub.v1.Application\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xca\x01\n\x18\x43reateApplicationRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!apphub.googleapis.com/Application\x12\x1b\n\x0e\x61pplication_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x0b\x61pplication\x18\x03 \x01(\x0b\x32#.google.cloud.apphub.v1.ApplicationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"P\n\x15GetApplicationRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!apphub.googleapis.com/Application\"\xa8\x01\n\x18UpdateApplicationRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12=\n\x0b\x61pplication\x18\x02 \x01(\x0b\x32#.google.cloud.apphub.v1.ApplicationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"l\n\x18\x44\x65leteApplicationRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!apphub.googleapis.com/Application\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\x14ListWorkloadsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x61pphub.googleapis.com/Workload\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\"z\n\x15ListWorkloadsResponse\x12\x33\n\tworkloads\x18\x01 \x03(\x0b\x32 .google.cloud.apphub.v1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbf\x01\n\x1eListDiscoveredWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apphub.googleapis.com/DiscoveredWorkload\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\"\x99\x01\n\x1fListDiscoveredWorkloadsResponse\x12H\n\x14\x64iscovered_workloads\x18\x01 \x03(\x0b\x32*.google.cloud.apphub.v1.DiscoveredWorkload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbb\x01\n\x15\x43reateWorkloadRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x61pphub.googleapis.com/Workload\x12\x18\n\x0bworkload_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x08workload\x18\x03 \x01(\x0b\x32 .google.cloud.apphub.v1.WorkloadB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"J\n\x12GetWorkloadRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61pphub.googleapis.com/Workload\"^\n\x1cGetDiscoveredWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(apphub.googleapis.com/DiscoveredWorkload\"u\n\x1fLookupDiscoveredWorkloadRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apphub.googleapis.com/DiscoveredWorkload\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"k\n LookupDiscoveredWorkloadResponse\x12G\n\x13\x64iscovered_workload\x18\x01 \x01(\x0b\x32*.google.cloud.apphub.v1.DiscoveredWorkload\"\x9f\x01\n\x15UpdateWorkloadRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x37\n\x08workload\x18\x02 \x01(\x0b\x32 .google.cloud.apphub.v1.WorkloadB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"f\n\x15\x44\x65leteWorkloadRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61pphub.googleapis.com/Workload\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\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\x32\xa7/\n\x06\x41ppHub\x12\xf0\x01\n\x1eLookupServiceProjectAttachment\x12=.google.cloud.apphub.v1.LookupServiceProjectAttachmentRequest\x1a>.google.cloud.apphub.v1.LookupServiceProjectAttachmentResponse\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*}:lookupServiceProjectAttachment\x12\xec\x01\n\x1dListServiceProjectAttachments\x12<.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest\x1a=.google.cloud.apphub.v1.ListServiceProjectAttachmentsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*}/serviceProjectAttachments\x12\xd4\x02\n\x1e\x43reateServiceProjectAttachment\x12=.google.cloud.apphub.v1.CreateServiceProjectAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\xd3\x01\xca\x41-\n\x18ServiceProjectAttachment\x12\x11OperationMetadata\xda\x41?parent,service_project_attachment,service_project_attachment_id\x82\xd3\xe4\x93\x02[\"=/v1/{parent=projects/*/locations/*}/serviceProjectAttachments:\x1aservice_project_attachment\x12\xd9\x01\n\x1bGetServiceProjectAttachment\x12:.google.cloud.apphub.v1.GetServiceProjectAttachmentRequest\x1a\x30.google.cloud.apphub.v1.ServiceProjectAttachment\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/serviceProjectAttachments/*}\x12\xf9\x01\n\x1e\x44\x65leteServiceProjectAttachment\x12=.google.cloud.apphub.v1.DeleteServiceProjectAttachmentRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/serviceProjectAttachments/*}\x12\xf3\x01\n\x1e\x44\x65tachServiceProjectAttachment\x12=.google.cloud.apphub.v1.DetachServiceProjectAttachmentRequest\x1a>.google.cloud.apphub.v1.DetachServiceProjectAttachmentResponse\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\"@/v1/{name=projects/*/locations/*}:detachServiceProjectAttachment:\x01*\x12\xd0\x01\n\x16ListDiscoveredServices\x12\x35.google.cloud.apphub.v1.ListDiscoveredServicesRequest\x1a\x36.google.cloud.apphub.v1.ListDiscoveredServicesResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*}/discoveredServices\x12\xbd\x01\n\x14GetDiscoveredService\x12\x33.google.cloud.apphub.v1.GetDiscoveredServiceRequest\x1a).google.cloud.apphub.v1.DiscoveredService\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/discoveredServices/*}\x12\xde\x01\n\x17LookupDiscoveredService\x12\x36.google.cloud.apphub.v1.LookupDiscoveredServiceRequest\x1a\x37.google.cloud.apphub.v1.LookupDiscoveredServiceResponse\"R\xda\x41\nparent,uri\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*}/discoveredServices:lookup\x12\xb7\x01\n\x0cListServices\x12+.google.cloud.apphub.v1.ListServicesRequest\x1a,.google.cloud.apphub.v1.ListServicesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/applications/*}/services\x12\xe6\x01\n\rCreateService\x12,.google.cloud.apphub.v1.CreateServiceRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1c\n\x07Service\x12\x11OperationMetadata\xda\x41\x19parent,service,service_id\x82\xd3\xe4\x93\x02\x46\";/v1/{parent=projects/*/locations/*/applications/*}/services:\x07service\x12\xa4\x01\n\nGetService\x12).google.cloud.apphub.v1.GetServiceRequest\x1a\x1f.google.cloud.apphub.v1.Service\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/applications/*/services/*}\x12\xe8\x01\n\rUpdateService\x12,.google.cloud.apphub.v1.UpdateServiceRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1c\n\x07Service\x12\x11OperationMetadata\xda\x41\x13service,update_mask\x82\xd3\xe4\x93\x02N2C/v1/{service.name=projects/*/locations/*/applications/*/services/*}:\x07service\x12\xd5\x01\n\rDeleteService\x12,.google.cloud.apphub.v1.DeleteServiceRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/applications/*/services/*}\x12\xd4\x01\n\x17ListDiscoveredWorkloads\x12\x36.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest\x1a\x37.google.cloud.apphub.v1.ListDiscoveredWorkloadsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/discoveredWorkloads\x12\xc1\x01\n\x15GetDiscoveredWorkload\x12\x34.google.cloud.apphub.v1.GetDiscoveredWorkloadRequest\x1a*.google.cloud.apphub.v1.DiscoveredWorkload\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/discoveredWorkloads/*}\x12\xe2\x01\n\x18LookupDiscoveredWorkload\x12\x37.google.cloud.apphub.v1.LookupDiscoveredWorkloadRequest\x1a\x38.google.cloud.apphub.v1.LookupDiscoveredWorkloadResponse\"S\xda\x41\nparent,uri\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*}/discoveredWorkloads:lookup\x12\xbb\x01\n\rListWorkloads\x12,.google.cloud.apphub.v1.ListWorkloadsRequest\x1a-.google.cloud.apphub.v1.ListWorkloadsResponse\"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-app_hub-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb deleted file mode 100644 index 1b34c270e2f9..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb +++ /dev/null @@ -1,787 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - # Request for LookupServiceProjectAttachment. - # @!attribute [rw] name - # @return [::String] - # Required. Service project ID and location to lookup service project - # attachment for. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - class LookupServiceProjectAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for LookupServiceProjectAttachment. - # @!attribute [rw] service_project_attachment - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # Service project attachment for a project if exists, empty otherwise. - class LookupServiceProjectAttachmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListServiceProjectAttachments. - # @!attribute [rw] parent - # @return [::String] - # Required. Host project ID and location to list service project attachments. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListServiceProjectAttachmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListServiceProjectAttachments. - # @!attribute [rw] service_project_attachments - # @return [::Array<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] - # List of service project attachments. - # @!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 ListServiceProjectAttachmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for CreateServiceProjectAttachment. - # @!attribute [rw] parent - # @return [::String] - # Required. Host project ID and location to which service project is being - # attached. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] service_project_attachment_id - # @return [::String] - # Required. The service project attachment identifier must contain the - # project id of the service project specified in the - # service_project_attachment.service_project field. - # @!attribute [rw] service_project_attachment - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # 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 CreateServiceProjectAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetServiceProjectAttachment. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the service project attachment to - # retrieve. Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - class GetServiceProjectAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DeleteServiceProjectAttachment. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the service project attachment to delete. - # Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - # @!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). - class DeleteServiceProjectAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DetachServiceProjectAttachment. - # @!attribute [rw] name - # @return [::String] - # Required. Service project id and location to detach from a host project. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - class DetachServiceProjectAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for DetachServiceProjectAttachment. - class DetachServiceProjectAttachmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListServices. - # @!attribute [rw] parent - # @return [::String] - # Required. Fully qualified name of the parent Application to list Services - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @!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. Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - class ListServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListServices. - # @!attribute [rw] services - # @return [::Array<::Google::Cloud::AppHub::V1::Service>] - # List of Services. - # @!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 ListServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListDiscoveredServices. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location to list Discovered Services on. - # Expected format: `projects/{project}/locations/{location}`. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListDiscoveredServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListDiscoveredServices. - # @!attribute [rw] discovered_services - # @return [::Array<::Google::Cloud::AppHub::V1::DiscoveredService>] - # List of Discovered Services. - # @!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 ListDiscoveredServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for CreateService. - # @!attribute [rw] parent - # @return [::String] - # Required. Fully qualified name of the parent Application to create the - # Service in. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @!attribute [rw] service_id - # @return [::String] - # Required. The Service identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @!attribute [rw] service - # @return [::Google::Cloud::AppHub::V1::Service] - # 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 CreateServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetService. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - class GetServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetDiscoveredService. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Discovered Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. - class GetDiscoveredServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for LookupDiscoveredService. - # @!attribute [rw] parent - # @return [::String] - # Required. Host project ID and location to lookup Discovered Service in. - # Expected format: `projects/{project}/locations/{location}`. - # @!attribute [rw] uri - # @return [::String] - # Required. Resource URI to find DiscoveredService for. - # Accepts both project number and project ID and does translation when - # needed. - class LookupDiscoveredServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for LookupDiscoveredService. - # @!attribute [rw] discovered_service - # @return [::Google::Cloud::AppHub::V1::DiscoveredService] - # Discovered Service if exists, empty otherwise. - class LookupDiscoveredServiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for UpdateService. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Service resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @!attribute [rw] service - # @return [::Google::Cloud::AppHub::V1::Service] - # Required. The resource being updated. - # @!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 UpdateServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DeleteService. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Service to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # @!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). - class DeleteServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListApplications. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location to list Applications on. - # Expected format: `projects/{project}/locations/{location}`. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListApplicationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListApplications. - # @!attribute [rw] applications - # @return [::Array<::Google::Cloud::AppHub::V1::Application>] - # List of Applications. - # @!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 ListApplicationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for CreateApplication. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location to create Application in. - # Expected format: `projects/{project}/locations/{location}`. - # @!attribute [rw] application_id - # @return [::String] - # Required. The Application identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @!attribute [rw] application - # @return [::Google::Cloud::AppHub::V1::Application] - # 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 CreateApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetApplication. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Application to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - class GetApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for UpdateApplication. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Application resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @!attribute [rw] application - # @return [::Google::Cloud::AppHub::V1::Application] - # Required. The resource being updated. - # @!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 UpdateApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DeleteApplication. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Application to delete. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @!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). - class DeleteApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListWorkloads. - # @!attribute [rw] parent - # @return [::String] - # Required. Fully qualified name of the parent Application to list Workloads - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListWorkloads. - # @!attribute [rw] workloads - # @return [::Array<::Google::Cloud::AppHub::V1::Workload>] - # List of Workloads. - # @!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 ListWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListDiscoveredWorkloads. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location to list Discovered Workloads on. - # Expected format: `projects/{project}/locations/{location}`. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListDiscoveredWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListDiscoveredWorkloads. - # @!attribute [rw] discovered_workloads - # @return [::Array<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] - # List of Discovered Workloads. - # @!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 ListDiscoveredWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for CreateWorkload. - # @!attribute [rw] parent - # @return [::String] - # Required. Fully qualified name of the Application to create Workload in. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @!attribute [rw] workload_id - # @return [::String] - # Required. The Workload identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @!attribute [rw] workload - # @return [::Google::Cloud::AppHub::V1::Workload] - # 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 CreateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetWorkload. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - class GetWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetDiscoveredWorkload. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Discovered Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. - class GetDiscoveredWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for LookupDiscoveredWorkload. - # @!attribute [rw] parent - # @return [::String] - # Required. Host project ID and location to lookup Discovered Workload in. - # Expected format: `projects/{project}/locations/{location}`. - # @!attribute [rw] uri - # @return [::String] - # Required. Resource URI to find Discovered Workload for. - # Accepts both project number and project ID and does translation when - # needed. - class LookupDiscoveredWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for LookupDiscoveredWorkload. - # @!attribute [rw] discovered_workload - # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # Discovered Workload if exists, empty otherwise. - class LookupDiscoveredWorkloadResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for UpdateWorkload. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Workload resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @!attribute [rw] workload - # @return [::Google::Cloud::AppHub::V1::Workload] - # Required. The resource being updated. - # @!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 UpdateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DeleteWorkload. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Workload to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # @!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). - class DeleteWorkloadRequest - 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 been cancelled successfully - # have - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb deleted file mode 100644 index e67a1568db65..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.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 AppHub - module V1 - # Application defines the governance boundary for App Hub entities that - # perform a logical end-to-end business function. - # App Hub supports application level IAM permission to align with governance - # requirements. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of an Application. Format: - # `"projects/{host-project-id}/locations/{location}/applications/{application-id}"` - # @!attribute [rw] display_name - # @return [::String] - # Optional. User-defined name for the Application. - # Can have a maximum length of 63 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User-defined description of an Application. - # Can have a maximum length of 2048 characters. - # @!attribute [rw] attributes - # @return [::Google::Cloud::AppHub::V1::Attributes] - # Optional. Consumer provided attributes. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update time. - # @!attribute [rw] scope - # @return [::Google::Cloud::AppHub::V1::Scope] - # Required. Immutable. Defines what data can be included into this - # Application. Limits which Services and Workloads can be registered. - # @!attribute [r] uid - # @return [::String] - # Output only. A universally unique identifier (in UUID4 format) for the - # `Application`. - # @!attribute [r] state - # @return [::Google::Cloud::AppHub::V1::Application::State] - # Output only. Application state. - class Application - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Application state. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The Application is being created. - CREATING = 1 - - # The Application is ready to register Services and Workloads. - ACTIVE = 2 - - # The Application is being deleted. - DELETING = 3 - end - end - - # Scope of an application. - # @!attribute [rw] type - # @return [::Google::Cloud::AppHub::V1::Scope::Type] - # Required. Scope Type. - class Scope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Scope Type. - module Type - # Unspecified type. - TYPE_UNSPECIFIED = 0 - - # Regional type. - REGIONAL = 1 - - # Global type. - GLOBAL = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb deleted file mode 100644 index 841a166336a3..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.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 AppHub - module V1 - # Consumer provided attributes. - # @!attribute [rw] criticality - # @return [::Google::Cloud::AppHub::V1::Criticality] - # Optional. User-defined criticality information. - # @!attribute [rw] environment - # @return [::Google::Cloud::AppHub::V1::Environment] - # Optional. User-defined environment information. - # @!attribute [rw] developer_owners - # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] - # Optional. Developer team that owns development and coding. - # @!attribute [rw] operator_owners - # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] - # Optional. Operator team that ensures runtime and operations. - # @!attribute [rw] business_owners - # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] - # Optional. Business team that ensures user needs are met and value is - # delivered - class Attributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Criticality of the Application, Service, or Workload - # @!attribute [rw] type - # @return [::Google::Cloud::AppHub::V1::Criticality::Type] - # Required. Criticality Type. - class Criticality - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Criticality Type. - module Type - # Unspecified type. - TYPE_UNSPECIFIED = 0 - - # Mission critical service, application or workload. - MISSION_CRITICAL = 1 - - # High impact. - HIGH = 2 - - # Medium impact. - MEDIUM = 3 - - # Low impact. - LOW = 4 - end - end - - # Environment of the Application, Service, or Workload - # @!attribute [rw] type - # @return [::Google::Cloud::AppHub::V1::Environment::Type] - # Required. Environment Type. - class Environment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Environment Type. - module Type - # Unspecified type. - TYPE_UNSPECIFIED = 0 - - # Production environment. - PRODUCTION = 1 - - # Staging environment. - STAGING = 2 - - # Test environment. - TEST = 3 - - # Development environment. - DEVELOPMENT = 4 - end - end - - # Contact information of stakeholders. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Contact's name. - # Can have a maximum length of 63 characters. - # @!attribute [rw] email - # @return [::String] - # Required. Email address of the contacts. - class ContactInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb deleted file mode 100644 index 78a43787310d..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb +++ /dev/null @@ -1,139 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - # Service is an App Hub data model that contains a discovered service, which - # represents a network or API interface that exposes some functionality to - # clients for consumption over the network. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of a Service. Format: - # `"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}"` - # @!attribute [rw] display_name - # @return [::String] - # Optional. User-defined name for the Service. - # Can have a maximum length of 63 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User-defined description of a Service. - # Can have a maximum length of 2048 characters. - # @!attribute [r] service_reference - # @return [::Google::Cloud::AppHub::V1::ServiceReference] - # Output only. Reference to an underlying networking resource that can - # comprise a Service. These are immutable. - # @!attribute [r] service_properties - # @return [::Google::Cloud::AppHub::V1::ServiceProperties] - # Output only. Properties of an underlying compute resource that can comprise - # a Service. These are immutable. - # @!attribute [rw] attributes - # @return [::Google::Cloud::AppHub::V1::Attributes] - # Optional. Consumer provided attributes. - # @!attribute [rw] discovered_service - # @return [::String] - # Required. Immutable. The resource name of the original discovered service. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update time. - # @!attribute [r] uid - # @return [::String] - # Output only. A universally unique identifier (UUID) for the `Service` in - # the UUID4 format. - # @!attribute [r] state - # @return [::Google::Cloud::AppHub::V1::Service::State] - # Output only. Service state. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Service state. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The service is being created. - CREATING = 1 - - # The service is ready. - ACTIVE = 2 - - # The service is being deleted. - DELETING = 3 - - # The underlying networking resources have been deleted. - DETACHED = 4 - end - end - - # Reference to an underlying networking resource that can comprise a Service. - # @!attribute [r] uri - # @return [::String] - # Output only. The underlying resource URI. For example, URI of Forwarding - # Rule, URL Map, and Backend Service. - class ServiceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties of an underlying cloud resource that can comprise a Service. - # @!attribute [r] gcp_project - # @return [::String] - # Output only. The service project identifier that the underlying cloud - # resource resides in. - # @!attribute [r] location - # @return [::String] - # Output only. The location that the underlying resource resides in, for - # example, us-west1. - # @!attribute [r] zone - # @return [::String] - # Output only. The location that the underlying resource resides in if it is - # zonal, for example, us-west1-a). - class ServiceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DiscoveredService is a network or API interface that exposes some - # functionality to clients for consumption over the network. A discovered - # service can be registered to a App Hub service. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the discovered service. Format: - # `"projects/{host-project-id}/locations/{location}/discoveredServices/{uuid}"` - # @!attribute [r] service_reference - # @return [::Google::Cloud::AppHub::V1::ServiceReference] - # Output only. Reference to an underlying networking resource that can - # comprise a Service. These are immutable. - # @!attribute [r] service_properties - # @return [::Google::Cloud::AppHub::V1::ServiceProperties] - # Output only. Properties of an underlying compute resource that can comprise - # a Service. These are immutable. - class DiscoveredService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb deleted file mode 100644 index 2da9f70c19b1..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.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 AppHub - module V1 - # ServiceProjectAttachment represents an attachment from a service project to a - # host project. Service projects contain the underlying cloud - # infrastructure resources, and expose these resources to the host project - # through a ServiceProjectAttachment. With the attachments, the host project - # can provide an aggregated view of resources across all service projects. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of a ServiceProjectAttachment. Format: - # `"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."` - # @!attribute [rw] service_project - # @return [::String] - # Required. Immutable. Service project name in the format: `"projects/abc"` - # or `"projects/123"`. As input, project name with either project id or - # number are accepted. As output, this field will contain project number. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time. - # @!attribute [r] uid - # @return [::String] - # Output only. A globally unique identifier (in UUID4 format) for the - # `ServiceProjectAttachment`. - # @!attribute [r] state - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment::State] - # Output only. ServiceProjectAttachment state. - class ServiceProjectAttachment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # ServiceProjectAttachment state. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The ServiceProjectAttachment is being created. - CREATING = 1 - - # The ServiceProjectAttachment is ready. - # This means Services and Workloads under the corresponding - # ServiceProjectAttachment is ready for registration. - ACTIVE = 2 - - # The ServiceProjectAttachment is being deleted. - DELETING = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb deleted file mode 100644 index 9d71177bf824..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - # Workload is an App Hub data model that contains a discovered workload, which - # represents a binary deployment (such as managed instance groups (MIGs) and - # GKE deployments) that performs the smallest logical subset of business - # functionality. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the Workload. Format: - # `"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"` - # @!attribute [rw] display_name - # @return [::String] - # Optional. User-defined name for the Workload. - # Can have a maximum length of 63 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User-defined description of a Workload. - # Can have a maximum length of 2048 characters. - # @!attribute [r] workload_reference - # @return [::Google::Cloud::AppHub::V1::WorkloadReference] - # Output only. Reference of an underlying compute resource represented by the - # Workload. These are immutable. - # @!attribute [r] workload_properties - # @return [::Google::Cloud::AppHub::V1::WorkloadProperties] - # Output only. Properties of an underlying compute resource represented by - # the Workload. These are immutable. - # @!attribute [rw] discovered_workload - # @return [::String] - # Required. Immutable. The resource name of the original discovered workload. - # @!attribute [rw] attributes - # @return [::Google::Cloud::AppHub::V1::Attributes] - # Optional. Consumer provided attributes. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update time. - # @!attribute [r] uid - # @return [::String] - # Output only. A universally unique identifier (UUID) for the `Workload` in - # the UUID4 format. - # @!attribute [r] state - # @return [::Google::Cloud::AppHub::V1::Workload::State] - # Output only. Workload state. - class Workload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Workload state. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The Workload is being created. - CREATING = 1 - - # The Workload is ready. - ACTIVE = 2 - - # The Workload is being deleted. - DELETING = 3 - - # The underlying compute resources have been deleted. - DETACHED = 4 - end - end - - # Reference of an underlying compute resource represented by the Workload. - # @!attribute [r] uri - # @return [::String] - # Output only. The underlying compute resource uri. - class WorkloadReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties of an underlying compute resource represented by the Workload. - # @!attribute [r] gcp_project - # @return [::String] - # Output only. The service project identifier that the underlying cloud - # resource resides in. Empty for non-cloud resources. - # @!attribute [r] location - # @return [::String] - # Output only. The location that the underlying compute resource resides in - # (for example, us-west1). - # @!attribute [r] zone - # @return [::String] - # Output only. The location that the underlying compute resource resides in - # if it is zonal (for example, us-west1-a). - class WorkloadProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DiscoveredWorkload is a binary deployment (such as managed instance groups - # (MIGs) and GKE deployments) that performs the smallest logical subset of - # business functionality. A discovered workload can be registered to an App Hub - # Workload. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the discovered workload. Format: - # `"projects/{host-project-id}/locations/{location}/discoveredWorkloads/{uuid}"` - # @!attribute [r] workload_reference - # @return [::Google::Cloud::AppHub::V1::WorkloadReference] - # Output only. Reference of an underlying compute resource represented by the - # Workload. These are immutable. - # @!attribute [r] workload_properties - # @return [::Google::Cloud::AppHub::V1::WorkloadProperties] - # Output only. Properties of an underlying compute resource represented by - # the Workload. These are immutable. - class DiscoveredWorkload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-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-app_hub-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-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-app_hub-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile deleted file mode 100644 index 01e4ee88000f..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-app_hub-v1", path: "../" -else - gem "google-cloud-app_hub-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb deleted file mode 100644 index ecb6729ae83a..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.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 apphub_v1_generated_AppHub_CreateApplication_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the create_application call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#create_application. -# -def create_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new - - # Call the create_application method. - result = client.create_application request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_CreateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb deleted file mode 100644 index 909a8e44c897..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/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 apphub_v1_generated_AppHub_CreateService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the create_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#create_service. -# -def create_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::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 apphub_v1_generated_AppHub_CreateService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb deleted file mode 100644 index bef16146076a..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.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 apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the create_service_project_attachment call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment. -# -def create_service_project_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new - - # Call the create_service_project_attachment method. - result = client.create_service_project_attachment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb deleted file mode 100644 index 09e9695fc333..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.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 apphub_v1_generated_AppHub_CreateWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the create_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#create_workload. -# -def create_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new - - # Call the create_workload method. - result = client.create_workload request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb deleted file mode 100644 index 246fde1039c5..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.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 apphub_v1_generated_AppHub_DeleteApplication_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the delete_application call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#delete_application. -# -def delete_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new - - # Call the delete_application method. - result = client.delete_application request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_DeleteApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb deleted file mode 100644 index 96f1cd39b61c..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/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 apphub_v1_generated_AppHub_DeleteService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the delete_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#delete_service. -# -def delete_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::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 apphub_v1_generated_AppHub_DeleteService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb deleted file mode 100644 index 76b3adb08c91..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.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 apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the delete_service_project_attachment call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment. -# -def delete_service_project_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new - - # Call the delete_service_project_attachment method. - result = client.delete_service_project_attachment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb deleted file mode 100644 index 438e272456a7..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.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 apphub_v1_generated_AppHub_DeleteWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the delete_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#delete_workload. -# -def delete_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new - - # Call the delete_workload method. - result = client.delete_workload request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb deleted file mode 100644 index fd0a2727844c..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the detach_service_project_attachment call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment. -# -def detach_service_project_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new - - # Call the detach_service_project_attachment method. - result = client.detach_service_project_attachment request - - # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. - p result -end -# [END apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb deleted file mode 100644 index b24e9656c575..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_GetApplication_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_application call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_application. -# -def get_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetApplicationRequest.new - - # Call the get_application method. - result = client.get_application request - - # The returned object is of type Google::Cloud::AppHub::V1::Application. - p result -end -# [END apphub_v1_generated_AppHub_GetApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb deleted file mode 100644 index 8d6b3faca3aa..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_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 apphub_v1_generated_AppHub_GetDiscoveredService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_discovered_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service. -# -def get_discovered_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new - - # Call the get_discovered_service method. - result = client.get_discovered_service request - - # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. - p result -end -# [END apphub_v1_generated_AppHub_GetDiscoveredService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb deleted file mode 100644 index d5a7376701be..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_discovered_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload. -# -def get_discovered_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new - - # Call the get_discovered_workload method. - result = client.get_discovered_workload request - - # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. - p result -end -# [END apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb deleted file mode 100644 index cf9240d27574..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/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 apphub_v1_generated_AppHub_GetService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_service. -# -def get_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetServiceRequest.new - - # Call the get_service method. - result = client.get_service request - - # The returned object is of type Google::Cloud::AppHub::V1::Service. - p result -end -# [END apphub_v1_generated_AppHub_GetService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb deleted file mode 100644 index d913e0dd0077..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_service_project_attachment call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment. -# -def get_service_project_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new - - # Call the get_service_project_attachment method. - result = client.get_service_project_attachment request - - # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. - p result -end -# [END apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb deleted file mode 100644 index 981d5001c644..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_GetWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_workload. -# -def get_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new - - # Call the get_workload method. - result = client.get_workload request - - # The returned object is of type Google::Cloud::AppHub::V1::Workload. - p result -end -# [END apphub_v1_generated_AppHub_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb deleted file mode 100644 index a0c9e9dc43c5..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.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 apphub_v1_generated_AppHub_ListApplications_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_applications call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_applications. -# -def list_applications - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new - - # Call the list_applications method. - result = client.list_applications request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppHub::V1::Application. - p item - end -end -# [END apphub_v1_generated_AppHub_ListApplications_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb deleted file mode 100644 index 16595dffd427..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_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 apphub_v1_generated_AppHub_ListDiscoveredServices_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_discovered_services call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services. -# -def list_discovered_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new - - # Call the list_discovered_services method. - result = client.list_discovered_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::AppHub::V1::DiscoveredService. - p item - end -end -# [END apphub_v1_generated_AppHub_ListDiscoveredServices_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb deleted file mode 100644 index 8af6d5b9a9e5..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_discovered_workloads call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads. -# -def list_discovered_workloads - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new - - # Call the list_discovered_workloads method. - result = client.list_discovered_workloads request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. - p item - end -end -# [END apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb deleted file mode 100644 index c9dc10bc0854..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.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 apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_service_project_attachments call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments. -# -def list_service_project_attachments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new - - # Call the list_service_project_attachments method. - result = client.list_service_project_attachments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. - p item - end -end -# [END apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb deleted file mode 100644 index f63e8b919d25..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/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 apphub_v1_generated_AppHub_ListServices_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_services call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_services. -# -def list_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::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::AppHub::V1::Service. - p item - end -end -# [END apphub_v1_generated_AppHub_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb deleted file mode 100644 index 98bee1c64a09..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_ListWorkloads_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_workloads call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_workloads. -# -def list_workloads - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new - - # Call the list_workloads method. - result = client.list_workloads request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppHub::V1::Workload. - p item - end -end -# [END apphub_v1_generated_AppHub_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb deleted file mode 100644 index 70e65424d4a7..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_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 apphub_v1_generated_AppHub_LookupDiscoveredService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the lookup_discovered_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service. -# -def lookup_discovered_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new - - # Call the lookup_discovered_service method. - result = client.lookup_discovered_service request - - # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. - p result -end -# [END apphub_v1_generated_AppHub_LookupDiscoveredService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb deleted file mode 100644 index d1d638e8c7dc..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the lookup_discovered_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload. -# -def lookup_discovered_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new - - # Call the lookup_discovered_workload method. - result = client.lookup_discovered_workload request - - # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. - p result -end -# [END apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb deleted file mode 100644 index 86dc1e535b27..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the lookup_service_project_attachment call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment. -# -def lookup_service_project_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new - - # Call the lookup_service_project_attachment method. - result = client.lookup_service_project_attachment request - - # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. - p result -end -# [END apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb deleted file mode 100644 index b2ddfd7fe664..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.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 apphub_v1_generated_AppHub_UpdateApplication_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the update_application call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#update_application. -# -def update_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new - - # Call the update_application method. - result = client.update_application request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_UpdateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb deleted file mode 100644 index e0a74c946803..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_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 apphub_v1_generated_AppHub_UpdateService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the update_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#update_service. -# -def update_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new - - # Call the update_service method. - result = client.update_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 apphub_v1_generated_AppHub_UpdateService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb deleted file mode 100644 index fc6d58bbc083..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.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 apphub_v1_generated_AppHub_UpdateWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the update_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#update_workload. -# -def update_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new - - # Call the update_workload method. - result = client.update_workload request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json b/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json deleted file mode 100644 index 43c82a87d67c..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json +++ /dev/null @@ -1,1095 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-app_hub-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.apphub.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync", - "title": "Snippet for the lookup_service_project_attachment call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment.", - "file": "app_hub/lookup_service_project_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_service_project_attachment", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "LookupServiceProjectAttachment", - "full_name": "google.cloud.apphub.v1.AppHub.LookupServiceProjectAttachment", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync", - "title": "Snippet for the list_service_project_attachments call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments.", - "file": "app_hub/list_service_project_attachments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_project_attachments", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListServiceProjectAttachments", - "full_name": "google.cloud.apphub.v1.AppHub.ListServiceProjectAttachments", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync", - "title": "Snippet for the create_service_project_attachment call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment.", - "file": "app_hub/create_service_project_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_project_attachment", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "CreateServiceProjectAttachment", - "full_name": "google.cloud.apphub.v1.AppHub.CreateServiceProjectAttachment", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync", - "title": "Snippet for the get_service_project_attachment call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment.", - "file": "app_hub/get_service_project_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_project_attachment", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ServiceProjectAttachment", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetServiceProjectAttachment", - "full_name": "google.cloud.apphub.v1.AppHub.GetServiceProjectAttachment", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync", - "title": "Snippet for the delete_service_project_attachment call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment.", - "file": "app_hub/delete_service_project_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service_project_attachment", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "DeleteServiceProjectAttachment", - "full_name": "google.cloud.apphub.v1.AppHub.DeleteServiceProjectAttachment", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync", - "title": "Snippet for the detach_service_project_attachment call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment.", - "file": "app_hub/detach_service_project_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "detach_service_project_attachment", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "DetachServiceProjectAttachment", - "full_name": "google.cloud.apphub.v1.AppHub.DetachServiceProjectAttachment", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListDiscoveredServices_sync", - "title": "Snippet for the list_discovered_services call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services.", - "file": "app_hub/list_discovered_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_discovered_services", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListDiscoveredServices", - "full_name": "google.cloud.apphub.v1.AppHub.ListDiscoveredServices", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetDiscoveredService_sync", - "title": "Snippet for the get_discovered_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service.", - "file": "app_hub/get_discovered_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_discovered_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::DiscoveredService", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetDiscoveredService", - "full_name": "google.cloud.apphub.v1.AppHub.GetDiscoveredService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_LookupDiscoveredService_sync", - "title": "Snippet for the lookup_discovered_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service.", - "file": "app_hub/lookup_discovered_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_discovered_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "LookupDiscoveredService", - "full_name": "google.cloud.apphub.v1.AppHub.LookupDiscoveredService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListServices_sync", - "title": "Snippet for the list_services call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_services.", - "file": "app_hub/list_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_services", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListServicesResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListServices", - "full_name": "google.cloud.apphub.v1.AppHub.ListServices", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_CreateService_sync", - "title": "Snippet for the create_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_service.", - "file": "app_hub/create_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::CreateServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "CreateService", - "full_name": "google.cloud.apphub.v1.AppHub.CreateService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetService_sync", - "title": "Snippet for the get_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_service.", - "file": "app_hub/get_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::Service", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetService", - "full_name": "google.cloud.apphub.v1.AppHub.GetService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_UpdateService_sync", - "title": "Snippet for the update_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_service.", - "file": "app_hub/update_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::UpdateServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "UpdateService", - "full_name": "google.cloud.apphub.v1.AppHub.UpdateService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_DeleteService_sync", - "title": "Snippet for the delete_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_service.", - "file": "app_hub/delete_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::DeleteServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "DeleteService", - "full_name": "google.cloud.apphub.v1.AppHub.DeleteService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync", - "title": "Snippet for the list_discovered_workloads call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads.", - "file": "app_hub/list_discovered_workloads.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_discovered_workloads", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListDiscoveredWorkloads", - "full_name": "google.cloud.apphub.v1.AppHub.ListDiscoveredWorkloads", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync", - "title": "Snippet for the get_discovered_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload.", - "file": "app_hub/get_discovered_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_discovered_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::DiscoveredWorkload", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetDiscoveredWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.GetDiscoveredWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync", - "title": "Snippet for the lookup_discovered_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload.", - "file": "app_hub/lookup_discovered_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_discovered_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "LookupDiscoveredWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.LookupDiscoveredWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListWorkloads_sync", - "title": "Snippet for the list_workloads call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_workloads.", - "file": "app_hub/list_workloads.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workloads", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_workloads", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListWorkloadsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListWorkloadsResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListWorkloads", - "full_name": "google.cloud.apphub.v1.AppHub.ListWorkloads", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_CreateWorkload_sync", - "title": "Snippet for the create_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_workload.", - "file": "app_hub/create_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::CreateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "CreateWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.CreateWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetWorkload_sync", - "title": "Snippet for the get_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_workload.", - "file": "app_hub/get_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::Workload", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.GetWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_UpdateWorkload_sync", - "title": "Snippet for the update_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_workload.", - "file": "app_hub/update_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::UpdateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "UpdateWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.UpdateWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_DeleteWorkload_sync", - "title": "Snippet for the delete_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_workload.", - "file": "app_hub/delete_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::DeleteWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "DeleteWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.DeleteWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListApplications_sync", - "title": "Snippet for the list_applications call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_applications.", - "file": "app_hub/list_applications.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_applications", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_applications", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListApplicationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListApplicationsResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListApplications", - "full_name": "google.cloud.apphub.v1.AppHub.ListApplications", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_CreateApplication_sync", - "title": "Snippet for the create_application call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_application.", - "file": "app_hub/create_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_application", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::CreateApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "CreateApplication", - "full_name": "google.cloud.apphub.v1.AppHub.CreateApplication", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetApplication_sync", - "title": "Snippet for the get_application call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_application.", - "file": "app_hub/get_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_application", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::Application", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetApplication", - "full_name": "google.cloud.apphub.v1.AppHub.GetApplication", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_UpdateApplication_sync", - "title": "Snippet for the update_application call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_application.", - "file": "app_hub/update_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_application", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::UpdateApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "UpdateApplication", - "full_name": "google.cloud.apphub.v1.AppHub.UpdateApplication", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_DeleteApplication_sync", - "title": "Snippet for the delete_application call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_application.", - "file": "app_hub/delete_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_application", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::DeleteApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "DeleteApplication", - "full_name": "google.cloud.apphub.v1.AppHub.DeleteApplication", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "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-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb deleted file mode 100644 index 92b4bb44b49c..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apphub/v1/apphub_service_pb" -require "google/cloud/apphub/v1/apphub_service_services_pb" -require "google/cloud/app_hub/v1/app_hub" - -class ::Google::Cloud::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb deleted file mode 100644 index 546a7a4d6b65..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb +++ /dev/null @@ -1,139 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/app_hub/v1/app_hub" - -class ::Google::Cloud::AppHub::V1::AppHub::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_application_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.application_path project: "value0", location: "value1", application: "value2" - assert_equal "projects/value0/locations/value1/applications/value2", path - end - end - - def test_discovered_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::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.discovered_service_path project: "value0", location: "value1", discovered_service: "value2" - assert_equal "projects/value0/locations/value1/discoveredServices/value2", path - end - end - - def test_discovered_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.discovered_workload_path project: "value0", location: "value1", discovered_workload: "value2" - assert_equal "projects/value0/locations/value1/discoveredWorkloads/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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", 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::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", application: "value2", service: "value3" - assert_equal "projects/value0/locations/value1/applications/value2/services/value3", path - end - end - - def test_service_project_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::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_project_attachment_path project: "value0", location: "value1", service_project_attachment: "value2" - assert_equal "projects/value0/locations/value1/serviceProjectAttachments/value2", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path project: "value0", location: "value1", application: "value2", workload: "value3" - assert_equal "projects/value0/locations/value1/applications/value2/workloads/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb deleted file mode 100644 index 4b7d70cebacb..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb +++ /dev/null @@ -1,1605 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/apphub/v1/apphub_service_pb" -require "google/cloud/app_hub/v1/app_hub/rest" - - -class ::Google::Cloud::AppHub::V1::AppHub::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_lookup_service_project_attachment - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - lookup_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_service_project_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_service_project_attachment_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.lookup_service_project_attachment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.lookup_service_project_attachment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.lookup_service_project_attachment ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.lookup_service_project_attachment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.lookup_service_project_attachment(::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_service_project_attachment_client_stub.call_count - end - end - end - - def test_list_service_project_attachments - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.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_service_project_attachments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_service_project_attachments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_project_attachments_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_service_project_attachments({ 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_service_project_attachments 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_service_project_attachments ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.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_service_project_attachments({ 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_service_project_attachments(::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.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_service_project_attachments_client_stub.call_count - end - end - end - - def test_create_service_project_attachment - # Create test objects. - 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_project_attachment_id = "hello world" - service_project_attachment = {} - request_id = "hello world" - - create_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_service_project_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_project_attachment_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service_project_attachment parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service_project_attachment ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service_project_attachment(::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_project_attachment_client_stub.call_count - end - end - end - - def test_get_service_project_attachment - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_service_project_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_project_attachment_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service_project_attachment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service_project_attachment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service_project_attachment ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service_project_attachment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service_project_attachment(::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_project_attachment_client_stub.call_count - end - end - end - - def test_delete_service_project_attachment - # Create test objects. - 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_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_service_project_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_project_attachment_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_service_project_attachment({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_service_project_attachment name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_service_project_attachment ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.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_service_project_attachment({ 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_service_project_attachment(::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.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_service_project_attachment_client_stub.call_count - end - end - end - - def test_detach_service_project_attachment - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - detach_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_detach_service_project_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, detach_service_project_attachment_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.detach_service_project_attachment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.detach_service_project_attachment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.detach_service_project_attachment ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.detach_service_project_attachment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.detach_service_project_attachment(::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, detach_service_project_attachment_client_stub.call_count - end - end - end - - def test_list_discovered_services - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.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_discovered_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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_discovered_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_discovered_services_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_discovered_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_discovered_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_discovered_services ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.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_discovered_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_discovered_services(::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.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_discovered_services_client_stub.call_count - end - end - end - - def test_get_discovered_service - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::DiscoveredService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_discovered_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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_discovered_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_discovered_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_discovered_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_discovered_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_discovered_service ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_discovered_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_discovered_service(::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_discovered_service_client_stub.call_count - end - end - end - - def test_lookup_discovered_service - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - uri = "hello world" - - lookup_discovered_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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_discovered_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_discovered_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.lookup_discovered_service({ parent: parent, uri: uri }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.lookup_discovered_service parent: parent, uri: uri do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.lookup_discovered_service ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.lookup_discovered_service({ parent: parent, uri: uri }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.lookup_discovered_service(::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_discovered_service_client_stub.call_count - end - end - end - - def test_list_services - # Create test objects. - client_result = ::Google::Cloud::AppHub::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" - 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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_services_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::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::AppHub::V1::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::AppHub::V1::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_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. - parent = "hello world" - service_id = "hello world" - service = {} - request_id = "hello world" - - 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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service({ parent: parent, service_id: service_id, service: service, request_id: request_id }) 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, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service ::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id) 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, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service(::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id), 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_get_service - # Create test objects. - client_result = ::Google::Cloud::AppHub::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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::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::AppHub::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::AppHub::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_update_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. - update_mask = {} - service = {} - request_id = "hello world" - - 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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_service({ update_mask: update_mask, service: service, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_service update_mask: update_mask, service: service, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_service ::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_service({ update_mask: update_mask, service: service, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_service(::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id), 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::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_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::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_service({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_service name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_service ::Google::Cloud::AppHub::V1::DeleteServiceRequest.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_service({ 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_service(::Google::Cloud::AppHub::V1::DeleteServiceRequest.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_service_client_stub.call_count - end - end - end - - def test_list_discovered_workloads - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.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_discovered_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_discovered_workloads_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_discovered_workloads_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_discovered_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_discovered_workloads ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.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_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_discovered_workloads(::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.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_discovered_workloads_client_stub.call_count - end - end - end - - def test_get_discovered_workload - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_discovered_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_discovered_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_discovered_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_discovered_workload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_discovered_workload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_discovered_workload ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_discovered_workload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_discovered_workload(::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_discovered_workload_client_stub.call_count - end - end - end - - def test_lookup_discovered_workload - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - uri = "hello world" - - lookup_discovered_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_discovered_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_discovered_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.lookup_discovered_workload({ parent: parent, uri: uri }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.lookup_discovered_workload parent: parent, uri: uri do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.lookup_discovered_workload ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.lookup_discovered_workload({ parent: parent, uri: uri }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.lookup_discovered_workload(::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_discovered_workload_client_stub.call_count - end - end - end - - def test_list_workloads - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workloads ::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workloads(::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_workloads_client_stub.call_count - end - end - end - - def test_create_workload - # Create test objects. - 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" - workload_id = "hello world" - workload = {} - request_id = "hello world" - - create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_workload parent: parent, workload_id: workload_id, workload: workload, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_workload ::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_workload(::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workload_client_stub.call_count - end - end - end - - def test_get_workload - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::Workload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_workload ::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_workload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_workload(::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_count - end - end - end - - def test_update_workload - # Create test objects. - 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 = {} - workload = {} - request_id = "hello world" - - update_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_workload update_mask: update_mask, workload: workload, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_workload ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_workload(::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workload_client_stub.call_count - end - end - end - - def test_delete_workload - # Create test objects. - 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_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workload({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workload name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_workload ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.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_workload({ 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_workload(::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.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_workload_client_stub.call_count - end - end - end - - def test_list_applications - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.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_applications_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_applications_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_applications_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_applications({ 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_applications 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_applications ::Google::Cloud::AppHub::V1::ListApplicationsRequest.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_applications({ 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_applications(::Google::Cloud::AppHub::V1::ListApplicationsRequest.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_applications_client_stub.call_count - end - end - end - - def test_create_application - # Create test objects. - 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" - application_id = "hello world" - application = {} - request_id = "hello world" - - create_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_application_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_application parent: parent, application_id: application_id, application: application, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_application ::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_application(::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_application_client_stub.call_count - end - end - end - - def test_get_application - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::Application.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_application_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_application({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_application name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_application ::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_application({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_application(::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_application_client_stub.call_count - end - end - end - - def test_update_application - # Create test objects. - 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 = {} - application = {} - request_id = "hello world" - - update_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_application_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_application({ update_mask: update_mask, application: application, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_application update_mask: update_mask, application: application, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_application ::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_application({ update_mask: update_mask, application: application, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_application(::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_application_client_stub.call_count - end - end - end - - def test_delete_application - # Create test objects. - 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_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_application_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_application({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_application name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_application ::Google::Cloud::AppHub::V1::DeleteApplicationRequest.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_application({ 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_application(::Google::Cloud::AppHub::V1::DeleteApplicationRequest.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_application_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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb deleted file mode 100644 index 2c384f85efa9..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb +++ /dev/null @@ -1,1865 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/apphub/v1/apphub_service_pb" -require "google/cloud/app_hub/v1/app_hub" - -class ::Google::Cloud::AppHub::V1::AppHub::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_lookup_service_project_attachment - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - lookup_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_service_project_attachment, name - assert_kind_of ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_service_project_attachment_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.lookup_service_project_attachment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.lookup_service_project_attachment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.lookup_service_project_attachment ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.lookup_service_project_attachment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.lookup_service_project_attachment(::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_service_project_attachment_client_stub.call_rpc_count - end - end - - def test_list_service_project_attachments - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_service_project_attachments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_project_attachments, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, 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_service_project_attachments_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_service_project_attachments({ 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_service_project_attachments 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_service_project_attachments ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.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_service_project_attachments({ 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_service_project_attachments(::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.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_service_project_attachments_client_stub.call_rpc_count - end - end - - def test_create_service_project_attachment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_project_attachment_id = "hello world" - service_project_attachment = {} - request_id = "hello world" - - create_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_project_attachment, name - assert_kind_of ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["service_project_attachment_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::ServiceProjectAttachment), request["service_project_attachment"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_project_attachment_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, 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_service_project_attachment parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, 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_service_project_attachment ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, 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_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, 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_service_project_attachment(::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, 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_service_project_attachment_client_stub.call_rpc_count - end - end - - def test_get_service_project_attachment - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_project_attachment, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_project_attachment_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service_project_attachment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service_project_attachment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service_project_attachment ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.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_project_attachment({ 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_project_attachment(::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(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_project_attachment_client_stub.call_rpc_count - end - end - - def test_delete_service_project_attachment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service_project_attachment, name - assert_kind_of ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_project_attachment_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_service_project_attachment({ 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_service_project_attachment 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_service_project_attachment ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.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_service_project_attachment({ 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_service_project_attachment(::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.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_service_project_attachment_client_stub.call_rpc_count - end - end - - def test_detach_service_project_attachment - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - detach_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :detach_service_project_attachment, name - assert_kind_of ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, detach_service_project_attachment_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.detach_service_project_attachment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.detach_service_project_attachment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.detach_service_project_attachment ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.detach_service_project_attachment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.detach_service_project_attachment(::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, detach_service_project_attachment_client_stub.call_rpc_count - end - end - - def test_list_discovered_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_discovered_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_discovered_services, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, 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_discovered_services_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_discovered_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_discovered_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_discovered_services ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.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_discovered_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_discovered_services(::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.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_discovered_services_client_stub.call_rpc_count - end - end - - def test_get_discovered_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::DiscoveredService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_discovered_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_discovered_service, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_discovered_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_discovered_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_discovered_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_discovered_service ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_discovered_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_discovered_service(::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(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_discovered_service_client_stub.call_rpc_count - end - end - - def test_lookup_discovered_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - uri = "hello world" - - lookup_discovered_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_discovered_service, name - assert_kind_of ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["uri"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_discovered_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.lookup_discovered_service({ parent: parent, uri: uri }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.lookup_discovered_service parent: parent, uri: uri do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.lookup_discovered_service ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.lookup_discovered_service({ parent: parent, uri: uri }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.lookup_discovered_service(::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_discovered_service_client_stub.call_rpc_count - end - end - - def test_list_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::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" - 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::AppHub::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"] - 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::AppHub::V1::AppHub::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::AppHub::V1::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::AppHub::V1::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_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. - parent = "hello world" - service_id = "hello world" - service = {} - request_id = "hello world" - - create_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service, name - assert_kind_of ::Google::Cloud::AppHub::V1::CreateServiceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["service_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Service), request["service"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service({ parent: parent, service_id: service_id, service: service, 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_service parent: parent, service_id: service_id, service: service, 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_service ::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, 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_service({ parent: parent, service_id: service_id, service: service, 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_service(::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, 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_service_client_stub.call_rpc_count - end - end - - def test_get_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::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::AppHub::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::AppHub::V1::AppHub::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::AppHub::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::AppHub::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_update_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. - update_mask = {} - service = {} - request_id = "hello world" - - update_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service, name - assert_kind_of ::Google::Cloud::AppHub::V1::UpdateServiceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Service), request["service"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_service({ update_mask: update_mask, service: service, 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_service update_mask: update_mask, service: service, 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_service ::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, 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_service({ update_mask: update_mask, service: service, 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_service(::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, 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_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. - name = "hello world" - request_id = "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::AppHub::V1::DeleteServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_service({ 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_service 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_service ::Google::Cloud::AppHub::V1::DeleteServiceRequest.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_service({ 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_service(::Google::Cloud::AppHub::V1::DeleteServiceRequest.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_service_client_stub.call_rpc_count - end - end - - def test_list_discovered_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_discovered_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_discovered_workloads, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, 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_discovered_workloads_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_discovered_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_discovered_workloads ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.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_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_discovered_workloads(::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.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_discovered_workloads_client_stub.call_rpc_count - end - end - - def test_get_discovered_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_discovered_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_discovered_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_discovered_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_discovered_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_discovered_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_discovered_workload ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_discovered_workload({ 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_discovered_workload(::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(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_discovered_workload_client_stub.call_rpc_count - end - end - - def test_lookup_discovered_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - uri = "hello world" - - lookup_discovered_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_discovered_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["uri"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_discovered_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.lookup_discovered_workload({ parent: parent, uri: uri }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.lookup_discovered_workload parent: parent, uri: uri do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.lookup_discovered_workload ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.lookup_discovered_workload({ parent: parent, uri: uri }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.lookup_discovered_workload(::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_discovered_workload_client_stub.call_rpc_count - end - end - - def test_list_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workloads, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListWorkloadsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workloads_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workloads ::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workloads(::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_workloads_client_stub.call_rpc_count - end - end - - def test_create_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workload_id = "hello world" - workload = {} - request_id = "hello world" - - create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::CreateWorkloadRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["workload_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Workload), request["workload"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_workload({ parent: parent, workload_id: workload_id, workload: workload, 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_workload parent: parent, workload_id: workload_id, workload: workload, 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_workload ::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, 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_workload({ parent: parent, workload_id: workload_id, workload: workload, 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_workload(::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, 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_workload_client_stub.call_rpc_count - end - end - - def test_get_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_workload ::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_workload({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_workload(::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_rpc_count - end - end - - def test_update_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - workload = {} - request_id = "hello world" - - update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Workload), request["workload"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_workload({ update_mask: update_mask, workload: workload, 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_workload update_mask: update_mask, workload: workload, 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_workload ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, 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_workload({ update_mask: update_mask, workload: workload, 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_workload(::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, 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_workload_client_stub.call_rpc_count - end - end - - def test_delete_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workload_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_workload({ 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_workload 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_workload ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.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_workload({ 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_workload(::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.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_workload_client_stub.call_rpc_count - end - end - - def test_list_applications - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_applications_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_applications, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListApplicationsRequest, 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_applications_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_applications({ 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_applications 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_applications ::Google::Cloud::AppHub::V1::ListApplicationsRequest.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_applications({ 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_applications(::Google::Cloud::AppHub::V1::ListApplicationsRequest.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_applications_client_stub.call_rpc_count - end - end - - def test_create_application - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - application_id = "hello world" - application = {} - request_id = "hello world" - - create_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_application, name - assert_kind_of ::Google::Cloud::AppHub::V1::CreateApplicationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["application_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Application), request["application"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_application_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_application({ parent: parent, application_id: application_id, application: application, 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_application parent: parent, application_id: application_id, application: application, 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_application ::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, 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_application({ parent: parent, application_id: application_id, application: application, 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_application(::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, 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_application_client_stub.call_rpc_count - end - end - - def test_get_application - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::Application.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_application, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetApplicationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_application_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_application({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_application name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_application ::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_application({ 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_application(::Google::Cloud::AppHub::V1::GetApplicationRequest.new(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_application_client_stub.call_rpc_count - end - end - - def test_update_application - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - application = {} - request_id = "hello world" - - update_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_application, name - assert_kind_of ::Google::Cloud::AppHub::V1::UpdateApplicationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Application), request["application"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_application_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_application({ update_mask: update_mask, application: application, 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_application update_mask: update_mask, application: application, 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_application ::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, 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_application({ update_mask: update_mask, application: application, 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_application(::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, 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_application_client_stub.call_rpc_count - end - end - - def test_delete_application - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_application, name - assert_kind_of ::Google::Cloud::AppHub::V1::DeleteApplicationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_application_client_stub do - # Create client - c = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_application({ 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_application 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_application ::Google::Cloud::AppHub::V1::DeleteApplicationRequest.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_application({ 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_application(::Google::Cloud::AppHub::V1::DeleteApplicationRequest.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_application_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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::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::AppHub::V1::AppHub::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::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::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-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-app_optimize-v1beta/.gitignore b/owl-bot-staging/google-cloud-app_optimize-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/.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-app_optimize-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-app_optimize-v1beta/.repo-metadata.json deleted file mode 100644 index 451ab3df8516..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "appoptimize.googleapis.com", - "api_shortname": "appoptimize", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-app_optimize-v1beta/latest", - "distribution_name": "google-cloud-app_optimize-v1beta", - "is_cloud": true, - "language": "ruby", - "name": "appoptimize", - "name_pretty": "App Optimize V1BETA API", - "product_documentation": "https://docs.cloud.google.com/app-optimize/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The App Optimize API provides developers and platform teams with tools to monitor, analyze, and improve the performance and cost-efficiency of their cloud applications. Note that google-cloud-app_optimize-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_optimize instead. See the readme for more details.", - "ruby-cloud-product-url": "https://docs.cloud.google.com/app-optimize/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-app_optimize-v1beta/.rubocop.yml deleted file mode 100644 index cef10eae53b2..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-app_optimize-v1beta.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-app_optimize-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/.toys.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/.yardopts b/owl-bot-staging/google-cloud-app_optimize-v1beta/.yardopts deleted file mode 100644 index 7780a8e335e4..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="App Optimize V1BETA API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-app_optimize-v1beta/AUTHENTICATION.md deleted file mode 100644 index 759293528403..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-app_optimize-v1beta library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-app_optimize-v1beta library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/appoptimize/v1beta" - -client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/appoptimize/v1beta" - -::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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-app_optimize-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/appoptimize/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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-app_optimize-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-app_optimize-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/Gemfile b/owl-bot-staging/google-cloud-app_optimize-v1beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/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-app_optimize-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-app_optimize-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/README.md b/owl-bot-staging/google-cloud-app_optimize-v1beta/README.md deleted file mode 100644 index 4d0bcfe397fc..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the App Optimize V1BETA API - -The App Optimize API provides developers and platform teams with tools to monitor, analyze, and improve the performance and cost-efficiency of their cloud applications. - -The App Optimize API provides developers and platform teams with tools to monitor, analyze, and improve the performance and cost-efficiency of their cloud applications. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the App Optimize V1BETA API. Most users should consider using -the main client gem, -[google-cloud-app_optimize](https://rubygems.org/gems/google-cloud-app_optimize). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-app_optimize-v1beta -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/appoptimize.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/appoptimize/v1beta" - -client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new -request = ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new # (request fields as keyword arguments...) -response = client.create_report request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-app_optimize-v1beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://docs.cloud.google.com/app-optimize/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/appoptimize/v1beta" -require "logger" - -client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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-app_optimize`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-app_optimize-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-app_optimize`. -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-app_optimize-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/Rakefile b/owl-bot-staging/google-cloud-app_optimize-v1beta/Rakefile deleted file mode 100644 index 0a42283e458a..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-app_optimize-v1beta acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/appoptimize/v1beta/app_optimize/credentials" - ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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-app_optimize-v1beta gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-app_optimize-v1beta gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-app_optimize-v1beta gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-app_optimize-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-app_optimize-v1beta" - header "google-cloud-app_optimize-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-app_optimize-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-app_optimize-v1beta test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-app_optimize-v1beta smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-app_optimize-v1beta acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-app_optimize-v1beta/gapic_metadata.json deleted file mode 100644 index 24aa39819243..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/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.appoptimize.v1beta", - "libraryPackage": "::Google::Cloud::Appoptimize::V1beta", - "services": { - "AppOptimize": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client", - "rpcs": { - "CreateReport": { - "methods": [ - "create_report" - ] - }, - "GetReport": { - "methods": [ - "get_report" - ] - }, - "ListReports": { - "methods": [ - "list_reports" - ] - }, - "DeleteReport": { - "methods": [ - "delete_report" - ] - }, - "ReadReport": { - "methods": [ - "read_report" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/google-cloud-app_optimize-v1beta.gemspec b/owl-bot-staging/google-cloud-app_optimize-v1beta/google-cloud-app_optimize-v1beta.gemspec deleted file mode 100644 index 49275d425a6d..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/google-cloud-app_optimize-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/app_optimize/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-app_optimize-v1beta" - gem.version = Google::Cloud::AppOptimize::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The App Optimize API provides developers and platform teams with tools to monitor, analyze, and improve the performance and cost-efficiency of their cloud applications. Note that google-cloud-app_optimize-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_optimize instead. See the readme for more details." - gem.summary = "The App Optimize API provides developers and platform teams with tools to monitor, analyze, and improve the performance and cost-efficiency of their cloud applications." - 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-app_optimize-v1beta/lib/google-cloud-app_optimize-v1beta.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google-cloud-app_optimize-v1beta.rb deleted file mode 100644 index a02f66ecebbb..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google-cloud-app_optimize-v1beta.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/appoptimize/v1beta" diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/app_optimize/v1beta/version.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/app_optimize/v1beta/version.rb deleted file mode 100644 index 0abbbe55b69f..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/app_optimize/v1beta/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppOptimize - module V1beta - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta.rb deleted file mode 100644 index b5abc495b3a7..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/appoptimize/v1beta/app_optimize" -require "google/cloud/app_optimize/v1beta/version" - -module Google - module Cloud - module Appoptimize - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/appoptimize/v1beta" - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/appoptimize/v1beta" - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - module V1beta - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/cloud/appoptimize/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize.rb deleted file mode 100644 index d7334f5d45c7..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize.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/app_optimize/v1beta/version" - -require "google/cloud/appoptimize/v1beta/app_optimize/credentials" -require "google/cloud/appoptimize/v1beta/app_optimize/paths" -require "google/cloud/appoptimize/v1beta/app_optimize/operations" -require "google/cloud/appoptimize/v1beta/app_optimize/client" -require "google/cloud/appoptimize/v1beta/app_optimize/rest" - -module Google - module Cloud - module Appoptimize - module V1beta - ## - # Service for managing and querying optimization reports. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/appoptimize/v1beta/app_optimize" - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/appoptimize/v1beta/app_optimize/rest" - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - module AppOptimize - end - end - end - end -end - -helper_path = ::File.join __dir__, "app_optimize", "helpers.rb" -require "google/cloud/appoptimize/v1beta/app_optimize/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/client.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/client.rb deleted file mode 100644 index 99e0330a174f..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/client.rb +++ /dev/null @@ -1,961 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/appoptimize/v1beta/app_optimize_pb" -require "google/cloud/location" - -module Google - module Cloud - module Appoptimize - module V1beta - module AppOptimize - ## - # Client for the AppOptimize service. - # - # Service for managing and querying optimization reports. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appoptimize.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_optimize_stub - - ## - # Configure the AppOptimize Client class. - # - # See {::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppOptimize clients - # ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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", "Appoptimize", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_report.timeout = 60.0 - - default_config.rpcs.get_report.timeout = 60.0 - default_config.rpcs.get_report.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_reports.timeout = 60.0 - default_config.rpcs.list_reports.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_report.timeout = 60.0 - - default_config.rpcs.read_report.timeout = 60.0 - default_config.rpcs.read_report.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 AppOptimize 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::Appoptimize::V1beta::AppOptimize::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 - @app_optimize_stub.universe_domain - end - - ## - # Create a new AppOptimize client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppOptimize 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/appoptimize/v1beta/app_optimize_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 - - @app_optimize_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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 - ) - - @app_optimize_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 = @app_optimize_stub.endpoint - config.universe_domain = @app_optimize_stub.universe_domain - config.logger = @app_optimize_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Appoptimize::V1beta::AppOptimize::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @app_optimize_stub.logger - end - - # Service calls - - ## - # Creates a new report. - # - # This initiates a long-running operation that, upon completion, results - # in a report resource. Once the report is created, its results can be read - # via `ReadReport`. - # - # @overload create_report(request, options = nil) - # Pass arguments to `create_report` via a request object, either of type - # {::Google::Cloud::Appoptimize::V1beta::CreateReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Appoptimize::V1beta::CreateReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_report(parent: nil, report_id: nil, report: nil) - # Pass arguments to `create_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 parent [::String] - # Required. The parent Google Cloud project that will own the report. - # - # This value does not define the scope of the report data. See `Report.scope` - # for setting the data scope. - # - # Format: `projects/{project}/locations/{location}`. - # @param report_id [::String] - # Required. The ID to use for this report. This ID must be unique within - # the parent project and should comply with RFC 1034 restrictions (letters, - # numbers, and hyphen, with the first character a letter, the last a letter - # or a number, and a 63 character maximum). - # @param report [::Google::Cloud::Appoptimize::V1beta::Report, ::Hash] - # Required. The report resource to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/appoptimize/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new - # - # # Call the create_report method. - # result = client.create_report request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest - - # Converts hash and nil to 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_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::AppOptimize::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_optimize_stub.call_rpc :create_report, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the details of a report configuration. - # - # @overload get_report(request, options = nil) - # Pass arguments to `get_report` via a request object, either of type - # {::Google::Cloud::Appoptimize::V1beta::GetReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Appoptimize::V1beta::GetReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_report(name: nil) - # Pass arguments to `get_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 name [::String] - # Required. The name of the report to retrieve. - # - # Format: `projects/{project}/locations/{location}/reports/{report_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Appoptimize::V1beta::Report] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Appoptimize::V1beta::Report] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/appoptimize/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Appoptimize::V1beta::GetReportRequest.new - # - # # Call the get_report method. - # result = client.get_report request - # - # # The returned object is of type Google::Cloud::Appoptimize::V1beta::Report. - # p result - # - def get_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::GetReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_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::AppOptimize::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_optimize_stub.call_rpc :get_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 - - ## - # Lists reports within a given project. - # - # @overload list_reports(request, options = nil) - # Pass arguments to `list_reports` via a request object, either of type - # {::Google::Cloud::Appoptimize::V1beta::ListReportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Appoptimize::V1beta::ListReportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_reports(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project whose reports are to be listed. - # - # Format: `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. The maximum number of reports to return. The service may return - # fewer than this value. If unspecified, the server will determine the number - # of results to return. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListReports` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListReports` 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::Appoptimize::V1beta::Report>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Appoptimize::V1beta::Report>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/appoptimize/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Appoptimize::V1beta::ListReportsRequest.new - # - # # Call the list_reports method. - # result = client.list_reports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Appoptimize::V1beta::Report. - # p item - # end - # - def list_reports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_reports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_reports.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_optimize_stub.call_rpc :list_reports, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_optimize_stub, :list_reports, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified report. - # - # @overload delete_report(request, options = nil) - # Pass arguments to `delete_report` via a request object, either of type - # {::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_report(name: nil, allow_missing: nil) - # Pass arguments to `delete_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 name [::String] - # Required. The name of the report to delete. - # - # Format: `projects/{project}/locations/{location}/reports/{report_id}`. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the report 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 [::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/appoptimize/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new - # - # # Call the delete_report method. - # result = client.delete_report request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest - - # Converts hash and nil to 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_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::AppOptimize::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_optimize_stub.call_rpc :delete_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 - - ## - # Reads data within a specified report. - # - # @overload read_report(request, options = nil) - # Pass arguments to `read_report` via a request object, either of type - # {::Google::Cloud::Appoptimize::V1beta::ReadReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Appoptimize::V1beta::ReadReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_report(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `read_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 name [::String] - # Required. The resource name of the report to query. - # - # Format: `projects/{project}/locations/{location}/reports/{report_id}`. - # @param page_size [::Integer] - # Optional. The maximum number of rows to return. The service may return - # fewer than this value. If unspecified, at most 10,000 rows will be returned - # per page. The maximum allowed value is 25,000; values above 25,000 are - # coerced to 25,000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ReadReport` call, to - # retrieve the subsequent page of results. When `page_token` is specified, - # `job_reference` must also be provided from the previous response, and the - # `statement` field must not be set. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Protobuf::ListValue>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Protobuf::ListValue>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/appoptimize/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Appoptimize::V1beta::ReadReportRequest.new - # - # # Call the read_report method. - # result = client.read_report request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Protobuf::ListValue. - # p item - # end - # - def read_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest - - # Converts hash and nil to 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_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::AppOptimize::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.read_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.read_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_optimize_stub.call_rpc :read_report, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_optimize_stub, :read_report, request, response, 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 AppOptimize API. - # - # This class represents the configuration for AppOptimize, - # providing control 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::Appoptimize::V1beta::AppOptimize::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_report to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_report.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_report.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Appoptimize::V1beta::AppOptimize::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 = "appoptimize.googleapis.com" - - config_attr :endpoint, nil, ::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 AppOptimize API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_report` - # @return [::Gapic::Config::Method] - # - attr_reader :create_report - ## - # RPC-specific configuration for `get_report` - # @return [::Gapic::Config::Method] - # - attr_reader :get_report - ## - # RPC-specific configuration for `list_reports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reports - ## - # RPC-specific configuration for `delete_report` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_report - ## - # RPC-specific configuration for `read_report` - # @return [::Gapic::Config::Method] - # - attr_reader :read_report - - # @private - def initialize parent_rpcs = nil - create_report_config = parent_rpcs.create_report if parent_rpcs.respond_to? :create_report - @create_report = ::Gapic::Config::Method.new create_report_config - get_report_config = parent_rpcs.get_report if parent_rpcs.respond_to? :get_report - @get_report = ::Gapic::Config::Method.new get_report_config - list_reports_config = parent_rpcs.list_reports if parent_rpcs.respond_to? :list_reports - @list_reports = ::Gapic::Config::Method.new list_reports_config - delete_report_config = parent_rpcs.delete_report if parent_rpcs.respond_to? :delete_report - @delete_report = ::Gapic::Config::Method.new delete_report_config - read_report_config = parent_rpcs.read_report if parent_rpcs.respond_to? :read_report - @read_report = ::Gapic::Config::Method.new read_report_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/credentials.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/credentials.rb deleted file mode 100644 index 27f2622b05f2..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/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 Appoptimize - module V1beta - module AppOptimize - # Credentials for the AppOptimize 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-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/operations.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/operations.rb deleted file mode 100644 index f1cb927af0c3..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/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 Appoptimize - module V1beta - module AppOptimize - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appoptimize.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppOptimize 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 AppOptimize 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::AppOptimize::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "appoptimize.googleapis.com" - - config_attr :endpoint, nil, ::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-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/paths.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/paths.rb deleted file mode 100644 index 41d0f0f5198f..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/paths.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Appoptimize - module V1beta - module AppOptimize - # Path helper methods for the AppOptimize API. - module Paths - ## - # Create a fully-qualified Application resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/applications/{application}` - # - # @param project [String] - # @param location [String] - # @param application [String] - # - # @return [::String] - def application_path project:, location:, application: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/applications/#{application}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified Report resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/reports/{report}` - # - # @param project [String] - # @param location [String] - # @param report [String] - # - # @return [::String] - def report_path project:, location:, report: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/reports/#{report}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest.rb deleted file mode 100644 index 56837bd0515e..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/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/app_optimize/v1beta/version" -require "google/cloud/appoptimize/v1beta/bindings_override" - -require "google/cloud/appoptimize/v1beta/app_optimize/credentials" -require "google/cloud/appoptimize/v1beta/app_optimize/paths" -require "google/cloud/appoptimize/v1beta/app_optimize/rest/operations" -require "google/cloud/appoptimize/v1beta/app_optimize/rest/client" - -module Google - module Cloud - module Appoptimize - module V1beta - ## - # Service for managing and querying optimization reports. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/appoptimize/v1beta/app_optimize/rest" - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - module AppOptimize - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/appoptimize/v1beta/app_optimize/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/client.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/client.rb deleted file mode 100644 index ba42e42adc07..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/client.rb +++ /dev/null @@ -1,891 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/appoptimize/v1beta/app_optimize_pb" -require "google/cloud/appoptimize/v1beta/app_optimize/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Appoptimize - module V1beta - module AppOptimize - module Rest - ## - # REST client for the AppOptimize service. - # - # Service for managing and querying optimization reports. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appoptimize.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_optimize_stub - - ## - # Configure the AppOptimize Client class. - # - # See {::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppOptimize clients - # ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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", "Appoptimize", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_report.timeout = 60.0 - - default_config.rpcs.get_report.timeout = 60.0 - default_config.rpcs.get_report.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_reports.timeout = 60.0 - default_config.rpcs.list_reports.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_report.timeout = 60.0 - - default_config.rpcs.read_report.timeout = 60.0 - default_config.rpcs.read_report.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 AppOptimize 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::Appoptimize::V1beta::AppOptimize::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 - @app_optimize_stub.universe_domain - end - - ## - # Create a new AppOptimize REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppOptimize 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::Appoptimize::V1beta::AppOptimize::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 - - @app_optimize_stub = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @app_optimize_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 = @app_optimize_stub.endpoint - config.universe_domain = @app_optimize_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @app_optimize_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @app_optimize_stub.logger - end - - # Service calls - - ## - # Creates a new report. - # - # This initiates a long-running operation that, upon completion, results - # in a report resource. Once the report is created, its results can be read - # via `ReadReport`. - # - # @overload create_report(request, options = nil) - # Pass arguments to `create_report` via a request object, either of type - # {::Google::Cloud::Appoptimize::V1beta::CreateReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Appoptimize::V1beta::CreateReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_report(parent: nil, report_id: nil, report: nil) - # Pass arguments to `create_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 parent [::String] - # Required. The parent Google Cloud project that will own the report. - # - # This value does not define the scope of the report data. See `Report.scope` - # for setting the data scope. - # - # Format: `projects/{project}/locations/{location}`. - # @param report_id [::String] - # Required. The ID to use for this report. This ID must be unique within - # the parent project and should comply with RFC 1034 restrictions (letters, - # numbers, and hyphen, with the first character a letter, the last a letter - # or a number, and a 63 character maximum). - # @param report [::Google::Cloud::Appoptimize::V1beta::Report, ::Hash] - # Required. The report resource to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/appoptimize/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new - # - # # Call the create_report method. - # result = client.create_report request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest - - # Converts hash and nil to an 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_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::AppOptimize::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_optimize_stub.create_report request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 the details of a report configuration. - # - # @overload get_report(request, options = nil) - # Pass arguments to `get_report` via a request object, either of type - # {::Google::Cloud::Appoptimize::V1beta::GetReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Appoptimize::V1beta::GetReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_report(name: nil) - # Pass arguments to `get_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 name [::String] - # Required. The name of the report to retrieve. - # - # Format: `projects/{project}/locations/{location}/reports/{report_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Appoptimize::V1beta::Report] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Appoptimize::V1beta::Report] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/appoptimize/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Appoptimize::V1beta::GetReportRequest.new - # - # # Call the get_report method. - # result = client.get_report request - # - # # The returned object is of type Google::Cloud::Appoptimize::V1beta::Report. - # p result - # - def get_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::GetReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_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::AppOptimize::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_optimize_stub.get_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 - - ## - # Lists reports within a given project. - # - # @overload list_reports(request, options = nil) - # Pass arguments to `list_reports` via a request object, either of type - # {::Google::Cloud::Appoptimize::V1beta::ListReportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Appoptimize::V1beta::ListReportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_reports(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project whose reports are to be listed. - # - # Format: `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. The maximum number of reports to return. The service may return - # fewer than this value. If unspecified, the server will determine the number - # of results to return. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListReports` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListReports` 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::Appoptimize::V1beta::Report>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Appoptimize::V1beta::Report>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/appoptimize/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Appoptimize::V1beta::ListReportsRequest.new - # - # # Call the list_reports method. - # result = client.list_reports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Appoptimize::V1beta::Report. - # p item - # end - # - def list_reports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_reports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_reports.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_optimize_stub.list_reports request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_optimize_stub, :list_reports, "reports", request, result, 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 specified report. - # - # @overload delete_report(request, options = nil) - # Pass arguments to `delete_report` via a request object, either of type - # {::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_report(name: nil, allow_missing: nil) - # Pass arguments to `delete_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 name [::String] - # Required. The name of the report to delete. - # - # Format: `projects/{project}/locations/{location}/reports/{report_id}`. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the report 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 [::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/appoptimize/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new - # - # # Call the delete_report method. - # result = client.delete_report request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest - - # Converts hash and nil to an 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_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::AppOptimize::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_optimize_stub.delete_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 - - ## - # Reads data within a specified report. - # - # @overload read_report(request, options = nil) - # Pass arguments to `read_report` via a request object, either of type - # {::Google::Cloud::Appoptimize::V1beta::ReadReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Appoptimize::V1beta::ReadReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_report(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `read_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 name [::String] - # Required. The resource name of the report to query. - # - # Format: `projects/{project}/locations/{location}/reports/{report_id}`. - # @param page_size [::Integer] - # Optional. The maximum number of rows to return. The service may return - # fewer than this value. If unspecified, at most 10,000 rows will be returned - # per page. The maximum allowed value is 25,000; values above 25,000 are - # coerced to 25,000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ReadReport` call, to - # retrieve the subsequent page of results. When `page_token` is specified, - # `job_reference` must also be provided from the previous response, and the - # `statement` field must not be set. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Protobuf::ListValue>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Protobuf::ListValue>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/appoptimize/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Appoptimize::V1beta::ReadReportRequest.new - # - # # Call the read_report method. - # result = client.read_report request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Protobuf::ListValue. - # p item - # end - # - def read_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.read_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::AppOptimize::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.read_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.read_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_optimize_stub.read_report request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_optimize_stub, :read_report, "rows", request, result, 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 AppOptimize REST API. - # - # This class represents the configuration for AppOptimize 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::Appoptimize::V1beta::AppOptimize::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_report to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_report.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_report.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "appoptimize.googleapis.com" - - config_attr :endpoint, nil, ::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 AppOptimize API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_report` - # @return [::Gapic::Config::Method] - # - attr_reader :create_report - ## - # RPC-specific configuration for `get_report` - # @return [::Gapic::Config::Method] - # - attr_reader :get_report - ## - # RPC-specific configuration for `list_reports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reports - ## - # RPC-specific configuration for `delete_report` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_report - ## - # RPC-specific configuration for `read_report` - # @return [::Gapic::Config::Method] - # - attr_reader :read_report - - # @private - def initialize parent_rpcs = nil - create_report_config = parent_rpcs.create_report if parent_rpcs.respond_to? :create_report - @create_report = ::Gapic::Config::Method.new create_report_config - get_report_config = parent_rpcs.get_report if parent_rpcs.respond_to? :get_report - @get_report = ::Gapic::Config::Method.new get_report_config - list_reports_config = parent_rpcs.list_reports if parent_rpcs.respond_to? :list_reports - @list_reports = ::Gapic::Config::Method.new list_reports_config - delete_report_config = parent_rpcs.delete_report if parent_rpcs.respond_to? :delete_report - @delete_report = ::Gapic::Config::Method.new delete_report_config - read_report_config = parent_rpcs.read_report if parent_rpcs.respond_to? :read_report - @read_report = ::Gapic::Config::Method.new read_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-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/operations.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/operations.rb deleted file mode 100644 index 305e2a4d98d2..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/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 Appoptimize - module V1beta - module AppOptimize - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appoptimize.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppOptimize 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 AppOptimize 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::AppOptimize::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppOptimize::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "appoptimize.googleapis.com" - - config_attr :endpoint, nil, ::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: "/v1beta/{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: "/v1beta/{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: "/v1beta/{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: "/v1beta/{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-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/service_stub.rb deleted file mode 100644 index 90b0d58b97ad..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize/rest/service_stub.rb +++ /dev/null @@ -1,388 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/appoptimize/v1beta/app_optimize_pb" - -module Google - module Cloud - module Appoptimize - module V1beta - module AppOptimize - module Rest - ## - # REST service stub for the AppOptimize 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_report REST call - # - # @param request_pb [::Google::Cloud::Appoptimize::V1beta::CreateReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_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: "create_report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_report REST call - # - # @param request_pb [::Google::Cloud::Appoptimize::V1beta::GetReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Appoptimize::V1beta::Report] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Appoptimize::V1beta::Report] - # A result object deserialized from the server's reply - def get_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_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: "get_report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Appoptimize::V1beta::Report.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_reports REST call - # - # @param request_pb [::Google::Cloud::Appoptimize::V1beta::ListReportsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Appoptimize::V1beta::ListReportsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Appoptimize::V1beta::ListReportsResponse] - # A result object deserialized from the server's reply - def list_reports request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reports_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_reports", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Appoptimize::V1beta::ListReportsResponse.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_report REST call - # - # @param request_pb [::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_report", - 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 read_report REST call - # - # @param request_pb [::Google::Cloud::Appoptimize::V1beta::ReadReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Appoptimize::V1beta::ReadReportResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Appoptimize::V1beta::ReadReportResponse] - # A result object deserialized from the server's reply - def read_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_read_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: "read_report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Appoptimize::V1beta::ReadReportResponse.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_report REST call - # - # @param request_pb [::Google::Cloud::Appoptimize::V1beta::CreateReportRequest] - # 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_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/reports", - body: "report", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_report REST call - # - # @param request_pb [::Google::Cloud::Appoptimize::V1beta::GetReportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reports REST call - # - # @param request_pb [::Google::Cloud::Appoptimize::V1beta::ListReportsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_reports_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/reports", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_report REST call - # - # @param request_pb [::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest] - # 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_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the read_report REST call - # - # @param request_pb [::Google::Cloud::Appoptimize::V1beta::ReadReportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_read_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:read", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_pb.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_pb.rb deleted file mode 100644 index cfd388e56b0b..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/appoptimize/v1beta/app_optimize.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/appoptimize/v1beta/app_optimize.proto\x12\x1fgoogle.cloud.appoptimize.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x01\n\x13\x43reateReportRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!appoptimize.googleapis.com/Report\x12\x16\n\treport_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\x06report\x18\x03 \x01(\x0b\x32\'.google.cloud.appoptimize.v1beta.ReportB\x03\xe0\x41\x02\"\xd5\x02\n\x06Report\x12\x36\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\ndimensions\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x14\n\x07metrics\x18\x07 \x03(\tB\x03\xe0\x41\x02\x12;\n\x06scopes\x18\x03 \x03(\x0b\x32&.google.cloud.appoptimize.v1beta.ScopeB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01:q\xea\x41n\n!appoptimize.googleapis.com/Report\x12\x38projects/{project}/locations/{location}/reports/{report}*\x07reports2\x06reportB\x0c\n\nexpiration\"\x9a\x01\n\x05Scope\x12\x46\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/ProjectH\x00\x12@\n\x0b\x61pplication\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!apphub.googleapis.com/ApplicationH\x00\x42\x07\n\x05scope\"K\n\x10GetReportRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!appoptimize.googleapis.com/Report\"\x80\x01\n\x12ListReportsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!appoptimize.googleapis.com/Report\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"h\n\x13ListReportsResponse\x12\x38\n\x07reports\x18\x01 \x03(\x0b\x32\'.google.cloud.appoptimize.v1beta.Report\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x13\x44\x65leteReportRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!appoptimize.googleapis.com/Report\x12\x1a\n\rallow_missing\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"}\n\x11ReadReportRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!appoptimize.googleapis.com/Report\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\"\x91\x01\n\x12ReadReportResponse\x12(\n\x04rows\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.ListValue\x12\x38\n\x07\x63olumns\x18\x05 \x03(\x0b\x32\'.google.cloud.appoptimize.v1beta.Column\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"l\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04mode\x18\x03 \x01(\t\x12\x38\n\x07\x63olumns\x18\x04 \x03(\x0b\x32\'.google.cloud.appoptimize.v1beta.Column\"\x13\n\x11OperationMetadata2\x82\x08\n\x0b\x41ppOptimize\x12\xdc\x01\n\x0c\x43reateReport\x12\x34.google.cloud.appoptimize.v1beta.CreateReportRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41\x1b\n\x06Report\x12\x11OperationMetadata\xda\x41\x17parent,report,report_id\x82\xd3\xe4\x93\x02\x39\"//v1beta/{parent=projects/*/locations/*}/reports:\x06report\x12\xa7\x01\n\tGetReport\x12\x31.google.cloud.appoptimize.v1beta.GetReportRequest\x1a\'.google.cloud.appoptimize.v1beta.Report\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1beta/{name=projects/*/locations/*/reports/*}\x12\xba\x01\n\x0bListReports\x12\x33.google.cloud.appoptimize.v1beta.ListReportsRequest\x1a\x34.google.cloud.appoptimize.v1beta.ListReportsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1beta/{parent=projects/*/locations/*}/reports\x12\x9c\x01\n\x0c\x44\x65leteReport\x12\x34.google.cloud.appoptimize.v1beta.DeleteReportRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1beta/{name=projects/*/locations/*/reports/*}\x12\xbd\x01\n\nReadReport\x12\x32.google.cloud.appoptimize.v1beta.ReadReportRequest\x1a\x33.google.cloud.appoptimize.v1beta.ReadReportResponse\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1beta/{name=projects/*/locations/*/reports/*}:read:\x01*\x1aN\xca\x41\x1a\x61ppoptimize.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\x02\n#com.google.cloud.appoptimize.v1betaB\x10\x41ppOptimizeProtoP\x01ZEcloud.google.com/go/appoptimize/apiv1beta/appoptimizepb;appoptimizepb\xaa\x02\x1fGoogle.Cloud.AppOptimize.V1Beta\xca\x02\x1fGoogle\\Cloud\\AppOptimize\\V1beta\xea\x41g\n!apphub.googleapis.com/Application\x12\x42projects/{project}/locations/{location}/applications/{application}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Appoptimize - module V1beta - CreateReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.CreateReportRequest").msgclass - Report = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.Report").msgclass - Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.Scope").msgclass - GetReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.GetReportRequest").msgclass - ListReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.ListReportsRequest").msgclass - ListReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.ListReportsResponse").msgclass - DeleteReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.DeleteReportRequest").msgclass - ReadReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.ReadReportRequest").msgclass - ReadReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.ReadReportResponse").msgclass - Column = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.Column").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.appoptimize.v1beta.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_services_pb.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_services_pb.rb deleted file mode 100644 index 13eb8e092e77..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/app_optimize_services_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/appoptimize/v1beta/app_optimize.proto for package 'google.cloud.appoptimize.v1beta' -# 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/appoptimize/v1beta/app_optimize_pb' - -module Google - module Cloud - module Appoptimize - module V1beta - module AppOptimize - # Service for managing and querying optimization reports. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.appoptimize.v1beta.AppOptimize' - - # Creates a new report. - # - # This initiates a long-running operation that, upon completion, results - # in a report resource. Once the report is created, its results can be read - # via `ReadReport`. - rpc :CreateReport, ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest, ::Google::Longrunning::Operation - # Retrieves the details of a report configuration. - rpc :GetReport, ::Google::Cloud::Appoptimize::V1beta::GetReportRequest, ::Google::Cloud::Appoptimize::V1beta::Report - # Lists reports within a given project. - rpc :ListReports, ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest, ::Google::Cloud::Appoptimize::V1beta::ListReportsResponse - # Deletes the specified report. - rpc :DeleteReport, ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest, ::Google::Protobuf::Empty - # Reads data within a specified report. - rpc :ReadReport, ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest, ::Google::Cloud::Appoptimize::V1beta::ReadReportResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/bindings_override.rb deleted file mode 100644 index ee4114f30e6e..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/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 Appoptimize - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/appoptimize/v1beta/rest" - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - module V1beta - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Appoptimize"] - 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: "/v1beta/{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: "/v1beta/{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-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/rest.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/rest.rb deleted file mode 100644 index 587079670723..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/lib/google/cloud/appoptimize/v1beta/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/appoptimize/v1beta/app_optimize/rest" -require "google/cloud/appoptimize/v1beta/bindings_override" -require "google/cloud/app_optimize/v1beta/version" - -module Google - module Cloud - module Appoptimize - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/appoptimize/v1beta/rest" - # client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new - # - module V1beta - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/README.md deleted file mode 100644 index 71d8f8395b0e..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# App Optimize V1BETA Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/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-app_optimize-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/cloud/appoptimize/v1beta/app_optimize.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/cloud/appoptimize/v1beta/app_optimize.rb deleted file mode 100644 index 2b2d77e4ce11..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/cloud/appoptimize/v1beta/app_optimize.rb +++ /dev/null @@ -1,328 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Appoptimize - module V1beta - # Request message for the `CreateReport` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent Google Cloud project that will own the report. - # - # This value does not define the scope of the report data. See `Report.scope` - # for setting the data scope. - # - # Format: `projects/{project}/locations/{location}`. - # @!attribute [rw] report_id - # @return [::String] - # Required. The ID to use for this report. This ID must be unique within - # the parent project and should comply with RFC 1034 restrictions (letters, - # numbers, and hyphen, with the first character a letter, the last a letter - # or a number, and a 63 character maximum). - # @!attribute [rw] report - # @return [::Google::Cloud::Appoptimize::V1beta::Report] - # Required. The report resource to create. - class CreateReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A configuration that defines the parameters for the data represented by a - # report. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp in UTC of when this report expires. Once the - # report expires, it will no longer be accessible and the report's - # underlying data will be deleted. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of this report. - # @!attribute [rw] dimensions - # @return [::Array<::String>] - # Required. A list of dimensions to include in the report. Supported values: - # - # * `project` - # * `application` - # * `service_or_workload` - # * `resource` - # * `resource_type` - # * `location` - # * `product_display_name` - # * `sku` - # * `month` - # * `day` - # * `hour` - # - # To aggregate results by time, specify at least one time dimension - # (`month`, `day`, or `hour`). All time dimensions use Pacific Time, - # respect Daylight Saving Time (DST), and follow these ISO 8601 formats: - # - # * `month`: `YYYY-MM` (e.g., `2024-01`) - # * `day`: `YYYY-MM-DD` (e.g., `2024-01-10`) - # * `hour`: `YYYY-MM-DDTHH` (e.g., `2024-01-10T00`) - # - # If the time range filter does not align with the selected time dimension, - # the range is expanded to encompass the full period of the finest-grained - # time dimension. - # - # For example, if the filter is `2026-01-10` through `2026-01-12` and the - # `month` dimension is selected, the effective time range expands to include - # all of January (`2026-01-01` to `2026-02-01`). - # @!attribute [rw] metrics - # @return [::Array<::String>] - # Required. A list of metrics to include in the report. Supported values: - # - # * `cost` - # * `cpu_mean_utilization` - # * `cpu_usage_core_seconds` - # * `cpu_allocation_core_seconds` - # * `cpu_p95_utilization` - # * `memory_mean_utilization` - # * `memory_usage_byte_seconds` - # * `memory_allocation_byte_seconds` - # * `memory_p95_utilization` - # @!attribute [rw] scopes - # @return [::Array<::Google::Cloud::Appoptimize::V1beta::Scope>] - # Optional. The resource containers for which to fetch data. Default is the - # project specified in the report's parent. - # @!attribute [rw] filter - # @return [::String] - # Optional. A Common Expression Language (CEL) expression used to filter the - # data for the report. - # - # Predicates may refer to any dimension. Filtering must conform to these - # constraints: - # - # * All string field predicates must use exact string matches. - # * Multiple predicates referring to the same string field must be joined - # using the logical OR operator ('||'). - # * All other predicates must be joined using the logical AND operator - # (`&&`). - # * A predicate on a time dimension (e.g., `day`) specifying the start time - # must use a greater-than-or-equal-to comparison (`>=`). - # * A predicate on a time dimension specifying the end time must use a - # less-than comparison (`<`). - # - # Examples: - # - # 1. Filter by a specific resource type: - # `"resource_type == 'compute.googleapis.com/Instance'"` - # - # 2. Filter data points that fall within a specific absolute time interval: - # `"hour >= timestamp('2024-01-01T00:00:00Z') && - # hour < timestamp('2024-02-01T00:00:00Z')"` - # - # 3. Filter data points that fall within the past 72 hours: - # `"hour >= now - duration('72h')"` - # - # 4. Combine string predicate with time interval predicate: - # `"(location == 'us-east1' || location == 'us-west1') && - # hour >= timestamp('2023-12-01T00:00:00Z') && - # hour < timestamp('2024-02-01T00:00:00Z')"` - # - # If the filter omits time dimensions (`month`, `day`, `hour`), the report - # defaults to a 7-day range ending at the previous Pacific Time midnight, - # with Daylight Saving Time (DST) applied. - # - # For example, if the current Pacific Time is `2026-01-05T12:00:00`, - # the default range is `2025-12-29T00:00:00` to `2026-01-05T00:00:00` Pacific - # time. - class Report - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the report scope. - # @!attribute [rw] project - # @return [::String] - # Required. A Google Cloud Platform project to fetch data from. - # - # Format: `"projects/{project}"`. - # - # Note: The following fields are mutually exclusive: `project`, `application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] application - # @return [::String] - # Required. An App Hub Application to fetch data from. - # - # Format: - # `"projects/{project}/locations/{location}/applications/{application}"`. - # - # Note: The following fields are mutually exclusive: `application`, `project`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Scope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetReport` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the report to retrieve. - # - # Format: `projects/{project}/locations/{location}/reports/{report_id}`. - class GetReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListReports` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent project whose reports are to be listed. - # - # Format: `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of reports to return. The service may return - # fewer than this value. If unspecified, the server will determine the number - # of results to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListReports` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListReports` must match - # the call that provided the page token. - class ListReportsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListReports` method. - # @!attribute [rw] reports - # @return [::Array<::Google::Cloud::Appoptimize::V1beta::Report>] - # The list of reports. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is empty, there are no subsequent pages. - class ListReportsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteReport` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the report to delete. - # - # Format: `projects/{project}/locations/{location}/reports/{report_id}`. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the report is not found, the request will - # succeed but no action will be taken on the server. - class DeleteReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ReadReport` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the report to query. - # - # Format: `projects/{project}/locations/{location}/reports/{report_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of rows to return. The service may return - # fewer than this value. If unspecified, at most 10,000 rows will be returned - # per page. The maximum allowed value is 25,000; values above 25,000 are - # coerced to 25,000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ReadReport` call, to - # retrieve the subsequent page of results. When `page_token` is specified, - # `job_reference` must also be provided from the previous response, and the - # `statement` field must not be set. - class ReadReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ReadReport` method. - # @!attribute [rw] rows - # @return [::Array<::Google::Protobuf::ListValue>] - # A list of rows, where each row represents a record from the report. - # @!attribute [rw] columns - # @return [::Array<::Google::Cloud::Appoptimize::V1beta::Column>] - # The columns describing the structure of the data in the `rows` field. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` in a subsequent `ReadReport` - # request to retrieve the next page of results. If this field is empty, - # there are no further pages. - class ReadReportResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a single column within `Columns`. - # @!attribute [rw] name - # @return [::String] - # The name of the column. - # - # This field: - # - # * Contains only letters (a-z, A-Z), numbers (0-9), or underscores (_); - # * Start with a letter or underscore; and - # * Has a maximum length is 128 characters. - # @!attribute [rw] type - # @return [::String] - # The data type of the column. - # - # Supported values include: - # - # * `STRING` - # * `INT64` - # * `FLOAT64` - # * `BOOLEAN` - # * `TIMESTAMP` - # * `RECORD` - # - # `RECORD` indicates that the field contains a nested schema, described in - # the `columns` property of this `Column`. - # @!attribute [rw] mode - # @return [::String] - # The mode of the column, indicating if it is nullable, required, or - # repeated. - # - # Possible values: - # - # * `NULLABLE`: The column allows NULL values. - # * `REQUIRED`: The column does not allow NULL values. - # * `REPEATED`: The column contains an array of values. - # @!attribute [rw] columns - # @return [::Array<::Google::Cloud::Appoptimize::V1beta::Column>] - # If the `type` of this column is `RECORD`, this sub-field describes the - # nested structure. - class Column - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents metadata related to the creation of a Report. This value is - # embedded in the Operation object returned by `CreateReport`. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/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-app_optimize-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/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-app_optimize-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/Gemfile deleted file mode 100644 index 2c0512ca2148..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-app_optimize-v1beta", path: "../" -else - gem "google-cloud-app_optimize-v1beta" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/create_report.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/create_report.rb deleted file mode 100644 index dc5e43ddb229..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/create_report.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 appoptimize_v1beta_generated_AppOptimize_CreateReport_sync] -require "google/cloud/appoptimize/v1beta" - -## -# Snippet for the create_report call in the AppOptimize service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#create_report. -# -def create_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new - - # Call the create_report method. - result = client.create_report request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appoptimize_v1beta_generated_AppOptimize_CreateReport_sync] diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/delete_report.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/delete_report.rb deleted file mode 100644 index fee89a232e20..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/delete_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 appoptimize_v1beta_generated_AppOptimize_DeleteReport_sync] -require "google/cloud/appoptimize/v1beta" - -## -# Snippet for the delete_report call in the AppOptimize service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#delete_report. -# -def delete_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new - - # Call the delete_report method. - result = client.delete_report request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END appoptimize_v1beta_generated_AppOptimize_DeleteReport_sync] diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/get_report.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/get_report.rb deleted file mode 100644 index e9b4e8f3bbb7..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/get_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 appoptimize_v1beta_generated_AppOptimize_GetReport_sync] -require "google/cloud/appoptimize/v1beta" - -## -# Snippet for the get_report call in the AppOptimize service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#get_report. -# -def get_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Appoptimize::V1beta::GetReportRequest.new - - # Call the get_report method. - result = client.get_report request - - # The returned object is of type Google::Cloud::Appoptimize::V1beta::Report. - p result -end -# [END appoptimize_v1beta_generated_AppOptimize_GetReport_sync] diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/list_reports.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/list_reports.rb deleted file mode 100644 index fb336c8936a2..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/list_reports.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 appoptimize_v1beta_generated_AppOptimize_ListReports_sync] -require "google/cloud/appoptimize/v1beta" - -## -# Snippet for the list_reports call in the AppOptimize service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#list_reports. -# -def list_reports - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Appoptimize::V1beta::ListReportsRequest.new - - # Call the list_reports method. - result = client.list_reports request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Appoptimize::V1beta::Report. - p item - end -end -# [END appoptimize_v1beta_generated_AppOptimize_ListReports_sync] diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/read_report.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/read_report.rb deleted file mode 100644 index fddb352df0f8..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/app_optimize/read_report.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 appoptimize_v1beta_generated_AppOptimize_ReadReport_sync] -require "google/cloud/appoptimize/v1beta" - -## -# Snippet for the read_report call in the AppOptimize service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#read_report. -# -def read_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Appoptimize::V1beta::ReadReportRequest.new - - # Call the read_report method. - result = client.read_report request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Protobuf::ListValue. - p item - end -end -# [END appoptimize_v1beta_generated_AppOptimize_ReadReport_sync] diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/snippet_metadata_google.cloud.appoptimize.v1beta.json b/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/snippet_metadata_google.cloud.appoptimize.v1beta.json deleted file mode 100644 index fe71ae2fae2c..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/snippets/snippet_metadata_google.cloud.appoptimize.v1beta.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-app_optimize-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.appoptimize.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "appoptimize_v1beta_generated_AppOptimize_CreateReport_sync", - "title": "Snippet for the create_report call in the AppOptimize service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#create_report.", - "file": "app_optimize/create_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_report", - "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#create_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Appoptimize::V1beta::CreateReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppOptimize::Client", - "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client" - }, - "method": { - "short_name": "CreateReport", - "full_name": "google.cloud.appoptimize.v1beta.AppOptimize.CreateReport", - "service": { - "short_name": "AppOptimize", - "full_name": "google.cloud.appoptimize.v1beta.AppOptimize" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appoptimize_v1beta_generated_AppOptimize_GetReport_sync", - "title": "Snippet for the get_report call in the AppOptimize service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#get_report.", - "file": "app_optimize/get_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_report", - "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#get_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Appoptimize::V1beta::GetReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Appoptimize::V1beta::Report", - "client": { - "short_name": "AppOptimize::Client", - "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client" - }, - "method": { - "short_name": "GetReport", - "full_name": "google.cloud.appoptimize.v1beta.AppOptimize.GetReport", - "service": { - "short_name": "AppOptimize", - "full_name": "google.cloud.appoptimize.v1beta.AppOptimize" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appoptimize_v1beta_generated_AppOptimize_ListReports_sync", - "title": "Snippet for the list_reports call in the AppOptimize service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#list_reports.", - "file": "app_optimize/list_reports.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reports", - "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#list_reports", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Appoptimize::V1beta::ListReportsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Appoptimize::V1beta::ListReportsResponse", - "client": { - "short_name": "AppOptimize::Client", - "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client" - }, - "method": { - "short_name": "ListReports", - "full_name": "google.cloud.appoptimize.v1beta.AppOptimize.ListReports", - "service": { - "short_name": "AppOptimize", - "full_name": "google.cloud.appoptimize.v1beta.AppOptimize" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "appoptimize_v1beta_generated_AppOptimize_DeleteReport_sync", - "title": "Snippet for the delete_report call in the AppOptimize service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#delete_report.", - "file": "app_optimize/delete_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_report", - "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#delete_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AppOptimize::Client", - "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client" - }, - "method": { - "short_name": "DeleteReport", - "full_name": "google.cloud.appoptimize.v1beta.AppOptimize.DeleteReport", - "service": { - "short_name": "AppOptimize", - "full_name": "google.cloud.appoptimize.v1beta.AppOptimize" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appoptimize_v1beta_generated_AppOptimize_ReadReport_sync", - "title": "Snippet for the read_report call in the AppOptimize service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#read_report.", - "file": "app_optimize/read_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "read_report", - "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client#read_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Appoptimize::V1beta::ReadReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Appoptimize::V1beta::ReadReportResponse", - "client": { - "short_name": "AppOptimize::Client", - "full_name": "::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client" - }, - "method": { - "short_name": "ReadReport", - "full_name": "google.cloud.appoptimize.v1beta.AppOptimize.ReadReport", - "service": { - "short_name": "AppOptimize", - "full_name": "google.cloud.appoptimize.v1beta.AppOptimize" - } - } - }, - "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-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_operations_test.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_operations_test.rb deleted file mode 100644 index 06fe20fdf7d6..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_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/appoptimize/v1beta/app_optimize_pb" -require "google/cloud/appoptimize/v1beta/app_optimize_services_pb" -require "google/cloud/appoptimize/v1beta/app_optimize" - -class ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_paths_test.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_paths_test.rb deleted file mode 100644 index 43160d2524b3..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_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/appoptimize/v1beta/app_optimize" - -class ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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_application_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.application_path project: "value0", location: "value1", application: "value2" - assert_equal "projects/value0/locations/value1/applications/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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_report_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.report_path project: "value0", location: "value1", report: "value2" - assert_equal "projects/value0/locations/value1/reports/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_rest_test.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_rest_test.rb deleted file mode 100644 index 5b2558d2957c..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_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/appoptimize/v1beta/app_optimize_pb" -require "google/cloud/appoptimize/v1beta/app_optimize/rest" - - -class ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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_report - # Create test objects. - 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" - report_id = "hello world" - report = {} - - create_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::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.stub :transcode_create_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_report_client_stub do - # Create client - c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_report({ parent: parent, report_id: report_id, report: report }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_report parent: parent, report_id: report_id, report: report do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_report ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new(parent: parent, report_id: report_id, report: report) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_report({ parent: parent, report_id: report_id, report: report }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_report(::Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new(parent: parent, report_id: report_id, report: report), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_report_client_stub.call_count - end - end - end - - def test_get_report - # Create test objects. - client_result = ::Google::Cloud::Appoptimize::V1beta::Report.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_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::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.stub :transcode_get_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_report_client_stub do - # Create client - c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_report({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_report name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_report ::Google::Cloud::Appoptimize::V1beta::GetReportRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_report({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_report(::Google::Cloud::Appoptimize::V1beta::GetReportRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_report_client_stub.call_count - end - end - end - - def test_list_reports - # Create test objects. - client_result = ::Google::Cloud::Appoptimize::V1beta::ListReportsResponse.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_reports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.stub :transcode_list_reports_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reports_client_stub do - # Create client - c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_reports({ 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_reports 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_reports ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest.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_reports({ 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_reports(::Google::Cloud::Appoptimize::V1beta::ListReportsRequest.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_reports_client_stub.call_count - end - end - end - - def test_delete_report - # 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" - allow_missing = true - - delete_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::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.stub :transcode_delete_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_report_client_stub do - # Create client - c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_report({ name: name, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_report name: name, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_report ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.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_report({ 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_report(::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.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_report_client_stub.call_count - end - end - end - - def test_read_report - # Create test objects. - client_result = ::Google::Cloud::Appoptimize::V1beta::ReadReportResponse.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" - - read_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::Appoptimize::V1beta::AppOptimize::Rest::ServiceStub.stub :transcode_read_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, read_report_client_stub do - # Create client - c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.read_report({ 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.read_report 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.read_report ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest.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.read_report({ 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.read_report(::Google::Cloud::Appoptimize::V1beta::ReadReportRequest.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, read_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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_test.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_test.rb deleted file mode 100644 index 3acd8031999b..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/google/cloud/appoptimize/v1beta/app_optimize_test.rb +++ /dev/null @@ -1,437 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/appoptimize/v1beta/app_optimize_pb" -require "google/cloud/appoptimize/v1beta/app_optimize" - -class ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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_report - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - report_id = "hello world" - report = {} - - create_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_report, name - assert_kind_of ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["report_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Appoptimize::V1beta::Report), request["report"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_report_client_stub do - # Create client - c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_report({ parent: parent, report_id: report_id, report: report }) do |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_report parent: parent, report_id: report_id, report: report do |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_report ::Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new(parent: parent, report_id: report_id, report: report) do |response, operation| - 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_report({ parent: parent, report_id: report_id, report: report }, grpc_options) do |response, operation| - 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_report(::Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new(parent: parent, report_id: report_id, report: report), grpc_options) do |response, operation| - assert_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_report_client_stub.call_rpc_count - end - end - - def test_get_report - # Create GRPC objects. - grpc_response = ::Google::Cloud::Appoptimize::V1beta::Report.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_report, name - assert_kind_of ::Google::Cloud::Appoptimize::V1beta::GetReportRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_report_client_stub do - # Create client - c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_report({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_report name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_report ::Google::Cloud::Appoptimize::V1beta::GetReportRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_report({ 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_report(::Google::Cloud::Appoptimize::V1beta::GetReportRequest.new(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_report_client_stub.call_rpc_count - end - end - - def test_list_reports - # Create GRPC objects. - grpc_response = ::Google::Cloud::Appoptimize::V1beta::ListReportsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_reports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reports, name - assert_kind_of ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest, 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_reports_client_stub do - # Create client - c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_reports({ parent: parent, page_size: page_size, page_token: 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_reports parent: parent, page_size: page_size, page_token: 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_reports ::Google::Cloud::Appoptimize::V1beta::ListReportsRequest.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_reports({ 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_reports(::Google::Cloud::Appoptimize::V1beta::ListReportsRequest.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_reports_client_stub.call_rpc_count - end - end - - def test_delete_report - # 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" - allow_missing = true - - delete_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_report, name - assert_kind_of ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_report_client_stub do - # Create client - c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_report({ name: name, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_report name: name, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_report ::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new(name: name, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_report({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_report(::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_report_client_stub.call_rpc_count - end - end - - def test_read_report - # Create GRPC objects. - grpc_response = ::Google::Cloud::Appoptimize::V1beta::ReadReportResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - read_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :read_report, name - assert_kind_of ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest, 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, read_report_client_stub do - # Create client - c = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.read_report({ 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.read_report 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.read_report ::Google::Cloud::Appoptimize::V1beta::ReadReportRequest.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.read_report({ 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.read_report(::Google::Cloud::Appoptimize::V1beta::ReadReportRequest.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, read_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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Appoptimize::V1beta::AppOptimize::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::Appoptimize::V1beta::AppOptimize::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-app_optimize-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-app_optimize-v1beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-app_optimize-v1beta/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-artifact_registry-v1/.gitignore b/owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json deleted file mode 100644 index b7c7a7f45d14..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "artifactregistry.googleapis.com", - "api_shortname": "artifactregistry", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest", - "distribution_name": "google-cloud-artifact_registry-v1", - "is_cloud": true, - "language": "ruby", - "name": "artifactregistry", - "name_pretty": "Artifact Registry V1 API", - "product_documentation": "https://cloud.google.com/artifact-registry/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details.", - "ruby-cloud-env-prefix": "ARTIFACT_REGISTRY", - "ruby-cloud-product-url": "https://cloud.google.com/artifact-registry/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml b/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml deleted file mode 100644 index de96e2618870..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-artifact_registry-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-artifact_registry-v1.rb" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/.yardopts b/owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts deleted file mode 100644 index 79e1614b4868..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Artifact Registry 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-artifact_registry-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md deleted file mode 100644 index 1ae5019e3c04..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-artifact_registry-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-artifact_registry-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/artifact_registry/v1" - -client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/artifact_registry/v1" - -::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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-artifact_registry-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/artifact_registry/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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-artifact_registry-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/LICENSE.md b/owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1/README.md deleted file mode 100644 index 445805f41ecc..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Artifact Registry V1 API - -Store and manage build artifacts in a scalable and integrated service built on Google infrastructure. - -Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Artifact Registry V1 API. Most users should consider using -the main client gem, -[google-cloud-artifact_registry](https://rubygems.org/gems/google-cloud-artifact_registry). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-artifact_registry-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/artifactregistry.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/artifact_registry/v1" - -client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new -request = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new # (request fields as keyword arguments...) -response = client.list_docker_images request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/artifact-registry/) -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/artifact_registry/v1" -require "logger" - -client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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-artifact_registry`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-artifact_registry-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-artifact_registry`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-artifact_registry-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile b/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile deleted file mode 100644 index 4148fa14709c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ARTIFACT_REGISTRY_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ARTIFACT_REGISTRY_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 ARTIFACT_REGISTRY_TEST_PROJECT=test123 ARTIFACT_REGISTRY_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/artifact_registry/v1/artifact_registry/credentials" - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ARTIFACT_REGISTRY_PROJECT"] = project - ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] = project - ENV["ARTIFACT_REGISTRY_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-artifact_registry-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-artifact_registry-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-artifact_registry-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-artifact_registry-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-artifact_registry-v1" - header "google-cloud-artifact_registry-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-artifact_registry-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-artifact_registry-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-artifact_registry-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-artifact_registry-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-artifact_registry-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json deleted file mode 100644 index 02e8cf3c04bd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.devtools.artifactregistry.v1", - "libraryPackage": "::Google::Cloud::ArtifactRegistry::V1", - "services": { - "ArtifactRegistry": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client", - "rpcs": { - "ListDockerImages": { - "methods": [ - "list_docker_images" - ] - }, - "GetDockerImage": { - "methods": [ - "get_docker_image" - ] - }, - "ListMavenArtifacts": { - "methods": [ - "list_maven_artifacts" - ] - }, - "GetMavenArtifact": { - "methods": [ - "get_maven_artifact" - ] - }, - "ListNpmPackages": { - "methods": [ - "list_npm_packages" - ] - }, - "GetNpmPackage": { - "methods": [ - "get_npm_package" - ] - }, - "ListPythonPackages": { - "methods": [ - "list_python_packages" - ] - }, - "GetPythonPackage": { - "methods": [ - "get_python_package" - ] - }, - "ImportAptArtifacts": { - "methods": [ - "import_apt_artifacts" - ] - }, - "ImportYumArtifacts": { - "methods": [ - "import_yum_artifacts" - ] - }, - "ListRepositories": { - "methods": [ - "list_repositories" - ] - }, - "GetRepository": { - "methods": [ - "get_repository" - ] - }, - "CreateRepository": { - "methods": [ - "create_repository" - ] - }, - "UpdateRepository": { - "methods": [ - "update_repository" - ] - }, - "DeleteRepository": { - "methods": [ - "delete_repository" - ] - }, - "ListPackages": { - "methods": [ - "list_packages" - ] - }, - "GetPackage": { - "methods": [ - "get_package" - ] - }, - "DeletePackage": { - "methods": [ - "delete_package" - ] - }, - "ListVersions": { - "methods": [ - "list_versions" - ] - }, - "GetVersion": { - "methods": [ - "get_version" - ] - }, - "DeleteVersion": { - "methods": [ - "delete_version" - ] - }, - "BatchDeleteVersions": { - "methods": [ - "batch_delete_versions" - ] - }, - "UpdateVersion": { - "methods": [ - "update_version" - ] - }, - "ListFiles": { - "methods": [ - "list_files" - ] - }, - "GetFile": { - "methods": [ - "get_file" - ] - }, - "DeleteFile": { - "methods": [ - "delete_file" - ] - }, - "UpdateFile": { - "methods": [ - "update_file" - ] - }, - "ListTags": { - "methods": [ - "list_tags" - ] - }, - "GetTag": { - "methods": [ - "get_tag" - ] - }, - "CreateTag": { - "methods": [ - "create_tag" - ] - }, - "UpdateTag": { - "methods": [ - "update_tag" - ] - }, - "DeleteTag": { - "methods": [ - "delete_tag" - ] - }, - "CreateRule": { - "methods": [ - "create_rule" - ] - }, - "ListRules": { - "methods": [ - "list_rules" - ] - }, - "GetRule": { - "methods": [ - "get_rule" - ] - }, - "UpdateRule": { - "methods": [ - "update_rule" - ] - }, - "DeleteRule": { - "methods": [ - "delete_rule" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "GetProjectSettings": { - "methods": [ - "get_project_settings" - ] - }, - "UpdateProjectSettings": { - "methods": [ - "update_project_settings" - ] - }, - "GetVPCSCConfig": { - "methods": [ - "get_vpcsc_config" - ] - }, - "UpdateVPCSCConfig": { - "methods": [ - "update_vpcsc_config" - ] - }, - "UpdatePackage": { - "methods": [ - "update_package" - ] - }, - "ListAttachments": { - "methods": [ - "list_attachments" - ] - }, - "GetAttachment": { - "methods": [ - "get_attachment" - ] - }, - "CreateAttachment": { - "methods": [ - "create_attachment" - ] - }, - "DeleteAttachment": { - "methods": [ - "delete_attachment" - ] - }, - "ExportArtifact": { - "methods": [ - "export_artifact" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec b/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec deleted file mode 100644 index 47c7a5a724a4..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/artifact_registry/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-artifact_registry-v1" - gem.version = Google::Cloud::ArtifactRegistry::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details." - gem.summary = "Store and manage build artifacts in a scalable and integrated service built on Google 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" - 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-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb deleted file mode 100644 index 81605be80ce5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-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/artifact_registry/v1" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb deleted file mode 100644 index 0fa4b7bfbe28..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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/artifact_registry/v1/artifact_registry" -require "google/cloud/artifact_registry/v1/version" - -module Google - module Cloud - module ArtifactRegistry - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/artifact_registry/v1" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/artifact_registry/v1" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/artifact_registry/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb deleted file mode 100644 index ee43fe7eedff..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/artifact_registry/v1/version" - -require "google/cloud/artifact_registry/v1/artifact_registry/credentials" -require "google/cloud/artifact_registry/v1/artifact_registry/paths" -require "google/cloud/artifact_registry/v1/artifact_registry/operations" -require "google/cloud/artifact_registry/v1/artifact_registry/client" -require "google/cloud/artifact_registry/v1/artifact_registry/rest" - -module Google - module Cloud - module ArtifactRegistry - module V1 - ## - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/artifact_registry/v1/artifact_registry" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/artifact_registry/v1/artifact_registry/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - module ArtifactRegistry - end - end - end - end -end - -helper_path = ::File.join __dir__, "artifact_registry", "helpers.rb" -require "google/cloud/artifact_registry/v1/artifact_registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb deleted file mode 100644 index e71cc0cd853d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +++ /dev/null @@ -1,5574 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/devtools/artifactregistry/v1/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - ## - # Client for the ArtifactRegistry service. - # - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :artifact_registry_stub - - ## - # Configure the ArtifactRegistry Client class. - # - # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ArtifactRegistry clients - # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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", "ArtifactRegistry", "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 ArtifactRegistry 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::ArtifactRegistry::V1::ArtifactRegistry::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 - @artifact_registry_stub.universe_domain - end - - ## - # Create a new ArtifactRegistry client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ArtifactRegistry client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/devtools/artifactregistry/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 - - @artifact_registry_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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 - ) - - @artifact_registry_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 = @artifact_registry_stub.endpoint - config.universe_domain = @artifact_registry_stub.universe_domain - config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @artifact_registry_stub.logger - end - - # Service calls - - ## - # Lists docker images. - # - # @overload list_docker_images(request, options = nil) - # Pass arguments to `list_docker_images` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_docker_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose docker images will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param order_by [::String] - # The field to order the results by. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new - # - # # Call the list_docker_images method. - # result = client.list_docker_images request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. - # p item - # end - # - def list_docker_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_docker_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_docker_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_docker_images, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, request, response, 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 docker image. - # - # @overload get_docker_image(request, options = nil) - # Pass arguments to `get_docker_image` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_docker_image(name: nil) - # Pass arguments to `get_docker_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 docker images. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new - # - # # Call the get_docker_image method. - # result = client.get_docker_image request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. - # p result - # - def get_docker_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_docker_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_docker_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_docker_image, request, 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 maven artifacts. - # - # @overload list_maven_artifacts(request, options = nil) - # Pass arguments to `list_maven_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_maven_artifacts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_maven_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose maven artifacts will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new - # - # # Call the list_maven_artifacts method. - # result = client.list_maven_artifacts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - # p item - # end - # - def list_maven_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_maven_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_maven_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_maven_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_maven_artifacts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, request, response, 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 maven artifact. - # - # @overload get_maven_artifact(request, options = nil) - # Pass arguments to `get_maven_artifact` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_maven_artifact(name: nil) - # Pass arguments to `get_maven_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 maven artifact. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new - # - # # Call the get_maven_artifact method. - # result = client.get_maven_artifact request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - # p result - # - def get_maven_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_maven_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_maven_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_maven_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_maven_artifact, request, 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 npm packages. - # - # @overload list_npm_packages(request, options = nil) - # Pass arguments to `list_npm_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_npm_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_npm_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose npm packages will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new - # - # # Call the list_npm_packages method. - # result = client.list_npm_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. - # p item - # end - # - def list_npm_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_npm_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_npm_packages.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_npm_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_npm_packages, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, request, response, 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 npm package. - # - # @overload get_npm_package(request, options = nil) - # Pass arguments to `get_npm_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_npm_package(name: nil) - # Pass arguments to `get_npm_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 npm package. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new - # - # # Call the get_npm_package method. - # result = client.get_npm_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. - # p result - # - def get_npm_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_npm_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_npm_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_npm_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_npm_package, request, 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 python packages. - # - # @overload list_python_packages(request, options = nil) - # Pass arguments to `list_python_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_python_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_python_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose python packages will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new - # - # # Call the list_python_packages method. - # result = client.list_python_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. - # p item - # end - # - def list_python_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_python_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_python_packages.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_python_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_python_packages, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, request, response, 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 python package. - # - # @overload get_python_package(request, options = nil) - # Pass arguments to `get_python_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_python_package(name: nil) - # Pass arguments to `get_python_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 python package. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new - # - # # Call the get_python_package method. - # result = client.get_python_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. - # p result - # - def get_python_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_python_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_python_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_python_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_python_package, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_apt_artifacts(request, options = nil) - # Pass arguments to `import_apt_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_apt_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new - # - # # Call the import_apt_artifacts method. - # result = client.import_apt_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_apt_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_apt_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_apt_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_yum_artifacts(request, options = nil) - # Pass arguments to `import_yum_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_yum_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new - # - # # Call the import_yum_artifacts method. - # result = client.import_yum_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_yum_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_yum_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_yum_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::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, order_by: nil) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose repositories will be - # listed. - # @param page_size [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # - # Examples of using a filter: - # - # To filter the results of your request to repositories with the name - # `my-repo` in project `my-project` in the `us-central` region, append the - # following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - # @param order_by [::String] - # Optional. The field to order the results by. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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 - - @artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_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 a repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::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. The name of the repository to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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 - - @artifact_registry_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 repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::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_id: nil, repository: 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 name of the parent resource where the repository will be - # created. - # @param repository_id [::String] - # Required. The repository id to use for this repository. - # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] - # Required. The repository to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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 - - @artifact_registry_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 a repository. - # - # @overload update_repository(request, options = nil) - # Pass arguments to `update_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::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(repository: nil, update_mask: 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 repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] - # The repository that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new - # - # # Call the update_repository method. - # result = client.update_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. - # p result - # - def update_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-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 - - @artifact_registry_stub.call_rpc :update_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 - - ## - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::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) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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 - - @artifact_registry_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 packages. - # - # @overload list_packages(request, options = nil) - # Pass arguments to `list_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose packages will be listed. - # @param page_size [::Integer] - # The maximum number of packages to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to packages with the name - # `my-package` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - # - # To filter the results of your request to packages with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request": - # - # * `"annotations.external_link:external_link_value"` - # - # To filter the results just for a specific annotation key `external_link`, - # append the following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to packages with the annotation key-value pair - # [`external.link`:`https://example.com/my-package`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-package`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @param order_by [::String] - # Optional. The field to order the results by. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new - # - # # Call the list_packages method. - # result = client.list_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. - # p item - # end - # - def list_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_packages.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, 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 package. - # - # @overload get_package(request, options = nil) - # Pass arguments to `get_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_package(name: nil) - # Pass arguments to `get_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 package to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new - # - # # Call the get_package method. - # result = client.get_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - # p result - # - def get_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_package, request, 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 package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - # - # @overload delete_package(request, options = nil) - # Pass arguments to `delete_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_package(name: nil) - # Pass arguments to `delete_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 package to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new - # - # # Call the delete_package method. - # result = client.delete_package request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest - - # Converts hash and nil to 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_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 versions. - # - # @overload list_versions(request, options = nil) - # Pass arguments to `list_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil) - # Pass arguments to `list_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] - # The name of the parent resource whose versions will be listed. - # @param page_size [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - # @param order_by [::String] - # Optional. The field to order the results by. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to versions with the name - # `my-version` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - # - # To filter the results of your request to versions with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to versions with the annotation key-value pair - # [`external.link`:`https://example.com/my-version`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-version`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new - # - # # Call the list_versions method. - # result = client.list_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::ArtifactRegistry::V1::Version. - # p item - # end - # - def list_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_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 a version - # - # @overload get_version(request, options = nil) - # Pass arguments to `get_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_version(name: nil, view: nil) - # Pass arguments to `get_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] - # The name of the version to retrieve. - # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new - # - # # Call the get_version method. - # result = client.get_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - # p result - # - def get_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_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 - - ## - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - # - # @overload delete_version(request, options = nil) - # Pass arguments to `delete_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_version(name: nil, force: nil) - # Pass arguments to `delete_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] - # The name of the version to delete. - # @param force [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new - # - # # Call the delete_version method. - # result = client.delete_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest - - # Converts hash and nil to 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_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 multiple versions across a repository. The returned operation will - # complete once the versions have been deleted. - # - # @overload batch_delete_versions(request, options = nil) - # Pass arguments to `batch_delete_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_delete_versions(parent: nil, names: nil, validate_only: nil) - # Pass arguments to `batch_delete_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] - # The name of the repository holding all requested versions. - # @param names [::Array<::String>] - # Required. The names of the versions to delete. - # The maximum number of versions deleted per batch is determined by the - # service and is dependent on the available resources in the region. - # @param validate_only [::Boolean] - # If true, the request is performed without deleting data, following AIP-163. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new - # - # # Call the batch_delete_versions method. - # result = client.batch_delete_versions request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_delete_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest - - # Converts hash and nil to 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_delete_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_delete_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_delete_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :batch_delete_versions, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 version. - # - # @overload update_version(request, options = nil) - # Pass arguments to `update_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_version(version: nil, update_mask: nil) - # Pass arguments to `update_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 version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash] - # Required. The Version that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new - # - # # Call the update_version method. - # result = client.update_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - # p result - # - def update_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest - - # Converts hash and nil to 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_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.version&.name - header_params["version.name"] = request.version.name - end - - request_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_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_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 - - ## - # Lists files. - # - # @overload list_files(request, options = nil) - # Pass arguments to `list_files` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 repository whose files will be listed. For - # example: "projects/p1/locations/us-central1/repositories/repo1 - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `owner` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to files with the name `my_file.txt` - # in project `my-project` in the `us-central` region, in repository - # `my-repo`, append the following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - # - # To filter the results of your request to files owned by the version `1.0` - # in package `pkg1`, append the following filter expression to your request: - # - # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # - # To filter the results of your request to files with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to files with the annotation key-value pair - # [`external.link`:`https://example.com/my-file`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-file`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @param page_size [::Integer] - # The maximum number of files to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param order_by [::String] - # The field to order the results by. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new - # - # # Call the list_files method. - # result = client.list_files request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. - # p item - # end - # - def list_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_files.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, 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 file. - # - # @overload get_file(request, options = nil) - # Pass arguments to `get_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_file(name: nil) - # Pass arguments to `get_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 file to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new - # - # # Call the get_file method. - # result = client.get_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - # p result - # - def get_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_file, request, 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 file and all of its content. It is only allowed on generic - # repositories. The returned operation will complete once the file has been - # deleted. - # - # @overload delete_file(request, options = nil) - # Pass arguments to `delete_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_file(name: nil) - # Pass arguments to `delete_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 file to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new - # - # # Call the delete_file method. - # result = client.delete_file request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest - - # Converts hash and nil to 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_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_file, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 file. - # - # @overload update_file(request, options = nil) - # Pass arguments to `update_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_file(file: nil, update_mask: nil) - # Pass arguments to `update_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash] - # Required. The File that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new - # - # # Call the update_file method. - # result = client.update_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - # p result - # - def update_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest - - # Converts hash and nil to 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_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.file&.name - header_params["file.name"] = request.file.name - end - - request_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_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_file, request, 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 tags. - # - # @overload list_tags(request, options = nil) - # Pass arguments to `list_tags` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tags` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent package whose tags will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `version` - # - # Examples of using a filter: - # - # To filter the results of your request to tags with the name `my-tag` in - # package `my-package` in repository `my-repo` in project "`y-project` in - # the us-central region, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - # - # To filter the results of your request to tags applied to the version - # `1.0` in package `my-package`, append the following filter expression to - # your request: - # - # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # @param page_size [::Integer] - # The maximum number of tags to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new - # - # # Call the list_tags method. - # result = client.list_tags request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. - # p item - # end - # - def list_tags request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tags.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tags.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tags.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, 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 tag. - # - # @overload get_tag(request, options = nil) - # Pass arguments to `get_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_tag(name: nil) - # Pass arguments to `get_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new - # - # # Call the get_tag method. - # result = client.get_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def get_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_tag, request, 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 tag. - # - # @overload create_tag(request, options = nil) - # Pass arguments to `create_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_tag(parent: nil, tag_id: nil, tag: nil) - # Pass arguments to `create_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource where the tag will be created. - # @param tag_id [::String] - # The tag id to use for this repository. - # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] - # The tag to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new - # - # # Call the create_tag method. - # result = client.create_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def create_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest - - # Converts hash and nil to 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :create_tag, request, 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 tag. - # - # @overload update_tag(request, options = nil) - # Pass arguments to `update_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_tag(tag: nil, update_mask: nil) - # Pass arguments to `update_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] - # The tag that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new - # - # # Call the update_tag method. - # result = client.update_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def update_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest - - # Converts hash and nil to 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.tag&.name - header_params["tag.name"] = request.tag.name - end - - request_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_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_tag, request, 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 tag. - # - # @overload delete_tag(request, options = nil) - # Pass arguments to `delete_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_tag(name: nil) - # Pass arguments to `delete_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag 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/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new - # - # # Call the delete_tag method. - # result = client.delete_tag request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest - - # Converts hash and nil to 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_tag, request, 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 rule. - # - # @overload create_rule(request, options = nil) - # Pass arguments to `create_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_rule(parent: nil, rule_id: nil, rule: nil) - # Pass arguments to `create_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource where the rule will be created. - # @param rule_id [::String] - # The rule id to use for this repository. - # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] - # The rule to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new - # - # # Call the create_rule method. - # result = client.create_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def create_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :create_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists rules. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_rules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent repository whose rules will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1`. - # @param page_size [::Integer] - # The maximum number of rules to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. - # p item - # end - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_rules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_rules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_rules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a rule. - # - # @overload get_rule(request, options = nil) - # Pass arguments to `get_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_rule(name: nil) - # Pass arguments to `get_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new - # - # # Call the get_rule method. - # result = client.get_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def get_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a rule. - # - # @overload update_rule(request, options = nil) - # Pass arguments to `update_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_rule(rule: nil, update_mask: nil) - # Pass arguments to `update_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] - # The rule that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new - # - # # Call the update_rule method. - # result = client.update_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def update_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.rule&.name - header_params["rule.name"] = request.rule.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a rule. - # - # @overload delete_rule(request, options = nil) - # Pass arguments to `delete_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_rule(name: nil) - # Pass arguments to `delete_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to delete. - # - # @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/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new - # - # # Call the delete_rule method. - # result = client.delete_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the IAM policy for a given 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/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-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 - - @artifact_registry_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 IAM policy for a given 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/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-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 - - @artifact_registry_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 - - ## - # Tests if the caller has a list of permissions on a resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-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 - - @artifact_registry_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 - - ## - # Retrieves the Settings for the Project. - # - # @overload get_project_settings(request, options = nil) - # Pass arguments to `get_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_project_settings(name: nil) - # Pass arguments to `get_project_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. The name of the projectSettings resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new - # - # # Call the get_project_settings method. - # result = client.get_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - # p result - # - def get_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_project_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_project_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 Settings for the Project. - # - # @overload update_project_settings(request, options = nil) - # Pass arguments to `update_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_project_settings(project_settings: nil, update_mask: nil) - # Pass arguments to `update_project_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 project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash] - # The project settings. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new - # - # # Call the update_project_settings method. - # result = client.update_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - # p result - # - def update_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_project_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.project_settings&.name - header_params["project_settings.name"] = request.project_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_project_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_project_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 the VPCSC Config for the Project. - # - # @overload get_vpcsc_config(request, options = nil) - # Pass arguments to `get_vpcsc_config` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_vpcsc_config(name: nil) - # Pass arguments to `get_vpcsc_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 VPCSCConfig resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new - # - # # Call the get_vpcsc_config method. - # result = client.get_vpcsc_config request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - # p result - # - def get_vpcsc_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_vpcsc_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vpcsc_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_vpcsc_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 the VPCSC Config for the Project. - # - # @overload update_vpcsc_config(request, options = nil) - # Pass arguments to `update_vpcsc_config` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil) - # Pass arguments to `update_vpcsc_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 vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash] - # The project config. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new - # - # # Call the update_vpcsc_config method. - # result = client.update_vpcsc_config request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - # p result - # - def update_vpcsc_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest - - # Converts hash and nil to 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_vpcsc_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.vpcsc_config&.name - header_params["vpcsc_config.name"] = request.vpcsc_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_vpcsc_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vpcsc_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_vpcsc_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 package. - # - # @overload update_package(request, options = nil) - # Pass arguments to `update_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_package(package: nil, update_mask: nil) - # Pass arguments to `update_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash] - # The package that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new - # - # # Call the update_package method. - # result = client.update_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - # p result - # - def update_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest - - # Converts hash and nil to 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_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.package&.name - header_params["package.name"] = request.package.name - end - - request_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_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_package, request, 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 attachments. - # - # @overload list_attachments(request, options = nil) - # Pass arguments to `list_attachments` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_attachments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose attachments will be listed. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `target` - # * `type` - # * `attachment_namespace` - # @param page_size [::Integer] - # The maximum number of attachments to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new - # - # # Call the list_attachments method. - # result = client.list_attachments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. - # p item - # end - # - def list_attachments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_attachments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_attachments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_attachments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_attachments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_attachments, request, response, 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 attachment. - # - # @overload get_attachment(request, options = nil) - # Pass arguments to `get_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_attachment(name: nil) - # Pass arguments to `get_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 attachment to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new - # - # # Call the get_attachment method. - # result = client.get_attachment request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. - # p result - # - def get_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_attachment, request, 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 attachment. The returned Operation will finish once the - # attachment has been created. Its response will be the created attachment. - # - # @overload create_attachment(request, options = nil) - # Pass arguments to `create_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil) - # Pass arguments to `create_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 where the attachment will be - # created. - # @param attachment_id [::String] - # Required. The attachment id to use for this attachment. - # @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash] - # Required. The attachment to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new - # - # # Call the create_attachment method. - # result = client.create_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest - - # Converts hash and nil to 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_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :create_attachment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 attachment. The returned Operation will - # finish once the attachments has been deleted. It will not have any - # Operation metadata and will return a `google.protobuf.Empty` response. - # - # @overload delete_attachment(request, options = nil) - # Pass arguments to `delete_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_attachment(name: nil) - # Pass arguments to `delete_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 attachment to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new - # - # # Call the delete_attachment method. - # result = client.delete_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest - - # Converts hash and nil to 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_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_attachment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports an artifact to a Cloud Storage bucket. - # - # @overload export_artifact(request, options = nil) - # Pass arguments to `export_artifact` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_artifact(source_version: nil, source_tag: nil, gcs_path: nil, repository: nil) - # Pass arguments to `export_artifact` via keyword arguments. Note that at - # least one keyword argument is 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_version [::String] - # The artifact version to export. - # Format: - # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} - # - # Note: The following parameters are mutually exclusive: `source_version`, `source_tag`. 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 source_tag [::String] - # The artifact tag to export. - # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} - # - # Note: The following parameters are mutually exclusive: `source_tag`, `source_version`. 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 gcs_path [::String] - # The Cloud Storage path to export the artifact to. Should start with the - # bucket name, and optionally have a directory path. Examples: - # `dst_bucket`, `dst_bucket/sub_dir`. - # Existing objects with the same path will be overwritten. - # @param repository [::String] - # Required. The repository of the artifact to export. - # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new - # - # # Call the export_artifact method. - # result = client.export_artifact request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-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.export_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :export_artifact, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 ArtifactRegistry API. - # - # This class represents the configuration for ArtifactRegistry, - # providing control 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::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_docker_images to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_docker_images.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_docker_images.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::ArtifactRegistry::V1::ArtifactRegistry::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 = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::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 ArtifactRegistry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_docker_images` - # @return [::Gapic::Config::Method] - # - attr_reader :list_docker_images - ## - # RPC-specific configuration for `get_docker_image` - # @return [::Gapic::Config::Method] - # - attr_reader :get_docker_image - ## - # RPC-specific configuration for `list_maven_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_maven_artifacts - ## - # RPC-specific configuration for `get_maven_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :get_maven_artifact - ## - # RPC-specific configuration for `list_npm_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_npm_packages - ## - # RPC-specific configuration for `get_npm_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_npm_package - ## - # RPC-specific configuration for `list_python_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_python_packages - ## - # RPC-specific configuration for `get_python_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_python_package - ## - # RPC-specific configuration for `import_apt_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_apt_artifacts - ## - # RPC-specific configuration for `import_yum_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_yum_artifacts - ## - # 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_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_packages - ## - # RPC-specific configuration for `get_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_package - ## - # RPC-specific configuration for `delete_package` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_package - ## - # RPC-specific configuration for `list_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_versions - ## - # RPC-specific configuration for `get_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_version - ## - # RPC-specific configuration for `delete_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_version - ## - # RPC-specific configuration for `batch_delete_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_delete_versions - ## - # RPC-specific configuration for `update_version` - # @return [::Gapic::Config::Method] - # - attr_reader :update_version - ## - # RPC-specific configuration for `list_files` - # @return [::Gapic::Config::Method] - # - attr_reader :list_files - ## - # RPC-specific configuration for `get_file` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file - ## - # RPC-specific configuration for `delete_file` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_file - ## - # RPC-specific configuration for `update_file` - # @return [::Gapic::Config::Method] - # - attr_reader :update_file - ## - # RPC-specific configuration for `list_tags` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tags - ## - # RPC-specific configuration for `get_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tag - ## - # RPC-specific configuration for `create_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tag - ## - # RPC-specific configuration for `update_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tag - ## - # RPC-specific configuration for `delete_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tag - ## - # RPC-specific configuration for `create_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_rule - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `get_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule - ## - # RPC-specific configuration for `update_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule - ## - # RPC-specific configuration for `delete_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_rule - ## - # RPC-specific configuration for `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_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_settings - ## - # RPC-specific configuration for `update_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_project_settings - ## - # RPC-specific configuration for `get_vpcsc_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vpcsc_config - ## - # RPC-specific configuration for `update_vpcsc_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vpcsc_config - ## - # RPC-specific configuration for `update_package` - # @return [::Gapic::Config::Method] - # - attr_reader :update_package - ## - # RPC-specific configuration for `list_attachments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attachments - ## - # RPC-specific configuration for `get_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_attachment - ## - # RPC-specific configuration for `create_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_attachment - ## - # RPC-specific configuration for `delete_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_attachment - ## - # RPC-specific configuration for `export_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :export_artifact - - # @private - def initialize parent_rpcs = nil - list_docker_images_config = parent_rpcs.list_docker_images if parent_rpcs.respond_to? :list_docker_images - @list_docker_images = ::Gapic::Config::Method.new list_docker_images_config - get_docker_image_config = parent_rpcs.get_docker_image if parent_rpcs.respond_to? :get_docker_image - @get_docker_image = ::Gapic::Config::Method.new get_docker_image_config - list_maven_artifacts_config = parent_rpcs.list_maven_artifacts if parent_rpcs.respond_to? :list_maven_artifacts - @list_maven_artifacts = ::Gapic::Config::Method.new list_maven_artifacts_config - get_maven_artifact_config = parent_rpcs.get_maven_artifact if parent_rpcs.respond_to? :get_maven_artifact - @get_maven_artifact = ::Gapic::Config::Method.new get_maven_artifact_config - list_npm_packages_config = parent_rpcs.list_npm_packages if parent_rpcs.respond_to? :list_npm_packages - @list_npm_packages = ::Gapic::Config::Method.new list_npm_packages_config - get_npm_package_config = parent_rpcs.get_npm_package if parent_rpcs.respond_to? :get_npm_package - @get_npm_package = ::Gapic::Config::Method.new get_npm_package_config - list_python_packages_config = parent_rpcs.list_python_packages if parent_rpcs.respond_to? :list_python_packages - @list_python_packages = ::Gapic::Config::Method.new list_python_packages_config - get_python_package_config = parent_rpcs.get_python_package if parent_rpcs.respond_to? :get_python_package - @get_python_package = ::Gapic::Config::Method.new get_python_package_config - import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts - @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config - import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts - @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_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_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages - @list_packages = ::Gapic::Config::Method.new list_packages_config - get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package - @get_package = ::Gapic::Config::Method.new get_package_config - delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package - @delete_package = ::Gapic::Config::Method.new delete_package_config - list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions - @list_versions = ::Gapic::Config::Method.new list_versions_config - get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version - @get_version = ::Gapic::Config::Method.new get_version_config - delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version - @delete_version = ::Gapic::Config::Method.new delete_version_config - batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions - @batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config - update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version - @update_version = ::Gapic::Config::Method.new update_version_config - list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files - @list_files = ::Gapic::Config::Method.new list_files_config - get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file - @get_file = ::Gapic::Config::Method.new get_file_config - delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file - @delete_file = ::Gapic::Config::Method.new delete_file_config - update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file - @update_file = ::Gapic::Config::Method.new update_file_config - list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags - @list_tags = ::Gapic::Config::Method.new list_tags_config - get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag - @get_tag = ::Gapic::Config::Method.new get_tag_config - create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag - @create_tag = ::Gapic::Config::Method.new create_tag_config - update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag - @update_tag = ::Gapic::Config::Method.new update_tag_config - delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag - @delete_tag = ::Gapic::Config::Method.new delete_tag_config - create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule - @create_rule = ::Gapic::Config::Method.new create_rule_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule - @get_rule = ::Gapic::Config::Method.new get_rule_config - update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule - @update_rule = ::Gapic::Config::Method.new update_rule_config - delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule - @delete_rule = ::Gapic::Config::Method.new delete_rule_config - 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_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings - @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config - update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings - @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config - get_vpcsc_config_config = parent_rpcs.get_vpcsc_config if parent_rpcs.respond_to? :get_vpcsc_config - @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config - update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config - @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config - update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package - @update_package = ::Gapic::Config::Method.new update_package_config - list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments - @list_attachments = ::Gapic::Config::Method.new list_attachments_config - get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment - @get_attachment = ::Gapic::Config::Method.new get_attachment_config - create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment - @create_attachment = ::Gapic::Config::Method.new create_attachment_config - delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment - @delete_attachment = ::Gapic::Config::Method.new delete_attachment_config - export_artifact_config = parent_rpcs.export_artifact if parent_rpcs.respond_to? :export_artifact - @export_artifact = ::Gapic::Config::Method.new export_artifact_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb deleted file mode 100644 index 808d2715f8ee..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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 ArtifactRegistry - module V1 - module ArtifactRegistry - # Credentials for the ArtifactRegistry API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "ARTIFACT_REGISTRY_CREDENTIALS", - "ARTIFACT_REGISTRY_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "ARTIFACT_REGISTRY_CREDENTIALS_JSON", - "ARTIFACT_REGISTRY_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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb deleted file mode 100644 index 57d67f3b167a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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 ArtifactRegistry - module V1 - module ArtifactRegistry - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ArtifactRegistry 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 ArtifactRegistry 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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::ArtifactRegistry::V1::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 = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb deleted file mode 100644 index 624a366f2e6a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb +++ /dev/null @@ -1,333 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - # Path helper methods for the ArtifactRegistry API. - module Paths - ## - # Create a fully-qualified Attachment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param attachment [String] - # - # @return [::String] - def attachment_path project:, location:, repository:, attachment: - 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}/attachments/#{attachment}" - end - - ## - # Create a fully-qualified DockerImage resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param docker_image [String] - # - # @return [::String] - def docker_image_path project:, location:, repository:, docker_image: - 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}/dockerImages/#{docker_image}" - end - - ## - # Create a fully-qualified File resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/files/{file}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param file [String] - # - # @return [::String] - def file_path project:, location:, repository:, file: - 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}/files/#{file}" - 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 MavenArtifact resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param maven_artifact [String] - # - # @return [::String] - def maven_artifact_path project:, location:, repository:, maven_artifact: - 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}/mavenArtifacts/#{maven_artifact}" - end - - ## - # Create a fully-qualified NpmPackage resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param npm_package [String] - # - # @return [::String] - def npm_package_path project:, location:, repository:, npm_package: - 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}/npmPackages/#{npm_package}" - end - - ## - # Create a fully-qualified Package resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param package [String] - # - # @return [::String] - def package_path project:, location:, repository:, package: - 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}/packages/#{package}" - end - - ## - # Create a fully-qualified ProjectSettings resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/projectSettings` - # - # @param project [String] - # - # @return [::String] - def project_settings_path project: - "projects/#{project}/projectSettings" - end - - ## - # Create a fully-qualified PythonPackage resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param python_package [String] - # - # @return [::String] - def python_package_path project:, location:, repository:, python_package: - 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}/pythonPackages/#{python_package}" - 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 Rule resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/rules/{rule}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param rule [String] - # - # @return [::String] - def rule_path project:, location:, repository:, 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}/rules/#{rule}" - 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 - - ## - # Create a fully-qualified Tag resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param package [String] - # @param tag [String] - # - # @return [::String] - def tag_path project:, location:, repository:, package:, tag: - 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, "package cannot contain /" if package.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}" - end - - ## - # Create a fully-qualified Version resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param package [String] - # @param version [String] - # - # @return [::String] - def version_path project:, location:, repository:, package:, version: - 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, "package cannot contain /" if package.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/versions/#{version}" - end - - ## - # Create a fully-qualified VpcscConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/vpcscConfig` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def vpcsc_config_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}/vpcscConfig" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb deleted file mode 100644 index 64924d2a2ee7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/artifact_registry/v1/version" -require "google/cloud/artifact_registry/v1/bindings_override" - -require "google/cloud/artifact_registry/v1/artifact_registry/credentials" -require "google/cloud/artifact_registry/v1/artifact_registry/paths" -require "google/cloud/artifact_registry/v1/artifact_registry/rest/operations" -require "google/cloud/artifact_registry/v1/artifact_registry/rest/client" - -module Google - module Cloud - module ArtifactRegistry - module V1 - ## - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/artifact_registry/v1/artifact_registry/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - module ArtifactRegistry - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/artifact_registry/v1/artifact_registry/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb deleted file mode 100644 index 735735a49314..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +++ /dev/null @@ -1,5189 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/devtools/artifactregistry/v1/service_pb" -require "google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - module Rest - ## - # REST client for the ArtifactRegistry service. - # - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :artifact_registry_stub - - ## - # Configure the ArtifactRegistry Client class. - # - # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ArtifactRegistry clients - # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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", "ArtifactRegistry", "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 ArtifactRegistry 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::ArtifactRegistry::V1::ArtifactRegistry::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 - @artifact_registry_stub.universe_domain - end - - ## - # Create a new ArtifactRegistry REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ArtifactRegistry 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::ArtifactRegistry::V1::ArtifactRegistry::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 - - @artifact_registry_stub = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @artifact_registry_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 = @artifact_registry_stub.endpoint - config.universe_domain = @artifact_registry_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @artifact_registry_stub.logger - end - - # Service calls - - ## - # Lists docker images. - # - # @overload list_docker_images(request, options = nil) - # Pass arguments to `list_docker_images` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_docker_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose docker images will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param order_by [::String] - # The field to order the results by. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new - # - # # Call the list_docker_images method. - # result = client.list_docker_images request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. - # p item - # end - # - def list_docker_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_docker_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_docker_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_docker_images request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, "docker_images", request, result, 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 docker image. - # - # @overload get_docker_image(request, options = nil) - # Pass arguments to `get_docker_image` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_docker_image(name: nil) - # Pass arguments to `get_docker_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 docker images. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new - # - # # Call the get_docker_image method. - # result = client.get_docker_image request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. - # p result - # - def get_docker_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_docker_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_docker_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_docker_image request, 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 maven artifacts. - # - # @overload list_maven_artifacts(request, options = nil) - # Pass arguments to `list_maven_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_maven_artifacts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_maven_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose maven artifacts will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new - # - # # Call the list_maven_artifacts method. - # result = client.list_maven_artifacts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - # p item - # end - # - def list_maven_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_maven_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_maven_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_maven_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_maven_artifacts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, "maven_artifacts", request, result, 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 maven artifact. - # - # @overload get_maven_artifact(request, options = nil) - # Pass arguments to `get_maven_artifact` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_maven_artifact(name: nil) - # Pass arguments to `get_maven_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 maven artifact. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new - # - # # Call the get_maven_artifact method. - # result = client.get_maven_artifact request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - # p result - # - def get_maven_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_maven_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_maven_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_maven_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_maven_artifact request, 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 npm packages. - # - # @overload list_npm_packages(request, options = nil) - # Pass arguments to `list_npm_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_npm_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_npm_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose npm packages will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new - # - # # Call the list_npm_packages method. - # result = client.list_npm_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. - # p item - # end - # - def list_npm_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_npm_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_npm_packages.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_npm_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_npm_packages request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, "npm_packages", request, result, 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 npm package. - # - # @overload get_npm_package(request, options = nil) - # Pass arguments to `get_npm_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_npm_package(name: nil) - # Pass arguments to `get_npm_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 npm package. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new - # - # # Call the get_npm_package method. - # result = client.get_npm_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. - # p result - # - def get_npm_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_npm_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_npm_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_npm_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_npm_package request, 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 python packages. - # - # @overload list_python_packages(request, options = nil) - # Pass arguments to `list_python_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_python_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_python_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose python packages will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new - # - # # Call the list_python_packages method. - # result = client.list_python_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. - # p item - # end - # - def list_python_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_python_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_python_packages.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_python_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_python_packages request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, "python_packages", request, result, 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 python package. - # - # @overload get_python_package(request, options = nil) - # Pass arguments to `get_python_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_python_package(name: nil) - # Pass arguments to `get_python_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 python package. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new - # - # # Call the get_python_package method. - # result = client.get_python_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. - # p result - # - def get_python_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_python_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_python_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_python_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_python_package request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_apt_artifacts(request, options = nil) - # Pass arguments to `import_apt_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_apt_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new - # - # # Call the import_apt_artifacts method. - # result = client.import_apt_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_apt_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_apt_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_apt_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.import_apt_artifacts request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_yum_artifacts(request, options = nil) - # Pass arguments to `import_yum_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_yum_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new - # - # # Call the import_yum_artifacts method. - # result = client.import_yum_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_yum_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_yum_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_yum_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.import_yum_artifacts request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::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, order_by: nil) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose repositories will be - # listed. - # @param page_size [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # - # Examples of using a filter: - # - # To filter the results of your request to repositories with the name - # `my-repo` in project `my-project` in the `us-central` region, append the - # following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - # @param order_by [::String] - # Optional. The field to order the results by. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @artifact_registry_stub.list_repositories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_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 a repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::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. The name of the repository to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @artifact_registry_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 repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::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_id: nil, repository: 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 name of the parent resource where the repository will be - # created. - # @param repository_id [::String] - # Required. The repository id to use for this repository. - # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] - # Required. The repository to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @artifact_registry_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 a repository. - # - # @overload update_repository(request, options = nil) - # Pass arguments to `update_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::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(repository: nil, update_mask: 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 repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] - # The repository that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new - # - # # Call the update_repository method. - # result = client.update_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. - # p result - # - def update_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @artifact_registry_stub.update_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 - - ## - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::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) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @artifact_registry_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 packages. - # - # @overload list_packages(request, options = nil) - # Pass arguments to `list_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose packages will be listed. - # @param page_size [::Integer] - # The maximum number of packages to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to packages with the name - # `my-package` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - # - # To filter the results of your request to packages with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request": - # - # * `"annotations.external_link:external_link_value"` - # - # To filter the results just for a specific annotation key `external_link`, - # append the following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to packages with the annotation key-value pair - # [`external.link`:`https://example.com/my-package`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-package`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @param order_by [::String] - # Optional. The field to order the results by. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new - # - # # Call the list_packages method. - # result = client.list_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. - # p item - # end - # - def list_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_packages.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_packages request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, 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 package. - # - # @overload get_package(request, options = nil) - # Pass arguments to `get_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_package(name: nil) - # Pass arguments to `get_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 package to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new - # - # # Call the get_package method. - # result = client.get_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - # p result - # - def get_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_package request, 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 package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - # - # @overload delete_package(request, options = nil) - # Pass arguments to `delete_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_package(name: nil) - # Pass arguments to `delete_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 package to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new - # - # # Call the delete_package method. - # result = client.delete_package request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest - - # Converts hash and nil to an 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_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_package request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 versions. - # - # @overload list_versions(request, options = nil) - # Pass arguments to `list_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil) - # Pass arguments to `list_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] - # The name of the parent resource whose versions will be listed. - # @param page_size [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - # @param order_by [::String] - # Optional. The field to order the results by. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to versions with the name - # `my-version` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - # - # To filter the results of your request to versions with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to versions with the annotation key-value pair - # [`external.link`:`https://example.com/my-version`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-version`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new - # - # # Call the list_versions method. - # result = client.list_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::ArtifactRegistry::V1::Version. - # p item - # end - # - def list_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_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 a version - # - # @overload get_version(request, options = nil) - # Pass arguments to `get_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_version(name: nil, view: nil) - # Pass arguments to `get_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] - # The name of the version to retrieve. - # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new - # - # # Call the get_version method. - # result = client.get_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - # p result - # - def get_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_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 - - ## - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - # - # @overload delete_version(request, options = nil) - # Pass arguments to `delete_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_version(name: nil, force: nil) - # Pass arguments to `delete_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] - # The name of the version to delete. - # @param force [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new - # - # # Call the delete_version method. - # result = client.delete_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest - - # Converts hash and nil to an 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_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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_version request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 multiple versions across a repository. The returned operation will - # complete once the versions have been deleted. - # - # @overload batch_delete_versions(request, options = nil) - # Pass arguments to `batch_delete_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_delete_versions(parent: nil, names: nil, validate_only: nil) - # Pass arguments to `batch_delete_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] - # The name of the repository holding all requested versions. - # @param names [::Array<::String>] - # Required. The names of the versions to delete. - # The maximum number of versions deleted per batch is determined by the - # service and is dependent on the available resources in the region. - # @param validate_only [::Boolean] - # If true, the request is performed without deleting data, following AIP-163. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new - # - # # Call the batch_delete_versions method. - # result = client.batch_delete_versions request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_delete_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest - - # Converts hash and nil to an 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_delete_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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_delete_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_delete_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.batch_delete_versions request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 version. - # - # @overload update_version(request, options = nil) - # Pass arguments to `update_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_version(version: nil, update_mask: nil) - # Pass arguments to `update_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 version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash] - # Required. The Version that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new - # - # # Call the update_version method. - # result = client.update_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - # p result - # - def update_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest - - # Converts hash and nil to an 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_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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_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 - - ## - # Lists files. - # - # @overload list_files(request, options = nil) - # Pass arguments to `list_files` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 repository whose files will be listed. For - # example: "projects/p1/locations/us-central1/repositories/repo1 - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `owner` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to files with the name `my_file.txt` - # in project `my-project` in the `us-central` region, in repository - # `my-repo`, append the following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - # - # To filter the results of your request to files owned by the version `1.0` - # in package `pkg1`, append the following filter expression to your request: - # - # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # - # To filter the results of your request to files with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to files with the annotation key-value pair - # [`external.link`:`https://example.com/my-file`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-file`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @param page_size [::Integer] - # The maximum number of files to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param order_by [::String] - # The field to order the results by. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new - # - # # Call the list_files method. - # result = client.list_files request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. - # p item - # end - # - def list_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_files.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_files request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, 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 file. - # - # @overload get_file(request, options = nil) - # Pass arguments to `get_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_file(name: nil) - # Pass arguments to `get_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 file to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new - # - # # Call the get_file method. - # result = client.get_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - # p result - # - def get_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_file request, 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 file and all of its content. It is only allowed on generic - # repositories. The returned operation will complete once the file has been - # deleted. - # - # @overload delete_file(request, options = nil) - # Pass arguments to `delete_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_file(name: nil) - # Pass arguments to `delete_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 file to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new - # - # # Call the delete_file method. - # result = client.delete_file request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest - - # Converts hash and nil to an 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_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_file request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 file. - # - # @overload update_file(request, options = nil) - # Pass arguments to `update_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_file(file: nil, update_mask: nil) - # Pass arguments to `update_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash] - # Required. The File that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new - # - # # Call the update_file method. - # result = client.update_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - # p result - # - def update_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest - - # Converts hash and nil to an 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_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_file request, 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 tags. - # - # @overload list_tags(request, options = nil) - # Pass arguments to `list_tags` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tags` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent package whose tags will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `version` - # - # Examples of using a filter: - # - # To filter the results of your request to tags with the name `my-tag` in - # package `my-package` in repository `my-repo` in project "`y-project` in - # the us-central region, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - # - # To filter the results of your request to tags applied to the version - # `1.0` in package `my-package`, append the following filter expression to - # your request: - # - # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # @param page_size [::Integer] - # The maximum number of tags to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new - # - # # Call the list_tags method. - # result = client.list_tags request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. - # p item - # end - # - def list_tags request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tags.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tags.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tags.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_tags request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, 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 tag. - # - # @overload get_tag(request, options = nil) - # Pass arguments to `get_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_tag(name: nil) - # Pass arguments to `get_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new - # - # # Call the get_tag method. - # result = client.get_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def get_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_tag request, 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 tag. - # - # @overload create_tag(request, options = nil) - # Pass arguments to `create_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_tag(parent: nil, tag_id: nil, tag: nil) - # Pass arguments to `create_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource where the tag will be created. - # @param tag_id [::String] - # The tag id to use for this repository. - # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] - # The tag to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new - # - # # Call the create_tag method. - # result = client.create_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def create_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest - - # Converts hash and nil to an 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.create_tag request, 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 tag. - # - # @overload update_tag(request, options = nil) - # Pass arguments to `update_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_tag(tag: nil, update_mask: nil) - # Pass arguments to `update_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] - # The tag that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new - # - # # Call the update_tag method. - # result = client.update_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def update_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest - - # Converts hash and nil to an 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_tag request, 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 tag. - # - # @overload delete_tag(request, options = nil) - # Pass arguments to `delete_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_tag(name: nil) - # Pass arguments to `delete_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag 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/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new - # - # # Call the delete_tag method. - # result = client.delete_tag request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest - - # Converts hash and nil to an 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_tag request, 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 rule. - # - # @overload create_rule(request, options = nil) - # Pass arguments to `create_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_rule(parent: nil, rule_id: nil, rule: nil) - # Pass arguments to `create_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource where the rule will be created. - # @param rule_id [::String] - # The rule id to use for this repository. - # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] - # The rule to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new - # - # # Call the create_rule method. - # result = client.create_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def create_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.create_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists rules. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_rules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent repository whose rules will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1`. - # @param page_size [::Integer] - # The maximum number of rules to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. - # p item - # end - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_rules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_rules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_rules, "rules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a rule. - # - # @overload get_rule(request, options = nil) - # Pass arguments to `get_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_rule(name: nil) - # Pass arguments to `get_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new - # - # # Call the get_rule method. - # result = client.get_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def get_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a rule. - # - # @overload update_rule(request, options = nil) - # Pass arguments to `update_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_rule(rule: nil, update_mask: nil) - # Pass arguments to `update_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] - # The rule that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new - # - # # Call the update_rule method. - # result = client.update_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def update_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a rule. - # - # @overload delete_rule(request, options = nil) - # Pass arguments to `delete_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_rule(name: nil) - # Pass arguments to `delete_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to delete. - # @yield [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/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new - # - # # Call the delete_rule method. - # result = client.delete_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the IAM policy for a given 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/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @artifact_registry_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 IAM policy for a given 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/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @artifact_registry_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 - - ## - # Tests if the caller has a list of permissions on a resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @artifact_registry_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 - - ## - # Retrieves the Settings for the Project. - # - # @overload get_project_settings(request, options = nil) - # Pass arguments to `get_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_project_settings(name: nil) - # Pass arguments to `get_project_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. The name of the projectSettings resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new - # - # # Call the get_project_settings method. - # result = client.get_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - # p result - # - def get_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_project_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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_project_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 Settings for the Project. - # - # @overload update_project_settings(request, options = nil) - # Pass arguments to `update_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_project_settings(project_settings: nil, update_mask: nil) - # Pass arguments to `update_project_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 project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash] - # The project settings. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new - # - # # Call the update_project_settings method. - # result = client.update_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - # p result - # - def update_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_project_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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_project_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 the VPCSC Config for the Project. - # - # @overload get_vpcsc_config(request, options = nil) - # Pass arguments to `get_vpcsc_config` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_vpcsc_config(name: nil) - # Pass arguments to `get_vpcsc_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 VPCSCConfig resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new - # - # # Call the get_vpcsc_config method. - # result = client.get_vpcsc_config request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - # p result - # - def get_vpcsc_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_vpcsc_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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_vpcsc_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_vpcsc_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 the VPCSC Config for the Project. - # - # @overload update_vpcsc_config(request, options = nil) - # Pass arguments to `update_vpcsc_config` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil) - # Pass arguments to `update_vpcsc_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 vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash] - # The project config. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new - # - # # Call the update_vpcsc_config method. - # result = client.update_vpcsc_config request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - # p result - # - def update_vpcsc_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest - - # Converts hash and nil to an 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_vpcsc_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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vpcsc_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_vpcsc_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_vpcsc_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 package. - # - # @overload update_package(request, options = nil) - # Pass arguments to `update_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_package(package: nil, update_mask: nil) - # Pass arguments to `update_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash] - # The package that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new - # - # # Call the update_package method. - # result = client.update_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - # p result - # - def update_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest - - # Converts hash and nil to an 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_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_package request, 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 attachments. - # - # @overload list_attachments(request, options = nil) - # Pass arguments to `list_attachments` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_attachments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 whose attachments will be listed. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `target` - # * `type` - # * `attachment_namespace` - # @param page_size [::Integer] - # The maximum number of attachments to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new - # - # # Call the list_attachments method. - # result = client.list_attachments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. - # p item - # end - # - def list_attachments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_attachments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_attachments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_attachments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_attachments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_attachments, "attachments", request, result, 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 attachment. - # - # @overload get_attachment(request, options = nil) - # Pass arguments to `get_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_attachment(name: nil) - # Pass arguments to `get_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 attachment to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new - # - # # Call the get_attachment method. - # result = client.get_attachment request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. - # p result - # - def get_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_attachment request, 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 attachment. The returned Operation will finish once the - # attachment has been created. Its response will be the created attachment. - # - # @overload create_attachment(request, options = nil) - # Pass arguments to `create_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil) - # Pass arguments to `create_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 where the attachment will be - # created. - # @param attachment_id [::String] - # Required. The attachment id to use for this attachment. - # @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash] - # Required. The attachment to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new - # - # # Call the create_attachment method. - # result = client.create_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest - - # Converts hash and nil to an 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_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.create_attachment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 attachment. The returned Operation will - # finish once the attachments has been deleted. It will not have any - # Operation metadata and will return a `google.protobuf.Empty` response. - # - # @overload delete_attachment(request, options = nil) - # Pass arguments to `delete_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_attachment(name: nil) - # Pass arguments to `delete_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 attachment to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new - # - # # Call the delete_attachment method. - # result = client.delete_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest - - # Converts hash and nil to an 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_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_attachment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports an artifact to a Cloud Storage bucket. - # - # @overload export_artifact(request, options = nil) - # Pass arguments to `export_artifact` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_artifact(source_version: nil, source_tag: nil, gcs_path: nil, repository: nil) - # Pass arguments to `export_artifact` via keyword arguments. Note that at - # least one keyword argument is 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_version [::String] - # The artifact version to export. - # Format: - # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} - # - # Note: The following parameters are mutually exclusive: `source_version`, `source_tag`. 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 source_tag [::String] - # The artifact tag to export. - # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} - # - # Note: The following parameters are mutually exclusive: `source_tag`, `source_version`. 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 gcs_path [::String] - # The Cloud Storage path to export the artifact to. Should start with the - # bucket name, and optionally have a directory path. Examples: - # `dst_bucket`, `dst_bucket/sub_dir`. - # Existing objects with the same path will be overwritten. - # @param repository [::String] - # Required. The repository of the artifact to export. - # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new - # - # # Call the export_artifact method. - # result = client.export_artifact request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.export_artifact request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 ArtifactRegistry REST API. - # - # This class represents the configuration for ArtifactRegistry 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::ArtifactRegistry::V1::ArtifactRegistry::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_docker_images to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_docker_images.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_docker_images.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::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 ArtifactRegistry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_docker_images` - # @return [::Gapic::Config::Method] - # - attr_reader :list_docker_images - ## - # RPC-specific configuration for `get_docker_image` - # @return [::Gapic::Config::Method] - # - attr_reader :get_docker_image - ## - # RPC-specific configuration for `list_maven_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_maven_artifacts - ## - # RPC-specific configuration for `get_maven_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :get_maven_artifact - ## - # RPC-specific configuration for `list_npm_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_npm_packages - ## - # RPC-specific configuration for `get_npm_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_npm_package - ## - # RPC-specific configuration for `list_python_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_python_packages - ## - # RPC-specific configuration for `get_python_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_python_package - ## - # RPC-specific configuration for `import_apt_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_apt_artifacts - ## - # RPC-specific configuration for `import_yum_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_yum_artifacts - ## - # 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_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_packages - ## - # RPC-specific configuration for `get_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_package - ## - # RPC-specific configuration for `delete_package` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_package - ## - # RPC-specific configuration for `list_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_versions - ## - # RPC-specific configuration for `get_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_version - ## - # RPC-specific configuration for `delete_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_version - ## - # RPC-specific configuration for `batch_delete_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_delete_versions - ## - # RPC-specific configuration for `update_version` - # @return [::Gapic::Config::Method] - # - attr_reader :update_version - ## - # RPC-specific configuration for `list_files` - # @return [::Gapic::Config::Method] - # - attr_reader :list_files - ## - # RPC-specific configuration for `get_file` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file - ## - # RPC-specific configuration for `delete_file` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_file - ## - # RPC-specific configuration for `update_file` - # @return [::Gapic::Config::Method] - # - attr_reader :update_file - ## - # RPC-specific configuration for `list_tags` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tags - ## - # RPC-specific configuration for `get_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tag - ## - # RPC-specific configuration for `create_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tag - ## - # RPC-specific configuration for `update_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tag - ## - # RPC-specific configuration for `delete_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tag - ## - # RPC-specific configuration for `create_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_rule - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `get_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule - ## - # RPC-specific configuration for `update_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule - ## - # RPC-specific configuration for `delete_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_rule - ## - # RPC-specific configuration for `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_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_settings - ## - # RPC-specific configuration for `update_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_project_settings - ## - # RPC-specific configuration for `get_vpcsc_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vpcsc_config - ## - # RPC-specific configuration for `update_vpcsc_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vpcsc_config - ## - # RPC-specific configuration for `update_package` - # @return [::Gapic::Config::Method] - # - attr_reader :update_package - ## - # RPC-specific configuration for `list_attachments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attachments - ## - # RPC-specific configuration for `get_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_attachment - ## - # RPC-specific configuration for `create_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_attachment - ## - # RPC-specific configuration for `delete_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_attachment - ## - # RPC-specific configuration for `export_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :export_artifact - - # @private - def initialize parent_rpcs = nil - list_docker_images_config = parent_rpcs.list_docker_images if parent_rpcs.respond_to? :list_docker_images - @list_docker_images = ::Gapic::Config::Method.new list_docker_images_config - get_docker_image_config = parent_rpcs.get_docker_image if parent_rpcs.respond_to? :get_docker_image - @get_docker_image = ::Gapic::Config::Method.new get_docker_image_config - list_maven_artifacts_config = parent_rpcs.list_maven_artifacts if parent_rpcs.respond_to? :list_maven_artifacts - @list_maven_artifacts = ::Gapic::Config::Method.new list_maven_artifacts_config - get_maven_artifact_config = parent_rpcs.get_maven_artifact if parent_rpcs.respond_to? :get_maven_artifact - @get_maven_artifact = ::Gapic::Config::Method.new get_maven_artifact_config - list_npm_packages_config = parent_rpcs.list_npm_packages if parent_rpcs.respond_to? :list_npm_packages - @list_npm_packages = ::Gapic::Config::Method.new list_npm_packages_config - get_npm_package_config = parent_rpcs.get_npm_package if parent_rpcs.respond_to? :get_npm_package - @get_npm_package = ::Gapic::Config::Method.new get_npm_package_config - list_python_packages_config = parent_rpcs.list_python_packages if parent_rpcs.respond_to? :list_python_packages - @list_python_packages = ::Gapic::Config::Method.new list_python_packages_config - get_python_package_config = parent_rpcs.get_python_package if parent_rpcs.respond_to? :get_python_package - @get_python_package = ::Gapic::Config::Method.new get_python_package_config - import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts - @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config - import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts - @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_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_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages - @list_packages = ::Gapic::Config::Method.new list_packages_config - get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package - @get_package = ::Gapic::Config::Method.new get_package_config - delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package - @delete_package = ::Gapic::Config::Method.new delete_package_config - list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions - @list_versions = ::Gapic::Config::Method.new list_versions_config - get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version - @get_version = ::Gapic::Config::Method.new get_version_config - delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version - @delete_version = ::Gapic::Config::Method.new delete_version_config - batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions - @batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config - update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version - @update_version = ::Gapic::Config::Method.new update_version_config - list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files - @list_files = ::Gapic::Config::Method.new list_files_config - get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file - @get_file = ::Gapic::Config::Method.new get_file_config - delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file - @delete_file = ::Gapic::Config::Method.new delete_file_config - update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file - @update_file = ::Gapic::Config::Method.new update_file_config - list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags - @list_tags = ::Gapic::Config::Method.new list_tags_config - get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag - @get_tag = ::Gapic::Config::Method.new get_tag_config - create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag - @create_tag = ::Gapic::Config::Method.new create_tag_config - update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag - @update_tag = ::Gapic::Config::Method.new update_tag_config - delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag - @delete_tag = ::Gapic::Config::Method.new delete_tag_config - create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule - @create_rule = ::Gapic::Config::Method.new create_rule_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule - @get_rule = ::Gapic::Config::Method.new get_rule_config - update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule - @update_rule = ::Gapic::Config::Method.new update_rule_config - delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule - @delete_rule = ::Gapic::Config::Method.new delete_rule_config - 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_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings - @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config - update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings - @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config - get_vpcsc_config_config = parent_rpcs.get_vpcsc_config if parent_rpcs.respond_to? :get_vpcsc_config - @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config - update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config - @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config - update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package - @update_package = ::Gapic::Config::Method.new update_package_config - list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments - @list_attachments = ::Gapic::Config::Method.new list_attachments_config - get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment - @get_attachment = ::Gapic::Config::Method.new get_attachment_config - create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment - @create_attachment = ::Gapic::Config::Method.new create_attachment_config - delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment - @delete_attachment = ::Gapic::Config::Method.new delete_attachment_config - export_artifact_config = parent_rpcs.export_artifact if parent_rpcs.respond_to? :export_artifact - @export_artifact = ::Gapic::Config::Method.new export_artifact_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb deleted file mode 100644 index f3b03abb527f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/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 ArtifactRegistry - module V1 - module ArtifactRegistry - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ArtifactRegistry 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 ArtifactRegistry 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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::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{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb deleted file mode 100644 index fa04cece7736..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb +++ /dev/null @@ -1,3149 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/devtools/artifactregistry/v1/service_pb" - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - module Rest - ## - # REST service stub for the ArtifactRegistry 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_docker_images REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse] - # A result object deserialized from the server's reply - def list_docker_images request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_docker_images_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_docker_images", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_docker_image REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # A result object deserialized from the server's reply - def get_docker_image request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_docker_image_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_docker_image", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.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_maven_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse] - # A result object deserialized from the server's reply - def list_maven_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_maven_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_maven_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_maven_artifact REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # A result object deserialized from the server's reply - def get_maven_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_maven_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_maven_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.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_npm_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse] - # A result object deserialized from the server's reply - def list_npm_packages request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_npm_packages_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_npm_packages", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_npm_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # A result object deserialized from the server's reply - def get_npm_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_npm_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_npm_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.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_python_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse] - # A result object deserialized from the server's reply - def list_python_packages request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_python_packages_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_python_packages", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_python_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # A result object deserialized from the server's reply - def get_python_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_python_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_python_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_apt_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_apt_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_apt_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_apt_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_yum_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_yum_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_yum_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_yum_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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::ArtifactRegistry::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::ArtifactRegistry::V1::ListRepositoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # 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::Cloud::ArtifactRegistry::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 delete_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::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_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse] - # A result object deserialized from the server's reply - def list_packages request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_packages_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_packages", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # A result object deserialized from the server's reply - def get_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Package.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_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse] - # A result object deserialized from the server's reply - def list_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_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_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # A result object deserialized from the server's reply - def get_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_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_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Version.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_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_delete_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_delete_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_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: "batch_delete_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # A result object deserialized from the server's reply - def update_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_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: "update_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Version.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_files REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse] - # A result object deserialized from the server's reply - def list_files request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_files_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_files", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # A result object deserialized from the server's reply - def get_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_file", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::File.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_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_file", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # A result object deserialized from the server's reply - def update_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_file", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::File.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_tags REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse] - # A result object deserialized from the server's reply - def list_tags request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tags_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tags", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # A result object deserialized from the server's reply - def get_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Tag.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_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # A result object deserialized from the server's reply - def create_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Tag.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_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # A result object deserialized from the server's reply - def update_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Tag.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_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tag", - 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_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # A result object deserialized from the server's reply - def create_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_rules REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse] - # A result object deserialized from the server's reply - def list_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # A result object deserialized from the server's reply - def get_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # A result object deserialized from the server's reply - def update_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the 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_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # A result object deserialized from the server's reply - def get_project_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_project_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_project_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # A result object deserialized from the server's reply - def update_project_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_project_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_project_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_vpcsc_config REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # A result object deserialized from the server's reply - def get_vpcsc_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_vpcsc_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_vpcsc_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.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_vpcsc_config REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # A result object deserialized from the server's reply - def update_vpcsc_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_vpcsc_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_vpcsc_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.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_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # A result object deserialized from the server's reply - def update_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Package.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_attachments REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse] - # A result object deserialized from the server's reply - def list_attachments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_attachments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_attachments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # A result object deserialized from the server's reply - def get_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Attachment.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_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_artifact REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_docker_images REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_docker_images_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dockerImages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_docker_image REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_docker_image_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/dockerImages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_maven_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_maven_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/mavenArtifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_maven_artifact REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_maven_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/mavenArtifacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_npm_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_npm_packages_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/npmPackages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_npm_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_npm_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/npmPackages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_python_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_python_packages_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/pythonPackages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_python_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_python_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pythonPackages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_apt_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_apt_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/aptArtifacts:import", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_yum_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_yum_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/yumArtifacts:import", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_repositories REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_packages_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/packages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest] - # 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_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest] - # 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_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_delete_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest] - # 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_delete_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/versions:batchDelete", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest] - # 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_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{version.name}", - body: "version", - matches: [ - ["version.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_files REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_files_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/files", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest] - # 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_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest] - # 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_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{file.name}", - body: "file", - matches: [ - ["file.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tags REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tags_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tags", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest] - # 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_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tags", - body: "tag", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest] - # 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_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{tag.name}", - body: "tag", - matches: [ - ["tag.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest] - # 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_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/rules", - body: "rule", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rules REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/rules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{rule.name}", - body: "rule", - matches: [ - ["rule.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_project_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/projectSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_project_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{project_settings.name}", - body: "project_settings", - matches: [ - ["project_settings.name", %r{^projects/[^/]+/projectSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_vpcsc_config REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_vpcsc_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/vpcscConfig/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_vpcsc_config REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest] - # 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_vpcsc_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{vpcsc_config.name}", - body: "vpcsc_config", - matches: [ - ["vpcsc_config.name", %r{^projects/[^/]+/locations/[^/]+/vpcscConfig/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest] - # 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_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{package.name}", - body: "package", - matches: [ - ["package.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_attachments REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_attachments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attachments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/attachments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest] - # 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_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/attachments", - body: "attachment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest] - # 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_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/attachments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_artifact REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{repository}:exportArtifact", - body: "*", - matches: [ - ["repository", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb deleted file mode 100644 index 5cb15289f659..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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 ArtifactRegistry - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/artifact_registry/v1/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ArtifactRegistry"] - 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-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb deleted file mode 100644 index d0a4958ba59d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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/artifact_registry/v1/artifact_registry/rest" -require "google/cloud/artifact_registry/v1/bindings_override" -require "google/cloud/artifact_registry/v1/version" - -module Google - module Cloud - module ArtifactRegistry - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/artifact_registry/v1/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb deleted file mode 100644 index e60f17647d63..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/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 ArtifactRegistry - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb deleted file mode 100644 index d52d7db02386..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/apt_artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1/apt_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xba\x03\n\x0b\x41ptArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12W\n\x0cpackage_type\x18\x03 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.AptArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcomponent\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x63ontrol_file\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/AptArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}\"B\n\x1bImportAptArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x8d\x01\n\x19ImportAptArtifactsRequest\x12V\n\ngcs_source\x18\x02 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa2\x01\n\x1bImportAptArtifactsErrorInfo\x12V\n\ngcs_source\x18\x01 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xb7\x01\n\x1aImportAptArtifactsResponse\x12G\n\rapt_artifacts\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.AptArtifact\x12P\n\x06\x65rrors\x18\x02 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo\"\x1c\n\x1aImportAptArtifactsMetadataB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10\x41ptArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - AptArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.AptArtifact").msgclass - AptArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.AptArtifact.PackageType").enummodule - ImportAptArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource").msgclass - ImportAptArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsRequest").msgclass - ImportAptArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo").msgclass - ImportAptArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsResponse").msgclass - ImportAptArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb deleted file mode 100644 index 37a131ac39a5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/devtools/artifactregistry/v1/artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x04\n\x0b\x44ockerImage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12\x18\n\x10image_size_bytes\x18\x04 \x01(\x03\x12/\n\x0bupload_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nmedia_type\x18\x06 \x01(\t\x12.\n\nbuild_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\rartifact_type\x18\t \x01(\t\x12P\n\x0fimage_manifests\x18\x0b \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.ImageManifestB\x03\xe0\x41\x01:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/DockerImage\x12]projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}\"\xb2\x01\n\rImageManifest\x12\x19\n\x0c\x61rchitecture\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x0f\n\x02os\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x64igest\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmedia_type\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nos_version\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bos_features\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07variant\x18\x07 \x01(\tB\x03\xe0\x41\x01\"g\n\x17ListDockerImagesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\"|\n\x18ListDockerImagesResponse\x12G\n\rdocker_images\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.DockerImage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15GetDockerImageRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+artifactregistry.googleapis.com/DockerImage\"\xf5\x02\n\rMavenArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07pom_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x08group_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61rtifact_id\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\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:\x96\x01\xea\x41\x92\x01\n-artifactregistry.googleapis.com/MavenArtifact\x12\x61projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}\"\x89\x01\n\x19ListMavenArtifactsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-artifactregistry.googleapis.com/MavenArtifact\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1aListMavenArtifactsResponse\x12K\n\x0fmaven_artifacts\x18\x01 \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.MavenArtifact\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17GetMavenArtifactRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-artifactregistry.googleapis.com/MavenArtifact\"\xd0\x02\n\nNpmPackage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0cpackage_name\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x0c\n\x04tags\x18\x05 \x03(\t\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:\x8d\x01\xea\x41\x89\x01\n*artifactregistry.googleapis.com/NpmPackage\x12[projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}\"\x83\x01\n\x16ListNpmPackagesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/NpmPackage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x17ListNpmPackagesResponse\x12\x45\n\x0cnpm_packages\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.NpmPackage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetNpmPackageRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/NpmPackage\"\xe0\x02\n\rPythonPackage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0cpackage_name\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\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:\x96\x01\xea\x41\x92\x01\n-artifactregistry.googleapis.com/PythonPackage\x12\x61projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}\"\x89\x01\n\x19ListPythonPackagesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-artifactregistry.googleapis.com/PythonPackage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1aListPythonPackagesResponse\x12K\n\x0fpython_packages\x18\x01 \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.PythonPackage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17GetPythonPackageRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-artifactregistry.googleapis.com/PythonPackageB\xf8\x01\n\'com.google.devtools.artifactregistry.v1B\rArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - DockerImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DockerImage").msgclass - ImageManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImageManifest").msgclass - ListDockerImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListDockerImagesRequest").msgclass - ListDockerImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListDockerImagesResponse").msgclass - GetDockerImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetDockerImageRequest").msgclass - MavenArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.MavenArtifact").msgclass - ListMavenArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListMavenArtifactsRequest").msgclass - ListMavenArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListMavenArtifactsResponse").msgclass - GetMavenArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetMavenArtifactRequest").msgclass - NpmPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.NpmPackage").msgclass - ListNpmPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListNpmPackagesRequest").msgclass - ListNpmPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListNpmPackagesResponse").msgclass - GetNpmPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetNpmPackageRequest").msgclass - PythonPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.PythonPackage").msgclass - ListPythonPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPythonPackagesRequest").msgclass - ListPythonPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPythonPackagesResponse").msgclass - GetPythonPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetPythonPackageRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb deleted file mode 100644 index 704480588aca..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/attachment.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/devtools/artifactregistry/v1/attachment.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x04\n\nAttachment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x06target\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x1c\n\x14\x61ttachment_namespace\x18\x04 \x01(\t\x12Z\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.Attachment.AnnotationsEntryB\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\x12;\n\x05\x66iles\x18\x08 \x03(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\x12\x1d\n\x10oci_version_name\x18\t \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8c\x01\xea\x41\x88\x01\n*artifactregistry.googleapis.com/Attachment\x12Zprojects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}\"\x98\x01\n\x16ListAttachmentsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Attachment\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"x\n\x17ListAttachmentsResponse\x12\x44\n\x0b\x61ttachments\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.Attachment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetAttachmentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Attachment\"\xc3\x01\n\x17\x43reateAttachmentRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Attachment\x12\x1a\n\rattachment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\nattachment\x18\x03 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.AttachmentB\x03\xe0\x41\x02\"[\n\x17\x44\x65leteAttachmentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/AttachmentB\xfa\x01\n\'com.google.devtools.artifactregistry.v1B\x0f\x41ttachmentProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Attachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Attachment").msgclass - ListAttachmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListAttachmentsRequest").msgclass - ListAttachmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListAttachmentsResponse").msgclass - GetAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetAttachmentRequest").msgclass - CreateAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateAttachmentRequest").msgclass - DeleteAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteAttachmentRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb deleted file mode 100644 index 314b552fdc62..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/export.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/devtools/artifactregistry/v1/file_pb' -require 'google/devtools/artifactregistry/v1/version_pb' - - -descriptor_data = "\n0google/devtools/artifactregistry/v1/export.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a\x31google/devtools/artifactregistry/v1/version.proto\"\x9d\x02\n\x15\x45xportArtifactRequest\x12\x46\n\x0esource_version\x18\x02 \x01(\tB,\xfa\x41)\n\'artifactregistry.googleapis.com/VersionH\x00\x12>\n\nsource_tag\x18\x04 \x01(\tB(\xfa\x41%\n#artifactregistry.googleapis.com/TagH\x00\x12\x12\n\x08gcs_path\x18\x03 \x01(\tH\x01\x12\x46\n\nrepository\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\x11\n\x0fsource_artifactB\r\n\x0b\x64\x65stination\"`\n\x16\x45xportArtifactResponse\x12\x46\n\x10\x65xported_version\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.Version\"\xa9\x02\n\x16\x45xportArtifactMetadata\x12`\n\x0e\x65xported_files\x18\x01 \x03(\x0b\x32H.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile\x1a\xac\x01\n\x0c\x45xportedFile\x12\x19\n\x0fgcs_object_path\x18\x02 \x01(\tH\x00\x12\x37\n\x04name\x18\x01 \x01(\tB)\xfa\x41&\n$artifactregistry.googleapis.com/File\x12\x39\n\x06hashes\x18\x03 \x03(\x0b\x32).google.devtools.artifactregistry.v1.HashB\r\n\x0b\x64\x65stinationB\xf6\x01\n\'com.google.devtools.artifactregistry.v1B\x0b\x45xportProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - ExportArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactRequest").msgclass - ExportArtifactResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactResponse").msgclass - ExportArtifactMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactMetadata").msgclass - ExportArtifactMetadata::ExportedFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb deleted file mode 100644 index 18141ebfddc3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/file.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/devtools/artifactregistry/v1/file.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x01\n\x04Hash\x12@\n\x04type\x18\x01 \x01(\x0e\x32\x32.google.devtools.artifactregistry.v1.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\"M\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\x12\x11\n\rDIRSUM_SHA256\x10\x03\"\x98\x04\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nsize_bytes\x18\x03 \x01(\x03\x12\x39\n\x06hashes\x18\x04 \x03(\x0b\x32).google.devtools.artifactregistry.v1.Hash\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\r\n\x05owner\x18\x07 \x01(\t\x12\x33\n\nfetch_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0b\x61nnotations\x18\t \x03(\x0b\x32:.google.devtools.artifactregistry.v1.File.AnnotationsEntryB\x03\xe0\x41\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:y\xea\x41v\n$artifactregistry.googleapis.com/File\x12Nprojects/{project}/locations/{location}/repositories/{repository}/files/{file}\"\x99\x01\n\x10ListFilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/File\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"f\n\x11ListFilesResponse\x12\x38\n\x05\x66iles\x18\x01 \x03(\x0b\x32).google.devtools.artifactregistry.v1.File\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x0eGetFileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\"O\n\x11\x44\x65leteFileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\"\x87\x01\n\x11UpdateFileRequest\x12<\n\x04\x66ile\x18\x01 \x01(\x0b\x32).google.devtools.artifactregistry.v1.FileB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x42\xf4\x01\n\'com.google.devtools.artifactregistry.v1B\tFileProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Hash").msgclass - Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Hash.HashType").enummodule - File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.File").msgclass - ListFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListFilesRequest").msgclass - ListFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListFilesResponse").msgclass - GetFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetFileRequest").msgclass - DeleteFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteFileRequest").msgclass - UpdateFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateFileRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb deleted file mode 100644 index 4834b13eda56..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/generic.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/devtools/artifactregistry/v1/generic.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x02\n\x0fGenericArtifact\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x9c\x01\xea\x41\x98\x01\n/artifactregistry.googleapis.com/GenericArtifact\x12\x65projects/{project}/locations/{location}/repositories/{repository}/genericArtifacts/{generic_artifact}B\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cGenericProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - GenericArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GenericArtifact").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb deleted file mode 100644 index a68f52f8871f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/go.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/devtools/artifactregistry/v1/go.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x02\n\x08GoModule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x87\x01\xea\x41\x83\x01\n(artifactregistry.googleapis.com/GoModule\x12Wprojects/{project}/locations/{location}/repositories/{repository}/goModules/{go_module}B\xf2\x01\n\'com.google.devtools.artifactregistry.v1B\x07GoProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - GoModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GoModule").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb deleted file mode 100644 index dfa39a394c4e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/kfp_artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1/kfp_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc4\x01\n\x0bKfpArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x02 \x01(\t:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/KfpArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/kfpArtifacts/{kfp_artifact}B\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10KfpArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - KfpArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.KfpArtifact").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb deleted file mode 100644 index 40d4e366eaf5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/package.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/devtools/artifactregistry/v1/package.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa1\x03\n\x07Package\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12W\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32=.google.devtools.artifactregistry.v1.Package.AnnotationsEntryB\x03\xe0\x41\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:\x82\x01\xea\x41\x7f\n\'artifactregistry.googleapis.com/Package\x12Tprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}\"\xa9\x01\n\x13ListPackagesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'artifactregistry.googleapis.com/Package\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"o\n\x14ListPackagesResponse\x12>\n\x08packages\x18\x01 \x03(\x0b\x32,.google.devtools.artifactregistry.v1.Package\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x11GetPackageRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Package\"U\n\x14\x44\x65letePackageRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Package\"\x86\x01\n\x14UpdatePackageRequest\x12=\n\x07package\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.Package\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cPackageProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Package").msgclass - ListPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPackagesRequest").msgclass - ListPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPackagesResponse").msgclass - GetPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetPackageRequest").msgclass - DeletePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeletePackageRequest").msgclass - UpdatePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdatePackageRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb deleted file mode 100644 index a2d3a43bb3f2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/repository.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' - - -descriptor_data = "\n4google/devtools/artifactregistry/v1/repository.proto\x12#google.devtools.artifactregistry.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\"s\n\x0eUpstreamPolicy\x12\n\n\x02id\x18\x01 \x01(\t\x12\x43\n\nrepository\x18\x02 \x01(\tB/\xfa\x41,\n*artifactregistry.googleapis.com/Repository\x12\x10\n\x08priority\x18\x03 \x01(\x05\"\xa8\x03\n\x16\x43leanupPolicyCondition\x12\\\n\ttag_state\x18\x02 \x01(\x0e\x32\x44.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagStateH\x00\x88\x01\x01\x12\x14\n\x0ctag_prefixes\x18\x03 \x03(\t\x12\x1d\n\x15version_name_prefixes\x18\x04 \x03(\t\x12\x1d\n\x15package_name_prefixes\x18\x05 \x03(\t\x12\x32\n\nolder_than\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x12\x32\n\nnewer_than\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationH\x02\x88\x01\x01\"H\n\x08TagState\x12\x19\n\x15TAG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06TAGGED\x10\x01\x12\x0c\n\x08UNTAGGED\x10\x02\x12\x07\n\x03\x41NY\x10\x03\x42\x0c\n\n_tag_stateB\r\n\x0b_older_thanB\r\n\x0b_newer_than\"h\n\x1f\x43leanupPolicyMostRecentVersions\x12\x1d\n\x15package_name_prefixes\x18\x01 \x03(\t\x12\x17\n\nkeep_count\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\r\n\x0b_keep_count\"\xe8\x02\n\rCleanupPolicy\x12P\n\tcondition\x18\x02 \x01(\x0b\x32;.google.devtools.artifactregistry.v1.CleanupPolicyConditionH\x00\x12\x64\n\x14most_recent_versions\x18\x04 \x01(\x0b\x32\x44.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12I\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x39.google.devtools.artifactregistry.v1.CleanupPolicy.Action\"6\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04KEEP\x10\x02\x42\x10\n\x0e\x63ondition_type\"i\n\x17VirtualRepositoryConfig\x12N\n\x11upstream_policies\x18\x01 \x03(\x0b\x32\x33.google.devtools.artifactregistry.v1.UpstreamPolicy\"\xcd\x1f\n\x16RemoteRepositoryConfig\x12i\n\x11\x64ocker_repository\x18\x02 \x01(\x0b\x32L.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryH\x00\x12g\n\x10maven_repository\x18\x03 \x01(\x0b\x32K.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryH\x00\x12\x63\n\x0enpm_repository\x18\x04 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryH\x00\x12i\n\x11python_repository\x18\x05 \x01(\x0b\x32L.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryH\x00\x12\x63\n\x0e\x61pt_repository\x18\x06 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryH\x00\x12\x63\n\x0eyum_repository\x18\x07 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryH\x00\x12o\n\x11\x63ommon_repository\x18\x0e \x01(\x0b\x32R.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepositoryH\x00\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12r\n\x14upstream_credentials\x18\t \x01(\x0b\x32O.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentialsB\x03\xe0\x41\x01\x12(\n\x1b\x64isable_upstream_validation\x18\x0c \x01(\x08\x42\x03\xe0\x41\x04\x1a\xbf\x02\n\x13UpstreamCredentials\x12\x94\x01\n\x1dusername_password_credentials\x18\x01 \x01(\x0b\x32k.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentialsH\x00\x1a\x81\x01\n\x1bUsernamePasswordCredentials\x12\x10\n\x08username\x18\x01 \x01(\t\x12P\n\x17password_secret_version\x18\x02 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionB\r\n\x0b\x63redentials\x1a\xfe\x02\n\x10\x44ockerRepository\x12z\n\x11public_repository\x18\x01 \x01(\x0e\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepositoryH\x00\x12z\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"E\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x0e\n\nDOCKER_HUB\x10\x01\x42\n\n\x08upstream\x1a\xfe\x02\n\x0fMavenRepository\x12y\n\x11public_repository\x18\x01 \x01(\x0e\x32\\.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepositoryH\x00\x12y\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32\\.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"H\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x11\n\rMAVEN_CENTRAL\x10\x01\x42\n\n\x08upstream\x1a\xf0\x02\n\rNpmRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0e\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"@\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\t\n\x05NPMJS\x10\x01\x42\n\n\x08upstream\x1a\xf8\x02\n\x10PythonRepository\x12z\n\x11public_repository\x18\x01 \x01(\x0e\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepositoryH\x00\x12z\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"?\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x08\n\x04PYPI\x10\x01\x42\n\n\x08upstream\x1a\xc1\x04\n\rAptRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepositoryH\x00\x1a\x90\x02\n\x10PublicRepository\x12\x82\x01\n\x0frepository_base\x18\x01 \x01(\x0e\x32i.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase\x12\x17\n\x0frepository_path\x18\x02 \x01(\t\"^\n\x0eRepositoryBase\x12\x1f\n\x1bREPOSITORY_BASE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45\x42IAN\x10\x01\x12\n\n\x06UBUNTU\x10\x02\x12\x13\n\x0f\x44\x45\x42IAN_SNAPSHOT\x10\x03\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\tB\n\n\x08upstream\x1a\xed\x04\n\rYumRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepositoryH\x00\x1a\xbc\x02\n\x10PublicRepository\x12\x82\x01\n\x0frepository_base\x18\x01 \x01(\x0e\x32i.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase\x12\x17\n\x0frepository_path\x18\x02 \x01(\t\"\x89\x01\n\x0eRepositoryBase\x12\x1f\n\x1bREPOSITORY_BASE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x45NTOS\x10\x01\x12\x10\n\x0c\x43\x45NTOS_DEBUG\x10\x02\x12\x10\n\x0c\x43\x45NTOS_VAULT\x10\x03\x12\x11\n\rCENTOS_STREAM\x10\x04\x12\t\n\x05ROCKY\x10\x05\x12\x08\n\x04\x45PEL\x10\x06\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\tB\n\n\x08upstream\x1a*\n\x16\x43ommonRemoteRepository\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0f\n\rremote_source\"\xbf\x14\n\nRepository\x12]\n\x0cmaven_config\x18\t \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigH\x00\x12_\n\rdocker_config\x18\x11 \x01(\x0b\x32\x46.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigH\x00\x12\x61\n\x19virtual_repository_config\x18\x0e \x01(\x0b\x32<.google.devtools.artifactregistry.v1.VirtualRepositoryConfigH\x01\x12_\n\x18remote_repository_config\x18\x0f \x01(\x0b\x32;.google.devtools.artifactregistry.v1.RemoteRepositoryConfigH\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x36.google.devtools.artifactregistry.v1.Repository.FormatB\x03\xe0\x41\x01\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12K\n\x06labels\x18\x04 \x03(\x0b\x32;.google.devtools.artifactregistry.v1.Repository.LabelsEntry\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\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x12G\n\x04mode\x18\n \x01(\x0e\x32\x34.google.devtools.artifactregistry.v1.Repository.ModeB\x03\xe0\x41\x01\x12\x63\n\x10\x63leanup_policies\x18\x0c \x03(\x0b\x32\x44.google.devtools.artifactregistry.v1.Repository.CleanupPoliciesEntryB\x03\xe0\x41\x01\x12\x17\n\nsize_bytes\x18\r \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12#\n\x16\x63leanup_policy_dry_run\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12w\n\x1dvulnerability_scanning_config\x18\x13 \x01(\x0b\x32K.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfigB\x03\xe0\x41\x01\x12&\n\x19\x64isallow_unspecified_mode\x18\x15 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzi\x18\x16 \x01(\x08\x42\x03\xe0\x41\x03\x12\x19\n\x0cregistry_uri\x18\x1a \x01(\tB\x03\xe0\x41\x03\x1a\xf3\x01\n\x15MavenRepositoryConfig\x12!\n\x19\x61llow_snapshot_overwrites\x18\x01 \x01(\x08\x12k\n\x0eversion_policy\x18\x02 \x01(\x0e\x32S.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy\"J\n\rVersionPolicy\x12\x1e\n\x1aVERSION_POLICY_UNSPECIFIED\x10\x00\x12\x0b\n\x07RELEASE\x10\x01\x12\x0c\n\x08SNAPSHOT\x10\x02\x1a\x30\n\x16\x44ockerRepositoryConfig\x12\x16\n\x0eimmutable_tags\x18\x01 \x01(\x08\x1a\xc7\x04\n\x1bVulnerabilityScanningConfig\x12|\n\x11\x65nablement_config\x18\x01 \x01(\x0e\x32\\.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfigB\x03\xe0\x41\x01\x12\x39\n\x10last_enable_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12z\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32[.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementStateB\x03\xe0\x41\x03\x12$\n\x17\x65nablement_state_reason\x18\x04 \x01(\tB\x03\xe0\x41\x03\"R\n\x10\x45nablementConfig\x12!\n\x1d\x45NABLEMENT_CONFIG_UNSPECIFIED\x10\x00\x12\r\n\tINHERITED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"y\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14SCANNING_UNSUPPORTED\x10\x01\x12\x15\n\x11SCANNING_DISABLED\x10\x02\x12\x13\n\x0fSCANNING_ACTIVE\x10\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aj\n\x14\x43leanupPoliciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.devtools.artifactregistry.v1.CleanupPolicy:\x02\x38\x01\"\x86\x01\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OCKER\x10\x01\x12\t\n\x05MAVEN\x10\x02\x12\x07\n\x03NPM\x10\x03\x12\x07\n\x03\x41PT\x10\x05\x12\x07\n\x03YUM\x10\x06\x12\n\n\x06PYTHON\x10\x08\x12\x07\n\x03KFP\x10\t\x12\x06\n\x02GO\x10\n\x12\x0b\n\x07GENERIC\x10\x0b\x12\x08\n\x04RUBY\x10\x0c\"d\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_REPOSITORY\x10\x01\x12\x16\n\x12VIRTUAL_REPOSITORY\x10\x02\x12\x15\n\x11REMOTE_REPOSITORY\x10\x03:r\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}B\x0f\n\rformat_configB\r\n\x0bmode_config\"\xb0\x01\n\x17ListRepositoriesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x18ListRepositoriesResponse\x12\x45\n\x0crepositories\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Repository\"\xc3\x01\n\x17\x43reateRepositoryRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x1a\n\rrepository_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\nrepository\x18\x03 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.RepositoryB\x03\xe0\x41\x02\"\x8f\x01\n\x17UpdateRepositoryRequest\x12\x43\n\nrepository\x18\x01 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x17\x44\x65leteRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\xe7\x03\n\'com.google.devtools.artifactregistry.v1B\x0fRepositoryProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - UpstreamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpstreamPolicy").msgclass - CleanupPolicyCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyCondition").msgclass - CleanupPolicyCondition::TagState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState").enummodule - CleanupPolicyMostRecentVersions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions").msgclass - CleanupPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicy").msgclass - CleanupPolicy::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicy.Action").enummodule - VirtualRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VirtualRepositoryConfig").msgclass - RemoteRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig").msgclass - RemoteRepositoryConfig::UpstreamCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials").msgclass - RemoteRepositoryConfig::UpstreamCredentials::UsernamePasswordCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials").msgclass - RemoteRepositoryConfig::DockerRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository").msgclass - RemoteRepositoryConfig::DockerRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository").msgclass - RemoteRepositoryConfig::DockerRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository").enummodule - RemoteRepositoryConfig::MavenRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository").msgclass - RemoteRepositoryConfig::MavenRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository").msgclass - RemoteRepositoryConfig::MavenRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository").enummodule - RemoteRepositoryConfig::NpmRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository").msgclass - RemoteRepositoryConfig::NpmRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository").msgclass - RemoteRepositoryConfig::NpmRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository").enummodule - RemoteRepositoryConfig::PythonRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository").msgclass - RemoteRepositoryConfig::PythonRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository").msgclass - RemoteRepositoryConfig::PythonRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository").enummodule - RemoteRepositoryConfig::AptRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository").msgclass - RemoteRepositoryConfig::AptRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository").msgclass - RemoteRepositoryConfig::AptRepository::PublicRepository::RepositoryBase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase").enummodule - RemoteRepositoryConfig::AptRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository").msgclass - RemoteRepositoryConfig::YumRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository").msgclass - RemoteRepositoryConfig::YumRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository").msgclass - RemoteRepositoryConfig::YumRepository::PublicRepository::RepositoryBase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase").enummodule - RemoteRepositoryConfig::YumRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository").msgclass - RemoteRepositoryConfig::CommonRemoteRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository").msgclass - Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository").msgclass - Repository::MavenRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig").msgclass - Repository::MavenRepositoryConfig::VersionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy").enummodule - Repository::DockerRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig").msgclass - Repository::VulnerabilityScanningConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig").msgclass - Repository::VulnerabilityScanningConfig::EnablementConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig").enummodule - Repository::VulnerabilityScanningConfig::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState").enummodule - Repository::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.Format").enummodule - Repository::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.Mode").enummodule - ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRepositoriesRequest").msgclass - ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRepositoriesResponse").msgclass - GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetRepositoryRequest").msgclass - CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateRepositoryRequest").msgclass - UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateRepositoryRequest").msgclass - DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteRepositoryRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb deleted file mode 100644 index 4bac0fc5a283..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/rule.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n.google/devtools/artifactregistry/v1/rule.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\"\xc5\x03\n\x04Rule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.Rule.Action\x12\x46\n\toperation\x18\x03 \x01(\x0e\x32\x33.google.devtools.artifactregistry.v1.Rule.Operation\x12)\n\tcondition\x18\x04 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x12\n\npackage_id\x18\x05 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\"4\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44OWNLOAD\x10\x01:y\xea\x41v\n$artifactregistry.googleapis.com/Rule\x12Nprojects/{project}/locations/{location}/repositories/{repository}/rules/{rule}\"w\n\x10ListRulesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"f\n\x11ListRulesResponse\x12\x38\n\x05rules\x18\x01 \x03(\x0b\x32).google.devtools.artifactregistry.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x0eGetRuleRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/Rule\"\x9b\x01\n\x11\x43reateRuleRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/Rule\x12\x0f\n\x07rule_id\x18\x02 \x01(\t\x12\x37\n\x04rule\x18\x03 \x01(\x0b\x32).google.devtools.artifactregistry.v1.Rule\"}\n\x11UpdateRuleRequest\x12\x37\n\x04rule\x18\x01 \x01(\x0b\x32).google.devtools.artifactregistry.v1.Rule\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"O\n\x11\x44\x65leteRuleRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/RuleB\xf4\x01\n\'com.google.devtools.artifactregistry.v1B\tRuleProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule").msgclass - Rule::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule.Action").enummodule - Rule::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule.Operation").enummodule - ListRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRulesRequest").msgclass - ListRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRulesResponse").msgclass - GetRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetRuleRequest").msgclass - CreateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateRuleRequest").msgclass - UpdateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateRuleRequest").msgclass - DeleteRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteRuleRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb deleted file mode 100644 index ac3659b2f1e1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/devtools/artifactregistry/v1/apt_artifact_pb' -require 'google/devtools/artifactregistry/v1/artifact_pb' -require 'google/devtools/artifactregistry/v1/attachment_pb' -require 'google/devtools/artifactregistry/v1/export_pb' -require 'google/devtools/artifactregistry/v1/file_pb' -require 'google/devtools/artifactregistry/v1/package_pb' -require 'google/devtools/artifactregistry/v1/repository_pb' -require 'google/devtools/artifactregistry/v1/rule_pb' -require 'google/devtools/artifactregistry/v1/settings_pb' -require 'google/devtools/artifactregistry/v1/tag_pb' -require 'google/devtools/artifactregistry/v1/version_pb' -require 'google/devtools/artifactregistry/v1/vpcsc_config_pb' -require 'google/devtools/artifactregistry/v1/yum_artifact_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n1google/devtools/artifactregistry/v1/service.proto\x12#google.devtools.artifactregistry.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x36google/devtools/artifactregistry/v1/apt_artifact.proto\x1a\x32google/devtools/artifactregistry/v1/artifact.proto\x1a\x34google/devtools/artifactregistry/v1/attachment.proto\x1a\x30google/devtools/artifactregistry/v1/export.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a\x31google/devtools/artifactregistry/v1/package.proto\x1a\x34google/devtools/artifactregistry/v1/repository.proto\x1a.google/devtools/artifactregistry/v1/rule.proto\x1a\x32google/devtools/artifactregistry/v1/settings.proto\x1a-google/devtools/artifactregistry/v1/tag.proto\x1a\x31google/devtools/artifactregistry/v1/version.proto\x1a\x36google/devtools/artifactregistry/v1/vpcsc_config.proto\x1a\x36google/devtools/artifactregistry/v1/yum_artifact.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x13\n\x11OperationMetadata2\xa6Z\n\x10\x41rtifactRegistry\x12\xe1\x01\n\x10ListDockerImages\x12<.google.devtools.artifactregistry.v1.ListDockerImagesRequest\x1a=.google.devtools.artifactregistry.v1.ListDockerImagesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages\x12\xce\x01\n\x0eGetDockerImage\x12:.google.devtools.artifactregistry.v1.GetDockerImageRequest\x1a\x30.google.devtools.artifactregistry.v1.DockerImage\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}\x12\xe9\x01\n\x12ListMavenArtifacts\x12>.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest\x1a?.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts\x12\xd6\x01\n\x10GetMavenArtifact\x12<.google.devtools.artifactregistry.v1.GetMavenArtifactRequest\x1a\x32.google.devtools.artifactregistry.v1.MavenArtifact\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}\x12\xdd\x01\n\x0fListNpmPackages\x12;.google.devtools.artifactregistry.v1.ListNpmPackagesRequest\x1a<.google.devtools.artifactregistry.v1.ListNpmPackagesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages\x12\xca\x01\n\rGetNpmPackage\x12\x39.google.devtools.artifactregistry.v1.GetNpmPackageRequest\x1a/.google.devtools.artifactregistry.v1.NpmPackage\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}\x12\xe9\x01\n\x12ListPythonPackages\x12>.google.devtools.artifactregistry.v1.ListPythonPackagesRequest\x1a?.google.devtools.artifactregistry.v1.ListPythonPackagesResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages\x12\xd6\x01\n\x10GetPythonPackage\x12<.google.devtools.artifactregistry.v1.GetPythonPackageRequest\x1a\x32.google.devtools.artifactregistry.v1.PythonPackage\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}\x12\xcb\x02\n\x12ImportAptArtifacts\x12>.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41\x80\x01\n>google.devtools.artifactregistry.v1.ImportAptArtifactsResponse\x12>google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import:\x01*\x12\xcb\x02\n\x12ImportYumArtifacts\x12>.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41\x80\x01\n>google.devtools.artifactregistry.v1.ImportYumArtifactsResponse\x12>google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import:\x01*\x12\xd2\x01\n\x10ListRepositories\x12<.google.devtools.artifactregistry.v1.ListRepositoriesRequest\x1a=.google.devtools.artifactregistry.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.devtools.artifactregistry.v1.GetRepositoryRequest\x1a/.google.devtools.artifactregistry.v1.Repository\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/repositories/*}\x12\xc2\x02\n\x10\x43reateRepository\x12<.google.devtools.artifactregistry.v1.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\xd0\x01\xca\x41g\n.google.devtools.artifactregistry.v1.Repository\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xeb\x01\n\x10UpdateRepository\x12<.google.devtools.artifactregistry.v1.UpdateRepositoryRequest\x1a/.google.devtools.artifactregistry.v1.Repository\"h\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\x82\x02\n\x10\x44\x65leteRepository\x12<.google.devtools.artifactregistry.v1.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xd1\x01\n\x0cListPackages\x12\x38.google.devtools.artifactregistry.v1.ListPackagesRequest\x1a\x39.google.devtools.artifactregistry.v1.ListPackagesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/repositories/*}/packages\x12\xbe\x01\n\nGetPackage\x12\x36.google.devtools.artifactregistry.v1.GetPackageRequest\x1a,.google.devtools.artifactregistry.v1.Package\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/repositories/*/packages/*}\x12\x87\x02\n\rDeletePackage\x12\x39.google.devtools.artifactregistry.v1.DeletePackageRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/repositories/*/packages/*}\x12\xdc\x01\n\x0cListVersions\x12\x38.google.devtools.artifactregistry.v1.ListVersionsRequest\x1a\x39.google.devtools.artifactregistry.v1.ListVersionsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions\x12\xc9\x01\n\nGetVersion\x12\x36.google.devtools.artifactregistry.v1.GetVersionRequest\x1a,.google.devtools.artifactregistry.v1.Version\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\x92\x02\n\rDeleteVersion\x12\x39.google.devtools.artifactregistry.v1.DeleteVersionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xbf\x02\n\x13\x42\x61tchDeleteVersions\x12?.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41X\n\x15google.protobuf.Empty\x12?google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02W\"R/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete:\x01*\x12\xef\x01\n\rUpdateVersion\x12\x39.google.devtools.artifactregistry.v1.UpdateVersionRequest\x1a,.google.devtools.artifactregistry.v1.Version\"u\xda\x41\x13version,update_mask\x82\xd3\xe4\x93\x02Y2N/v1/{version.name=projects/*/locations/*/repositories/*/packages/*/versions/*}:\x07version\x12\xc5\x01\n\tListFiles\x12\x35.google.devtools.artifactregistry.v1.ListFilesRequest\x1a\x36.google.devtools.artifactregistry.v1.ListFilesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/files\x12\xb3\x01\n\x07GetFile\x12\x33.google.devtools.artifactregistry.v1.GetFileRequest\x1a).google.devtools.artifactregistry.v1.File\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/repositories/*/files/**}\x12\xfe\x01\n\nDeleteFile\x12\x36.google.devtools.artifactregistry.v1.DeleteFileRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/files/*}\x12\xcf\x01\n\nUpdateFile\x12\x36.google.devtools.artifactregistry.v1.UpdateFileRequest\x1a).google.devtools.artifactregistry.v1.File\"^\xda\x41\x10\x66ile,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{file.name=projects/*/locations/*/repositories/*/files/*}:\x04\x66ile\x12\xcc\x01\n\x08ListTags\x12\x34.google.devtools.artifactregistry.v1.ListTagsRequest\x1a\x35.google.devtools.artifactregistry.v1.ListTagsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags\x12\xb9\x01\n\x06GetTag\x12\x32.google.devtools.artifactregistry.v1.GetTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xd1\x01\n\tCreateTag\x12\x35.google.devtools.artifactregistry.v1.CreateTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"c\xda\x41\x11parent,tag,tag_id\x82\xd3\xe4\x93\x02I\"B/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags:\x03tag\x12\xd3\x01\n\tUpdateTag\x12\x35.google.devtools.artifactregistry.v1.UpdateTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"e\xda\x41\x0ftag,update_mask\x82\xd3\xe4\x93\x02M2F/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}:\x03tag\x12\xad\x01\n\tDeleteTag\x12\x35.google.devtools.artifactregistry.v1.DeleteTagRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xcd\x01\n\nCreateRule\x12\x36.google.devtools.artifactregistry.v1.CreateRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"\\\xda\x41\x13parent,rule,rule_id\x82\xd3\xe4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/rules:\x04rule\x12\xc5\x01\n\tListRules\x12\x35.google.devtools.artifactregistry.v1.ListRulesRequest\x1a\x36.google.devtools.artifactregistry.v1.ListRulesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/rules\x12\xb2\x01\n\x07GetRule\x12\x33.google.devtools.artifactregistry.v1.GetRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/repositories/*/rules/*}\x12\xcf\x01\n\nUpdateRule\x12\x36.google.devtools.artifactregistry.v1.UpdateRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"^\xda\x41\x10rule,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{rule.name=projects/*/locations/*/repositories/*/rules/*}:\x04rule\x12\xa5\x01\n\nDeleteRule\x12\x36.google.devtools.artifactregistry.v1.DeleteRuleRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/rules/*}\x12\x97\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\x94\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"I\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xbd\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"R\x82\xd3\xe4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\xc0\x01\n\x12GetProjectSettings\x12>.google.devtools.artifactregistry.v1.GetProjectSettingsRequest\x1a\x34.google.devtools.artifactregistry.v1.ProjectSettings\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\x12%/v1/{name=projects/*/projectSettings}\x12\x81\x02\n\x15UpdateProjectSettings\x12\x41.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest\x1a\x34.google.devtools.artifactregistry.v1.ProjectSettings\"o\xda\x41\x1cproject_settings,update_mask\x82\xd3\xe4\x93\x02J26/v1/{project_settings.name=projects/*/projectSettings}:\x10project_settings\x12\xbc\x01\n\x0eGetVPCSCConfig\x12:.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest\x1a\x30.google.devtools.artifactregistry.v1.VPCSCConfig\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/vpcscConfig}\x12\xf1\x01\n\x11UpdateVPCSCConfig\x12=.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest\x1a\x30.google.devtools.artifactregistry.v1.VPCSCConfig\"k\xda\x41\x18vpcsc_config,update_mask\x82\xd3\xe4\x93\x02J2:/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}:\x0cvpcsc_config\x12\xe4\x01\n\rUpdatePackage\x12\x39.google.devtools.artifactregistry.v1.UpdatePackageRequest\x1a,.google.devtools.artifactregistry.v1.Package\"j\xda\x41\x13package,update_mask\x82\xd3\xe4\x93\x02N2C/v1/{package.name=projects/*/locations/*/repositories/*/packages/*}:\x07package\x12\xdd\x01\n\x0fListAttachments\x12;.google.devtools.artifactregistry.v1.ListAttachmentsRequest\x1a<.google.devtools.artifactregistry.v1.ListAttachmentsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/attachments\x12\xca\x01\n\rGetAttachment\x12\x39.google.devtools.artifactregistry.v1.GetAttachmentRequest\x1a/.google.devtools.artifactregistry.v1.Attachment\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/attachments/*}\x12\xd0\x02\n\x10\x43reateAttachment\x12<.google.devtools.artifactregistry.v1.CreateAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\xde\x01\xca\x41g\n.google.devtools.artifactregistry.v1.Attachment\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x1fparent,attachment,attachment_id\x82\xd3\xe4\x93\x02L\">/v1/{parent=projects/*/locations/*/repositories/*}/attachments:\nattachment\x12\x90\x02\n\x10\x44\x65leteAttachment\x12<.google.devtools.artifactregistry.v1.DeleteAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/attachments/*}\x12\xb9\x02\n\x0e\x45xportArtifact\x12:.google.devtools.artifactregistry.v1.ExportArtifactRequest\x1a\x1d.google.longrunning.Operation\"\xcb\x01\xca\x41x\n:google.devtools.artifactregistry.v1.ExportArtifactResponse\x12:google.devtools.artifactregistry.v1.ExportArtifactMetadata\x82\xd3\xe4\x93\x02J\"E/v1/{repository=projects/*/locations/*/repositories/*}:exportArtifact:\x01*\x1a\x8c\x01\xca\x41\x1f\x61rtifactregistry.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cServiceProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb deleted file mode 100644 index cd63f995e427..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb +++ /dev/null @@ -1,172 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/devtools/artifactregistry/v1/service.proto for package 'Google.Cloud.ArtifactRegistry.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/devtools/artifactregistry/v1/service_pb' - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.devtools.artifactregistry.v1.ArtifactRegistry' - - # Lists docker images. - rpc :ListDockerImages, ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse - # Gets a docker image. - rpc :GetDockerImage, ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Google::Cloud::ArtifactRegistry::V1::DockerImage - # Lists maven artifacts. - rpc :ListMavenArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse - # Gets a maven artifact. - rpc :GetMavenArtifact, ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact - # Lists npm packages. - rpc :ListNpmPackages, ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse - # Gets a npm package. - rpc :GetNpmPackage, ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::NpmPackage - # Lists python packages. - rpc :ListPythonPackages, ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse - # Gets a python package. - rpc :GetPythonPackage, ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::PythonPackage - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - rpc :ImportAptArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Google::Longrunning::Operation - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - rpc :ImportYumArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Google::Longrunning::Operation - # Lists repositories. - rpc :ListRepositories, ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse - # Gets a repository. - rpc :GetRepository, ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1::Repository - # Creates a repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - rpc :CreateRepository, ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, ::Google::Longrunning::Operation - # Updates a repository. - rpc :UpdateRepository, ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1::Repository - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - rpc :DeleteRepository, ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, ::Google::Longrunning::Operation - # Lists packages. - rpc :ListPackages, ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse - # Gets a package. - rpc :GetPackage, ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::Package - # Deletes a package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - rpc :DeletePackage, ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Google::Longrunning::Operation - # Lists versions. - rpc :ListVersions, ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse - # Gets a version - rpc :GetVersion, ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Google::Cloud::ArtifactRegistry::V1::Version - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - rpc :DeleteVersion, ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Google::Longrunning::Operation - # Deletes multiple versions across a repository. The returned operation will - # complete once the versions have been deleted. - rpc :BatchDeleteVersions, ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Google::Longrunning::Operation - # Updates a version. - rpc :UpdateVersion, ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Google::Cloud::ArtifactRegistry::V1::Version - # Lists files. - rpc :ListFiles, ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse - # Gets a file. - rpc :GetFile, ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Google::Cloud::ArtifactRegistry::V1::File - # Deletes a file and all of its content. It is only allowed on generic - # repositories. The returned operation will complete once the file has been - # deleted. - rpc :DeleteFile, ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Google::Longrunning::Operation - # Updates a file. - rpc :UpdateFile, ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Google::Cloud::ArtifactRegistry::V1::File - # Lists tags. - rpc :ListTags, ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse - # Gets a tag. - rpc :GetTag, ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag - # Creates a tag. - rpc :CreateTag, ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag - # Updates a tag. - rpc :UpdateTag, ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag - # Deletes a tag. - rpc :DeleteTag, ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Google::Protobuf::Empty - # Creates a rule. - rpc :CreateRule, ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule - # Lists rules. - rpc :ListRules, ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse - # Gets a rule. - rpc :GetRule, ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule - # Updates a rule. - rpc :UpdateRule, ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule - # Deletes a rule. - rpc :DeleteRule, ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Google::Protobuf::Empty - # Updates the IAM policy for a given resource. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the IAM policy for a given resource. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Tests if the caller has a list of permissions on a resource. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Retrieves the Settings for the Project. - rpc :GetProjectSettings, ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings - # Updates the Settings for the Project. - rpc :UpdateProjectSettings, ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings - # Retrieves the VPCSC Config for the Project. - rpc :GetVPCSCConfig, ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig - # Updates the VPCSC Config for the Project. - rpc :UpdateVPCSCConfig, ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig - # Updates a package. - rpc :UpdatePackage, ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Google::Cloud::ArtifactRegistry::V1::Package - # Lists attachments. - rpc :ListAttachments, ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse - # Gets an attachment. - rpc :GetAttachment, ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Google::Cloud::ArtifactRegistry::V1::Attachment - # Creates an attachment. The returned Operation will finish once the - # attachment has been created. Its response will be the created attachment. - rpc :CreateAttachment, ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Google::Longrunning::Operation - # Deletes an attachment. The returned Operation will - # finish once the attachments has been deleted. It will not have any - # Operation metadata and will return a `google.protobuf.Empty` response. - rpc :DeleteAttachment, ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Google::Longrunning::Operation - # Exports an artifact to a Cloud Storage bucket. - rpc :ExportArtifact, ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb deleted file mode 100644 index 0c2cce6155dc..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/settings.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n2google/devtools/artifactregistry/v1/settings.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x88\x04\n\x0fProjectSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12g\n\x18legacy_redirection_state\x18\x02 \x01(\x0e\x32\x45.google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState\x12\x14\n\x0cpull_percent\x18\x03 \x01(\x05\"\x8d\x02\n\x10RedirectionState\x12!\n\x1dREDIRECTION_STATE_UNSPECIFIED\x10\x00\x12$\n REDIRECTION_FROM_GCR_IO_DISABLED\x10\x01\x12#\n\x1fREDIRECTION_FROM_GCR_IO_ENABLED\x10\x02\x12)\n!REDIRECTION_FROM_GCR_IO_FINALIZED\x10\x03\x1a\x02\x08\x01\x12/\n+REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING\x10\x05\x12/\n+REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING\x10\x06:X\xea\x41U\n/artifactregistry.googleapis.com/ProjectSettings\x12\"projects/{project}/projectSettings\"b\n\x19GetProjectSettingsRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/artifactregistry.googleapis.com/ProjectSettings\"\x9f\x01\n\x1cUpdateProjectSettingsRequest\x12N\n\x10project_settings\x18\x02 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1.ProjectSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xf8\x01\n\'com.google.devtools.artifactregistry.v1B\rSettingsProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - ProjectSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ProjectSettings").msgclass - ProjectSettings::RedirectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState").enummodule - GetProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetProjectSettingsRequest").msgclass - UpdateProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb deleted file mode 100644 index bb7df2a34734..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/tag.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n-google/devtools/artifactregistry/v1/tag.proto\x12#google.devtools.artifactregistry.v1\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb1\x01\n\x03Tag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t:\x8a\x01\xea\x41\x86\x01\n#artifactregistry.googleapis.com/Tag\x12_projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}\"X\n\x0fListTagsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"c\n\x10ListTagsResponse\x12\x36\n\x04tags\x18\x01 \x03(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1d\n\rGetTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"i\n\x10\x43reateTagRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06tag_id\x18\x02 \x01(\t\x12\x35\n\x03tag\x18\x03 \x01(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\"z\n\x10UpdateTagRequest\x12\x35\n\x03tag\x18\x01 \x01(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\" \n\x10\x44\x65leteTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\xf3\x01\n\'com.google.devtools.artifactregistry.v1B\x08TagProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Tag").msgclass - ListTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListTagsRequest").msgclass - ListTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListTagsResponse").msgclass - GetTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetTagRequest").msgclass - CreateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateTagRequest").msgclass - UpdateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateTagRequest").msgclass - DeleteTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteTagRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb deleted file mode 100644 index d391b66a4f6d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/version.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/devtools/artifactregistry/v1/file_pb' -require 'google/devtools/artifactregistry/v1/tag_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/devtools/artifactregistry/v1/version.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a-google/devtools/artifactregistry/v1/tag.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xea\x04\n\x07Version\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x0crelated_tags\x18\x07 \x03(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12W\n\x0b\x61nnotations\x18\t \x03(\x0b\x32=.google.devtools.artifactregistry.v1.Version.AnnotationsEntryB\x03\xe0\x41\x01\x12\x44\n\x0c\x66ingerprints\x18\n \x03(\x0b\x32).google.devtools.artifactregistry.v1.HashB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x96\x01\xea\x41\x92\x01\n\'artifactregistry.googleapis.com/Version\x12gprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}\"\xb8\x01\n\x13ListVersionsRequest\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>\n\x04view\x18\x04 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.VersionView\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x06 \x01(\tB\x03\xe0\x41\x01\"o\n\x14ListVersionsResponse\x12>\n\x08versions\x18\x01 \x03(\x0b\x32,.google.devtools.artifactregistry.v1.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x11GetVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x04view\x18\x02 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.VersionView\"3\n\x14\x44\x65leteVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"\xb1\x01\n\x1a\x42\x61tchDeleteVersionsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xfa\x41)\x12\'artifactregistry.googleapis.com/Version\x12>\n\x05names\x18\x02 \x03(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Version\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"6\n\x1b\x42\x61tchDeleteVersionsMetadata\x12\x17\n\x0f\x66\x61iled_versions\x18\x02 \x03(\t\"\x8b\x01\n\x14UpdateVersionRequest\x12\x42\n\x07version\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.VersionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask*@\n\x0bVersionView\x12\x1c\n\x18VERSION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cVersionProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Version").msgclass - ListVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListVersionsRequest").msgclass - ListVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListVersionsResponse").msgclass - GetVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetVersionRequest").msgclass - DeleteVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteVersionRequest").msgclass - BatchDeleteVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest").msgclass - BatchDeleteVersionsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata").msgclass - UpdateVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateVersionRequest").msgclass - VersionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VersionView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb deleted file mode 100644 index dbb9ba0543ee..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/vpcsc_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1/vpcsc_config.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x98\x02\n\x0bVPCSCConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12R\n\x0cvpcsc_policy\x18\x02 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy\"@\n\x0bVPCSCPolicy\x12\x1c\n\x18VPCSC_POLICY_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44\x45NY\x10\x01\x12\t\n\x05\x41LLOW\x10\x02:e\xea\x41\x62\n+artifactregistry.googleapis.com/VpcscConfig\x12\x33projects/{project}/locations/{location}/vpcscConfig\"Z\n\x15GetVPCSCConfigRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+artifactregistry.googleapis.com/VpcscConfig\"\x93\x01\n\x18UpdateVPCSCConfigRequest\x12\x46\n\x0cvpcsc_config\x18\x01 \x01(\x0b\x32\x30.google.devtools.artifactregistry.v1.VPCSCConfig\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10VPCSCConfigProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - VPCSCConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VPCSCConfig").msgclass - VPCSCConfig::VPCSCPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy").enummodule - GetVPCSCConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetVPCSCConfigRequest").msgclass - UpdateVPCSCConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb deleted file mode 100644 index a52fb7f9c0ff..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/yum_artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1/yum_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\x87\x03\n\x0bYumArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12W\n\x0cpackage_type\x18\x03 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.YumArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/YumArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}\"B\n\x1bImportYumArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x8d\x01\n\x19ImportYumArtifactsRequest\x12V\n\ngcs_source\x18\x02 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa2\x01\n\x1bImportYumArtifactsErrorInfo\x12V\n\ngcs_source\x18\x01 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xb7\x01\n\x1aImportYumArtifactsResponse\x12G\n\ryum_artifacts\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.YumArtifact\x12P\n\x06\x65rrors\x18\x02 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo\"\x1c\n\x1aImportYumArtifactsMetadataB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10YumArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - YumArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.YumArtifact").msgclass - YumArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.YumArtifact.PackageType").enummodule - ImportYumArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource").msgclass - ImportYumArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsRequest").msgclass - ImportYumArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo").msgclass - ImportYumArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsResponse").msgclass - ImportYumArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md deleted file mode 100644 index 94b4fba12369..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Artifact Registry 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-artifact_registry-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb deleted file mode 100644 index a312b90573bf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # A detailed representation of an Apt artifact. Information in the record - # is derived from the archive's control file. - # See https://www.debian.org/doc/debian-policy/ch-controlfields.html - # @!attribute [r] name - # @return [::String] - # Output only. The Artifact Registry resource name of the artifact. - # @!attribute [r] package_name - # @return [::String] - # Output only. The Apt package name of the artifact. - # @!attribute [r] package_type - # @return [::Google::Cloud::ArtifactRegistry::V1::AptArtifact::PackageType] - # Output only. An artifact is a binary or source package. - # @!attribute [r] architecture - # @return [::String] - # Output only. Operating system architecture of the artifact. - # @!attribute [r] component - # @return [::String] - # Output only. Repository component of the artifact. - # @!attribute [r] control_file - # @return [::String] - # Output only. Contents of the artifact's control metadata file. - class AptArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Package type is either binary or source. - module PackageType - # Package type is not specified. - PACKAGE_TYPE_UNSPECIFIED = 0 - - # Binary package. - BINARY = 1 - - # Source package. - SOURCE = 2 - end - end - - # Google Cloud Storage location where the artifacts currently reside. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). - # @!attribute [rw] use_wildcards - # @return [::Boolean] - # Supports URI wildcards for matching multiple objects from a single URI. - class ImportAptArtifactsGcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to import new apt artifacts. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource] - # Google Cloud Storage location where input content is located. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the artifacts will be imported. - class ImportAptArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Error information explaining why a package was not imported. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource] - # Google Cloud Storage location requested. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The detailed error status. - class ImportAptArtifactsErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message from importing APT artifacts. - # @!attribute [rw] apt_artifacts - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::AptArtifact>] - # The Apt artifacts imported. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsErrorInfo>] - # Detailed error info for packages that were not imported. - class ImportAptArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The operation metadata for importing artifacts. - class ImportAptArtifactsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb deleted file mode 100644 index 19aa2ab91f75..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb +++ /dev/null @@ -1,384 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # DockerImage represents a docker artifact. - # The following fields are returned as untyped metadata in the Version - # resource, using camelcase keys (i.e. metadata.imageSizeBytes): - # * imageSizeBytes - # * mediaType - # * buildTime - # @!attribute [rw] name - # @return [::String] - # Required. registry_location, project_id, repository_name and image id forms - # a unique image - # name:`projects//locations//repositories//dockerImages/`. - # For example, - # "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ - # nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", - # where "us-west4" is the registry_location, "test-project" is the - # project_id, "test-repo" is the repository_name and - # "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" - # is the image's digest. - # @!attribute [rw] uri - # @return [::String] - # Required. URL to access the image. - # Example: - # us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf - # @!attribute [rw] tags - # @return [::Array<::String>] - # Tags attached to this image. - # @!attribute [rw] image_size_bytes - # @return [::Integer] - # Calculated size of the image. - # This field is returned as the 'metadata.imageSizeBytes' field in the - # Version resource. - # @!attribute [rw] upload_time - # @return [::Google::Protobuf::Timestamp] - # Time the image was uploaded. - # @!attribute [rw] media_type - # @return [::String] - # Media type of this image, e.g. - # "application/vnd.docker.distribution.manifest.v2+json". - # This field is returned as the 'metadata.mediaType' field in the - # Version resource. - # @!attribute [rw] build_time - # @return [::Google::Protobuf::Timestamp] - # The time this image was built. - # This field is returned as the 'metadata.buildTime' field in the - # Version resource. - # The build time is returned to the client as an RFC 3339 string, which can - # be easily used with the JavaScript Date constructor. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the docker image was last updated. - # @!attribute [rw] artifact_type - # @return [::String] - # ArtifactType of this image, e.g. "application/vnd.example+type". - # If the `subject_digest` is set and no `artifact_type` is given, the - # `media_type` will be considered as the `artifact_type`. This field is - # returned as the `metadata.artifactType` field in the Version resource. - # @!attribute [rw] image_manifests - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImageManifest>] - # Optional. For multi-arch images (manifest lists), this field contains the - # list of image manifests. - class DockerImage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of a single image manifest within a multi-arch image. - # @!attribute [rw] architecture - # @return [::String] - # Optional. The CPU architecture of the image. - # Values are provided by the Docker client and are not validated by Artifact - # Registry. Example values include "amd64", "arm64", "ppc64le", "s390x", - # "riscv64", "mips64le", etc. - # @!attribute [rw] os - # @return [::String] - # Optional. The operating system of the image. - # Values are provided by the Docker client and are not validated by Artifact - # Registry. Example values include "linux", "windows", "darwin", "aix", etc. - # @!attribute [rw] digest - # @return [::String] - # Optional. The manifest digest, in the format "sha256:". - # @!attribute [rw] media_type - # @return [::String] - # Optional. The media type of the manifest, e.g., - # "application/vnd.docker.distribution.manifest.v2+json" - # @!attribute [rw] os_version - # @return [::String] - # Optional. The OS version of the image, for example on Windows - # `10.0.14393.1066`. - # @!attribute [rw] os_features - # @return [::Array<::String>] - # Optional. The required OS features for the image, for example on Windows - # `win32k`. - # @!attribute [rw] variant - # @return [::String] - # Optional. The variant of the CPU in the image, for example `v7` to specify - # ARMv7 when architecture is `arm`. - class ImageManifest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list docker images. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose docker images will be - # listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] order_by - # @return [::String] - # The field to order the results by. - class ListDockerImagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing docker images. - # @!attribute [rw] docker_images - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] - # The docker images returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of artifacts, or empty if there are no - # more artifacts to return. - class ListDockerImagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get docker images. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the docker images. - class GetDockerImageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MavenArtifact represents a maven artifact. - # @!attribute [rw] name - # @return [::String] - # Required. registry_location, project_id, repository_name and maven_artifact - # forms a unique artifact For example, - # "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ - # com.google.guava:guava:31.0-jre", - # where "us-west4" is the registry_location, "test-project" is the - # project_id, "test-repo" is the repository_name and - # "com.google.guava:guava:31.0-jre" - # is the maven artifact. - # @!attribute [rw] pom_uri - # @return [::String] - # Required. URL to access the pom file of the artifact. - # Example: - # us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom - # @!attribute [rw] group_id - # @return [::String] - # Group ID for the artifact. - # Example: - # com.google.guava - # @!attribute [rw] artifact_id - # @return [::String] - # Artifact ID for the artifact. - # @!attribute [rw] version - # @return [::String] - # Version of this artifact. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the artifact was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the artifact was updated. - class MavenArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list maven artifacts. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose maven artifacts will be - # listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListMavenArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing maven artifacts. - # @!attribute [rw] maven_artifacts - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] - # The maven artifacts returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of artifacts, or empty if there are no - # more artifacts to return. - class ListMavenArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get maven artifacts. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the maven artifact. - class GetMavenArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NpmPackage represents an npm artifact. - # @!attribute [rw] name - # @return [::String] - # Required. registry_location, project_id, repository_name and npm_package - # forms a unique package For example, - # "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ - # npm_test:1.0.0", - # where "us-west4" is the registry_location, "test-project" is the - # project_id, "test-repo" is the repository_name and - # npm_test:1.0.0" is the npm package. - # @!attribute [rw] package_name - # @return [::String] - # Package for the artifact. - # @!attribute [rw] version - # @return [::String] - # Version of this package. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Tags attached to this package. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the package was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the package was updated. - class NpmPackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list npm packages. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose npm packages will be - # listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListNpmPackagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing npm packages. - # @!attribute [rw] npm_packages - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] - # The npm packages returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of artifacts, or empty if there are no - # more artifacts to return. - class ListNpmPackagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get npm packages. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the npm package. - class GetNpmPackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PythonPackage represents a python artifact. - # @!attribute [rw] name - # @return [::String] - # Required. registry_location, project_id, repository_name and python_package - # forms a unique package - # name:`projects//locations//repository//pythonPackages/`. - # For example, - # "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ - # python_package:1.0.0", - # where "us-west4" is the registry_location, "test-project" is the - # project_id, "test-repo" is the repository_name and - # python_package:1.0.0" is the python package. - # @!attribute [rw] uri - # @return [::String] - # Required. URL to access the package. - # Example: - # us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz - # @!attribute [rw] package_name - # @return [::String] - # Package for the artifact. - # @!attribute [rw] version - # @return [::String] - # Version of this package. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the package was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the package was updated. - class PythonPackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list python packages. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose python packages will be - # listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListPythonPackagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing python packages. - # @!attribute [rw] python_packages - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] - # The python packages returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of artifacts, or empty if there are no - # more artifacts to return. - class ListPythonPackagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get python packages. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the python package. - class GetPythonPackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb deleted file mode 100644 index 4f4aa4117723..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # An Attachment refers to additional metadata that can be attached to - # artifacts in Artifact Registry. An attachment consists of one or more files. - # @!attribute [rw] name - # @return [::String] - # The name of the attachment. E.g. - # `projects/p1/locations/us/repositories/repo/attachments/sbom`. - # @!attribute [rw] target - # @return [::String] - # Required. The target the attachment is for, can be a Version, Package or - # Repository. E.g. - # `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. - # @!attribute [rw] type - # @return [::String] - # Type of attachment. - # E.g. `application/vnd.spdx+json` - # @!attribute [rw] attachment_namespace - # @return [::String] - # The namespace this attachment belongs to. - # E.g. If an attachment is created by artifact analysis, namespace is set - # to `artifactanalysis.googleapis.com`. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User annotations. These attributes can only be set and used by - # the user, and not by Artifact Registry. See - # https://google.aip.dev/128#annotations for more details such as format and - # size limitations. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the attachment was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the attachment was last updated. - # @!attribute [rw] files - # @return [::Array<::String>] - # Required. The files that belong to this attachment. - # If the file ID part contains slashes, they are escaped. E.g. - # `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. - # @!attribute [r] oci_version_name - # @return [::String] - # Output only. The name of the OCI version that this attachment created. Only - # populated for Docker attachments. E.g. - # `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. - class Attachment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request to list attachments. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose attachments will be listed. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `target` - # * `type` - # * `attachment_namespace` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of attachments to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListAttachmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing attachments. - # @!attribute [rw] attachments - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Attachment>] - # The attachments returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of attachments, or empty if there are - # no more attachments to return. - class ListAttachmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve an attachment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the attachment to retrieve. - class GetAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new attachment. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource where the attachment will be - # created. - # @!attribute [rw] attachment_id - # @return [::String] - # Required. The attachment id to use for this attachment. - # @!attribute [rw] attachment - # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # Required. The attachment to be created. - class CreateAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete an attachment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the attachment to delete. - class DeleteAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb deleted file mode 100644 index a94ff905b658..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.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! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # The request for exporting an artifact to a destination. - # @!attribute [rw] source_version - # @return [::String] - # The artifact version to export. - # Format: - # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} - # - # Note: The following fields are mutually exclusive: `source_version`, `source_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] source_tag - # @return [::String] - # The artifact tag to export. - # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} - # - # Note: The following fields are mutually exclusive: `source_tag`, `source_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcs_path - # @return [::String] - # The Cloud Storage path to export the artifact to. Should start with the - # bucket name, and optionally have a directory path. Examples: - # `dst_bucket`, `dst_bucket/sub_dir`. - # Existing objects with the same path will be overwritten. - # @!attribute [rw] repository - # @return [::String] - # Required. The repository of the artifact to export. - # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} - class ExportArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for exporting an artifact to a destination. - # @!attribute [rw] exported_version - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # The exported version. Should be the same as the request version with - # fingerprint resource name. - class ExportArtifactResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The LRO metadata for exporting an artifact. - # @!attribute [rw] exported_files - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ExportArtifactMetadata::ExportedFile>] - # The exported artifact files. - class ExportArtifactMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The exported artifact file. - # @!attribute [rw] gcs_object_path - # @return [::String] - # Cloud Storage Object path of the exported file. Examples: - # `dst_bucket/file1`, `dst_bucket/sub_dir/file1` - # @!attribute [rw] name - # @return [::String] - # Name of the exported artifact file. - # Format: `projects/p1/locations/us/repositories/repo1/files/file1` - # @!attribute [rw] hashes - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] - # The hashes of the file content. - class ExportedFile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb deleted file mode 100644 index e07c055ac9d5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.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! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # A hash of file content. - # @!attribute [rw] type - # @return [::Google::Cloud::ArtifactRegistry::V1::Hash::HashType] - # The algorithm used to compute the hash value. - # @!attribute [rw] value - # @return [::String] - # The hash value. - class Hash - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The algorithm used to compute the hash. - module HashType - # Unspecified. - HASH_TYPE_UNSPECIFIED = 0 - - # SHA256 hash. - SHA256 = 1 - - # MD5 hash. - MD5 = 2 - - # Dirsum SHA256 hash. - DIRSUM_SHA256 = 3 - end - end - - # Files store content that is potentially associated with Packages or Versions. - # @!attribute [rw] name - # @return [::String] - # The name of the file, for example: - # `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`. - # If the file ID part contains slashes, they are escaped. - # @!attribute [rw] size_bytes - # @return [::Integer] - # The size of the File in bytes. - # @!attribute [rw] hashes - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] - # The hashes of the file content. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the File was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the File was last updated. - # @!attribute [rw] owner - # @return [::String] - # The name of the Package or Version that owns this file, if any. - # @!attribute [r] fetch_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the last attempt to refresh the file's data was - # made. Only set when the repository is remote. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client specified annotations. - class File - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request to list files. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the repository whose files will be listed. For - # example: "projects/p1/locations/us-central1/repositories/repo1 - # @!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` - # * `owner` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to files with the name `my_file.txt` - # in project `my-project` in the `us-central` region, in repository - # `my-repo`, append the following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - # - # To filter the results of your request to files owned by the version `1.0` - # in package `pkg1`, append the following filter expression to your request: - # - # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # - # To filter the results of your request to files with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to files with the annotation key-value pair - # [`external.link`:`https://example.com/my-file`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-file`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of files to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] order_by - # @return [::String] - # The field to order the results by. - class ListFilesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing files. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::File>] - # The files returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of files, or empty if there are no - # more files to return. - class ListFilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a file. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the file to retrieve. - class GetFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a file. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the file to delete. - class DeleteFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a file. - # @!attribute [rw] file - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # Required. The File that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb deleted file mode 100644 index e851d178d658..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.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 Cloud - module ArtifactRegistry - module V1 - # GenericArtifact represents a generic artifact - # @!attribute [rw] name - # @return [::String] - # Resource name of the generic artifact. - # project, location, repository, package_id and version_id - # create a unique generic artifact. - # i.e. "projects/test-project/locations/us-west4/repositories/test-repo/ - # genericArtifacts/package_id:version_id" - # @!attribute [rw] version - # @return [::String] - # The version of the generic artifact. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Generic module is created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Generic module is updated. - class GenericArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb deleted file mode 100644 index ad71da265c27..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.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 ArtifactRegistry - module V1 - # GoModule represents a Go module. - # @!attribute [rw] name - # @return [::String] - # The resource name of a Go module. - # @!attribute [rw] version - # @return [::String] - # The version of the Go module. Must be a valid canonical version as defined - # in https://go.dev/ref/mod#glos-canonical-version. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Go module is created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Go module is updated. - class GoModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb deleted file mode 100644 index 2b69b5b6bb0d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.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 ArtifactRegistry - module V1 - # A detailed representation of a KFP artifact. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of the KFP artifact. Since users don't directly - # interact with this resource, the name will be derived from the associated - # version. For example, when version = ".../versions/sha256:abcdef...", the - # name will be ".../kfpArtifacts/sha256:abcdef...". - # @!attribute [rw] version - # @return [::String] - # The version associated with the KFP artifact. Must follow the Semantic - # Versioning standard. - class KfpArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb deleted file mode 100644 index b7e1ad069172..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.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! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # Packages are named collections of versions. - # @!attribute [rw] name - # @return [::String] - # The name of the package, for example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - # If the package ID part contains slashes, the slashes are escaped. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the package. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the package was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the package was last updated. This includes publishing a new - # version of the package. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client specified annotations. - class Package - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request to list packages. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose packages will be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of packages to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to packages with the name - # `my-package` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - # - # To filter the results of your request to packages with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request": - # - # * `"annotations.external_link:external_link_value"` - # - # To filter the results just for a specific annotation key `external_link`, - # append the following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to packages with the annotation key-value pair - # [`external.link`:`https://example.com/my-package`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-package`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @!attribute [rw] order_by - # @return [::String] - # Optional. The field to order the results by. - class ListPackagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing packages. - # @!attribute [rw] packages - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Package>] - # The packages returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of packages, or empty if there are no - # more packages to return. - class ListPackagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a package. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the package to retrieve. - class GetPackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a package. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the package to delete. - class DeletePackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a package. - # @!attribute [rw] package - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # The package that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdatePackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb deleted file mode 100644 index 4f78625826fd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb +++ /dev/null @@ -1,848 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # Artifact policy configuration for the repository contents. - # @!attribute [rw] id - # @return [::String] - # The user-provided ID of the upstream policy. - # @!attribute [rw] repository - # @return [::String] - # A reference to the repository resource, for example: - # `projects/p1/locations/us-central1/repositories/repo1`. - # @!attribute [rw] priority - # @return [::Integer] - # Entries with a greater priority value take precedence in the pull order. - class UpstreamPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. - # If multiple entries are set, all must be satisfied for the condition to be - # satisfied. - # @!attribute [rw] tag_state - # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyCondition::TagState] - # Match versions by tag status. - # @!attribute [rw] tag_prefixes - # @return [::Array<::String>] - # Match versions by tag prefix. Applied on any prefix match. - # @!attribute [rw] version_name_prefixes - # @return [::Array<::String>] - # Match versions by version name prefix. Applied on any prefix match. - # @!attribute [rw] package_name_prefixes - # @return [::Array<::String>] - # Match versions by package prefix. Applied on any prefix match. - # @!attribute [rw] older_than - # @return [::Google::Protobuf::Duration] - # Match versions older than a duration. - # @!attribute [rw] newer_than - # @return [::Google::Protobuf::Duration] - # Match versions newer than a duration. - class CleanupPolicyCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Statuses applying to versions. - module TagState - # Tag status not specified. - TAG_STATE_UNSPECIFIED = 0 - - # Applies to tagged versions only. - TAGGED = 1 - - # Applies to untagged versions only. - UNTAGGED = 2 - - # Applies to all versions. - ANY = 3 - end - end - - # CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy - # for retaining a minimum number of versions. - # @!attribute [rw] package_name_prefixes - # @return [::Array<::String>] - # List of package name prefixes that will apply this rule. - # @!attribute [rw] keep_count - # @return [::Integer] - # Minimum number of versions to keep. - class CleanupPolicyMostRecentVersions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Artifact policy configuration for repository cleanup policies. - # @!attribute [rw] condition - # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyCondition] - # Policy condition for matching versions. - # - # Note: The following fields are mutually exclusive: `condition`, `most_recent_versions`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] most_recent_versions - # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyMostRecentVersions] - # Policy condition for retaining a minimum number of versions. May only be - # specified with a Keep action. - # - # Note: The following fields are mutually exclusive: `most_recent_versions`, `condition`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] id - # @return [::String] - # The user-provided ID of the cleanup policy. - # @!attribute [rw] action - # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy::Action] - # Policy action. - class CleanupPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Action type for a cleanup policy. - module Action - # Action not specified. - ACTION_UNSPECIFIED = 0 - - # Delete action. - DELETE = 1 - - # Keep action. - KEEP = 2 - end - end - - # Virtual repository configuration. - # @!attribute [rw] upstream_policies - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::UpstreamPolicy>] - # Policies that configure the upstream artifacts distributed by the Virtual - # Repository. Upstream policies cannot be set on a standard repository. - class VirtualRepositoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Remote repository configuration. - # @!attribute [rw] docker_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository] - # Specific settings for a Docker remote repository. - # - # Note: The following fields are mutually exclusive: `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] maven_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository] - # Specific settings for a Maven remote repository. - # - # Note: The following fields are mutually exclusive: `maven_repository`, `docker_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] npm_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository] - # Specific settings for an Npm remote repository. - # - # Note: The following fields are mutually exclusive: `npm_repository`, `docker_repository`, `maven_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] python_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository] - # Specific settings for a Python remote repository. - # - # Note: The following fields are mutually exclusive: `python_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] apt_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository] - # Specific settings for an Apt remote repository. - # - # Note: The following fields are mutually exclusive: `apt_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] yum_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository] - # Specific settings for a Yum remote repository. - # - # Note: The following fields are mutually exclusive: `yum_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] common_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::CommonRemoteRepository] - # Common remote repository settings. - # Used as the remote repository upstream URL. - # - # Note: The following fields are mutually exclusive: `common_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] description - # @return [::String] - # The description of the remote source. - # @!attribute [rw] upstream_credentials - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::UpstreamCredentials] - # Optional. The credentials used to access the remote repository. - # @!attribute [rw] disable_upstream_validation - # @return [::Boolean] - # Input only. A create/update remote repo option to avoid making a HEAD/GET - # request to validate a remote repo and any supplied upstream credentials. - class RemoteRepositoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The credentials to access the remote repository. - # @!attribute [rw] username_password_credentials - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::UpstreamCredentials::UsernamePasswordCredentials] - # Use username and password to access the remote repository. - class UpstreamCredentials - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Username and password credentials. - # @!attribute [rw] username - # @return [::String] - # The username to access the remote repository. - # @!attribute [rw] password_secret_version - # @return [::String] - # The Secret Manager key version that holds the password to access the - # remote repository. Must be in the format of - # `projects/{project}/secrets/{secret}/versions/{version}`. - class UsernamePasswordCredentials - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for a Docker remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository::PublicRepository] - # One of the publicly available Docker repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DockerRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the custom remote repository, for ex: - # "https://registry-1.docker.io". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Predefined list of publicly available Docker repositories like Docker - # Hub. - module PublicRepository - # Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0 - - # Docker Hub. - DOCKER_HUB = 1 - end - end - - # Configuration for a Maven remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository::PublicRepository] - # One of the publicly available Maven repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class MavenRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the upstream remote repository, for ex: - # "https://my.maven.registry/". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Predefined list of publicly available Maven repositories like Maven - # Central. - module PublicRepository - # Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0 - - # Maven Central. - MAVEN_CENTRAL = 1 - end - end - - # Configuration for a Npm remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository::PublicRepository] - # One of the publicly available Npm repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class NpmRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the upstream remote repository, for ex: - # "https://my.npm.registry/". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Predefined list of publicly available NPM repositories like npmjs. - module PublicRepository - # Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0 - - # npmjs. - NPMJS = 1 - end - end - - # Configuration for a Python remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository::PublicRepository] - # One of the publicly available Python repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class PythonRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the upstream remote repository, for ex: - # "https://my.python.registry/". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Predefined list of publicly available Python repositories like PyPI.org. - module PublicRepository - # Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0 - - # PyPI. - PYPI = 1 - end - end - - # Configuration for an Apt remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::PublicRepository] - # One of the publicly available Apt repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AptRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Publicly available Apt repositories constructed from a common repository - # base and a custom repository path. - # @!attribute [rw] repository_base - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::PublicRepository::RepositoryBase] - # A common public repository base for Apt. - # @!attribute [rw] repository_path - # @return [::String] - # A custom field to define a path to a specific repository from the base. - class PublicRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Predefined list of publicly available repository bases for Apt. - module RepositoryBase - # Unspecified repository base. - REPOSITORY_BASE_UNSPECIFIED = 0 - - # Debian. - DEBIAN = 1 - - # Ubuntu LTS/Pro. - UBUNTU = 2 - - # Archived Debian. - DEBIAN_SNAPSHOT = 3 - end - end - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the upstream remote repository, for ex: - # "https://my.apt.registry/". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for a Yum remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::PublicRepository] - # One of the publicly available Yum repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class YumRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Publicly available Yum repositories constructed from a common repository - # base and a custom repository path. - # @!attribute [rw] repository_base - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::PublicRepository::RepositoryBase] - # A common public repository base for Yum. - # @!attribute [rw] repository_path - # @return [::String] - # A custom field to define a path to a specific repository from the base. - class PublicRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Predefined list of publicly available repository bases for Yum. - module RepositoryBase - # Unspecified repository base. - REPOSITORY_BASE_UNSPECIFIED = 0 - - # CentOS. - CENTOS = 1 - - # CentOS Debug. - CENTOS_DEBUG = 2 - - # CentOS Vault. - CENTOS_VAULT = 3 - - # CentOS Stream. - CENTOS_STREAM = 4 - - # Rocky. - ROCKY = 5 - - # Fedora Extra Packages for Enterprise Linux (EPEL). - EPEL = 6 - end - end - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the upstream remote repository, for ex: - # "https://my.yum.registry/". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Common remote repository settings type. - # @!attribute [rw] uri - # @return [::String] - # Required. A common public repository base for remote repository. - class CommonRemoteRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A Repository for storing artifacts with a specific format. - # @!attribute [rw] maven_config - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::MavenRepositoryConfig] - # Maven repository config contains repository level configuration - # for the repositories of maven type. - # - # Note: The following fields are mutually exclusive: `maven_config`, `docker_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] docker_config - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::DockerRepositoryConfig] - # Docker repository config contains repository level configuration - # for the repositories of docker type. - # - # Note: The following fields are mutually exclusive: `docker_config`, `maven_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] virtual_repository_config - # @return [::Google::Cloud::ArtifactRegistry::V1::VirtualRepositoryConfig] - # Configuration specific for a Virtual Repository. - # - # Note: The following fields are mutually exclusive: `virtual_repository_config`, `remote_repository_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] remote_repository_config - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig] - # Configuration specific for a Remote Repository. - # - # Note: The following fields are mutually exclusive: `remote_repository_config`, `virtual_repository_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # The name of the repository, for example: - # `projects/p1/locations/us-central1/repositories/repo1`. For each location - # in a project, repository names must be unique. - # @!attribute [rw] format - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::Format] - # Optional. The format of packages that are stored in the repository. - # @!attribute [rw] description - # @return [::String] - # The user-provided description of the repository. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels with user-defined metadata. - # This field may contain up to 64 entries. Label keys and values may be no - # longer than 63 characters. Label keys must begin with a lowercase letter - # and may only contain lowercase letters, numeric characters, underscores, - # and dashes. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the repository was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the repository was last updated. - # @!attribute [rw] kms_key_name - # @return [::String] - # The Cloud KMS resource name of the customer managed encryption key that's - # used to encrypt the contents of the Repository. Has the form: - # `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. - # This value may not be changed after the Repository has been created. - # @!attribute [rw] mode - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::Mode] - # Optional. The mode of the repository. - # @!attribute [rw] cleanup_policies - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy}] - # Optional. Cleanup policies for this repository. Cleanup policies indicate - # when certain package versions can be automatically deleted. Map keys are - # policy IDs supplied by users during policy creation. They must unique - # within a repository and be under 128 characters in length. - # @!attribute [r] size_bytes - # @return [::Integer] - # Output only. The size, in bytes, of all artifact storage in this - # repository. Repositories that are generally available or in public preview - # use this to calculate storage costs. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Whether or not this repository satisfies PZS. - # @!attribute [rw] cleanup_policy_dry_run - # @return [::Boolean] - # Optional. If true, the cleanup pipeline is prevented from deleting versions - # in this repository. - # @!attribute [rw] vulnerability_scanning_config - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig] - # Optional. Config and state for vulnerability scanning of resources within - # this Repository. - # @!attribute [rw] disallow_unspecified_mode - # @return [::Boolean] - # Optional. If this is true, an unspecified repo type will be treated as - # error rather than defaulting to standard. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Whether or not this repository satisfies PZI. - # @!attribute [r] registry_uri - # @return [::String] - # Output only. The repository endpoint, for example: - # `us-docker.pkg.dev/my-proj/my-repo`. - class Repository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # MavenRepositoryConfig is maven related repository details. - # Provides additional configuration details for repositories of the maven - # format type. - # @!attribute [rw] allow_snapshot_overwrites - # @return [::Boolean] - # The repository with this flag will allow publishing - # the same snapshot versions. - # @!attribute [rw] version_policy - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::MavenRepositoryConfig::VersionPolicy] - # Version policy defines the versions that the registry will accept. - class MavenRepositoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VersionPolicy is the version policy for the repository. - module VersionPolicy - # VERSION_POLICY_UNSPECIFIED - the version policy is not defined. - # When the version policy is not defined, no validation is performed - # for the versions. - VERSION_POLICY_UNSPECIFIED = 0 - - # RELEASE - repository will accept only Release versions. - RELEASE = 1 - - # SNAPSHOT - repository will accept only Snapshot versions. - SNAPSHOT = 2 - end - end - - # DockerRepositoryConfig is docker related repository details. - # Provides additional configuration details for repositories of the docker - # format type. - # @!attribute [rw] immutable_tags - # @return [::Boolean] - # The repository which enabled this flag prevents all tags from being - # modified, moved or deleted. This does not prevent tags from being - # created. - class DockerRepositoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config on whether to perform vulnerability scanning for resources in this - # repository, as well as output fields describing current state. - # @!attribute [rw] enablement_config - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig::EnablementConfig] - # Optional. Config for whether this repository has vulnerability scanning - # disabled. - # @!attribute [r] last_enable_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time this repository config was enabled. - # @!attribute [r] enablement_state - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig::EnablementState] - # Output only. State of feature enablement, combining repository enablement - # config and API enablement state. - # @!attribute [r] enablement_state_reason - # @return [::String] - # Output only. Reason for the repository state. - class VulnerabilityScanningConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Config for vulnerability scanning of resources in this repository. - module EnablementConfig - # Not set. This will be treated as INHERITED for Docker repositories and - # DISABLED for non-Docker repositories. - ENABLEMENT_CONFIG_UNSPECIFIED = 0 - - # Scanning is Enabled, but dependent on API enablement. - INHERITED = 1 - - # No automatic vulnerability scanning will be performed for this - # repository. - DISABLED = 2 - end - - # Describes the state of vulnerability scanning in this repository, - # including both repository enablement and API enablement. - module EnablementState - # Enablement state is unclear. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # Repository does not support vulnerability scanning. - SCANNING_UNSUPPORTED = 1 - - # Vulnerability scanning is disabled for this repository. - SCANNING_DISABLED = 2 - - # Vulnerability scanning is active for this repository. - SCANNING_ACTIVE = 3 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy] - class CleanupPoliciesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A package format. - module Format - # Unspecified package format. - FORMAT_UNSPECIFIED = 0 - - # Docker package format. - DOCKER = 1 - - # Maven package format. - MAVEN = 2 - - # NPM package format. - NPM = 3 - - # APT package format. - APT = 5 - - # YUM package format. - YUM = 6 - - # Python package format. - PYTHON = 8 - - # Kubeflow Pipelines package format. - KFP = 9 - - # Go package format. - GO = 10 - - # Generic package format. - GENERIC = 11 - - # Ruby package format. - RUBY = 12 - end - - # The mode configures the repository to serve artifacts from different - # sources. - module Mode - # Unspecified mode. - MODE_UNSPECIFIED = 0 - - # A standard repository storing artifacts. - STANDARD_REPOSITORY = 1 - - # A virtual repository to serve artifacts from one or more sources. - VIRTUAL_REPOSITORY = 2 - - # A remote repository to serve artifacts from a remote source. - REMOTE_REPOSITORY = 3 - end - end - - # The request to list repositories. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose repositories will be - # listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # - # Examples of using a filter: - # - # To filter the results of your request to repositories with the name - # `my-repo` in project `my-project` in the `us-central` region, append the - # following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - # @!attribute [rw] order_by - # @return [::String] - # Optional. The field to order the results by. - class ListRepositoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing repositories. - # @!attribute [rw] repositories - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Repository>] - # The repositories returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of repositories, or empty if there are - # no more repositories to return. - class ListRepositoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a repository. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the repository to retrieve. - class GetRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new repository. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource where the repository will be - # created. - # @!attribute [rw] repository_id - # @return [::String] - # Required. The repository id to use for this repository. - # @!attribute [rw] repository - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # Required. The repository to be created. - class CreateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a repository. - # @!attribute [rw] repository - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # The repository that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a repository. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the repository to delete. - class DeleteRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb deleted file mode 100644 index 0bdb1d2172c8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb +++ /dev/null @@ -1,149 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # A rule defines the deny or allow action of the operation it applies to and - # the conditions required for the rule to apply. You can set one rule for an - # entire repository and one rule for each package within. - # @!attribute [rw] name - # @return [::String] - # The name of the rule, for example: - # `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. - # @!attribute [rw] action - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule::Action] - # The action this rule takes. - # @!attribute [rw] operation - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule::Operation] - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # Optional. A CEL expression for conditions that must be met in order for the - # rule to apply. If not provided, the rule matches all objects. - # @!attribute [rw] package_id - # @return [::String] - # The package ID the rule applies to. - # If empty, this rule applies to all packages inside the repository. - class Rule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the action of the rule. - module Action - # Action not specified. - ACTION_UNSPECIFIED = 0 - - # Allow the operation. - ALLOW = 1 - - # Deny the operation. - DENY = 2 - end - - # The operation the rule applies to. - module Operation - # Operation not specified. - OPERATION_UNSPECIFIED = 0 - - # Download operation. - DOWNLOAD = 1 - end - end - - # The request to list rules. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent repository whose rules will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of rules to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing rules. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Rule>] - # The rules returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of rules, or empty if there are no - # more rules to return. - class ListRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a rule. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to retrieve. - class GetRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new rule. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource where the rule will be created. - # @!attribute [rw] rule_id - # @return [::String] - # The rule id to use for this repository. - # @!attribute [rw] rule - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # The rule to be created. - class CreateRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a rule. - # @!attribute [rw] rule - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # The rule that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a rule. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to delete. - class DeleteRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb deleted file mode 100644 index 2ee4fa0cdea8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.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 ArtifactRegistry - module V1 - # Metadata type for longrunning-operations, currently empty. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb deleted file mode 100644 index a545ef0668e5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.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 ArtifactRegistry - module V1 - # The Artifact Registry settings that apply to a Project. - # @!attribute [rw] name - # @return [::String] - # The name of the project's settings. - # - # Always of the form: - # projects/\\{project-id}/projectSettings - # - # In update request: never set - # In response: always set - # @!attribute [rw] legacy_redirection_state - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings::RedirectionState] - # The redirection state of the legacy repositories in this project. - # @!attribute [rw] pull_percent - # @return [::Integer] - # The percentage of pull traffic to redirect from GCR to AR when using - # partial redirection. - class ProjectSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible redirection states for legacy repositories. - module RedirectionState - # No redirection status has been set. - REDIRECTION_STATE_UNSPECIFIED = 0 - - # Redirection is disabled. - REDIRECTION_FROM_GCR_IO_DISABLED = 1 - - # Redirection is enabled. - REDIRECTION_FROM_GCR_IO_ENABLED = 2 - - # Redirection is enabled, and has been finalized so cannot be reverted. - REDIRECTION_FROM_GCR_IO_FINALIZED = 3 - - # Redirection is enabled and missing images are copied from GCR - REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING = 5 - - # Redirection is partially enabled and missing images are copied from GCR - REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING = 6 - end - end - - # Gets the redirection status for a project. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the projectSettings resource. - class GetProjectSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sets the settings of the project. - # @!attribute [rw] project_settings - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # The project settings. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Field mask to support partial updates. - class UpdateProjectSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb deleted file mode 100644 index a9a41f7a2b11..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # Tags point to a version and represent an alternative name that can be used - # to access the version. - # @!attribute [rw] name - # @return [::String] - # The name of the tag, for example: - # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". - # If the package part contains slashes, the slashes are escaped. - # The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else - # must be URL encoded. - # @!attribute [rw] version - # @return [::String] - # The name of the version the tag refers to, for example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` - # If the package or version ID parts contain slashes, the slashes are - # escaped. - class Tag - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list tags. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent package whose tags will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - # @!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` - # * `version` - # - # Examples of using a filter: - # - # To filter the results of your request to tags with the name `my-tag` in - # package `my-package` in repository `my-repo` in project "`y-project` in - # the us-central region, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - # - # To filter the results of your request to tags applied to the version - # `1.0` in package `my-package`, append the following filter expression to - # your request: - # - # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of tags to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListTagsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing tags. - # @!attribute [rw] tags - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # The tags returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of tags, or empty if there are no - # more tags to return. - class ListTagsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a tag. - # @!attribute [rw] name - # @return [::String] - # The name of the tag to retrieve. - class GetTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new tag. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the tag will be created. - # @!attribute [rw] tag_id - # @return [::String] - # The tag id to use for this repository. - # @!attribute [rw] tag - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # The tag to be created. - class CreateTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create or update a tag. - # @!attribute [rw] tag - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # The tag that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a tag. - # @!attribute [rw] name - # @return [::String] - # The name of the tag to delete. - class DeleteTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb deleted file mode 100644 index 9c9c3ee8a90f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb +++ /dev/null @@ -1,237 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # The body of a version resource. A version resource represents a - # collection of components, such as files and other data. This may correspond - # to a version in many package management schemes. - # @!attribute [rw] name - # @return [::String] - # The name of the version, for example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. - # If the package or version ID parts contain slashes, the slashes are - # escaped. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the version, as specified in its metadata. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the version was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the version was last updated. - # @!attribute [rw] related_tags - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # Output only. A list of related tags. Will contain up to 100 tags that - # reference this version. - # @!attribute [r] metadata - # @return [::Google::Protobuf::Struct] - # Output only. Repository-specific Metadata stored against this version. - # The fields returned are defined by the underlying repository-specific - # resource. Currently, the resources could be: - # {::Google::Cloud::ArtifactRegistry::V1::DockerImage DockerImage} - # {::Google::Cloud::ArtifactRegistry::V1::MavenArtifact MavenArtifact} - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client specified annotations. - # @!attribute [r] fingerprints - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] - # Output only. Immutable reference for the version, calculated based on the - # version's content. Currently we only support dirsum_sha256 hash algorithm. - # Additional hash algorithms may be added in the future. - class Version - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request to list versions. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource whose versions will be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] view - # @return [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The field to order the results by. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to versions with the name - # `my-version` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - # - # To filter the results of your request to versions with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to versions with the annotation key-value pair - # [`external.link`:`https://example.com/my-version`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-version`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - class ListVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing versions. - # @!attribute [rw] versions - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Version>] - # The versions returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of versions, or empty if there are no - # more versions to return. - class ListVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a version. - # @!attribute [rw] name - # @return [::String] - # The name of the version to retrieve. - # @!attribute [rw] view - # @return [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - class GetVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a version. - # @!attribute [rw] name - # @return [::String] - # The name of the version to delete. - # @!attribute [rw] force - # @return [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - class DeleteVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete multiple versions across a repository. - # @!attribute [rw] parent - # @return [::String] - # The name of the repository holding all requested versions. - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. The names of the versions to delete. - # The maximum number of versions deleted per batch is determined by the - # service and is dependent on the available resources in the region. - # @!attribute [rw] validate_only - # @return [::Boolean] - # If true, the request is performed without deleting data, following AIP-163. - class BatchDeleteVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The metadata of an LRO from deleting multiple versions. - # @!attribute [rw] failed_versions - # @return [::Array<::String>] - # The versions the operation failed to delete. - class BatchDeleteVersionsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a version. - # @!attribute [rw] version - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # Required. The Version that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The view, which determines what version information is returned in a - # response. - module VersionView - # The default / unset value. - # The API will default to the BASIC view. - VERSION_VIEW_UNSPECIFIED = 0 - - # Includes basic information about the version, but not any related tags. - BASIC = 1 - - # Include everything. - FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb deleted file mode 100644 index ddeb66c66eaa..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.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 Cloud - module ArtifactRegistry - module V1 - # The Artifact Registry VPC SC config that apply to a Project. - # @!attribute [rw] name - # @return [::String] - # The name of the project's VPC SC Config. - # - # Always of the form: - # projects/\\{projectID}/locations/\\{location}/vpcscConfig - # - # In update request: never set - # In response: always set - # @!attribute [rw] vpcsc_policy - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig::VPCSCPolicy] - # The project per location VPC SC policy that defines the VPC SC behavior for - # the Remote Repository (Allow/Deny). - class VPCSCConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VPCSCPolicy is the VPC SC policy for project and location. - module VPCSCPolicy - # VPCSC_POLICY_UNSPECIFIED - the VPS SC policy is not defined. - # When VPS SC policy is not defined - the Service will use the default - # behavior (VPCSC_DENY). - VPCSC_POLICY_UNSPECIFIED = 0 - - # VPCSC_DENY - repository will block the requests to the Upstreams for the - # Remote Repositories if the resource is in the perimeter. - DENY = 1 - - # VPCSC_ALLOW - repository will allow the requests to the Upstreams for the - # Remote Repositories if the resource is in the perimeter. - ALLOW = 2 - end - end - - # Gets the VPC SC config for a project. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the VPCSCConfig resource. - class GetVPCSCConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sets the VPCSC config of the project. - # @!attribute [rw] vpcsc_config - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # The project config. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Field mask to support partial updates. - class UpdateVPCSCConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb deleted file mode 100644 index dac974efbbdf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.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! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # A detailed representation of a Yum artifact. - # @!attribute [r] name - # @return [::String] - # Output only. The Artifact Registry resource name of the artifact. - # @!attribute [r] package_name - # @return [::String] - # Output only. The yum package name of the artifact. - # @!attribute [r] package_type - # @return [::Google::Cloud::ArtifactRegistry::V1::YumArtifact::PackageType] - # Output only. An artifact is a binary or source package. - # @!attribute [r] architecture - # @return [::String] - # Output only. Operating system architecture of the artifact. - class YumArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Package type is either binary or source. - module PackageType - # Package type is not specified. - PACKAGE_TYPE_UNSPECIFIED = 0 - - # Binary package (.rpm). - BINARY = 1 - - # Source package (.srpm). - SOURCE = 2 - end - end - - # Google Cloud Storage location where the artifacts currently reside. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). - # @!attribute [rw] use_wildcards - # @return [::Boolean] - # Supports URI wildcards for matching multiple objects from a single URI. - class ImportYumArtifactsGcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to import new yum artifacts. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource] - # Google Cloud Storage location where input content is located. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the artifacts will be imported. - class ImportYumArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Error information explaining why a package was not imported. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource] - # Google Cloud Storage location requested. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The detailed error status. - class ImportYumArtifactsErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message from importing YUM artifacts. - # @!attribute [rw] yum_artifacts - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::YumArtifact>] - # The yum artifacts imported. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsErrorInfo>] - # Detailed error info for packages that were not imported. - class ImportYumArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The operation metadata for importing artifacts. - class ImportYumArtifactsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile deleted file mode 100644 index 459cdcd60fe7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1", path: "../" -else - gem "google-cloud-artifact_registry-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-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb deleted file mode 100644 index 3551d1fea5e3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.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 artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the batch_delete_versions call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions. -# -def batch_delete_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new - - # Call the batch_delete_versions method. - result = client.batch_delete_versions request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb deleted file mode 100644 index faa2d06ad650..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.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 artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the create_attachment call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment. -# -def create_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new - - # Call the create_attachment method. - result = client.create_attachment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb deleted file mode 100644 index da79982e2f09..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the create_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository. -# -def create_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::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 artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb deleted file mode 100644 index 446cae77d141..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the create_rule call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule. -# -def create_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new - - # Call the create_rule method. - result = client.create_rule request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb deleted file mode 100644 index 614917acd763..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the create_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag. -# -def create_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new - - # Call the create_tag method. - result = client.create_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb deleted file mode 100644 index a5a7848c4daa..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.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 artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_attachment call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment. -# -def delete_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new - - # Call the delete_attachment method. - result = client.delete_attachment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb deleted file mode 100644 index fdcd3ccaa467..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.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 artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_file call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file. -# -def delete_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new - - # Call the delete_file method. - result = client.delete_file request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb deleted file mode 100644 index 5a655c2e4962..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.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 artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package. -# -def delete_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new - - # Call the delete_package method. - result = client.delete_package request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb deleted file mode 100644 index 640b18b6b3c2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository. -# -def delete_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::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 artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb deleted file mode 100644 index 558ed7cef6e8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_rule call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule. -# -def delete_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new - - # Call the delete_rule method. - result = client.delete_rule request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb deleted file mode 100644 index 91e16a183ca6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag. -# -def delete_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new - - # Call the delete_tag method. - result = client.delete_tag request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb deleted file mode 100644 index 3eaddca23f51..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.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 artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_version call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version. -# -def delete_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new - - # Call the delete_version method. - result = client.delete_version request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb deleted file mode 100644 index 5f1daba9d5a5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.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 artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the export_artifact call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact. -# -def export_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new - - # Call the export_artifact method. - result = client.export_artifact request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb deleted file mode 100644 index b5b108c71355..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_attachment call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment. -# -def get_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new - - # Call the get_attachment method. - result = client.get_attachment request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb deleted file mode 100644 index 0ef05ed884cb..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_docker_image call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image. -# -def get_docker_image - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new - - # Call the get_docker_image method. - result = client.get_docker_image request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb deleted file mode 100644 index 197816935c4b..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_file call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file. -# -def get_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new - - # Call the get_file method. - result = client.get_file request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb deleted file mode 100644 index 1afea8a55d98..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_iam_policy call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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 artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb deleted file mode 100644 index 565ab113d0f9..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_maven_artifact call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact. -# -def get_maven_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new - - # Call the get_maven_artifact method. - result = client.get_maven_artifact request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb deleted file mode 100644 index e3fb548ad087..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_npm_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package. -# -def get_npm_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new - - # Call the get_npm_package method. - result = client.get_npm_package request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb deleted file mode 100644 index e8bca8350df6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package. -# -def get_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new - - # Call the get_package method. - result = client.get_package request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb deleted file mode 100644 index cfb98bbd9209..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_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 artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_project_settings call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings. -# -def get_project_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new - - # Call the get_project_settings method. - result = client.get_project_settings request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb deleted file mode 100644 index df5c6449c907..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_python_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package. -# -def get_python_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new - - # Call the get_python_package method. - result = client.get_python_package request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb deleted file mode 100644 index 4919f715af65..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository. -# -def get_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new - - # Call the get_repository method. - result = client.get_repository request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb deleted file mode 100644 index 64edea734465..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_rule call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule. -# -def get_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new - - # Call the get_rule method. - result = client.get_rule request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb deleted file mode 100644 index 38020d4c9027..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag. -# -def get_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new - - # Call the get_tag method. - result = client.get_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb deleted file mode 100644 index ebfc4996d184..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_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 artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_version call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version. -# -def get_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new - - # Call the get_version method. - result = client.get_version request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb deleted file mode 100644 index 6396617d1fd4..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_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 artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_vpcsc_config call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config. -# -def get_vpcsc_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new - - # Call the get_vpcsc_config method. - result = client.get_vpcsc_config request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb deleted file mode 100644 index 1d1c19f659e9..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.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 artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the import_apt_artifacts call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts. -# -def import_apt_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new - - # Call the import_apt_artifacts method. - result = client.import_apt_artifacts request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb deleted file mode 100644 index 3b576e4026b4..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.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 artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the import_yum_artifacts call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts. -# -def import_yum_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new - - # Call the import_yum_artifacts method. - result = client.import_yum_artifacts request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb deleted file mode 100644 index c0e7bcf3df0d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.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 artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_attachments call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments. -# -def list_attachments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new - - # Call the list_attachments method. - result = client.list_attachments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb deleted file mode 100644 index f5ae43a24fcb..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.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 artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_docker_images call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images. -# -def list_docker_images - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new - - # Call the list_docker_images method. - result = client.list_docker_images request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb deleted file mode 100644 index ef775fe14faa..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.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 artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_files call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files. -# -def list_files - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new - - # Call the list_files method. - result = client.list_files request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb deleted file mode 100644 index 9485dc527e7e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.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 artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_maven_artifacts call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts. -# -def list_maven_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new - - # Call the list_maven_artifacts method. - result = client.list_maven_artifacts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb deleted file mode 100644 index 5139dde54193..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.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 artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_npm_packages call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages. -# -def list_npm_packages - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new - - # Call the list_npm_packages method. - result = client.list_npm_packages request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb deleted file mode 100644 index 13c4c0a14971..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.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 artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_packages call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages. -# -def list_packages - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new - - # Call the list_packages method. - result = client.list_packages request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb deleted file mode 100644 index d87b40b2c0cf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.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 artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_python_packages call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages. -# -def list_python_packages - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new - - # Call the list_python_packages method. - result = client.list_python_packages request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb deleted file mode 100644 index 097d7c46cbf1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_repositories call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories. -# -def list_repositories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::V1::Repository. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb deleted file mode 100644 index 0e2f6de5c8fe..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_rules call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules. -# -def list_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new - - # Call the list_rules method. - result = client.list_rules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb deleted file mode 100644 index 0e0ed6c2658e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.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 artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_tags call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags. -# -def list_tags - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new - - # Call the list_tags method. - result = client.list_tags request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb deleted file mode 100644 index 4c0c49ab3fe0..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_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 artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_versions call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions. -# -def list_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new - - # Call the list_versions method. - result = client.list_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::ArtifactRegistry::V1::Version. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb deleted file mode 100644 index 976e507f153a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the set_iam_policy call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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 artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb deleted file mode 100644 index df231fd7b342..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/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 artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the test_iam_permissions call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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 artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb deleted file mode 100644 index b45c4176571a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_file call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file. -# -def update_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new - - # Call the update_file method. - result = client.update_file request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb deleted file mode 100644 index 39121b1eecdd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package. -# -def update_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new - - # Call the update_package method. - result = client.update_package request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb deleted file mode 100644 index fbc2f9584b3c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_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 artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_project_settings call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings. -# -def update_project_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new - - # Call the update_project_settings method. - result = client.update_project_settings request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb deleted file mode 100644 index 7831d02528b2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_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 artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository. -# -def update_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new - - # Call the update_repository method. - result = client.update_repository request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb deleted file mode 100644 index 3304a6d9f6f3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_rule call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule. -# -def update_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new - - # Call the update_rule method. - result = client.update_rule request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb deleted file mode 100644 index 658e94dda101..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag. -# -def update_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new - - # Call the update_tag method. - result = client.update_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb deleted file mode 100644 index b1e1b1b96fea..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_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 artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_version call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version. -# -def update_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new - - # Call the update_version method. - result = client.update_version request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb deleted file mode 100644 index 2d206b7333ad..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_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 artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_vpcsc_config call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config. -# -def update_vpcsc_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new - - # Call the update_vpcsc_config method. - result = client.update_vpcsc_config request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json deleted file mode 100644 index 5ee717882e69..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json +++ /dev/null @@ -1,2015 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-artifact_registry-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.devtools.artifactregistry.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync", - "title": "Snippet for the list_docker_images call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images.", - "file": "artifact_registry/list_docker_images.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_docker_images", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListDockerImages", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImages", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync", - "title": "Snippet for the get_docker_image call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image.", - "file": "artifact_registry/get_docker_image.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_docker_image", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::DockerImage", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetDockerImage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync", - "title": "Snippet for the list_maven_artifacts call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts.", - "file": "artifact_registry/list_maven_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_maven_artifacts", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListMavenArtifacts", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifacts", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync", - "title": "Snippet for the get_maven_artifact call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact.", - "file": "artifact_registry/get_maven_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_maven_artifact", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::MavenArtifact", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetMavenArtifact", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifact", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync", - "title": "Snippet for the list_npm_packages call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages.", - "file": "artifact_registry/list_npm_packages.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_npm_packages", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListNpmPackages", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackages", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync", - "title": "Snippet for the get_npm_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package.", - "file": "artifact_registry/get_npm_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_npm_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::NpmPackage", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetNpmPackage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync", - "title": "Snippet for the list_python_packages call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages.", - "file": "artifact_registry/list_python_packages.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_python_packages", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListPythonPackages", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackages", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync", - "title": "Snippet for the get_python_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package.", - "file": "artifact_registry/get_python_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_python_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::PythonPackage", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetPythonPackage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync", - "title": "Snippet for the import_apt_artifacts call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts.", - "file": "artifact_registry/import_apt_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_apt_artifacts", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ImportAptArtifacts", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync", - "title": "Snippet for the import_yum_artifacts call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts.", - "file": "artifact_registry/import_yum_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_yum_artifacts", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ImportYumArtifacts", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync", - "title": "Snippet for the list_repositories call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories.", - "file": "artifact_registry/list_repositories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_repositories", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListRepositories", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositories", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync", - "title": "Snippet for the get_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository.", - "file": "artifact_registry/get_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Repository", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetRepository", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync", - "title": "Snippet for the create_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository.", - "file": "artifact_registry/create_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateRepository", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync", - "title": "Snippet for the update_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository.", - "file": "artifact_registry/update_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Repository", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateRepository", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync", - "title": "Snippet for the delete_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository.", - "file": "artifact_registry/delete_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteRepository", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync", - "title": "Snippet for the list_packages call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages.", - "file": "artifact_registry/list_packages.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_packages", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListPackages", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync", - "title": "Snippet for the get_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package.", - "file": "artifact_registry/get_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Package", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetPackage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync", - "title": "Snippet for the delete_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package.", - "file": "artifact_registry/delete_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeletePackage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync", - "title": "Snippet for the list_versions call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions.", - "file": "artifact_registry/list_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_versions", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListVersions", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync", - "title": "Snippet for the get_version call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version.", - "file": "artifact_registry/get_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_version", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Version", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetVersion", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync", - "title": "Snippet for the delete_version call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version.", - "file": "artifact_registry/delete_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_version", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteVersion", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync", - "title": "Snippet for the batch_delete_versions call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions.", - "file": "artifact_registry/batch_delete_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_delete_versions", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "BatchDeleteVersions", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersions", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync", - "title": "Snippet for the update_version call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version.", - "file": "artifact_registry/update_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_version", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Version", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateVersion", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersion", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync", - "title": "Snippet for the list_files call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files.", - "file": "artifact_registry/list_files.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_files", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListFiles", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync", - "title": "Snippet for the get_file call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file.", - "file": "artifact_registry/get_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_file", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::File", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetFile", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync", - "title": "Snippet for the delete_file call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file.", - "file": "artifact_registry/delete_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_file", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteFile", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFile", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync", - "title": "Snippet for the update_file call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file.", - "file": "artifact_registry/update_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_file", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::File", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateFile", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFile", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync", - "title": "Snippet for the list_tags call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags.", - "file": "artifact_registry/list_tags.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tags", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListTags", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync", - "title": "Snippet for the get_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag.", - "file": "artifact_registry/get_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetTag", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync", - "title": "Snippet for the create_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag.", - "file": "artifact_registry/create_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateTag", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync", - "title": "Snippet for the update_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag.", - "file": "artifact_registry/update_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateTag", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync", - "title": "Snippet for the delete_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag.", - "file": "artifact_registry/delete_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteTag", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync", - "title": "Snippet for the create_rule call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule.", - "file": "artifact_registry/create_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_rule", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateRule", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRule", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync", - "title": "Snippet for the list_rules call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules.", - "file": "artifact_registry/list_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rules", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListRules", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRules", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync", - "title": "Snippet for the get_rule call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule.", - "file": "artifact_registry/get_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_rule", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetRule", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRule", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync", - "title": "Snippet for the update_rule call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule.", - "file": "artifact_registry/update_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_rule", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateRule", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRule", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync", - "title": "Snippet for the delete_rule call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule.", - "file": "artifact_registry/delete_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_rule", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteRule", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRule", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy.", - "file": "artifact_registry/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy.", - "file": "artifact_registry/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions.", - "file": "artifact_registry/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync", - "title": "Snippet for the get_project_settings call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings.", - "file": "artifact_registry/get_project_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_project_settings", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ProjectSettings", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetProjectSettings", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync", - "title": "Snippet for the update_project_settings call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings.", - "file": "artifact_registry/update_project_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_project_settings", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ProjectSettings", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateProjectSettings", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync", - "title": "Snippet for the get_vpcsc_config call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config.", - "file": "artifact_registry/get_vpcsc_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vpcsc_config", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetVPCSCConfig", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfig", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync", - "title": "Snippet for the update_vpcsc_config call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config.", - "file": "artifact_registry/update_vpcsc_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vpcsc_config", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateVPCSCConfig", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfig", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync", - "title": "Snippet for the update_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package.", - "file": "artifact_registry/update_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Package", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdatePackage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync", - "title": "Snippet for the list_attachments call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments.", - "file": "artifact_registry/list_attachments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_attachments", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListAttachments", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachments", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync", - "title": "Snippet for the get_attachment call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment.", - "file": "artifact_registry/get_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_attachment", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Attachment", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetAttachment", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachment", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync", - "title": "Snippet for the create_attachment call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment.", - "file": "artifact_registry/create_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_attachment", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateAttachment", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachment", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync", - "title": "Snippet for the delete_attachment call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment.", - "file": "artifact_registry/delete_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_attachment", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteAttachment", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachment", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync", - "title": "Snippet for the export_artifact call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact.", - "file": "artifact_registry/export_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_artifact", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ExportArtifact", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifact", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "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-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb deleted file mode 100644 index 4fabdd26d3a5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/devtools/artifactregistry/v1/service_pb" -require "google/devtools/artifactregistry/v1/service_services_pb" -require "google/cloud/artifact_registry/v1/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb deleted file mode 100644 index ee6f6455b726..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb +++ /dev/null @@ -1,223 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/artifact_registry/v1/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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_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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.attachment_path project: "value0", location: "value1", repository: "value2", attachment: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/attachments/value3", path - end - end - - def test_docker_image_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.docker_image_path project: "value0", location: "value1", repository: "value2", docker_image: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/dockerImages/value3", path - end - end - - def test_file_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.file_path project: "value0", location: "value1", repository: "value2", file: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/files/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::ArtifactRegistry::V1::ArtifactRegistry::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_maven_artifact_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.maven_artifact_path project: "value0", location: "value1", repository: "value2", maven_artifact: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/mavenArtifacts/value3", path - end - end - - def test_npm_package_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.npm_package_path project: "value0", location: "value1", repository: "value2", npm_package: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/npmPackages/value3", path - end - end - - def test_package_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.package_path project: "value0", location: "value1", repository: "value2", package: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3", path - end - end - - def test_project_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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_settings_path project: "value0" - assert_equal "projects/value0/projectSettings", path - end - end - - def test_python_package_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.python_package_path project: "value0", location: "value1", repository: "value2", python_package: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/pythonPackages/value3", 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::ArtifactRegistry::V1::ArtifactRegistry::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_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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.rule_path project: "value0", location: "value1", repository: "value2", rule: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/rules/value3", path - end - end - - def test_secret_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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 - - def test_tag_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tag_path project: "value0", location: "value1", repository: "value2", package: "value3", tag: "value4" - assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/tags/value4", path - end - end - - def test_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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.version_path project: "value0", location: "value1", repository: "value2", package: "value3", version: "value4" - assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/versions/value4", path - end - end - - def test_vpcsc_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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vpcsc_config_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1/vpcscConfig", path - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb deleted file mode 100644 index 2a53db24bba7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb +++ /dev/null @@ -1,2861 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/devtools/artifactregistry/v1/service_pb" -require "google/cloud/artifact_registry/v1/artifact_registry/rest" - - -class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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_docker_images - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.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" - order_by = "hello world" - - list_docker_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_docker_images_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_docker_images_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_docker_images parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_docker_images ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_docker_images(::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_docker_images_client_stub.call_count - end - end - end - - def test_get_docker_image - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_docker_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_docker_image_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_docker_image_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_docker_image({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_docker_image name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_docker_image ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_docker_image({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_docker_image(::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_docker_image_client_stub.call_count - end - end - end - - def test_list_maven_artifacts - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.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_maven_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_maven_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_maven_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_maven_artifacts({ 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_maven_artifacts 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_maven_artifacts ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.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_maven_artifacts({ 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_maven_artifacts(::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.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_maven_artifacts_client_stub.call_count - end - end - end - - def test_get_maven_artifact - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_maven_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_maven_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_maven_artifact_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_maven_artifact({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_maven_artifact name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_maven_artifact ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_maven_artifact({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_maven_artifact(::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_maven_artifact_client_stub.call_count - end - end - end - - def test_list_npm_packages - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.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_npm_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_npm_packages_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_npm_packages_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_npm_packages({ 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_npm_packages 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_npm_packages ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.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_npm_packages({ 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_npm_packages(::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.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_npm_packages_client_stub.call_count - end - end - end - - def test_get_npm_package - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_npm_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_npm_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_npm_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_npm_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_npm_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_npm_package ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_npm_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_npm_package(::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_npm_package_client_stub.call_count - end - end - end - - def test_list_python_packages - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.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_python_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_python_packages_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_python_packages_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_python_packages({ 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_python_packages 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_python_packages ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.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_python_packages({ 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_python_packages(::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.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_python_packages_client_stub.call_count - end - end - end - - def test_get_python_package - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_python_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_python_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_python_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_python_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_python_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_python_package ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_python_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_python_package(::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_python_package_client_stub.call_count - end - end - end - - def test_import_apt_artifacts - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_apt_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_apt_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_apt_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.import_apt_artifacts gcs_source: gcs_source, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_apt_artifacts_client_stub.call_count - end - end - end - - def test_import_yum_artifacts - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_yum_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_yum_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_yum_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.import_yum_artifacts gcs_source: gcs_source, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_yum_artifacts_client_stub.call_count - end - end - end - - def test_list_repositories - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::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" - order_by = "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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_repositories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_repositories_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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, order_by: order_by }) 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, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_repositories ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.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_repositories({ 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_repositories(::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.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_repositories_client_stub.call_count - end - end - end - - def test_get_repository - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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_id = "hello world" - repository = {} - - 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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_repository parent: parent, repository_id: repository_id, repository: repository do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_repository ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_repository(::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), 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::Cloud::ArtifactRegistry::V1::Repository.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - repository = {} - update_mask = {} - - 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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_repository({ repository: repository, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_repository repository: repository, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_repository ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_repository({ repository: repository, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_repository(::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), 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" - - 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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_repository({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_repository name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_repository ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_repository({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_repository(::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name), 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_packages - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.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_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_packages_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_packages_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_packages({ 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_packages 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_packages ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.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_packages({ 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_packages(::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.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_packages_client_stub.call_count - end - end - end - - def test_get_package - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Package.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_package ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_package(::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_package_client_stub.call_count - end - end - end - - def test_delete_package - # Create test objects. - 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_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_package ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_package(::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_package_client_stub.call_count - end - end - end - - def test_list_versions - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - order_by = "hello world" - filter = "hello world" - - list_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_versions ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_versions(::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_versions_client_stub.call_count - end - end - end - - def test_get_version - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Version.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - - get_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_version_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_version({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_version name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_version ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_version({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_version(::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_version_client_stub.call_count - end - end - end - - def test_delete_version - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_version({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_version name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_version ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_version({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_version(::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_version_client_stub.call_count - end - end - end - - def test_batch_delete_versions - # Create test objects. - 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"] - validate_only = true - - batch_delete_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_batch_delete_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_delete_versions_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_delete_versions parent: parent, names: names, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_delete_versions ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_delete_versions(::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_delete_versions_client_stub.call_count - end - end - end - - def test_update_version - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Version.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - version = {} - update_mask = {} - - update_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_version_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_version({ version: version, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_version version: version, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_version ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_version({ version: version, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_version(::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_version_client_stub.call_count - end - end - end - - def test_list_files - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.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" - order_by = "hello world" - - list_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_files_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_files_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_files parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_files ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_files(::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_files_client_stub.call_count - end - end - end - - def test_get_file - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::File.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_file_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_file({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_file name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_file ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_file({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_file(::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_file_client_stub.call_count - end - end - end - - def test_delete_file - # Create test objects. - 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_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_file_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_file({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_file name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_file ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_file({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_file(::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_file_client_stub.call_count - end - end - end - - def test_update_file - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::File.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - file = {} - update_mask = {} - - update_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_file_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_file({ file: file, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_file file: file, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_file ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_file({ file: file, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_file(::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_file_client_stub.call_count - end - end - end - - def test_list_tags - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.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_tags_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_tags_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tags_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_tags({ 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_tags 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_tags ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.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_tags({ 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_tags(::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.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_tags_client_stub.call_count - end - end - end - - def test_get_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_tag({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_tag name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_tag ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_tag({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_tag(::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_tag_client_stub.call_count - end - end - end - - def test_create_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tag_id = "hello world" - tag = {} - - create_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_tag parent: parent, tag_id: tag_id, tag: tag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_tag ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_tag(::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_tag_client_stub.call_count - end - end - end - - def test_update_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - tag = {} - update_mask = {} - - update_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_tag({ tag: tag, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_tag tag: tag, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_tag ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_tag({ tag: tag, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_tag(::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_tag_client_stub.call_count - end - end - end - - def test_delete_tag - # 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_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_tag({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_tag name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_tag ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_tag({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_tag(::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_tag_client_stub.call_count - end - end - end - - def test_create_rule - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule_id = "hello world" - rule = {} - - create_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_rule_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_rule({ parent: parent, rule_id: rule_id, rule: rule }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_rule parent: parent, rule_id: rule_id, rule: rule do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_rule ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_rule({ parent: parent, rule_id: rule_id, rule: rule }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_rule(::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_rule_client_stub.call_count - end - end - end - - def test_list_rules - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_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_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_rules ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.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_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_rules(::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.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_rules_client_stub.call_count - end - end - end - - def test_get_rule - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_rule_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_rule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_rule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_rule ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_rule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_rule(::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_rule_client_stub.call_count - end - end - end - - def test_update_rule - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - rule = {} - update_mask = {} - - update_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_rule_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_rule({ rule: rule, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_rule rule: rule, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_rule ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_rule({ rule: rule, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_rule(::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_rule_client_stub.call_count - end - end - end - - def test_delete_rule - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_rule_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_rule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_rule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_rule ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_rule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_rule(::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_rule_client_stub.call_count - end - end - end - - def test_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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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_project_settings - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_project_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_project_settings_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_project_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_project_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_project_settings ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_project_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_project_settings(::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_project_settings_client_stub.call_count - end - end - end - - def test_update_project_settings - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - project_settings = {} - update_mask = {} - - update_project_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_project_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_project_settings_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_project_settings project_settings: project_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_project_settings ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_project_settings({ project_settings: project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings_client_stub.call_count - end - end - end - - def test_get_vpcsc_config - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_vpcsc_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_vpcsc_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_vpcsc_config_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_vpcsc_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_vpcsc_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_vpcsc_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_vpcsc_config_client_stub.call_count - end - end - end - - def test_update_vpcsc_config - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - vpcsc_config = {} - update_mask = {} - - update_vpcsc_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::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_vpcsc_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_vpcsc_config_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_vpcsc_config vpcsc_config: vpcsc_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_vpcsc_config({ vpcsc_config: vpcsc_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_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_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_vpcsc_config_client_stub.call_count - end - end - end - - def test_update_package - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Package.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - package = {} - update_mask = {} - - update_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_package({ package: package, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_package package: package, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_package ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_package({ package: package, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_package(::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_package_client_stub.call_count - end - end - end - - def test_list_attachments - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.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_attachments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_attachments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_attachments_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_attachments({ 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_attachments 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_attachments ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.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_attachments({ 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_attachments(::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.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_attachments_client_stub.call_count - end - end - end - - def test_get_attachment - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Attachment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_attachment_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_attachment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_attachment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_attachment ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_attachment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_attachment(::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_attachment_client_stub.call_count - end - end - end - - def test_create_attachment - # Create test objects. - 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" - attachment_id = "hello world" - attachment = {} - - create_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_attachment_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_attachment parent: parent, attachment_id: attachment_id, attachment: attachment do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_attachment ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_attachment(::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_attachment_client_stub.call_count - end - end - end - - def test_delete_attachment - # Create test objects. - 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_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_attachment_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_attachment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_attachment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_attachment ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_attachment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_attachment(::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_attachment_client_stub.call_count - end - end - end - - def test_export_artifact - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - source_version = "hello world" - gcs_path = "hello world" - repository = "hello world" - - export_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_export_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_artifact_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.export_artifact source_version: source_version, gcs_path: gcs_path, repository: repository do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.export_artifact ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.export_artifact(::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_artifact_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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb deleted file mode 100644 index ddbb91ec308d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb +++ /dev/null @@ -1,3256 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/devtools/artifactregistry/v1/service_pb" -require "google/cloud/artifact_registry/v1/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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_docker_images - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - - list_docker_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_docker_images, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, 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["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_docker_images_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, 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_docker_images parent: parent, page_size: page_size, page_token: page_token, 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_docker_images ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, 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_docker_images({ parent: parent, page_size: page_size, page_token: page_token, 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_docker_images(::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, 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_docker_images_client_stub.call_rpc_count - end - end - - def test_get_docker_image - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_docker_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_docker_image, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_docker_image_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_docker_image({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_docker_image name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_docker_image ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_docker_image({ 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_docker_image(::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(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_docker_image_client_stub.call_rpc_count - end - end - - def test_list_maven_artifacts - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_maven_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_maven_artifacts, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, 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_maven_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_maven_artifacts({ parent: parent, page_size: page_size, page_token: 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_maven_artifacts parent: parent, page_size: page_size, page_token: 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_maven_artifacts ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.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_maven_artifacts({ 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_maven_artifacts(::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.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_maven_artifacts_client_stub.call_rpc_count - end - end - - def test_get_maven_artifact - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_maven_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_maven_artifact, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_maven_artifact_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_maven_artifact({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_maven_artifact name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_maven_artifact ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_maven_artifact({ 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_maven_artifact(::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(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_maven_artifact_client_stub.call_rpc_count - end - end - - def test_list_npm_packages - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_npm_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_npm_packages, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, 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_npm_packages_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_npm_packages({ parent: parent, page_size: page_size, page_token: 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_npm_packages parent: parent, page_size: page_size, page_token: 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_npm_packages ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.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_npm_packages({ 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_npm_packages(::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.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_npm_packages_client_stub.call_rpc_count - end - end - - def test_get_npm_package - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_npm_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_npm_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_npm_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_npm_package({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_npm_package name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_npm_package ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_npm_package({ 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_npm_package(::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(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_npm_package_client_stub.call_rpc_count - end - end - - def test_list_python_packages - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_python_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_python_packages, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, 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_python_packages_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_python_packages({ parent: parent, page_size: page_size, page_token: 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_python_packages parent: parent, page_size: page_size, page_token: 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_python_packages ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.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_python_packages({ 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_python_packages(::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.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_python_packages_client_stub.call_rpc_count - end - end - - def test_get_python_package - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_python_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_python_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_python_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_python_package({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_python_package name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_python_package ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_python_package({ 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_python_package(::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(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_python_package_client_stub.call_rpc_count - end - end - - def test_import_apt_artifacts - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_apt_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_apt_artifacts, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource), request["gcs_source"] - assert_equal :gcs_source, request.source - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_apt_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.import_apt_artifacts({ gcs_source: gcs_source, 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.import_apt_artifacts gcs_source: gcs_source, 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.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, 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.import_apt_artifacts({ gcs_source: gcs_source, 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.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, 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, import_apt_artifacts_client_stub.call_rpc_count - end - end - - def test_import_yum_artifacts - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_yum_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_yum_artifacts, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource), request["gcs_source"] - assert_equal :gcs_source, request.source - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_yum_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.import_yum_artifacts({ gcs_source: gcs_source, 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.import_yum_artifacts gcs_source: gcs_source, 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.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, 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.import_yum_artifacts({ gcs_source: gcs_source, 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.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, 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, import_yum_artifacts_client_stub.call_rpc_count - end - end - - def test_list_repositories - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::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" - order_by = "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::ArtifactRegistry::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["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_repositories_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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, 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_repositories 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_repositories ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.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_repositories({ 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_repositories(::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.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_repositories_client_stub.call_rpc_count - end - end - - def test_get_repository - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::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::ArtifactRegistry::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_id = "hello world" - repository = {} - - create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["repository_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Repository), request["repository"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |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_id: repository_id, repository: repository do |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::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |response, operation| - 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_id: repository_id, repository: repository }, grpc_options) do |response, operation| - 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::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), grpc_options) do |response, operation| - assert_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::Cloud::ArtifactRegistry::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. - repository = {} - update_mask = {} - - update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Repository), request["repository"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_repository({ repository: repository, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_repository repository: repository, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_repository ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, 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_repository({ repository: repository, 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_repository(::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, 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_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" - - delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_repository({ 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_repository 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_repository ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.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_repository({ 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_repository(::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.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_repository_client_stub.call_rpc_count - end - end - - def test_list_packages - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_packages, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, 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_packages_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_packages({ 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_packages 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_packages ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.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_packages({ 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_packages(::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.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_packages_client_stub.call_rpc_count - end - end - - def test_get_package - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Package.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_package({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_package name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_package ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_package({ 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_package(::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(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_package_client_stub.call_rpc_count - end - end - - def test_delete_package - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_package({ 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_package 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_package ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.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_package({ 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_package(::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.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_package_client_stub.call_rpc_count - end - end - - def test_list_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - order_by = "hello world" - filter = "hello world" - - list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_versions, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_versions_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, 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_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, 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_versions ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, 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_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, 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_versions(::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, 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_versions_client_stub.call_rpc_count - end - end - - def test_get_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Version.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - - get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_version, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_version_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_version({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_version name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_version ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_version({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_version(::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_version_client_stub.call_rpc_count - end - end - - def test_delete_version - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_version, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_version_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_version({ name: name, 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_version name: name, 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_version ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, 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_version({ name: name, 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_version(::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, 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_version_client_stub.call_rpc_count - end - end - - def test_batch_delete_versions - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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"] - validate_only = true - - batch_delete_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_delete_versions, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_delete_versions_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_delete_versions({ parent: parent, names: names, 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.batch_delete_versions parent: parent, names: names, 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.batch_delete_versions ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, 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.batch_delete_versions({ parent: parent, names: names, 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.batch_delete_versions(::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, 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, batch_delete_versions_client_stub.call_rpc_count - end - end - - def test_update_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Version.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - version = {} - update_mask = {} - - update_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_version, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Version), request["version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_version_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_version({ version: version, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_version version: version, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_version ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, 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_version({ version: version, 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_version(::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, 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_version_client_stub.call_rpc_count - end - end - - def test_list_files - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - - list_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_files, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, 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 "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_files_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_files parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_files ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_files(::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_files_client_stub.call_rpc_count - end - end - - def test_get_file - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::File.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_file, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_file_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_file({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_file name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_file ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_file({ 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_file(::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(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_file_client_stub.call_rpc_count - end - end - - def test_delete_file - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_file, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_file_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_file({ 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_file 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_file ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.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_file({ 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_file(::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.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_file_client_stub.call_rpc_count - end - end - - def test_update_file - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::File.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - file = {} - update_mask = {} - - update_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_file, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::File), request["file"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_file_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_file({ file: file, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_file file: file, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_file ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, 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_file({ file: file, 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_file(::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, 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_file_client_stub.call_rpc_count - end - end - - def test_list_tags - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_tags_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tags, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, 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_tags_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_tags({ 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_tags 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_tags ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.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_tags({ 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_tags(::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.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_tags_client_stub.call_rpc_count - end - end - - def test_get_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_tag({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_tag name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_tag ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_tag({ 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_tag(::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(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_tag_client_stub.call_rpc_count - end - end - - def test_create_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tag_id = "hello world" - tag = {} - - create_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["tag_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Tag), request["tag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_tag parent: parent, tag_id: tag_id, tag: tag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_tag ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_tag(::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_tag_client_stub.call_rpc_count - end - end - - def test_update_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - tag = {} - update_mask = {} - - update_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Tag), request["tag"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_tag({ tag: tag, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_tag tag: tag, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_tag ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, 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_tag({ tag: tag, 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_tag(::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, 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_tag_client_stub.call_rpc_count - end - end - - def test_delete_tag - # 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_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_tag({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_tag name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_tag ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_tag({ 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_tag(::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(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_tag_client_stub.call_rpc_count - end - end - - def test_create_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule_id = "hello world" - rule = {} - - create_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_rule, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["rule_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Rule), request["rule"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_rule_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_rule({ parent: parent, rule_id: rule_id, rule: rule }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_rule parent: parent, rule_id: rule_id, rule: rule do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_rule ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_rule({ parent: parent, rule_id: rule_id, rule: rule }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_rule(::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_rule_client_stub.call_rpc_count - end - end - - def test_list_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rules, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, 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_rules_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_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_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_rules ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.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_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_rules(::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.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_rules_client_stub.call_rpc_count - end - end - - def test_get_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_rule, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_rule_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_rule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_rule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_rule ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_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_rule(::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_rule_client_stub.call_rpc_count - end - end - - def test_update_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - rule = {} - update_mask = {} - - update_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_rule, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Rule), request["rule"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_rule_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_rule({ rule: rule, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_rule rule: rule, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_rule ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_rule({ rule: rule, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_rule(::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_rule_client_stub.call_rpc_count - end - end - - def test_delete_rule - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_rule, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_rule_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_rule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_rule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_rule ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_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.delete_rule(::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(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_rule_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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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_project_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_project_settings, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_project_settings_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_project_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_project_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_project_settings ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_project_settings_client_stub.call_rpc_count - end - end - - def test_update_project_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - project_settings = {} - update_mask = {} - - update_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_project_settings, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings), request["project_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_project_settings_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_project_settings project_settings: project_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_project_settings ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings({ project_settings: project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings_client_stub.call_rpc_count - end - end - - def test_get_vpcsc_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_vpcsc_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vpcsc_config, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vpcsc_config_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_vpcsc_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_vpcsc_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_vpcsc_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_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(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_vpcsc_config_client_stub.call_rpc_count - end - end - - def test_update_vpcsc_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - vpcsc_config = {} - update_mask = {} - - update_vpcsc_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vpcsc_config, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig), request["vpcsc_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vpcsc_config_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_vpcsc_config vpcsc_config: vpcsc_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_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_vpcsc_config({ vpcsc_config: vpcsc_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_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_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_vpcsc_config_client_stub.call_rpc_count - end - end - - def test_update_package - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Package.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - package = {} - update_mask = {} - - update_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Package), request["package"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_package({ package: package, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_package package: package, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_package ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, 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_package({ package: package, 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_package(::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, 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_package_client_stub.call_rpc_count - end - end - - def test_list_attachments - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_attachments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_attachments, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, 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_attachments_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_attachments({ 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_attachments 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_attachments ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.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_attachments({ 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_attachments(::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.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_attachments_client_stub.call_rpc_count - end - end - - def test_get_attachment - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Attachment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_attachment, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_attachment_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_attachment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_attachment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_attachment ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_attachment({ 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_attachment(::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(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_attachment_client_stub.call_rpc_count - end - end - - def test_create_attachment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - attachment_id = "hello world" - attachment = {} - - create_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_attachment, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["attachment_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Attachment), request["attachment"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_attachment_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }) do |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_attachment parent: parent, attachment_id: attachment_id, attachment: attachment do |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_attachment ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment) do |response, operation| - 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_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }, grpc_options) do |response, operation| - 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_attachment(::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment), grpc_options) do |response, operation| - assert_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_attachment_client_stub.call_rpc_count - end - end - - def test_delete_attachment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_attachment, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_attachment_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_attachment({ 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_attachment 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_attachment ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.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_attachment({ 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_attachment(::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.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_attachment_client_stub.call_rpc_count - end - end - - def test_export_artifact - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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_version = "hello world" - gcs_path = "hello world" - repository = "hello world" - - export_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_artifact, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, request - assert_equal "hello world", request["source_version"] - assert_equal :source_version, request.source_artifact - assert_equal "hello world", request["gcs_path"] - assert_equal :gcs_path, request.destination - assert_equal "hello world", request["repository"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_artifact_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }) do |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.export_artifact source_version: source_version, gcs_path: gcs_path, repository: repository do |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.export_artifact ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository) do |response, operation| - 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.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }, grpc_options) do |response, operation| - 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.export_artifact(::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_artifact_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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::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::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/.gitignore b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/.repo-metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json deleted file mode 100644 index 7910a7e9b677..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "artifactregistry.googleapis.com", - "api_shortname": "artifactregistry", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest", - "distribution_name": "google-cloud-artifact_registry-v1beta2", - "is_cloud": true, - "language": "ruby", - "name": "artifactregistry", - "name_pretty": "Artifact Registry V1beta2 API", - "product_documentation": "https://cloud.google.com/artifact-registry/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details.", - "ruby-cloud-env-prefix": "ARTIFACT_REGISTRY", - "ruby-cloud-product-url": "https://cloud.google.com/artifact-registry/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml deleted file mode 100644 index 6d12e8a99a67..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-artifact_registry-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-artifact_registry-v1beta2.rb" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/.yardopts b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts deleted file mode 100644 index 577e906ef894..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Artifact Registry 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-artifact_registry-v1beta2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md deleted file mode 100644 index 658611b9d9e8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-artifact_registry-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-artifact_registry-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/artifact_registry/v1beta2" - -client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/artifact_registry/v1beta2" - -::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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-artifact_registry-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/artifact_registry/v1beta2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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-artifact_registry-v1beta2/CHANGELOG.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/LICENSE.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md deleted file mode 100644 index c83c61757d75..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Artifact Registry V1beta2 API - -Store and manage build artifacts in a scalable and integrated service built on Google infrastructure. - -Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Artifact Registry V1beta2 API. Most users should consider using -the main client gem, -[google-cloud-artifact_registry](https://rubygems.org/gems/google-cloud-artifact_registry). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-artifact_registry-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/artifactregistry.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/artifact_registry/v1beta2" - -client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new -request = ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new # (request fields as keyword arguments...) -response = client.import_apt_artifacts request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/artifact-registry/) -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/artifact_registry/v1beta2" -require "logger" - -client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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-artifact_registry`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-artifact_registry-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-artifact_registry`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-artifact_registry-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-artifact_registry-v1beta2/Rakefile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile deleted file mode 100644 index 1d749b6abb41..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ARTIFACT_REGISTRY_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ARTIFACT_REGISTRY_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 ARTIFACT_REGISTRY_TEST_PROJECT=test123 ARTIFACT_REGISTRY_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ARTIFACT_REGISTRY_PROJECT"] = project - ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] = project - ENV["ARTIFACT_REGISTRY_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-artifact_registry-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-artifact_registry-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-artifact_registry-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-artifact_registry-v1beta2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-artifact_registry-v1beta2" - header "google-cloud-artifact_registry-v1beta2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-artifact_registry-v1beta2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-artifact_registry-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-artifact_registry-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-artifact_registry-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-artifact_registry-v1beta2/gapic_metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json deleted file mode 100644 index 478bacfc4ddd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.devtools.artifactregistry.v1beta2", - "libraryPackage": "::Google::Cloud::ArtifactRegistry::V1beta2", - "services": { - "ArtifactRegistry": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client", - "rpcs": { - "ImportAptArtifacts": { - "methods": [ - "import_apt_artifacts" - ] - }, - "ImportYumArtifacts": { - "methods": [ - "import_yum_artifacts" - ] - }, - "ListRepositories": { - "methods": [ - "list_repositories" - ] - }, - "GetRepository": { - "methods": [ - "get_repository" - ] - }, - "CreateRepository": { - "methods": [ - "create_repository" - ] - }, - "UpdateRepository": { - "methods": [ - "update_repository" - ] - }, - "DeleteRepository": { - "methods": [ - "delete_repository" - ] - }, - "ListPackages": { - "methods": [ - "list_packages" - ] - }, - "GetPackage": { - "methods": [ - "get_package" - ] - }, - "DeletePackage": { - "methods": [ - "delete_package" - ] - }, - "ListVersions": { - "methods": [ - "list_versions" - ] - }, - "GetVersion": { - "methods": [ - "get_version" - ] - }, - "DeleteVersion": { - "methods": [ - "delete_version" - ] - }, - "ListFiles": { - "methods": [ - "list_files" - ] - }, - "GetFile": { - "methods": [ - "get_file" - ] - }, - "ListTags": { - "methods": [ - "list_tags" - ] - }, - "GetTag": { - "methods": [ - "get_tag" - ] - }, - "CreateTag": { - "methods": [ - "create_tag" - ] - }, - "UpdateTag": { - "methods": [ - "update_tag" - ] - }, - "DeleteTag": { - "methods": [ - "delete_tag" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "GetProjectSettings": { - "methods": [ - "get_project_settings" - ] - }, - "UpdateProjectSettings": { - "methods": [ - "update_project_settings" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec deleted file mode 100644 index d0cda2334ff6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/artifact_registry/v1beta2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-artifact_registry-v1beta2" - gem.version = Google::Cloud::ArtifactRegistry::V1beta2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details." - gem.summary = "Store and manage build artifacts in a scalable and integrated service built on Google 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" - 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-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb deleted file mode 100644 index 42773d56b713..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-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/artifact_registry/v1beta2" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb deleted file mode 100644 index 5a48465dc9de..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/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/artifact_registry/v1beta2/artifact_registry" -require "google/cloud/artifact_registry/v1beta2/version" - -module Google - module Cloud - module ArtifactRegistry - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/artifact_registry/v1beta2" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/artifact_registry/v1beta2" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - module V1beta2 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta2", "_helpers.rb" -require "google/cloud/artifact_registry/v1beta2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb deleted file mode 100644 index de5f1fa1ee86..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/artifact_registry/v1beta2/version" - -require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/paths" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/operations" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/client" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - ## - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/artifact_registry/v1beta2/artifact_registry" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - module ArtifactRegistry - end - end - end - end -end - -helper_path = ::File.join __dir__, "artifact_registry", "helpers.rb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb deleted file mode 100644 index a334974e17a3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb +++ /dev/null @@ -1,3004 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - ## - # Client for the ArtifactRegistry service. - # - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :artifact_registry_stub - - ## - # Configure the ArtifactRegistry Client class. - # - # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ArtifactRegistry clients - # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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", "ArtifactRegistry", "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_repositories.timeout = 30.0 - default_config.rpcs.list_repositories.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_repository.timeout = 30.0 - default_config.rpcs.get_repository.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_repository.timeout = 30.0 - - default_config.rpcs.update_repository.timeout = 30.0 - - default_config.rpcs.delete_repository.timeout = 30.0 - default_config.rpcs.delete_repository.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_packages.timeout = 30.0 - default_config.rpcs.list_packages.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_package.timeout = 30.0 - default_config.rpcs.get_package.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_package.timeout = 30.0 - default_config.rpcs.delete_package.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_versions.timeout = 30.0 - default_config.rpcs.list_versions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_version.timeout = 30.0 - default_config.rpcs.get_version.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_version.timeout = 30.0 - default_config.rpcs.delete_version.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_files.timeout = 30.0 - default_config.rpcs.list_files.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_file.timeout = 30.0 - default_config.rpcs.get_file.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tags.timeout = 30.0 - default_config.rpcs.list_tags.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_tag.timeout = 30.0 - default_config.rpcs.get_tag.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_tag.timeout = 30.0 - - default_config.rpcs.update_tag.timeout = 30.0 - - default_config.rpcs.delete_tag.timeout = 30.0 - default_config.rpcs.delete_tag.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy.timeout = 30.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.test_iam_permissions.timeout = 30.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ArtifactRegistry 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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 - @artifact_registry_stub.universe_domain - end - - ## - # Create a new ArtifactRegistry client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ArtifactRegistry client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/devtools/artifactregistry/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 - - @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 - - @artifact_registry_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 - ) - - @artifact_registry_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 = @artifact_registry_stub.endpoint - config.universe_domain = @artifact_registry_stub.universe_domain - config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @artifact_registry_stub.logger - end - - # Service calls - - ## - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_apt_artifacts(request, options = nil) - # Pass arguments to `import_apt_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_apt_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new - # - # # Call the import_apt_artifacts method. - # result = client.import_apt_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_apt_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_apt_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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.import_apt_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_apt_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_yum_artifacts(request, options = nil) - # Pass arguments to `import_yum_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_yum_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new - # - # # Call the import_yum_artifacts method. - # result = client.import_yum_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_yum_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_yum_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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.import_yum_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_yum_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose repositories will be listed. - # @param page_size [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 - - @artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_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 a repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_repository(name: nil) - # Pass arguments to `get_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 - - @artifact_registry_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 repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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_id: nil, repository: 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 name of the parent resource where the repository will be created. - # @param repository_id [::String] - # The repository id to use for this repository. - # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] - # The repository to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 - - @artifact_registry_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 a repository. - # - # @overload update_repository(request, options = nil) - # Pass arguments to `update_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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(repository: nil, update_mask: 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 repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] - # The repository that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new - # - # # Call the update_repository method. - # result = client.update_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. - # p result - # - def update_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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.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 - - @artifact_registry_stub.call_rpc :update_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 - - ## - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 - - @artifact_registry_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 packages. - # - # @overload list_packages(request, options = nil) - # Pass arguments to `list_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose packages will be listed. - # @param page_size [::Integer] - # The maximum number of packages to return. - # Maximum page size is 10,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new - # - # # Call the list_packages method. - # result = client.list_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. - # p item - # end - # - def list_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_packages.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, 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 package. - # - # @overload get_package(request, options = nil) - # Pass arguments to `get_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_package(name: nil) - # Pass arguments to `get_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the package to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new - # - # # Call the get_package method. - # result = client.get_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. - # p result - # - def get_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_package, request, 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 package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - # - # @overload delete_package(request, options = nil) - # Pass arguments to `delete_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_package(name: nil) - # Pass arguments to `delete_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the package to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new - # - # # Call the delete_package method. - # result = client.delete_package request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest - - # Converts hash and nil to 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_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 versions. - # - # @overload list_versions(request, options = nil) - # Pass arguments to `list_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil) - # Pass arguments to `list_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] - # The name of the parent resource whose versions will be listed. - # @param page_size [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - # @param order_by [::String] - # Optional. The field to order the results by. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new - # - # # Call the list_versions method. - # result = client.list_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::ArtifactRegistry::V1beta2::Version. - # p item - # end - # - def list_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_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::ArtifactRegistry::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_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_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 a version - # - # @overload get_version(request, options = nil) - # Pass arguments to `get_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_version(name: nil, view: nil) - # Pass arguments to `get_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] - # The name of the version to retrieve. - # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new - # - # # Call the get_version method. - # result = client.get_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. - # p result - # - def get_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_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::ArtifactRegistry::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_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_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 - - ## - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - # - # @overload delete_version(request, options = nil) - # Pass arguments to `delete_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_version(name: nil, force: nil) - # Pass arguments to `delete_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] - # The name of the version to delete. - # @param force [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new - # - # # Call the delete_version method. - # result = client.delete_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest - - # Converts hash and nil to 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_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::ArtifactRegistry::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_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 files. - # - # @overload list_files(request, options = nil) - # Pass arguments to `list_files` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the repository whose files will be listed. For example: - # "projects/p1/locations/us-central1/repositories/repo1 - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `owner` - # - # An example of using a filter: - # - # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - # ID starting with "a/b/". - # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - # Files owned by the version `1.0` in package `pkg1`. - # @param page_size [::Integer] - # The maximum number of files to return. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new - # - # # Call the list_files method. - # result = client.list_files request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. - # p item - # end - # - def list_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_files.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, 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 file. - # - # @overload get_file(request, options = nil) - # Pass arguments to `get_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_file(name: nil) - # Pass arguments to `get_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the file to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new - # - # # Call the get_file method. - # result = client.get_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. - # p result - # - def get_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_file, request, 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 tags. - # - # @overload list_tags(request, options = nil) - # Pass arguments to `list_tags` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tags` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose tags will be listed. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `version` - # - # An example of using a filter: - # - # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - # --> Tags that are applied to the version `1.0` in package `pkg1`. - # @param page_size [::Integer] - # The maximum number of tags to return. Maximum page size is 10,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new - # - # # Call the list_tags method. - # result = client.list_tags request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p item - # end - # - def list_tags request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tags.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_tags.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tags.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, 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 tag. - # - # @overload get_tag(request, options = nil) - # Pass arguments to `get_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_tag(name: nil) - # Pass arguments to `get_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new - # - # # Call the get_tag method. - # result = client.get_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def get_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_tag, request, 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 tag. - # - # @overload create_tag(request, options = nil) - # Pass arguments to `create_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_tag(parent: nil, tag_id: nil, tag: nil) - # Pass arguments to `create_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource where the tag will be created. - # @param tag_id [::String] - # The tag id to use for this repository. - # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] - # The tag to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new - # - # # Call the create_tag method. - # result = client.create_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def create_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest - - # Converts hash and nil to 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :create_tag, request, 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 tag. - # - # @overload update_tag(request, options = nil) - # Pass arguments to `update_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_tag(tag: nil, update_mask: nil) - # Pass arguments to `update_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] - # The tag that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new - # - # # Call the update_tag method. - # result = client.update_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def update_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest - - # Converts hash and nil to 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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.tag&.name - header_params["tag.name"] = request.tag.name - end - - request_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_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_tag, request, 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 tag. - # - # @overload delete_tag(request, options = nil) - # Pass arguments to `delete_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_tag(name: nil) - # Pass arguments to `delete_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag 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/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new - # - # # Call the delete_tag method. - # result = client.delete_tag request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest - - # Converts hash and nil to 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_tag, request, 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 IAM policy for a given 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/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 - - @artifact_registry_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 IAM policy for a given 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/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 - - @artifact_registry_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 - - ## - # Tests if the caller has a list of permissions on a resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 - - @artifact_registry_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 - - ## - # Retrieves the Settings for the Project. - # - # @overload get_project_settings(request, options = nil) - # Pass arguments to `get_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_project_settings(name: nil) - # Pass arguments to `get_project_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. The name of the projectSettings resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new - # - # # Call the get_project_settings method. - # result = client.get_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - # p result - # - def get_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_project_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::ArtifactRegistry::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_project_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_project_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 Settings for the Project. - # - # @overload update_project_settings(request, options = nil) - # Pass arguments to `update_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_project_settings(project_settings: nil, update_mask: nil) - # Pass arguments to `update_project_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 project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash] - # The project settings. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new - # - # # Call the update_project_settings method. - # result = client.update_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - # p result - # - def update_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_project_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::ArtifactRegistry::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.project_settings&.name - header_params["project_settings.name"] = request.project_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_project_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_project_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 - - ## - # Configuration class for the ArtifactRegistry API. - # - # This class represents the configuration for ArtifactRegistry, - # providing control 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::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # import_apt_artifacts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.import_apt_artifacts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.import_apt_artifacts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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 = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::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 ArtifactRegistry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `import_apt_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_apt_artifacts - ## - # RPC-specific configuration for `import_yum_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_yum_artifacts - ## - # 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_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_packages - ## - # RPC-specific configuration for `get_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_package - ## - # RPC-specific configuration for `delete_package` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_package - ## - # RPC-specific configuration for `list_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_versions - ## - # RPC-specific configuration for `get_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_version - ## - # RPC-specific configuration for `delete_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_version - ## - # RPC-specific configuration for `list_files` - # @return [::Gapic::Config::Method] - # - attr_reader :list_files - ## - # RPC-specific configuration for `get_file` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file - ## - # RPC-specific configuration for `list_tags` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tags - ## - # RPC-specific configuration for `get_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tag - ## - # RPC-specific configuration for `create_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tag - ## - # RPC-specific configuration for `update_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tag - ## - # RPC-specific configuration for `delete_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tag - ## - # 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_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_settings - ## - # RPC-specific configuration for `update_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_project_settings - - # @private - def initialize parent_rpcs = nil - import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts - @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config - import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts - @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_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_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages - @list_packages = ::Gapic::Config::Method.new list_packages_config - get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package - @get_package = ::Gapic::Config::Method.new get_package_config - delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package - @delete_package = ::Gapic::Config::Method.new delete_package_config - list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions - @list_versions = ::Gapic::Config::Method.new list_versions_config - get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version - @get_version = ::Gapic::Config::Method.new get_version_config - delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version - @delete_version = ::Gapic::Config::Method.new delete_version_config - list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files - @list_files = ::Gapic::Config::Method.new list_files_config - get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file - @get_file = ::Gapic::Config::Method.new get_file_config - list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags - @list_tags = ::Gapic::Config::Method.new list_tags_config - get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag - @get_tag = ::Gapic::Config::Method.new get_tag_config - create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag - @create_tag = ::Gapic::Config::Method.new create_tag_config - update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag - @update_tag = ::Gapic::Config::Method.new update_tag_config - delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag - @delete_tag = ::Gapic::Config::Method.new delete_tag_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_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings - @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config - update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings - @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb deleted file mode 100644 index bca5d7763a5e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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 ArtifactRegistry - module V1beta2 - module ArtifactRegistry - # Credentials for the ArtifactRegistry API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "ARTIFACT_REGISTRY_CREDENTIALS", - "ARTIFACT_REGISTRY_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "ARTIFACT_REGISTRY_CREDENTIALS_JSON", - "ARTIFACT_REGISTRY_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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb deleted file mode 100644 index 3d15132574aa..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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 ArtifactRegistry - module V1beta2 - module ArtifactRegistry - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ArtifactRegistry 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 ArtifactRegistry 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::ArtifactRegistry::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.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::ArtifactRegistry::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_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::ArtifactRegistry::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_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::ArtifactRegistry::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.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::ArtifactRegistry::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 - - 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 = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb deleted file mode 100644 index 4b937ff38983..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.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 ArtifactRegistry - module V1beta2 - module ArtifactRegistry - # Path helper methods for the ArtifactRegistry 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 ProjectSettings resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/projectSettings` - # - # @param project [String] - # - # @return [::String] - def project_settings_path project: - "projects/#{project}/projectSettings" - 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 Tag resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param package [String] - # @param tag [String] - # - # @return [::String] - def tag_path project:, location:, repository:, package:, tag: - 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, "package cannot contain /" if package.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb deleted file mode 100644 index 4e4826632d6d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/artifact_registry/v1beta2/version" -require "google/cloud/artifact_registry/v1beta2/bindings_override" - -require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/paths" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - ## - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - module ArtifactRegistry - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb deleted file mode 100644 index 8fde50261255..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb +++ /dev/null @@ -1,2794 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - module Rest - ## - # REST client for the ArtifactRegistry service. - # - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :artifact_registry_stub - - ## - # Configure the ArtifactRegistry Client class. - # - # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ArtifactRegistry clients - # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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", "ArtifactRegistry", "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_repositories.timeout = 30.0 - default_config.rpcs.list_repositories.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_repository.timeout = 30.0 - default_config.rpcs.get_repository.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_repository.timeout = 30.0 - - default_config.rpcs.update_repository.timeout = 30.0 - - default_config.rpcs.delete_repository.timeout = 30.0 - default_config.rpcs.delete_repository.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_packages.timeout = 30.0 - default_config.rpcs.list_packages.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_package.timeout = 30.0 - default_config.rpcs.get_package.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_package.timeout = 30.0 - default_config.rpcs.delete_package.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_versions.timeout = 30.0 - default_config.rpcs.list_versions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_version.timeout = 30.0 - default_config.rpcs.get_version.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_version.timeout = 30.0 - default_config.rpcs.delete_version.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_files.timeout = 30.0 - default_config.rpcs.list_files.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_file.timeout = 30.0 - default_config.rpcs.get_file.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tags.timeout = 30.0 - default_config.rpcs.list_tags.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_tag.timeout = 30.0 - default_config.rpcs.get_tag.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_tag.timeout = 30.0 - - default_config.rpcs.update_tag.timeout = 30.0 - - default_config.rpcs.delete_tag.timeout = 30.0 - default_config.rpcs.delete_tag.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy.timeout = 30.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.test_iam_permissions.timeout = 30.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ArtifactRegistry 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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 - @artifact_registry_stub.universe_domain - end - - ## - # Create a new ArtifactRegistry REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ArtifactRegistry 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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 - - @artifact_registry_stub = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @artifact_registry_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 = @artifact_registry_stub.endpoint - config.universe_domain = @artifact_registry_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @artifact_registry_stub.logger - end - - # Service calls - - ## - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_apt_artifacts(request, options = nil) - # Pass arguments to `import_apt_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_apt_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new - # - # # Call the import_apt_artifacts method. - # result = client.import_apt_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_apt_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_apt_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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.import_apt_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_apt_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.import_apt_artifacts request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_yum_artifacts(request, options = nil) - # Pass arguments to `import_yum_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_yum_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new - # - # # Call the import_yum_artifacts method. - # result = client.import_yum_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_yum_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_yum_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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.import_yum_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_yum_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.import_yum_artifacts request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose repositories will be listed. - # @param page_size [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 - - @artifact_registry_stub.list_repositories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_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 a repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_repository(name: nil) - # Pass arguments to `get_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 - - @artifact_registry_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 repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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_id: nil, repository: 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 name of the parent resource where the repository will be created. - # @param repository_id [::String] - # The repository id to use for this repository. - # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] - # The repository to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 - - @artifact_registry_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 a repository. - # - # @overload update_repository(request, options = nil) - # Pass arguments to `update_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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(repository: nil, update_mask: 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 repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] - # The repository that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new - # - # # Call the update_repository method. - # result = client.update_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. - # p result - # - def update_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 - - @artifact_registry_stub.update_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 - - ## - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::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) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::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_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 - - @artifact_registry_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 packages. - # - # @overload list_packages(request, options = nil) - # Pass arguments to `list_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose packages will be listed. - # @param page_size [::Integer] - # The maximum number of packages to return. - # Maximum page size is 10,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new - # - # # Call the list_packages method. - # result = client.list_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. - # p item - # end - # - def list_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_packages.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_packages request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, 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 package. - # - # @overload get_package(request, options = nil) - # Pass arguments to `get_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_package(name: nil) - # Pass arguments to `get_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the package to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new - # - # # Call the get_package method. - # result = client.get_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. - # p result - # - def get_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_package request, 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 package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - # - # @overload delete_package(request, options = nil) - # Pass arguments to `delete_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_package(name: nil) - # Pass arguments to `delete_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the package to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new - # - # # Call the delete_package method. - # result = client.delete_package request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest - - # Converts hash and nil to an 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_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_package request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 versions. - # - # @overload list_versions(request, options = nil) - # Pass arguments to `list_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil) - # Pass arguments to `list_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] - # The name of the parent resource whose versions will be listed. - # @param page_size [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - # @param order_by [::String] - # Optional. The field to order the results by. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new - # - # # Call the list_versions method. - # result = client.list_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::ArtifactRegistry::V1beta2::Version. - # p item - # end - # - def list_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_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::ArtifactRegistry::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_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_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 a version - # - # @overload get_version(request, options = nil) - # Pass arguments to `get_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_version(name: nil, view: nil) - # Pass arguments to `get_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] - # The name of the version to retrieve. - # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new - # - # # Call the get_version method. - # result = client.get_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. - # p result - # - def get_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_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::ArtifactRegistry::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_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_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 - - ## - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - # - # @overload delete_version(request, options = nil) - # Pass arguments to `delete_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_version(name: nil, force: nil) - # Pass arguments to `delete_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] - # The name of the version to delete. - # @param force [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new - # - # # Call the delete_version method. - # result = client.delete_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest - - # Converts hash and nil to an 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_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::ArtifactRegistry::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_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_version request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 files. - # - # @overload list_files(request, options = nil) - # Pass arguments to `list_files` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the repository whose files will be listed. For example: - # "projects/p1/locations/us-central1/repositories/repo1 - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `owner` - # - # An example of using a filter: - # - # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - # ID starting with "a/b/". - # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - # Files owned by the version `1.0` in package `pkg1`. - # @param page_size [::Integer] - # The maximum number of files to return. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new - # - # # Call the list_files method. - # result = client.list_files request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. - # p item - # end - # - def list_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_files.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_files request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, 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 file. - # - # @overload get_file(request, options = nil) - # Pass arguments to `get_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_file(name: nil) - # Pass arguments to `get_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the file to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new - # - # # Call the get_file method. - # result = client.get_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. - # p result - # - def get_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_file request, 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 tags. - # - # @overload list_tags(request, options = nil) - # Pass arguments to `list_tags` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tags` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose tags will be listed. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `version` - # - # An example of using a filter: - # - # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - # --> Tags that are applied to the version `1.0` in package `pkg1`. - # @param page_size [::Integer] - # The maximum number of tags to return. Maximum page size is 10,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new - # - # # Call the list_tags method. - # result = client.list_tags request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p item - # end - # - def list_tags request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tags.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_tags.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tags.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_tags request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, 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 tag. - # - # @overload get_tag(request, options = nil) - # Pass arguments to `get_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_tag(name: nil) - # Pass arguments to `get_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new - # - # # Call the get_tag method. - # result = client.get_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def get_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_tag request, 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 tag. - # - # @overload create_tag(request, options = nil) - # Pass arguments to `create_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_tag(parent: nil, tag_id: nil, tag: nil) - # Pass arguments to `create_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource where the tag will be created. - # @param tag_id [::String] - # The tag id to use for this repository. - # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] - # The tag to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new - # - # # Call the create_tag method. - # result = client.create_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def create_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest - - # Converts hash and nil to an 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.create_tag request, 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 tag. - # - # @overload update_tag(request, options = nil) - # Pass arguments to `update_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_tag(tag: nil, update_mask: nil) - # Pass arguments to `update_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] - # The tag that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new - # - # # Call the update_tag method. - # result = client.update_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def update_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest - - # Converts hash and nil to an 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_tag request, 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 tag. - # - # @overload delete_tag(request, options = nil) - # Pass arguments to `delete_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_tag(name: nil) - # Pass arguments to `delete_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag 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/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new - # - # # Call the delete_tag method. - # result = client.delete_tag request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest - - # Converts hash and nil to an 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_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::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_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_tag request, 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 IAM policy for a given 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/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 - - @artifact_registry_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 IAM policy for a given 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/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 - - @artifact_registry_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 - - ## - # Tests if the caller has a list of permissions on a resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::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 - - @artifact_registry_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 - - ## - # Retrieves the Settings for the Project. - # - # @overload get_project_settings(request, options = nil) - # Pass arguments to `get_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_project_settings(name: nil) - # Pass arguments to `get_project_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. The name of the projectSettings resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new - # - # # Call the get_project_settings method. - # result = client.get_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - # p result - # - def get_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_project_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::ArtifactRegistry::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_project_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_project_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 Settings for the Project. - # - # @overload update_project_settings(request, options = nil) - # Pass arguments to `update_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_project_settings(project_settings: nil, update_mask: nil) - # Pass arguments to `update_project_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 project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash] - # The project settings. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new - # - # # Call the update_project_settings method. - # result = client.update_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - # p result - # - def update_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_project_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::ArtifactRegistry::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_project_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_project_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 - - ## - # Configuration class for the ArtifactRegistry REST API. - # - # This class represents the configuration for ArtifactRegistry 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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 - # # import_apt_artifacts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.import_apt_artifacts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.import_apt_artifacts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::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 ArtifactRegistry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `import_apt_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_apt_artifacts - ## - # RPC-specific configuration for `import_yum_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_yum_artifacts - ## - # 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_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_packages - ## - # RPC-specific configuration for `get_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_package - ## - # RPC-specific configuration for `delete_package` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_package - ## - # RPC-specific configuration for `list_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_versions - ## - # RPC-specific configuration for `get_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_version - ## - # RPC-specific configuration for `delete_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_version - ## - # RPC-specific configuration for `list_files` - # @return [::Gapic::Config::Method] - # - attr_reader :list_files - ## - # RPC-specific configuration for `get_file` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file - ## - # RPC-specific configuration for `list_tags` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tags - ## - # RPC-specific configuration for `get_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tag - ## - # RPC-specific configuration for `create_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tag - ## - # RPC-specific configuration for `update_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tag - ## - # RPC-specific configuration for `delete_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tag - ## - # 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_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_settings - ## - # RPC-specific configuration for `update_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_project_settings - - # @private - def initialize parent_rpcs = nil - import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts - @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config - import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts - @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_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_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages - @list_packages = ::Gapic::Config::Method.new list_packages_config - get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package - @get_package = ::Gapic::Config::Method.new get_package_config - delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package - @delete_package = ::Gapic::Config::Method.new delete_package_config - list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions - @list_versions = ::Gapic::Config::Method.new list_versions_config - get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version - @get_version = ::Gapic::Config::Method.new get_version_config - delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version - @delete_version = ::Gapic::Config::Method.new delete_version_config - list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files - @list_files = ::Gapic::Config::Method.new list_files_config - get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file - @get_file = ::Gapic::Config::Method.new get_file_config - list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags - @list_tags = ::Gapic::Config::Method.new list_tags_config - get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag - @get_tag = ::Gapic::Config::Method.new get_tag_config - create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag - @create_tag = ::Gapic::Config::Method.new create_tag_config - update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag - @update_tag = ::Gapic::Config::Method.new update_tag_config - delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag - @delete_tag = ::Gapic::Config::Method.new delete_tag_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_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings - @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config - update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings - @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb deleted file mode 100644 index 2177e2eb1d4d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/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 ArtifactRegistry - module V1beta2 - module ArtifactRegistry - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ArtifactRegistry 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 ArtifactRegistry 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::ArtifactRegistry::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_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::ArtifactRegistry::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_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::ArtifactRegistry::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_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::ArtifactRegistry::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.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 = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::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: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb deleted file mode 100644 index ec6f1a7ce763..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb +++ /dev/null @@ -1,1615 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/devtools/artifactregistry/v1beta2/service_pb" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - module Rest - ## - # REST service stub for the ArtifactRegistry 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 import_apt_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_apt_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_apt_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_apt_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_yum_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_yum_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_yum_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_yum_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::ListRepositoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # 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::Cloud::ArtifactRegistry::V1beta2::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 delete_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::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_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse] - # A result object deserialized from the server's reply - def list_packages request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_packages_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_packages", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # A result object deserialized from the server's reply - def get_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.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_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse] - # A result object deserialized from the server's reply - def list_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_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_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # A result object deserialized from the server's reply - def get_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_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_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.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_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_files REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse] - # A result object deserialized from the server's reply - def list_files request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_files_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_files", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # A result object deserialized from the server's reply - def get_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_file", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::File.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_tags REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse] - # A result object deserialized from the server's reply - def list_tags request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tags_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tags", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # A result object deserialized from the server's reply - def get_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.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_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # A result object deserialized from the server's reply - def create_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.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_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # A result object deserialized from the server's reply - def update_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.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_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tag", - 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_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # A result object deserialized from the server's reply - def get_project_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_project_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_project_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # A result object deserialized from the server's reply - def update_project_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_project_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_project_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.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 import_apt_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_apt_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}/aptArtifacts:import", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_yum_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_yum_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}/yumArtifacts:import", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_repositories REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::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: "/v1beta2/{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::ArtifactRegistry::V1beta2::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: "/v1beta2/{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::ArtifactRegistry::V1beta2::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: "/v1beta2/{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::ArtifactRegistry::V1beta2::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: "/v1beta2/{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::ArtifactRegistry::V1beta2::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: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_packages_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/packages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest] - # 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_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest] - # 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_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_files REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_files_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/files", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tags REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tags_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/tags", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest] - # 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_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}/tags", - body: "tag", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest] - # 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_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta2/{tag.name}", - body: "tag", - matches: [ - ["tag.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest] - # 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_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, 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/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, 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/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, 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/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_project_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/projectSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_project_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta2/{project_settings.name}", - body: "project_settings", - matches: [ - ["project_settings.name", %r{^projects/[^/]+/projectSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb deleted file mode 100644 index 51f57d10ff56..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/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 ArtifactRegistry - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/artifact_registry/v1beta2/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - module V1beta2 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ArtifactRegistry"] - 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-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb deleted file mode 100644 index d25e48a6eb93..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/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/artifact_registry/v1beta2/artifact_registry/rest" -require "google/cloud/artifact_registry/v1beta2/bindings_override" -require "google/cloud/artifact_registry/v1beta2/version" - -module Google - module Cloud - module ArtifactRegistry - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/artifact_registry/v1beta2/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - module V1beta2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb deleted file mode 100644 index 8a820cee0d3a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/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 ArtifactRegistry - module V1beta2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb deleted file mode 100644 index 27134bb36c91..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/apt_artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n;google/devtools/artifactregistry/v1beta2/apt_artifact.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xbf\x03\n\x0b\x41ptArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0cpackage_type\x18\x03 \x01(\x0e\x32\x41.google.devtools.artifactregistry.v1beta2.AptArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcomponent\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x63ontrol_file\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/AptArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}\"B\n\x1bImportAptArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x92\x01\n\x19ImportAptArtifactsRequest\x12[\n\ngcs_source\x18\x02 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa7\x01\n\x1bImportAptArtifactsErrorInfo\x12[\n\ngcs_source\x18\x01 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xc1\x01\n\x1aImportAptArtifactsResponse\x12L\n\rapt_artifacts\x18\x01 \x03(\x0b\x32\x35.google.devtools.artifactregistry.v1beta2.AptArtifact\x12U\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo\"\x1c\n\x1aImportAptArtifactsMetadataB\x94\x02\n,com.google.devtools.artifactregistry.v1beta2B\x10\x41ptArtifactProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - AptArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.AptArtifact").msgclass - AptArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType").enummodule - ImportAptArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource").msgclass - ImportAptArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest").msgclass - ImportAptArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo").msgclass - ImportAptArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse").msgclass - ImportAptArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb deleted file mode 100644 index a1cc80819447..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/file.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/devtools/artifactregistry/v1beta2/file.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x98\x01\n\x04Hash\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.devtools.artifactregistry.v1beta2.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\":\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\"\xd4\x02\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nsize_bytes\x18\x03 \x01(\x03\x12>\n\x06hashes\x18\x04 \x03(\x0b\x32..google.devtools.artifactregistry.v1beta2.Hash\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05owner\x18\x07 \x01(\t:y\xea\x41v\n$artifactregistry.googleapis.com/File\x12Nprojects/{project}/locations/{location}/repositories/{repository}/files/{file}\"Y\n\x10ListFilesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x11ListFilesResponse\x12=\n\x05\x66iles\x18\x01 \x03(\x0b\x32..google.devtools.artifactregistry.v1beta2.File\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1e\n\x0eGetFileRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x8d\x02\n,com.google.devtools.artifactregistry.v1beta2B\tFileProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Hash").msgclass - Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Hash.HashType").enummodule - File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.File").msgclass - ListFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListFilesRequest").msgclass - ListFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListFilesResponse").msgclass - GetFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetFileRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb deleted file mode 100644 index 29552f5694d6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/package.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/package.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x01\n\x07Package\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"L\n\x13ListPackagesRequest\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\"t\n\x14ListPackagesResponse\x12\x43\n\x08packages\x18\x01 \x03(\x0b\x32\x31.google.devtools.artifactregistry.v1beta2.Package\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"!\n\x11GetPackageRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"$\n\x14\x44\x65letePackageRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cPackageProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Package").msgclass - ListPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListPackagesRequest").msgclass - ListPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListPackagesResponse").msgclass - GetPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetPackageRequest").msgclass - DeletePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeletePackageRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb deleted file mode 100644 index 9c549297f124..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/repository.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n9google/devtools/artifactregistry/v1beta2/repository.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x07\n\nRepository\x12\x62\n\x0cmaven_config\x18\t \x01(\x0b\x32J.google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfigH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x06\x66ormat\x18\x02 \x01(\x0e\x32;.google.devtools.artifactregistry.v1beta2.Repository.Format\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12P\n\x06labels\x18\x04 \x03(\x0b\x32@.google.devtools.artifactregistry.v1beta2.Repository.LabelsEntry\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x1a\xf8\x01\n\x15MavenRepositoryConfig\x12!\n\x19\x61llow_snapshot_overwrites\x18\x01 \x01(\x08\x12p\n\x0eversion_policy\x18\x02 \x01(\x0e\x32X.google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy\"J\n\rVersionPolicy\x12\x1e\n\x1aVERSION_POLICY_UNSPECIFIED\x10\x00\x12\x0b\n\x07RELEASE\x10\x01\x12\x0c\n\x08SNAPSHOT\x10\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OCKER\x10\x01\x12\t\n\x05MAVEN\x10\x02\x12\x07\n\x03NPM\x10\x03\x12\x07\n\x03\x41PT\x10\x05\x12\x07\n\x03YUM\x10\x06\x12\n\n\x06PYTHON\x10\x08:r\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}B\x0f\n\rformat_config\"\x84\x01\n\x17ListRepositoriesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x7f\n\x18ListRepositoriesResponse\x12J\n\x0crepositories\x18\x01 \x03(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Repository\"\xbe\x01\n\x17\x43reateRepositoryRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x15\n\rrepository_id\x18\x02 \x01(\t\x12H\n\nrepository\x18\x03 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\"\x94\x01\n\x17UpdateRepositoryRequest\x12H\n\nrepository\x18\x01 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x17\x44\x65leteRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\x93\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0fRepositoryProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository").msgclass - Repository::MavenRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig").msgclass - Repository::MavenRepositoryConfig::VersionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy").enummodule - Repository::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.Format").enummodule - ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest").msgclass - ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse").msgclass - GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetRepositoryRequest").msgclass - CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest").msgclass - UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest").msgclass - DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb deleted file mode 100644 index e30893147e79..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/devtools/artifactregistry/v1beta2/apt_artifact_pb' -require 'google/devtools/artifactregistry/v1beta2/file_pb' -require 'google/devtools/artifactregistry/v1beta2/package_pb' -require 'google/devtools/artifactregistry/v1beta2/repository_pb' -require 'google/devtools/artifactregistry/v1beta2/settings_pb' -require 'google/devtools/artifactregistry/v1beta2/tag_pb' -require 'google/devtools/artifactregistry/v1beta2/version_pb' -require 'google/devtools/artifactregistry/v1beta2/yum_artifact_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/service.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a;google/devtools/artifactregistry/v1beta2/apt_artifact.proto\x1a\x33google/devtools/artifactregistry/v1beta2/file.proto\x1a\x36google/devtools/artifactregistry/v1beta2/package.proto\x1a\x39google/devtools/artifactregistry/v1beta2/repository.proto\x1a\x37google/devtools/artifactregistry/v1beta2/settings.proto\x1a\x32google/devtools/artifactregistry/v1beta2/tag.proto\x1a\x36google/devtools/artifactregistry/v1beta2/version.proto\x1a;google/devtools/artifactregistry/v1beta2/yum_artifact.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x13\n\x11OperationMetadata2\xe6/\n\x10\x41rtifactRegistry\x12\xdf\x02\n\x12ImportAptArtifacts\x12\x43.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41\x8a\x01\nCgoogle.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse\x12\x43google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata\x82\xd3\xe4\x93\x02P\"K/v1beta2/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import:\x01*\x12\xdf\x02\n\x12ImportYumArtifacts\x12\x43.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41\x8a\x01\nCgoogle.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse\x12\x43google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata\x82\xd3\xe4\x93\x02P\"K/v1beta2/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import:\x01*\x12\xe1\x01\n\x10ListRepositories\x12\x41.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest\x1a\x42.google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta2/{parent=projects/*/locations/*}/repositories\x12\xcb\x01\n\rGetRepository\x12>.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest\x1a\x34.google.devtools.artifactregistry.v1beta2.Repository\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta2/{name=projects/*/locations/*/repositories/*}\x12\xd6\x02\n\x10\x43reateRepository\x12\x41.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41q\n3google.devtools.artifactregistry.v1beta2.Repository\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02\x43\"5/v1beta2/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xfa\x01\n\x10UpdateRepository\x12\x41.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest\x1a\x34.google.devtools.artifactregistry.v1beta2.Repository\"m\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02N2@/v1beta2/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\x91\x02\n\x10\x44\x65leteRepository\x12\x41.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta2/{name=projects/*/locations/*/repositories/*}\x12\xe0\x01\n\x0cListPackages\x12=.google.devtools.artifactregistry.v1beta2.ListPackagesRequest\x1a>.google.devtools.artifactregistry.v1beta2.ListPackagesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages\x12\xcd\x01\n\nGetPackage\x12;.google.devtools.artifactregistry.v1beta2.GetPackageRequest\x1a\x31.google.devtools.artifactregistry.v1beta2.Package\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}\x12\x96\x02\n\rDeletePackage\x12>.google.devtools.artifactregistry.v1beta2.DeletePackageRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}\x12\xeb\x01\n\x0cListVersions\x12=.google.devtools.artifactregistry.v1beta2.ListVersionsRequest\x1a>.google.devtools.artifactregistry.v1beta2.ListVersionsResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12K/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions\x12\xd8\x01\n\nGetVersion\x12;.google.devtools.artifactregistry.v1beta2.GetVersionRequest\x1a\x31.google.devtools.artifactregistry.v1beta2.Version\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12K/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xa1\x02\n\rDeleteVersion\x12>.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02M*K/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xd4\x01\n\tListFiles\x12:.google.devtools.artifactregistry.v1beta2.ListFilesRequest\x1a;.google.devtools.artifactregistry.v1beta2.ListFilesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1beta2/{parent=projects/*/locations/*/repositories/*}/files\x12\xc2\x01\n\x07GetFile\x12\x38.google.devtools.artifactregistry.v1beta2.GetFileRequest\x1a..google.devtools.artifactregistry.v1beta2.File\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}\x12\xdb\x01\n\x08ListTags\x12\x39.google.devtools.artifactregistry.v1beta2.ListTagsRequest\x1a:.google.devtools.artifactregistry.v1beta2.ListTagsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags\x12\xc8\x01\n\x06GetTag\x12\x37.google.devtools.artifactregistry.v1beta2.GetTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xe0\x01\n\tCreateTag\x12:.google.devtools.artifactregistry.v1beta2.CreateTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"h\xda\x41\x11parent,tag,tag_id\x82\xd3\xe4\x93\x02N\"G/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags:\x03tag\x12\xe2\x01\n\tUpdateTag\x12:.google.devtools.artifactregistry.v1beta2.UpdateTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"j\xda\x41\x0ftag,update_mask\x82\xd3\xe4\x93\x02R2K/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}:\x03tag\x12\xb7\x01\n\tDeleteTag\x12:.google.devtools.artifactregistry.v1beta2.DeleteTagRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I*G/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\x9c\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Q\x82\xd3\xe4\x93\x02K\"F/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\x99\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"N\x82\xd3\xe4\x93\x02H\x12\x46/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xc2\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"W\x82\xd3\xe4\x93\x02Q\"L/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\xcf\x01\n\x12GetProjectSettings\x12\x43.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest\x1a\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1beta2/{name=projects/*/projectSettings}\x12\x90\x02\n\x15UpdateProjectSettings\x12\x46.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest\x1a\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\"t\xda\x41\x1cproject_settings,update_mask\x82\xd3\xe4\x93\x02O2;/v1beta2/{project_settings.name=projects/*/projectSettings}:\x10project_settings\x1a\x8c\x01\xca\x41\x1f\x61rtifactregistry.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cServiceProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb deleted file mode 100644 index aaa057d35013..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb +++ /dev/null @@ -1,116 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/devtools/artifactregistry/v1beta2/service.proto for package 'Google.Cloud.ArtifactRegistry.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/devtools/artifactregistry/v1beta2/service_pb' - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.devtools.artifactregistry.v1beta2.ArtifactRegistry' - - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - rpc :ImportAptArtifacts, ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Google::Longrunning::Operation - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - rpc :ImportYumArtifacts, ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Google::Longrunning::Operation - # Lists repositories. - rpc :ListRepositories, ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse - # Gets a repository. - rpc :GetRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Repository - # Creates a repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - rpc :CreateRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, ::Google::Longrunning::Operation - # Updates a repository. - rpc :UpdateRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Repository - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - rpc :DeleteRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, ::Google::Longrunning::Operation - # Lists packages. - rpc :ListPackages, ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse - # Gets a package. - rpc :GetPackage, ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Package - # Deletes a package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - rpc :DeletePackage, ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Google::Longrunning::Operation - # Lists versions. - rpc :ListVersions, ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse - # Gets a version - rpc :GetVersion, ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Version - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - rpc :DeleteVersion, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Google::Longrunning::Operation - # Lists files. - rpc :ListFiles, ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse - # Gets a file. - rpc :GetFile, ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::File - # Lists tags. - rpc :ListTags, ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse - # Gets a tag. - rpc :GetTag, ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag - # Creates a tag. - rpc :CreateTag, ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag - # Updates a tag. - rpc :UpdateTag, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag - # Deletes a tag. - rpc :DeleteTag, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Google::Protobuf::Empty - # Updates the IAM policy for a given resource. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the IAM policy for a given resource. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Tests if the caller has a list of permissions on a resource. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Retrieves the Settings for the Project. - rpc :GetProjectSettings, ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings - # Updates the Settings for the Project. - rpc :UpdateProjectSettings, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb deleted file mode 100644 index 7dec3dc9290c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/settings.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n7google/devtools/artifactregistry/v1beta2/settings.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x91\x03\n\x0fProjectSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12l\n\x18legacy_redirection_state\x18\x02 \x01(\x0e\x32J.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState\"\xa7\x01\n\x10RedirectionState\x12!\n\x1dREDIRECTION_STATE_UNSPECIFIED\x10\x00\x12$\n REDIRECTION_FROM_GCR_IO_DISABLED\x10\x01\x12#\n\x1fREDIRECTION_FROM_GCR_IO_ENABLED\x10\x02\x12%\n!REDIRECTION_FROM_GCR_IO_FINALIZED\x10\x03:X\xea\x41U\n/artifactregistry.googleapis.com/ProjectSettings\x12\"projects/{project}/projectSettings\"b\n\x19GetProjectSettingsRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/artifactregistry.googleapis.com/ProjectSettings\"\xa4\x01\n\x1cUpdateProjectSettingsRequest\x12S\n\x10project_settings\x18\x02 \x01(\x0b\x32\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x91\x02\n,com.google.devtools.artifactregistry.v1beta2B\rSettingsProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - ProjectSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ProjectSettings").msgclass - ProjectSettings::RedirectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState").enummodule - GetProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest").msgclass - UpdateProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb deleted file mode 100644 index 658061a8e001..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/tag.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n2google/devtools/artifactregistry/v1beta2/tag.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb1\x01\n\x03Tag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t:\x8a\x01\xea\x41\x86\x01\n#artifactregistry.googleapis.com/Tag\x12_projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}\"X\n\x0fListTagsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"h\n\x10ListTagsResponse\x12;\n\x04tags\x18\x01 \x03(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1d\n\rGetTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"n\n\x10\x43reateTagRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06tag_id\x18\x02 \x01(\t\x12:\n\x03tag\x18\x03 \x01(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\"\x7f\n\x10UpdateTagRequest\x12:\n\x03tag\x18\x01 \x01(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\" \n\x10\x44\x65leteTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x8c\x02\n,com.google.devtools.artifactregistry.v1beta2B\x08TagProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Tag").msgclass - ListTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListTagsRequest").msgclass - ListTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListTagsResponse").msgclass - GetTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetTagRequest").msgclass - CreateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.CreateTagRequest").msgclass - UpdateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateTagRequest").msgclass - DeleteTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteTagRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb deleted file mode 100644 index e557d358711e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/version.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/devtools/artifactregistry/v1beta2/tag_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/version.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/devtools/artifactregistry/v1beta2/tag.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x03\n\x07Version\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0crelated_tags\x18\x07 \x03(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03:\x96\x01\xea\x41\x92\x01\n\'artifactregistry.googleapis.com/Version\x12gprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}\"\xa8\x01\n\x13ListVersionsRequest\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\x43\n\x04view\x18\x04 \x01(\x0e\x32\x35.google.devtools.artifactregistry.v1beta2.VersionView\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"t\n\x14ListVersionsResponse\x12\x43\n\x08versions\x18\x01 \x03(\x0b\x32\x31.google.devtools.artifactregistry.v1beta2.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"f\n\x11GetVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x43\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.devtools.artifactregistry.v1beta2.VersionView\"3\n\x14\x44\x65leteVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08*@\n\x0bVersionView\x12\x1c\n\x18VERSION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cVersionProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Version").msgclass - ListVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListVersionsRequest").msgclass - ListVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListVersionsResponse").msgclass - GetVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetVersionRequest").msgclass - DeleteVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteVersionRequest").msgclass - VersionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.VersionView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb deleted file mode 100644 index 7391ace9af17..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/yum_artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n;google/devtools/artifactregistry/v1beta2/yum_artifact.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\x8c\x03\n\x0bYumArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0cpackage_type\x18\x03 \x01(\x0e\x32\x41.google.devtools.artifactregistry.v1beta2.YumArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/YumArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}\"B\n\x1bImportYumArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x92\x01\n\x19ImportYumArtifactsRequest\x12[\n\ngcs_source\x18\x02 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa7\x01\n\x1bImportYumArtifactsErrorInfo\x12[\n\ngcs_source\x18\x01 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xc1\x01\n\x1aImportYumArtifactsResponse\x12L\n\ryum_artifacts\x18\x01 \x03(\x0b\x32\x35.google.devtools.artifactregistry.v1beta2.YumArtifact\x12U\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo\"\x1c\n\x1aImportYumArtifactsMetadataB\x94\x02\n,com.google.devtools.artifactregistry.v1beta2B\x10YumArtifactProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - YumArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.YumArtifact").msgclass - YumArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType").enummodule - ImportYumArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource").msgclass - ImportYumArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest").msgclass - ImportYumArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo").msgclass - ImportYumArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse").msgclass - ImportYumArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md deleted file mode 100644 index 2d7f47c14fc9..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Artifact Registry 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-artifact_registry-v1beta2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb deleted file mode 100644 index 87bcf0a3806a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # A detailed representation of an Apt artifact. Information in the record - # is derived from the archive's control file. - # See https://www.debian.org/doc/debian-policy/ch-controlfields.html - # @!attribute [r] name - # @return [::String] - # Output only. The Artifact Registry resource name of the artifact. - # @!attribute [r] package_name - # @return [::String] - # Output only. The Apt package name of the artifact. - # @!attribute [r] package_type - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::AptArtifact::PackageType] - # Output only. An artifact is a binary or source package. - # @!attribute [r] architecture - # @return [::String] - # Output only. Operating system architecture of the artifact. - # @!attribute [r] component - # @return [::String] - # Output only. Repository component of the artifact. - # @!attribute [r] control_file - # @return [::String] - # Output only. Contents of the artifact's control metadata file. - class AptArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Package type is either binary or source. - module PackageType - # Package type is not specified. - PACKAGE_TYPE_UNSPECIFIED = 0 - - # Binary package. - BINARY = 1 - - # Source package. - SOURCE = 2 - end - end - - # Google Cloud Storage location where the artifacts currently reside. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). - # @!attribute [rw] use_wildcards - # @return [::Boolean] - # Supports URI wildcards for matching multiple objects from a single URI. - class ImportAptArtifactsGcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to import new apt artifacts. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource] - # Google Cloud Storage location where input content is located. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the artifacts will be imported. - class ImportAptArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Error information explaining why a package was not imported. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource] - # Google Cloud Storage location requested. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The detailed error status. - class ImportAptArtifactsErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message from importing APT artifacts. - # @!attribute [rw] apt_artifacts - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::AptArtifact>] - # The Apt artifacts imported. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsErrorInfo>] - # Detailed error info for artifacts that were not imported. - class ImportAptArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The operation metadata for importing artifacts. - class ImportAptArtifactsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb deleted file mode 100644 index b01bb4f451a4..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.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 ArtifactRegistry - module V1beta2 - # A hash of file content. - # @!attribute [rw] type - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Hash::HashType] - # The algorithm used to compute the hash value. - # @!attribute [rw] value - # @return [::String] - # The hash value. - class Hash - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The algorithm used to compute the hash. - module HashType - # Unspecified. - HASH_TYPE_UNSPECIFIED = 0 - - # SHA256 hash. - SHA256 = 1 - - # MD5 hash. - MD5 = 2 - end - end - - # Files store content that is potentially associated with Packages or Versions. - # @!attribute [rw] name - # @return [::String] - # The name of the file, for example: - # "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". - # If the file ID part contains slashes, they are escaped. - # @!attribute [rw] size_bytes - # @return [::Integer] - # The size of the File in bytes. - # @!attribute [rw] hashes - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Hash>] - # The hashes of the file content. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the File was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the File was last updated. - # @!attribute [rw] owner - # @return [::String] - # The name of the Package or Version that owns this file, if any. - class File - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list files. - # @!attribute [rw] parent - # @return [::String] - # The name of the repository whose files will be listed. For example: - # "projects/p1/locations/us-central1/repositories/repo1 - # @!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` - # * `owner` - # - # An example of using a filter: - # - # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - # ID starting with "a/b/". - # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - # Files owned by the version `1.0` in package `pkg1`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of files to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListFilesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing files. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::File>] - # The files returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of files, or empty if there are no - # more files to return. - class ListFilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a file. - # @!attribute [rw] name - # @return [::String] - # The name of the file to retrieve. - class GetFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb deleted file mode 100644 index 24ee1b9b6dc3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb +++ /dev/null @@ -1,93 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # Packages are named collections of versions. - # @!attribute [rw] name - # @return [::String] - # The name of the package, for example: - # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". - # @!attribute [rw] display_name - # @return [::String] - # The display name of the package. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the package was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the package was last updated. This includes publishing a new - # version of the package. - class Package - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list packages. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource whose packages will be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of packages to return. - # Maximum page size is 10,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListPackagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing packages. - # @!attribute [rw] packages - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] - # The packages returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of packages, or empty if there are no - # more packages to return. - class ListPackagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a package. - # @!attribute [rw] name - # @return [::String] - # The name of the package to retrieve. - class GetPackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a package. - # @!attribute [rw] name - # @return [::String] - # The name of the package to delete. - class DeletePackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb deleted file mode 100644 index 30184abcdddf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb +++ /dev/null @@ -1,202 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # A Repository for storing artifacts with a specific format. - # @!attribute [rw] maven_config - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::MavenRepositoryConfig] - # Maven repository config contains repository level configuration - # for the repositories of maven type. - # @!attribute [rw] name - # @return [::String] - # The name of the repository, for example: - # "projects/p1/locations/us-central1/repositories/repo1". - # @!attribute [rw] format - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::Format] - # The format of packages that are stored in the repository. - # @!attribute [rw] description - # @return [::String] - # The user-provided description of the repository. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels with user-defined metadata. - # This field may contain up to 64 entries. Label keys and values may be no - # longer than 63 characters. Label keys must begin with a lowercase letter - # and may only contain lowercase letters, numeric characters, underscores, - # and dashes. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the repository was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the repository was last updated. - # @!attribute [rw] kms_key_name - # @return [::String] - # The Cloud KMS resource name of the customer managed encryption key that’s - # used to encrypt the contents of the Repository. Has the form: - # `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. - # This value may not be changed after the Repository has been created. - class Repository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # MavenRepositoryConfig is maven related repository details. - # Provides additional configuration details for repositories of the maven - # format type. - # @!attribute [rw] allow_snapshot_overwrites - # @return [::Boolean] - # The repository with this flag will allow publishing - # the same snapshot versions. - # @!attribute [rw] version_policy - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::MavenRepositoryConfig::VersionPolicy] - # Version policy defines the versions that the registry will accept. - class MavenRepositoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VersionPolicy is the version policy for the repository. - module VersionPolicy - # VERSION_POLICY_UNSPECIFIED - the version policy is not defined. - # When the version policy is not defined, no validation is performed - # for the versions. - VERSION_POLICY_UNSPECIFIED = 0 - - # RELEASE - repository will accept only Release versions. - RELEASE = 1 - - # SNAPSHOT - repository will accept only Snapshot versions. - SNAPSHOT = 2 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A package format. - module Format - # Unspecified package format. - FORMAT_UNSPECIFIED = 0 - - # Docker package format. - DOCKER = 1 - - # Maven package format. - MAVEN = 2 - - # NPM package format. - NPM = 3 - - # APT package format. - APT = 5 - - # YUM package format. - YUM = 6 - - # Python package format. - PYTHON = 8 - end - end - - # The request to list repositories. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose repositories will be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListRepositoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing repositories. - # @!attribute [rw] repositories - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] - # The repositories returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of repositories, or empty if there are - # no more repositories to return. - class ListRepositoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a repository. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the repository to retrieve. - class GetRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new repository. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource where the repository will be created. - # @!attribute [rw] repository_id - # @return [::String] - # The repository id to use for this repository. - # @!attribute [rw] repository - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # The repository to be created. - class CreateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a repository. - # @!attribute [rw] repository - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # The repository that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a repository. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the repository to delete. - class DeleteRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb deleted file mode 100644 index cf0245f23a64..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.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 ArtifactRegistry - module V1beta2 - # Metadata type for longrunning-operations, currently empty. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb deleted file mode 100644 index b2fdc4b27fd1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # The Artifact Registry settings that apply to a Project. - # @!attribute [rw] name - # @return [::String] - # The name of the project's settings. - # - # Always of the form: - # projects/\\{project-id}/projectSettings - # - # In update request: never set - # In response: always set - # @!attribute [rw] legacy_redirection_state - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings::RedirectionState] - # The redirection state of the legacy repositories in this project. - class ProjectSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible redirection states for legacy repositories. - module RedirectionState - # No redirection status has been set. - REDIRECTION_STATE_UNSPECIFIED = 0 - - # Redirection is disabled. - REDIRECTION_FROM_GCR_IO_DISABLED = 1 - - # Redirection is enabled. - REDIRECTION_FROM_GCR_IO_ENABLED = 2 - - # Redirection is enabled, and has been finalized so cannot be reverted. - REDIRECTION_FROM_GCR_IO_FINALIZED = 3 - end - end - - # Gets the redirection status for a project. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the projectSettings resource. - class GetProjectSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sets the settings of the project. - # @!attribute [rw] project_settings - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # The project settings. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Field mask to support partial updates. - class UpdateProjectSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb deleted file mode 100644 index 2a6ea04aff2a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.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 ArtifactRegistry - module V1beta2 - # Tags point to a version and represent an alternative name that can be used - # to access the version. - # @!attribute [rw] name - # @return [::String] - # The name of the tag, for example: - # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". - # If the package part contains slashes, the slashes are escaped. - # The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else - # must be URL encoded. - # @!attribute [rw] version - # @return [::String] - # The name of the version the tag refers to, for example: - # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" - # If the package or version ID parts contain slashes, the slashes are - # escaped. - class Tag - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list tags. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource whose tags will be listed. - # @!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: - # - # * `version` - # - # An example of using a filter: - # - # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - # --> Tags that are applied to the version `1.0` in package `pkg1`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of tags to return. Maximum page size is 10,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListTagsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing tags. - # @!attribute [rw] tags - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # The tags returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of tags, or empty if there are no - # more tags to return. - class ListTagsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a tag. - # @!attribute [rw] name - # @return [::String] - # The name of the tag to retrieve. - class GetTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new tag. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the tag will be created. - # @!attribute [rw] tag_id - # @return [::String] - # The tag id to use for this repository. - # @!attribute [rw] tag - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # The tag to be created. - class CreateTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create or update a tag. - # @!attribute [rw] tag - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # The tag that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a tag. - # @!attribute [rw] name - # @return [::String] - # The name of the tag to delete. - class DeleteTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb deleted file mode 100644 index 51bc9a408b69..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.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 ArtifactRegistry - module V1beta2 - # The body of a version resource. A version resource represents a - # collection of components, such as files and other data. This may correspond - # to a version in many package management schemes. - # @!attribute [rw] name - # @return [::String] - # The name of the version, for example: - # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1". - # If the package or version ID parts contain slashes, the slashes are - # escaped. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the version, as specified in its metadata. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the version was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the version was last updated. - # @!attribute [rw] related_tags - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # Output only. A list of related tags. Will contain up to 100 tags that - # reference this version. - # @!attribute [r] metadata - # @return [::Google::Protobuf::Struct] - # Output only. Repository-specific Metadata stored against this version. - # The fields returned are defined by the underlying repository-specific - # resource. Currently, the only resource in use is - # [DockerImage][google.devtools.artifactregistry.v1.DockerImage] - class Version - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list versions. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource whose versions will be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] view - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The field to order the results by. - class ListVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing versions. - # @!attribute [rw] versions - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] - # The versions returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of versions, or empty if there are no - # more versions to return. - class ListVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a version. - # @!attribute [rw] name - # @return [::String] - # The name of the version to retrieve. - # @!attribute [rw] view - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - class GetVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a version. - # @!attribute [rw] name - # @return [::String] - # The name of the version to delete. - # @!attribute [rw] force - # @return [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - class DeleteVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The view, which determines what version information is returned in a - # response. - module VersionView - # The default / unset value. - # The API will default to the BASIC view. - VERSION_VIEW_UNSPECIFIED = 0 - - # Includes basic information about the version, but not any related tags. - BASIC = 1 - - # Include everything. - FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb deleted file mode 100644 index 1bf31d939f3d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.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! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # A detailed representation of a Yum artifact. - # @!attribute [r] name - # @return [::String] - # Output only. The Artifact Registry resource name of the artifact. - # @!attribute [r] package_name - # @return [::String] - # Output only. The yum package name of the artifact. - # @!attribute [r] package_type - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::YumArtifact::PackageType] - # Output only. An artifact is a binary or source package. - # @!attribute [r] architecture - # @return [::String] - # Output only. Operating system architecture of the artifact. - class YumArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Package type is either binary or source. - module PackageType - # Package type is not specified. - PACKAGE_TYPE_UNSPECIFIED = 0 - - # Binary package (.rpm). - BINARY = 1 - - # Source package (.srpm). - SOURCE = 2 - end - end - - # Google Cloud Storage location where the artifacts currently reside. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). - # @!attribute [rw] use_wildcards - # @return [::Boolean] - # Supports URI wildcards for matching multiple objects from a single URI. - class ImportYumArtifactsGcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to import new yum artifacts. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource] - # Google Cloud Storage location where input content is located. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the artifacts will be imported. - class ImportYumArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Error information explaining why a package was not imported. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource] - # Google Cloud Storage location requested. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The detailed error status. - class ImportYumArtifactsErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message from importing YUM artifacts. - # @!attribute [rw] yum_artifacts - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::YumArtifact>] - # The yum artifacts imported. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsErrorInfo>] - # Detailed error info for artifacts that were not imported. - class ImportYumArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The operation metadata for importing artifacts. - class ImportYumArtifactsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/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-artifact_registry-v1beta2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2/snippets/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile deleted file mode 100644 index 6aaca3591deb..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-artifact_registry-v1beta2", path: "../" -else - gem "google-cloud-artifact_registry-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-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb deleted file mode 100644 index b4aec628bdf3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the create_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository. -# -def create_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::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 artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb deleted file mode 100644 index ea333cf7fe5d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the create_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag. -# -def create_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new - - # Call the create_tag method. - result = client.create_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb deleted file mode 100644 index 3a5fe36a176f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.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 artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the delete_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package. -# -def delete_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new - - # Call the delete_package method. - result = client.delete_package request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb deleted file mode 100644 index 9d4a02cbddc5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the delete_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository. -# -def delete_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::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 artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb deleted file mode 100644 index f712c0a18063..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the delete_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag. -# -def delete_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new - - # Call the delete_tag method. - result = client.delete_tag request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb deleted file mode 100644 index 1240bb6fbb67..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.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 artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the delete_version call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version. -# -def delete_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new - - # Call the delete_version method. - result = client.delete_version request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb deleted file mode 100644 index b69d234386f5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_file call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file. -# -def get_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new - - # Call the get_file method. - result = client.get_file request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb deleted file mode 100644 index 75c9dd1f58a6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_iam_policy call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb deleted file mode 100644 index 24c3dd6d088f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package. -# -def get_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new - - # Call the get_package method. - result = client.get_package request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb deleted file mode 100644 index 1504ae352b97..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_project_settings call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings. -# -def get_project_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new - - # Call the get_project_settings method. - result = client.get_project_settings request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb deleted file mode 100644 index 6b62a92d27cf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository. -# -def get_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new - - # Call the get_repository method. - result = client.get_repository request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb deleted file mode 100644 index 227f1cb970c6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag. -# -def get_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new - - # Call the get_tag method. - result = client.get_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb deleted file mode 100644 index 053bede11d21..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_version call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version. -# -def get_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new - - # Call the get_version method. - result = client.get_version request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb deleted file mode 100644 index 749491500cbe..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.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 artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the import_apt_artifacts call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts. -# -def import_apt_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new - - # Call the import_apt_artifacts method. - result = client.import_apt_artifacts request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb deleted file mode 100644 index b177cea98dc7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.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 artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the import_yum_artifacts call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts. -# -def import_yum_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new - - # Call the import_yum_artifacts method. - result = client.import_yum_artifacts request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb deleted file mode 100644 index 0cccd6b55a02..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.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 artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the list_files call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files. -# -def list_files - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new - - # Call the list_files method. - result = client.list_files request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. - p item - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb deleted file mode 100644 index 3d5971af0c9d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.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 artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the list_packages call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages. -# -def list_packages - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new - - # Call the list_packages method. - result = client.list_packages request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. - p item - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb deleted file mode 100644 index b371d20afeb1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the list_repositories call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories. -# -def list_repositories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::Repository. - p item - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb deleted file mode 100644 index ba98059582c0..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.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 artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the list_tags call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags. -# -def list_tags - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new - - # Call the list_tags method. - result = client.list_tags request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. - p item - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb deleted file mode 100644 index f1ec20f158bd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_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 artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the list_versions call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions. -# -def list_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new - - # Call the list_versions method. - result = client.list_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::ArtifactRegistry::V1beta2::Version. - p item - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb deleted file mode 100644 index dca645f107d7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the set_iam_policy call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb deleted file mode 100644 index 7990b39f1d6a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/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 artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the test_iam_permissions call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb deleted file mode 100644 index 0aca5331f573..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_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 artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the update_project_settings call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings. -# -def update_project_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new - - # Call the update_project_settings method. - result = client.update_project_settings request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb deleted file mode 100644 index b49bb58893ec..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_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 artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the update_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository. -# -def update_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new - - # Call the update_repository method. - result = client.update_repository request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb deleted file mode 100644 index 477573a098df..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the update_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag. -# -def update_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new - - # Call the update_tag method. - result = client.update_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json deleted file mode 100644 index 344fe59d344c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json +++ /dev/null @@ -1,1015 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-artifact_registry-v1beta2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.devtools.artifactregistry.v1beta2", - "version": "v1beta2" - } - ] - }, - "snippets": [ - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync", - "title": "Snippet for the import_apt_artifacts call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts.", - "file": "artifact_registry/import_apt_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_apt_artifacts", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ImportAptArtifacts", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifacts", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync", - "title": "Snippet for the import_yum_artifacts call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts.", - "file": "artifact_registry/import_yum_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_yum_artifacts", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ImportYumArtifacts", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifacts", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync", - "title": "Snippet for the list_repositories call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories.", - "file": "artifact_registry/list_repositories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_repositories", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListRepositories", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositories", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync", - "title": "Snippet for the get_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository.", - "file": "artifact_registry/get_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Repository", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetRepository", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync", - "title": "Snippet for the create_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository.", - "file": "artifact_registry/create_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateRepository", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync", - "title": "Snippet for the update_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository.", - "file": "artifact_registry/update_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Repository", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateRepository", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync", - "title": "Snippet for the delete_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository.", - "file": "artifact_registry/delete_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteRepository", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync", - "title": "Snippet for the list_packages call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages.", - "file": "artifact_registry/list_packages.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_packages", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListPackages", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackages", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync", - "title": "Snippet for the get_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package.", - "file": "artifact_registry/get_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Package", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetPackage", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync", - "title": "Snippet for the delete_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package.", - "file": "artifact_registry/delete_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeletePackage", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync", - "title": "Snippet for the list_versions call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions.", - "file": "artifact_registry/list_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_versions", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListVersions", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersions", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync", - "title": "Snippet for the get_version call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version.", - "file": "artifact_registry/get_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_version", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Version", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetVersion", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersion", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync", - "title": "Snippet for the delete_version call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version.", - "file": "artifact_registry/delete_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_version", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteVersion", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersion", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync", - "title": "Snippet for the list_files call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files.", - "file": "artifact_registry/list_files.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_files", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListFiles", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFiles", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync", - "title": "Snippet for the get_file call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file.", - "file": "artifact_registry/get_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_file", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::File", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetFile", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFile", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync", - "title": "Snippet for the list_tags call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags.", - "file": "artifact_registry/list_tags.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tags", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListTags", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTags", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync", - "title": "Snippet for the get_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag.", - "file": "artifact_registry/get_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetTag", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync", - "title": "Snippet for the create_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag.", - "file": "artifact_registry/create_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateTag", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync", - "title": "Snippet for the update_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag.", - "file": "artifact_registry/update_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateTag", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync", - "title": "Snippet for the delete_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag.", - "file": "artifact_registry/delete_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteTag", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy.", - "file": "artifact_registry/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicy", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy.", - "file": "artifact_registry/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetIamPolicy", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions.", - "file": "artifact_registry/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissions", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync", - "title": "Snippet for the get_project_settings call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings.", - "file": "artifact_registry/get_project_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_project_settings", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetProjectSettings", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettings", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync", - "title": "Snippet for the update_project_settings call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings.", - "file": "artifact_registry/update_project_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_project_settings", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateProjectSettings", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettings", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "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-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb deleted file mode 100644 index fbe142f1b655..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/devtools/artifactregistry/v1beta2/service_services_pb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb deleted file mode 100644 index 81fee8ae756c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_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/artifact_registry/v1beta2/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_settings_path project: "value0" - assert_equal "projects/value0/projectSettings", 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::ArtifactRegistry::V1beta2::ArtifactRegistry::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_tag_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tag_path project: "value0", location: "value1", repository: "value2", package: "value3", tag: "value4" - assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/tags/value4", path - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb deleted file mode 100644 index 31d16e9467ad..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb +++ /dev/null @@ -1,1478 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" - - -class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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_import_apt_artifacts - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_apt_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_apt_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_apt_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.import_apt_artifacts gcs_source: gcs_source, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_apt_artifacts_client_stub.call_count - end - end - end - - def test_import_yum_artifacts - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_yum_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_yum_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_yum_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.import_yum_artifacts gcs_source: gcs_source, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_yum_artifacts_client_stub.call_count - end - end - end - - def test_list_repositories - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::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" - - 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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_repositories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_repositories_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 }) 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 do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_repositories ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.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_repositories({ 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_repositories(::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.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_repositories_client_stub.call_count - end - end - end - - def test_get_repository - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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_id = "hello world" - repository = {} - - 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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_repository parent: parent, repository_id: repository_id, repository: repository do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_repository ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_repository(::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), 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::Cloud::ArtifactRegistry::V1beta2::Repository.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - repository = {} - update_mask = {} - - 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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_repository({ repository: repository, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_repository repository: repository, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_repository ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_repository({ repository: repository, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_repository(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), 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" - - 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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_repository({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_repository name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_repository ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_repository({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_repository(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name), 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_packages - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.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_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_packages_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_packages_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_packages({ 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_packages 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_packages ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.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_packages({ 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_packages(::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.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_packages_client_stub.call_count - end - end - end - - def test_get_package - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_package ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_package(::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_package_client_stub.call_count - end - end - end - - def test_delete_package - # Create test objects. - 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_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_package ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_package(::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_package_client_stub.call_count - end - end - end - - def test_list_versions - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - order_by = "hello world" - - list_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_versions ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_versions(::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_versions_client_stub.call_count - end - end - end - - def test_get_version - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - - get_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_version_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_version({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_version name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_version ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_version({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_version(::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_version_client_stub.call_count - end - end - end - - def test_delete_version - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_version({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_version name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_version ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_version({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_version(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_version_client_stub.call_count - end - end - end - - def test_list_files - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.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_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_files_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_files_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_files({ 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_files 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_files ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.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_files({ 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_files(::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.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_files_client_stub.call_count - end - end - end - - def test_get_file - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::File.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_file_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_file({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_file name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_file ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_file({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_file(::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_file_client_stub.call_count - end - end - end - - def test_list_tags - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.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_tags_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_tags_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tags_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_tags({ 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_tags 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_tags ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.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_tags({ 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_tags(::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.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_tags_client_stub.call_count - end - end - end - - def test_get_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_tag({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_tag name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_tag ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_tag({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_tag(::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_tag_client_stub.call_count - end - end - end - - def test_create_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tag_id = "hello world" - tag = {} - - create_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_tag parent: parent, tag_id: tag_id, tag: tag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_tag ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_tag(::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_tag_client_stub.call_count - end - end - end - - def test_update_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - tag = {} - update_mask = {} - - update_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_tag({ tag: tag, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_tag tag: tag, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_tag ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_tag({ tag: tag, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_tag(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_tag_client_stub.call_count - end - end - end - - def test_delete_tag - # 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_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_tag({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_tag name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_tag ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_tag({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_tag(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_tag_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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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_project_settings - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_project_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_project_settings_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_project_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_project_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_project_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_project_settings_client_stub.call_count - end - end - end - - def test_update_project_settings - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - project_settings = {} - update_mask = {} - - update_project_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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_project_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_project_settings_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_project_settings project_settings: project_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_project_settings({ project_settings: project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings_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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb deleted file mode 100644 index 160cd4e1338f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb +++ /dev/null @@ -1,1683 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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_import_apt_artifacts - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_apt_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_apt_artifacts, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource), request["gcs_source"] - assert_equal :gcs_source, request.source - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_apt_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.import_apt_artifacts({ gcs_source: gcs_source, 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.import_apt_artifacts gcs_source: gcs_source, 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.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, 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.import_apt_artifacts({ gcs_source: gcs_source, 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.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, 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, import_apt_artifacts_client_stub.call_rpc_count - end - end - - def test_import_yum_artifacts - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_yum_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_yum_artifacts, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource), request["gcs_source"] - assert_equal :gcs_source, request.source - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_yum_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.import_yum_artifacts({ gcs_source: gcs_source, 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.import_yum_artifacts gcs_source: gcs_source, 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.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, 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.import_yum_artifacts({ gcs_source: gcs_source, 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.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, 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, import_yum_artifacts_client_stub.call_rpc_count - end - end - - def test_list_repositories - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::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" - - list_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_repositories, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, 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_repositories_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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 }) 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 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::ArtifactRegistry::V1beta2::ListRepositoriesRequest.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_repositories({ 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_repositories(::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.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_repositories_client_stub.call_rpc_count - end - end - - def test_get_repository - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::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::ArtifactRegistry::V1beta2::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_id = "hello world" - repository = {} - - create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["repository_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Repository), request["repository"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |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_id: repository_id, repository: repository do |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::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |response, operation| - 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_id: repository_id, repository: repository }, grpc_options) do |response, operation| - 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::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), grpc_options) do |response, operation| - assert_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::Cloud::ArtifactRegistry::V1beta2::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. - repository = {} - update_mask = {} - - update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Repository), request["repository"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_repository({ repository: repository, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_repository repository: repository, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_repository ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, 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_repository({ repository: repository, 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_repository(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, 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_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" - - delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_repository_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_repository({ 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_repository 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_repository ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.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_repository({ 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_repository(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.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_repository_client_stub.call_rpc_count - end - end - - def test_list_packages - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_packages, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, 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_packages_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_packages({ parent: parent, page_size: page_size, page_token: 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_packages parent: parent, page_size: page_size, page_token: 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_packages ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.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_packages({ 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_packages(::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.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_packages_client_stub.call_rpc_count - end - end - - def test_get_package - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_package({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_package name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_package ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_package({ 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_package(::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(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_package_client_stub.call_rpc_count - end - end - - def test_delete_package - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_package_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_package({ 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_package 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_package ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.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_package({ 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_package(::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.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_package_client_stub.call_rpc_count - end - end - - def test_list_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - order_by = "hello world" - - list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_versions, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_versions_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, 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_versions parent: parent, page_size: page_size, page_token: page_token, view: view, 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_versions ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, 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_versions(::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_versions_client_stub.call_rpc_count - end - end - - def test_get_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - - get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_version, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_version_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_version({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_version name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_version ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_version({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_version(::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_version_client_stub.call_rpc_count - end - end - - def test_delete_version - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_version, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_version_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_version({ name: name, 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_version name: name, 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_version ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, 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_version({ name: name, 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_version(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, 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_version_client_stub.call_rpc_count - end - end - - def test_list_files - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_files, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, 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_files_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_files({ 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_files 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_files ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.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_files({ 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_files(::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.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_files_client_stub.call_rpc_count - end - end - - def test_get_file - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::File.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_file, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_file_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_file({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_file name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_file ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_file({ 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_file(::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(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_file_client_stub.call_rpc_count - end - end - - def test_list_tags - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_tags_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tags, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, 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_tags_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_tags({ 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_tags 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_tags ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.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_tags({ 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_tags(::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.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_tags_client_stub.call_rpc_count - end - end - - def test_get_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_tag({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_tag name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_tag ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_tag({ 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_tag(::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(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_tag_client_stub.call_rpc_count - end - end - - def test_create_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tag_id = "hello world" - tag = {} - - create_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["tag_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Tag), request["tag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_tag parent: parent, tag_id: tag_id, tag: tag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_tag ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_tag(::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_tag_client_stub.call_rpc_count - end - end - - def test_update_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - tag = {} - update_mask = {} - - update_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Tag), request["tag"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_tag({ tag: tag, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_tag tag: tag, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_tag ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, 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_tag({ tag: tag, 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_tag(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, 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_tag_client_stub.call_rpc_count - end - end - - def test_delete_tag - # 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_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_tag_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_tag({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_tag name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_tag ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_tag({ 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_tag(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(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_tag_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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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_project_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_project_settings, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_project_settings_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_project_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_project_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_project_settings_client_stub.call_rpc_count - end - end - - def test_update_project_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - project_settings = {} - update_mask = {} - - update_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_project_settings, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings), request["project_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_project_settings_client_stub do - # Create client - c = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_project_settings project_settings: project_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings({ project_settings: project_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_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_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_project_settings_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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::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::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-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-assured_workloads-v1/.gitignore b/owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json deleted file mode 100644 index 69650035435c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "assuredworkloads.googleapis.com", - "api_shortname": "assuredworkloads", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1/latest", - "distribution_name": "google-cloud-assured_workloads-v1", - "is_cloud": true, - "language": "ruby", - "name": "assuredworkloads", - "name_pretty": "Assured Workloads for Government V1 API", - "product_documentation": "https://cloud.google.com/assured-workloads/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details.", - "ruby-cloud-env-prefix": "ASSURED_WORKLOADS", - "ruby-cloud-product-url": "https://cloud.google.com/assured-workloads/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml b/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml deleted file mode 100644 index 1a84e3a85a74..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-assured_workloads-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-assured_workloads-v1.rb" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/.yardopts b/owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts deleted file mode 100644 index fd857a4e0231..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Assured Workloads for Government 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-assured_workloads-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md deleted file mode 100644 index 3fba6040c2eb..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-assured_workloads-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-assured_workloads-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/assured_workloads/v1" - -client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/assured_workloads/v1" - -::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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-assured_workloads-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/assured_workloads/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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-assured_workloads-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/LICENSE.md b/owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1/README.md deleted file mode 100644 index c244150a73b8..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Assured Workloads for Government V1 API - -API Client library for the Assured Workloads for Government V1 API - -Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads 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 Assured Workloads for Government V1 API. Most users should consider using -the main client gem, -[google-cloud-assured_workloads](https://rubygems.org/gems/google-cloud-assured_workloads). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-assured_workloads-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/assuredworkloads.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/assured_workloads/v1" - -client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new -request = ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new # (request fields as keyword arguments...) -response = client.create_workload request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/assured-workloads/) -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/assured_workloads/v1" -require "logger" - -client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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-assured_workloads`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-assured_workloads-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-assured_workloads`. -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-assured_workloads-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-assured_workloads-v1/Rakefile b/owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile deleted file mode 100644 index e8a4e1de245c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ASSURED_WORKLOADS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ASSURED_WORKLOADS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ASSURED_WORKLOADS_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 ASSURED_WORKLOADS_TEST_PROJECT=test123 ASSURED_WORKLOADS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ASSURED_WORKLOADS_PROJECT"] = project - ENV["ASSURED_WORKLOADS_TEST_PROJECT"] = project - ENV["ASSURED_WORKLOADS_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-assured_workloads-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-assured_workloads-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-assured_workloads-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-assured_workloads-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-assured_workloads-v1" - header "google-cloud-assured_workloads-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-assured_workloads-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-assured_workloads-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-assured_workloads-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-assured_workloads-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-assured_workloads-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json deleted file mode 100644 index 4117f432b2e3..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.assuredworkloads.v1", - "libraryPackage": "::Google::Cloud::AssuredWorkloads::V1", - "services": { - "AssuredWorkloadsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client", - "rpcs": { - "CreateWorkload": { - "methods": [ - "create_workload" - ] - }, - "UpdateWorkload": { - "methods": [ - "update_workload" - ] - }, - "RestrictAllowedResources": { - "methods": [ - "restrict_allowed_resources" - ] - }, - "DeleteWorkload": { - "methods": [ - "delete_workload" - ] - }, - "GetWorkload": { - "methods": [ - "get_workload" - ] - }, - "ListWorkloads": { - "methods": [ - "list_workloads" - ] - }, - "ListViolations": { - "methods": [ - "list_violations" - ] - }, - "GetViolation": { - "methods": [ - "get_violation" - ] - }, - "AcknowledgeViolation": { - "methods": [ - "acknowledge_violation" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec b/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec deleted file mode 100644 index 05bda029be10..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/assured_workloads/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-assured_workloads-v1" - gem.version = Google::Cloud::AssuredWorkloads::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details." - gem.summary = "API Client library for the Assured Workloads for Government V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb deleted file mode 100644 index 24f2ce22bdb4..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-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/assured_workloads/v1" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb deleted file mode 100644 index 8a860900f3a7..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/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/assured_workloads/v1/assured_workloads_service" -require "google/cloud/assured_workloads/v1/version" - -module Google - module Cloud - module AssuredWorkloads - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/assured_workloads/v1" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/assured_workloads/v1" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/assured_workloads/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb deleted file mode 100644 index ea39cd61c3bf..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/assured_workloads/v1/version" - -require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" -require "google/cloud/assured_workloads/v1/assured_workloads_service/paths" -require "google/cloud/assured_workloads/v1/assured_workloads_service/operations" -require "google/cloud/assured_workloads/v1/assured_workloads_service/client" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" - -module Google - module Cloud - module AssuredWorkloads - module V1 - ## - # Service to manage AssuredWorkloads. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/assured_workloads/v1/assured_workloads_service" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - module AssuredWorkloadsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "assured_workloads_service", "helpers.rb" -require "google/cloud/assured_workloads/v1/assured_workloads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb deleted file mode 100644 index d7c596a875d2..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb +++ /dev/null @@ -1,1305 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/assuredworkloads/v1/assuredworkloads_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - ## - # Client for the AssuredWorkloadsService service. - # - # Service to manage AssuredWorkloads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :assured_workloads_service_stub - - ## - # Configure the AssuredWorkloadsService Client class. - # - # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssuredWorkloadsService clients - # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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", "AssuredWorkloads", "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 AssuredWorkloadsService 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::AssuredWorkloads::V1::AssuredWorkloadsService::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 - @assured_workloads_service_stub.universe_domain - end - - ## - # Create a new AssuredWorkloadsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssuredWorkloadsService 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/assuredworkloads/v1/assuredworkloads_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 - - @assured_workloads_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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 - ) - - @assured_workloads_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::AssuredWorkloads::V1::AssuredWorkloadsService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @assured_workloads_service_stub.logger - end - - # Service calls - - ## - # Creates Assured Workload. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workload(parent: nil, workload: nil, external_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] - # Required. Assured Workload to create - # @param external_id [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest - - # Converts hash and nil to 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing workload. - # Currently allows updating of workload display_name and labels. - # For force updates don't set etag field in the Workload. - # Only one update operation per workload can be in progress. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workload(workload: nil, update_mask: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] - # Required. The workload to update. - # The workload's `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - # p result - # - def update_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest - - # Converts hash and nil to 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.workload&.name - header_params["workload.name"] = request.workload.name - end - - request_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_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restrict the list of resources allowed in the Workload environment. - # The current list of allowed products can be found at - # https://cloud.google.com/assured-workloads/docs/supported-products - # In addition to assuredworkloads.workload.update permission, the user should - # also have orgpolicy.policy.set permission on the folder resource - # to use this functionality. - # - # @overload restrict_allowed_resources(request, options = nil) - # Pass arguments to `restrict_allowed_resources` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restrict_allowed_resources(name: nil, restriction_type: nil) - # Pass arguments to `restrict_allowed_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 name [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new - # - # # Call the restrict_allowed_resources method. - # result = client.restrict_allowed_resources request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. - # p result - # - def restrict_allowed_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restrict_allowed_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::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :restrict_allowed_resources, request, 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 workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workload(name: nil, etag: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param etag [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - # - # @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/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest - - # Converts hash and nil to 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets Assured Workload associated with a CRM Node - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload to fetch. This is the workload's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Assured Workloads under a CRM Node. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @param filter [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the Violations in the AssuredWorkload Environment. - # Callers may also choose to read across multiple Workloads as per - # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash - # character) as a wildcard character instead of workload-id in the parent. - # Format `organizations/{org_id}/locations/{location}/workloads/-` - # - # @overload list_violations(request, options = nil) - # Pass arguments to `list_violations` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_violations(parent: nil, interval: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_violations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The Workload name. - # Format `organizations/{org_id}/locations/{location}/workloads/{workload}`. - # @param interval [::Google::Cloud::AssuredWorkloads::V1::TimeWindow, ::Hash] - # Optional. Specifies the time window for retrieving active Violations. - # When specified, retrieves Violations that were active between start_time - # and end_time. - # @param page_size [::Integer] - # Optional. Page size. - # @param page_token [::String] - # Optional. Page token returned from previous request. - # @param filter [::String] - # Optional. A custom filter for filtering by the Violations properties. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Violation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Violation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new - # - # # Call the list_violations method. - # result = client.list_violations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Violation. - # p item - # end - # - def list_violations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_violations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::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_violations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_violations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :list_violations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_violations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves Assured Workload Violation based on ID. - # - # @overload get_violation(request, options = nil) - # Pass arguments to `get_violation` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_violation(name: nil) - # Pass arguments to `get_violation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Violation to fetch (ie. Violation.name). - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Violation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new - # - # # Call the get_violation method. - # result = client.get_violation request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Violation. - # p result - # - def get_violation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_violation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::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.get_violation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_violation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :get_violation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Acknowledges an existing violation. By acknowledging a violation, users - # acknowledge the existence of a compliance violation in their workload and - # decide to ignore it due to a valid business justification. Acknowledgement - # is a permanent operation and it cannot be reverted. - # - # @overload acknowledge_violation(request, options = nil) - # Pass arguments to `acknowledge_violation` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload acknowledge_violation(name: nil, comment: nil, non_compliant_org_policy: nil) - # Pass arguments to `acknowledge_violation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Violation to acknowledge. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} - # @param comment [::String] - # Required. Business justification explaining the need for violation acknowledgement - # @param non_compliant_org_policy [::String] - # Optional. This field is deprecated and will be removed in future version of the API. - # Name of the OrgPolicy which was modified with non-compliant change and - # resulted in this violation. - # Format: - # projects/\\{project_number}/policies/\\{constraint_name} - # folders/\\{folder_id}/policies/\\{constraint_name} - # organizations/\\{organization_id}/policies/\\{constraint_name} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new - # - # # Call the acknowledge_violation method. - # result = client.acknowledge_violation request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse. - # p result - # - def acknowledge_violation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.acknowledge_violation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::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.acknowledge_violation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.acknowledge_violation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :acknowledge_violation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AssuredWorkloadsService API. - # - # This class represents the configuration for AssuredWorkloadsService, - # providing control 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::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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 = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::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 AssuredWorkloadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `restrict_allowed_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :restrict_allowed_resources - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - ## - # RPC-specific configuration for `list_violations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_violations - ## - # RPC-specific configuration for `get_violation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_violation - ## - # RPC-specific configuration for `acknowledge_violation` - # @return [::Gapic::Config::Method] - # - attr_reader :acknowledge_violation - - # @private - def initialize parent_rpcs = nil - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources - @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations - @list_violations = ::Gapic::Config::Method.new list_violations_config - get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation - @get_violation = ::Gapic::Config::Method.new get_violation_config - acknowledge_violation_config = parent_rpcs.acknowledge_violation if parent_rpcs.respond_to? :acknowledge_violation - @acknowledge_violation = ::Gapic::Config::Method.new acknowledge_violation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb deleted file mode 100644 index 51ac08fa7943..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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 AssuredWorkloads - module V1 - module AssuredWorkloadsService - # Credentials for the AssuredWorkloadsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "ASSURED_WORKLOADS_CREDENTIALS", - "ASSURED_WORKLOADS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "ASSURED_WORKLOADS_CREDENTIALS_JSON", - "ASSURED_WORKLOADS_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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb deleted file mode 100644 index 37716c9322d8..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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 AssuredWorkloads - module V1 - module AssuredWorkloadsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssuredWorkloadsService 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 AssuredWorkloadsService 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::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AssuredWorkloads::V1::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 = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb deleted file mode 100644 index 14045503975a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.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 AssuredWorkloads - module V1 - module AssuredWorkloadsService - # Path helper methods for the AssuredWorkloadsService API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified Violation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}` - # - # @param organization [String] - # @param location [String] - # @param workload [String] - # @param violation [String] - # - # @return [::String] - def violation_path organization:, location:, workload:, violation: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "workload cannot contain /" if workload.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/workloads/#{workload}/violations/#{violation}" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/workloads/{workload}` - # - # @param organization [String] - # @param location [String] - # @param workload [String] - # - # @return [::String] - def workload_path organization:, location:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb deleted file mode 100644 index 277bb37f1f6d..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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/assured_workloads/v1/version" - -require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" -require "google/cloud/assured_workloads/v1/assured_workloads_service/paths" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/client" - -module Google - module Cloud - module AssuredWorkloads - module V1 - ## - # Service to manage AssuredWorkloads. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - module AssuredWorkloadsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb deleted file mode 100644 index 83406c2c4a70..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb +++ /dev/null @@ -1,930 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/assuredworkloads/v1/assuredworkloads_pb" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub" - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - module Rest - ## - # REST client for the AssuredWorkloadsService service. - # - # Service to manage AssuredWorkloads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :assured_workloads_service_stub - - ## - # Configure the AssuredWorkloadsService Client class. - # - # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssuredWorkloadsService clients - # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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", "AssuredWorkloads", "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 AssuredWorkloadsService 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::AssuredWorkloads::V1::AssuredWorkloadsService::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 - @assured_workloads_service_stub.universe_domain - end - - ## - # Create a new AssuredWorkloadsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssuredWorkloadsService 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::AssuredWorkloads::V1::AssuredWorkloadsService::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 - - @assured_workloads_service_stub = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @assured_workloads_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::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @assured_workloads_service_stub.logger - end - - # Service calls - - ## - # Creates Assured Workload. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workload(parent: nil, workload: nil, external_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] - # Required. Assured Workload to create - # @param external_id [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest - - # Converts hash and nil to an 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.create_workload request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workload. - # Currently allows updating of workload display_name and labels. - # For force updates don't set etag field in the Workload. - # Only one update operation per workload can be in progress. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workload(workload: nil, update_mask: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] - # Required. The workload to update. - # The workload's `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - # p result - # - def update_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest - - # Converts hash and nil to an 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.update_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restrict the list of resources allowed in the Workload environment. - # The current list of allowed products can be found at - # https://cloud.google.com/assured-workloads/docs/supported-products - # In addition to assuredworkloads.workload.update permission, the user should - # also have orgpolicy.policy.set permission on the folder resource - # to use this functionality. - # - # @overload restrict_allowed_resources(request, options = nil) - # Pass arguments to `restrict_allowed_resources` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restrict_allowed_resources(name: nil, restriction_type: nil) - # Pass arguments to `restrict_allowed_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 name [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new - # - # # Call the restrict_allowed_resources method. - # result = client.restrict_allowed_resources request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. - # p result - # - def restrict_allowed_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restrict_allowed_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::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.restrict_allowed_resources request, 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 workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workload(name: nil, etag: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param etag [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - # @yield [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/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest - - # Converts hash and nil to an 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.delete_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets Assured Workload associated with a CRM Node - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload to fetch. This is the workload's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.get_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Assured Workloads under a CRM Node. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @param filter [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.list_workloads request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, "workloads", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AssuredWorkloadsService REST API. - # - # This class represents the configuration for AssuredWorkloadsService 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::AssuredWorkloads::V1::AssuredWorkloadsService::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_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::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 AssuredWorkloadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `restrict_allowed_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :restrict_allowed_resources - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - - # @private - def initialize parent_rpcs = nil - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources - @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb deleted file mode 100644 index 0efaf6545122..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_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 AssuredWorkloads - module V1 - module AssuredWorkloadsService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssuredWorkloadsService 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 AssuredWorkloadsService 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::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::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{^organizations/[^/]+/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{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__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-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb deleted file mode 100644 index 54af58066810..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/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/cloud/assuredworkloads/v1/assuredworkloads_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - module Rest - ## - # REST service stub for the AssuredWorkloadsService 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_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # A result object deserialized from the server's reply - def update_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AssuredWorkloads::V1::Workload.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the restrict_allowed_resources REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # A result object deserialized from the server's reply - def restrict_allowed_resources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restrict_allowed_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: "restrict_allowed_resources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.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_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_workload", - 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_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # A result object deserialized from the server's reply - def get_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AssuredWorkloads::V1::Workload.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workloads REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse] - # A result object deserialized from the server's reply - def list_workloads request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_workloads", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.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_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest] - # 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_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/workloads", - body: "workload", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest] - # 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_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{workload.name}", - body: "workload", - matches: [ - ["workload.name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restrict_allowed_resources REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restrict_allowed_resources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:restrictAllowedResources", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest] - # 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_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workloads REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workloads_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workloads", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb deleted file mode 100644 index 159eef6467bf..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/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/assured_workloads/v1/assured_workloads_service/rest" -require "google/cloud/assured_workloads/v1/version" - -module Google - module Cloud - module AssuredWorkloads - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/assured_workloads/v1/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb deleted file mode 100644 index 43514745eb32..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/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 AssuredWorkloads - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb deleted file mode 100644 index 1695e94ae30e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/assuredworkloads/v1/assuredworkloads.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/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n7google/cloud/assuredworkloads/v1/assuredworkloads.proto\x12 google.cloud.assuredworkloads.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\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb6\x01\n\x15\x43reateWorkloadRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\x12\x41\n\x08workload\x18\x02 \x01(\x0b\x32*.google.cloud.assuredworkloads.v1.WorkloadB\x03\xe0\x41\x02\x12\x18\n\x0b\x65xternal_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x90\x01\n\x15UpdateWorkloadRequest\x12\x41\n\x08workload\x18\x01 \x01(\x0b\x32*.google.cloud.assuredworkloads.v1.WorkloadB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"j\n\x15\x44\x65leteWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x12GetWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\"\x8f\x01\n\x14ListWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\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\"o\n\x15ListWorkloadsResponse\x12=\n\tworkloads\x18\x01 \x03(\x0b\x32*.google.cloud.assuredworkloads.v1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb6\x15\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\tresources\x18\x03 \x03(\x0b\x32\x37.google.cloud.assuredworkloads.v1.Workload.ResourceInfoB\x03\xe0\x41\x03\x12^\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32;.google.cloud.assuredworkloads.v1.Workload.ComplianceRegimeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x37\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1c\n\x0f\x62illing_account\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.assuredworkloads.v1.Workload.LabelsEntryB\x03\xe0\x41\x01\x12)\n\x1cprovisioned_resources_parent\x18\r \x01(\tB\x03\xe0\x41\x04\x12S\n\x0ckms_settings\x18\x0e \x01(\x0b\x32\x36.google.cloud.assuredworkloads.v1.Workload.KMSSettingsB\x05\x18\x01\xe0\x41\x04\x12[\n\x11resource_settings\x18\x0f \x03(\x0b\x32;.google.cloud.assuredworkloads.v1.Workload.ResourceSettingsB\x03\xe0\x41\x04\x12`\n\x14kaj_enrollment_state\x18\x11 \x01(\x0e\x32=.google.cloud.assuredworkloads.v1.Workload.KajEnrollmentStateB\x03\xe0\x41\x03\x12&\n\x19\x65nable_sovereign_controls\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12\x66\n\x17saa_enrollment_response\x18\x14 \x01(\x0b\x32@.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponseB\x03\xe0\x41\x03\x12.\n!compliant_but_disallowed_services\x18\x18 \x03(\tB\x03\xe0\x41\x03\x12H\n\x07partner\x18\x19 \x01(\x0e\x32\x32.google.cloud.assuredworkloads.v1.Workload.PartnerB\x03\xe0\x41\x01\x1a\x89\x02\n\x0cResourceInfo\x12\x13\n\x0bresource_id\x18\x01 \x01(\x03\x12[\n\rresource_type\x18\x02 \x01(\x0e\x32\x44.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType\"\x86\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x10\x43ONSUMER_PROJECT\x10\x01\x1a\x02\x08\x01\x12\x13\n\x0f\x43ONSUMER_FOLDER\x10\x04\x12\x1b\n\x17\x45NCRYPTION_KEYS_PROJECT\x10\x02\x12\x0b\n\x07KEYRING\x10\x03\x1a\x93\x01\n\x0bKMSSettings\x12\x41\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05\x12=\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1a\x9a\x01\n\x10ResourceSettings\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12[\n\rresource_type\x18\x02 \x01(\x0e\x32\x44.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x1a\xfc\x03\n\x15SaaEnrollmentResponse\x12\x66\n\x0csetup_status\x18\x01 \x01(\x0e\x32K.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupStateH\x00\x88\x01\x01\x12\x61\n\x0csetup_errors\x18\x02 \x03(\x0e\x32K.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError\"R\n\nSetupState\x12\x1b\n\x17SETUP_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_PENDING\x10\x01\x12\x13\n\x0fSTATUS_COMPLETE\x10\x02\"\xb2\x01\n\nSetupError\x12\x1b\n\x17SETUP_ERROR_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45RROR_INVALID_BASE_SETUP\x10\x01\x12&\n\"ERROR_MISSING_EXTERNAL_SIGNING_KEY\x10\x02\x12#\n\x1f\x45RROR_NOT_ALL_SERVICES_ENROLLED\x10\x03\x12\x1c\n\x18\x45RROR_SETUP_CHECK_FAILED\x10\x04\x42\x0f\n\r_setup_status\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa5\x02\n\x10\x43omplianceRegime\x12!\n\x1d\x43OMPLIANCE_REGIME_UNSPECIFIED\x10\x00\x12\x07\n\x03IL4\x10\x01\x12\x08\n\x04\x43JIS\x10\x02\x12\x10\n\x0c\x46\x45\x44RAMP_HIGH\x10\x03\x12\x14\n\x10\x46\x45\x44RAMP_MODERATE\x10\x04\x12\x16\n\x12US_REGIONAL_ACCESS\x10\x05\x12\t\n\x05HIPAA\x10\x06\x12\x0b\n\x07HITRUST\x10\x07\x12\x1a\n\x16\x45U_REGIONS_AND_SUPPORT\x10\x08\x12\x1a\n\x16\x43\x41_REGIONS_AND_SUPPORT\x10\t\x12\x08\n\x04ITAR\x10\n\x12\x1d\n\x19\x41U_REGIONS_AND_US_SUPPORT\x10\x0b\x12\"\n\x1e\x41SSURED_WORKLOADS_FOR_PARTNERS\x10\x0c\"\x7f\n\x12KajEnrollmentState\x12$\n KAJ_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cKAJ_ENROLLMENT_STATE_PENDING\x10\x01\x12!\n\x1dKAJ_ENROLLMENT_STATE_COMPLETE\x10\x02\">\n\x07Partner\x12\x17\n\x13PARTNER_UNSPECIFIED\x10\x00\x12\x1a\n\x16LOCAL_CONTROLS_BY_S3NS\x10\x01:u\xea\x41r\n(assuredworkloads.googleapis.com/Workload\x12\x46organizations/{organization}/locations/{location}/workloads/{workload}\"\xe4\x01\n\x1f\x43reateWorkloadOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12[\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32;.google.cloud.assuredworkloads.v1.Workload.ComplianceRegimeB\x03\xe0\x41\x01\"\x97\x02\n\x1fRestrictAllowedResourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12p\n\x10restriction_type\x18\x02 \x01(\x0e\x32Q.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionTypeB\x03\xe0\x41\x02\"o\n\x0fRestrictionType\x12 \n\x1cRESTRICTION_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x41LLOW_ALL_GCP_RESOURCES\x10\x01\x12\x1d\n\x19\x41LLOW_COMPLIANT_RESOURCES\x10\x02\"\"\n RestrictAllowedResourcesResponse\"o\n\x1b\x41\x63knowledgeViolationRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63omment\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x18non_compliant_org_policy\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x01\"\x1e\n\x1c\x41\x63knowledgeViolationResponse\"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe5\x01\n\x15ListViolationsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)assuredworkloads.googleapis.com/Violation\x12\x43\n\x08interval\x18\x02 \x01(\x0b\x32,.google.cloud.assuredworkloads.v1.TimeWindowB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"r\n\x16ListViolationsResponse\x12?\n\nviolations\x18\x01 \x03(\x0b\x32+.google.cloud.assuredworkloads.v1.Violation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x13GetViolationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)assuredworkloads.googleapis.com/Violation\"\x8e\x0e\n\tViolation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nbegin_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0cresolve_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x07 \x01(\x0e\x32\x31.google.cloud.assuredworkloads.v1.Violation.StateB\x03\xe0\x41\x03\x12%\n\x15org_policy_constraint\x18\x08 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1e\n\x0e\x61udit_log_link\x18\x0b \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12(\n\x18non_compliant_org_policy\x18\x0c \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12Q\n\x0bremediation\x18\r \x01(\x0b\x32\x37.google.cloud.assuredworkloads.v1.Violation.RemediationB\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63knowledged\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x12\x42\n\x14\x61\x63knowledgement_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12(\n\x18\x65xception_audit_log_link\x18\x10 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x1a\x8c\x07\n\x0bRemediation\x12_\n\x0cinstructions\x18\x01 \x01(\x0b\x32\x44.google.cloud.assuredworkloads.v1.Violation.Remediation.InstructionsB\x03\xe0\x41\x02\x12\x18\n\x10\x63ompliant_values\x18\x02 \x03(\t\x12\x66\n\x10remediation_type\x18\x03 \x01(\x0e\x32G.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationTypeB\x03\xe0\x41\x03\x1a\xfa\x02\n\x0cInstructions\x12h\n\x13gcloud_instructions\x18\x01 \x01(\x0b\x32K.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud\x12j\n\x14\x63onsole_instructions\x18\x02 \x01(\x0b\x32L.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console\x1aJ\n\x06Gcloud\x12\x17\n\x0fgcloud_commands\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\x1aH\n\x07\x43onsole\x12\x14\n\x0c\x63onsole_uris\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\"\x9c\x02\n\x0fRemediationType\x12 \n\x1cREMEDIATION_TYPE_UNSPECIFIED\x10\x00\x12,\n(REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION\x10\x01\x12\x38\n4REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION\x10\x02\x12\x37\n3REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION\x10\x03\x12\x46\nBREMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION\x10\x04\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOLVED\x10\x02\x12\x0e\n\nUNRESOLVED\x10\x03\x12\r\n\tEXCEPTION\x10\x04:\x8e\x01\xea\x41\x8a\x01\n)assuredworkloads.googleapis.com/Violation\x12]organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}B\x17\n\x15_acknowledgement_time2\x86\x0e\n\x17\x41ssuredWorkloadsService\x12\xef\x01\n\x0e\x43reateWorkload\x12\x37.google.cloud.assuredworkloads.v1.CreateWorkloadRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41+\n\x08Workload\x12\x1f\x43reateWorkloadOperationMetadata\xda\x41\x0fparent,workload\x82\xd3\xe4\x93\x02>\"2/v1/{parent=organizations/*/locations/*}/workloads:\x08workload\x12\xdb\x01\n\x0eUpdateWorkload\x12\x37.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest\x1a*.google.cloud.assuredworkloads.v1.Workload\"d\xda\x41\x14workload,update_mask\x82\xd3\xe4\x93\x02G2;/v1/{workload.name=organizations/*/locations/*/workloads/*}:\x08workload\x12\xf9\x01\n\x18RestrictAllowedResources\x12\x41.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest\x1a\x42.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse\"V\x82\xd3\xe4\x93\x02P\"K/v1/{name=organizations/*/locations/*/workloads/*}:restrictAllowedResources:\x01*\x12\xa4\x01\n\x0e\x44\x65leteWorkload\x12\x37.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/locations/*/workloads/*}\x12\xb2\x01\n\x0bGetWorkload\x12\x34.google.cloud.assuredworkloads.v1.GetWorkloadRequest\x1a*.google.cloud.assuredworkloads.v1.Workload\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/locations/*/workloads/*}\x12\xc5\x01\n\rListWorkloads\x12\x36.google.cloud.assuredworkloads.v1.ListWorkloadsRequest\x1a\x37.google.cloud.assuredworkloads.v1.ListWorkloadsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*/locations/*}/workloads\x12\x8e\x01\n\x0eListViolations\x12\x37.google.cloud.assuredworkloads.v1.ListViolationsRequest\x1a\x38.google.cloud.assuredworkloads.v1.ListViolationsResponse\"\t\xda\x41\x06parent\x12{\n\x0cGetViolation\x12\x35.google.cloud.assuredworkloads.v1.GetViolationRequest\x1a+.google.cloud.assuredworkloads.v1.Violation\"\x07\xda\x41\x04name\x12\x97\x01\n\x14\x41\x63knowledgeViolation\x12=.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest\x1a>.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse\"\x00\x1aS\xca\x41\x1f\x61ssuredworkloads.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdd\x02\n$com.google.cloud.assuredworkloads.v1B\x15\x41ssuredworkloadsProtoP\x01ZPcloud.google.com/go/assuredworkloads/apiv1/assuredworkloadspb;assuredworkloadspb\xaa\x02 Google.Cloud.AssuredWorkloads.V1\xca\x02 Google\\Cloud\\AssuredWorkloads\\V1\xea\x02#Google::Cloud::AssuredWorkloads::V1\xea\x41]\n(assuredworkloads.googleapis.com/Location\x12\x31organizations/{organization}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AssuredWorkloads - module V1 - CreateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.CreateWorkloadRequest").msgclass - UpdateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.UpdateWorkloadRequest").msgclass - DeleteWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.DeleteWorkloadRequest").msgclass - GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.GetWorkloadRequest").msgclass - ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListWorkloadsRequest").msgclass - ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListWorkloadsResponse").msgclass - Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload").msgclass - Workload::ResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceInfo").msgclass - Workload::ResourceInfo::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType").enummodule - Workload::KMSSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.KMSSettings").msgclass - Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceSettings").msgclass - Workload::SaaEnrollmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse").msgclass - Workload::SaaEnrollmentResponse::SetupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState").enummodule - Workload::SaaEnrollmentResponse::SetupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError").enummodule - Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ComplianceRegime").enummodule - Workload::KajEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState").enummodule - Workload::Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.Partner").enummodule - CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata").msgclass - RestrictAllowedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest").msgclass - RestrictAllowedResourcesRequest::RestrictionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType").enummodule - RestrictAllowedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse").msgclass - AcknowledgeViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest").msgclass - AcknowledgeViolationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse").msgclass - TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.TimeWindow").msgclass - ListViolationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListViolationsRequest").msgclass - ListViolationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListViolationsResponse").msgclass - GetViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.GetViolationRequest").msgclass - Violation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation").msgclass - Violation::Remediation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation").msgclass - Violation::Remediation::Instructions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions").msgclass - Violation::Remediation::Instructions::Gcloud = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud").msgclass - Violation::Remediation::Instructions::Console = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console").msgclass - Violation::Remediation::RemediationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType").enummodule - Violation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb deleted file mode 100644 index 438ddf9b93f1..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb +++ /dev/null @@ -1,78 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/assuredworkloads/v1/assuredworkloads.proto for package 'Google.Cloud.AssuredWorkloads.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/assuredworkloads/v1/assuredworkloads_pb' - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - # Service to manage AssuredWorkloads. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.assuredworkloads.v1.AssuredWorkloadsService' - - # Creates Assured Workload. - rpc :CreateWorkload, ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Google::Longrunning::Operation - # Updates an existing workload. - # Currently allows updating of workload display_name and labels. - # For force updates don't set etag field in the Workload. - # Only one update operation per workload can be in progress. - rpc :UpdateWorkload, ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1::Workload - # Restrict the list of resources allowed in the Workload environment. - # The current list of allowed products can be found at - # https://cloud.google.com/assured-workloads/docs/supported-products - # In addition to assuredworkloads.workload.update permission, the user should - # also have orgpolicy.policy.set permission on the folder resource - # to use this functionality. - rpc :RestrictAllowedResources, ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse - # Deletes the workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - rpc :DeleteWorkload, ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Google::Protobuf::Empty - # Gets Assured Workload associated with a CRM Node - rpc :GetWorkload, ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1::Workload - # Lists Assured Workloads under a CRM Node. - rpc :ListWorkloads, ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse - # Lists the Violations in the AssuredWorkload Environment. - # Callers may also choose to read across multiple Workloads as per - # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash - # character) as a wildcard character instead of workload-id in the parent. - # Format `organizations/{org_id}/locations/{location}/workloads/-` - rpc :ListViolations, ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, ::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse - # Retrieves Assured Workload Violation based on ID. - rpc :GetViolation, ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, ::Google::Cloud::AssuredWorkloads::V1::Violation - # Acknowledges an existing violation. By acknowledging a violation, users - # acknowledge the existence of a compliance violation in their workload and - # decide to ignore it due to a valid business justification. Acknowledgement - # is a permanent operation and it cannot be reverted. - rpc :AcknowledgeViolation, ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md deleted file mode 100644 index f6053cce5a45..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Assured Workloads for Government 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-assured_workloads-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb deleted file mode 100644 index 29b652613713..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb +++ /dev/null @@ -1,720 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1 - # Request for creating a workload. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @!attribute [rw] workload - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # Required. Assured Workload to create - # @!attribute [rw] external_id - # @return [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - class CreateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for Updating a workload. - # @!attribute [rw] workload - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # Required. The workload to update. - # The workload's `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to be updated. - class UpdateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a Workload. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - class DeleteWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching a workload. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Workload to fetch. This is the workload's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - class GetWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching workloads in an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. - # @!attribute [rw] page_token - # @return [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @!attribute [rw] filter - # @return [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - class ListWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of ListWorkloads endpoint. - # @!attribute [rw] workloads - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload>] - # List of Workloads under a given parent. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. Return empty if reached the last page. - class ListWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Workload object for managing highly regulated workloads of cloud - # customers. - # @!attribute [rw] name - # @return [::String] - # Optional. The resource name of the workload. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload} - # - # Read-only. - # @!attribute [rw] display_name - # @return [::String] - # Required. The user-assigned display name of the Workload. - # When present it must be between 4 to 30 characters. - # Allowed characters are: lowercase and uppercase letters, numbers, - # hyphen, and spaces. - # - # Example: My Workload - # @!attribute [r] resources - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo>] - # Output only. The resources associated with this workload. - # These resources will be created when creating the workload. - # If any of the projects already exist, the workload creation will fail. - # Always read only. - # @!attribute [rw] compliance_regime - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ComplianceRegime] - # Required. Immutable. Compliance Regime associated with this workload. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Immutable. The Workload creation timestamp. - # @!attribute [rw] billing_account - # @return [::String] - # Optional. The billing account used for the resources which are - # direct children of workload. This billing account is initially associated - # with the resources created as part of Workload creation. - # After the initial creation of these resources, the customer can change - # the assigned billing account. - # The resource name has the form - # `billingAccounts/{billing_account_id}`. For example, - # `billingAccounts/012345-567890-ABCDEF`. - # @!attribute [rw] etag - # @return [::String] - # Optional. ETag of the workload, it is calculated on the basis - # of the Workload contents. It will be used in Update & Delete operations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels applied to the workload. - # @!attribute [rw] provisioned_resources_parent - # @return [::String] - # Input only. The parent resource for the resources managed by this Assured Workload. May - # be either empty or a folder resource which is a child of the - # Workload parent. If not specified all resources are created under the - # parent organization. - # Format: - # folders/\\{folder_id} - # @!attribute [rw] kms_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::KMSSettings] - # Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS - # CMEK key is provisioned. - # This field is deprecated as of Feb 28, 2022. - # In order to create a Keyring, callers should specify, - # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. - # @!attribute [rw] resource_settings - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceSettings>] - # Input only. Resource properties that are used to customize workload resources. - # These properties (such as custom project id) will be used to create - # workload resources if possible. This field is optional. - # @!attribute [r] kaj_enrollment_state - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::KajEnrollmentState] - # Output only. Represents the KAJ enrollment state of the given workload. - # @!attribute [rw] enable_sovereign_controls - # @return [::Boolean] - # Optional. Indicates the sovereignty status of the given workload. - # Currently meant to be used by Europe/Canada customers. - # @!attribute [r] saa_enrollment_response - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse] - # Output only. Represents the SAA enrollment response of the given workload. - # SAA enrollment response is queried during GetWorkload call. - # In failure cases, user friendly error message is shown in SAA details page. - # @!attribute [r] compliant_but_disallowed_services - # @return [::Array<::String>] - # Output only. Urls for services which are compliant for this Assured Workload, but which - # are currently disallowed by the ResourceUsageRestriction org policy. - # Invoke RestrictAllowedResources endpoint to allow your project developers - # to use these services in their environment." - # @!attribute [rw] partner - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::Partner] - # Optional. Compliance Regime associated with this workload. - class Workload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represent the resources that are children of this Workload. - # @!attribute [rw] resource_id - # @return [::Integer] - # Resource identifier. - # For a project this represents project_number. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo::ResourceType] - # Indicates the type of resource. - class ResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of resource. - module ResourceType - # Unknown resource type. - RESOURCE_TYPE_UNSPECIFIED = 0 - - # Consumer project. - # AssuredWorkloads Projects are no longer supported. This field will be - # ignored only in CreateWorkload requests. ListWorkloads and GetWorkload - # will continue to provide projects information. - # Use CONSUMER_FOLDER instead. - CONSUMER_PROJECT = 1 - - # Consumer Folder. - CONSUMER_FOLDER = 4 - - # Consumer project containing encryption keys. - ENCRYPTION_KEYS_PROJECT = 2 - - # Keyring resource that hosts encryption keys. - KEYRING = 3 - end - end - - # Settings specific to the Key Management Service. - # This message is deprecated. - # In order to create a Keyring, callers should specify, - # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] next_rotation_time - # @return [::Google::Protobuf::Timestamp] - # Required. Input only. Immutable. The time at which the Key Management Service will automatically create a - # new version of the crypto key and mark it as the primary. - # @!attribute [rw] rotation_period - # @return [::Google::Protobuf::Duration] - # Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key - # Management Service automatically rotates a key. Must be at least 24 hours - # and at most 876,000 hours. - class KMSSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represent the custom settings for the resources to be created. - # @!attribute [rw] resource_id - # @return [::String] - # Resource identifier. - # For a project this represents project_id. If the project is already - # taken, the workload creation will fail. - # For KeyRing, this represents the keyring_id. - # For a folder, don't set this value as folder_id is assigned by Google. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo::ResourceType] - # Indicates the type of resource. This field should be specified to - # correspond the id to the right resource type (CONSUMER_FOLDER or - # ENCRYPTION_KEYS_PROJECT) - # @!attribute [rw] display_name - # @return [::String] - # User-assigned resource display name. - # If not empty it will be used to create a resource with the specified - # name. - class ResourceSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Signed Access Approvals (SAA) enrollment response. - # @!attribute [rw] setup_status - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse::SetupState] - # Indicates SAA enrollment status of a given workload. - # @!attribute [rw] setup_errors - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse::SetupError>] - # Indicates SAA enrollment setup error if any. - class SaaEnrollmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Setup state of SAA enrollment. - module SetupState - # Unspecified. - SETUP_STATE_UNSPECIFIED = 0 - - # SAA enrollment pending. - STATUS_PENDING = 1 - - # SAA enrollment comopleted. - STATUS_COMPLETE = 2 - end - - # Setup error of SAA enrollment. - module SetupError - # Unspecified. - SETUP_ERROR_UNSPECIFIED = 0 - - # Invalid states for all customers, to be redirected to AA UI for - # additional details. - ERROR_INVALID_BASE_SETUP = 1 - - # Returned when there is not an EKM key configured. - ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 - - # Returned when there are no enrolled services or the customer is - # enrolled in CAA only for a subset of services. - ERROR_NOT_ALL_SERVICES_ENROLLED = 3 - - # Returned when exception was encountered during evaluation of other - # criteria. - ERROR_SETUP_CHECK_FAILED = 4 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Supported Compliance Regimes. - module ComplianceRegime - # Unknown compliance regime. - COMPLIANCE_REGIME_UNSPECIFIED = 0 - - # Information protection as per DoD IL4 requirements. - IL4 = 1 - - # Criminal Justice Information Services (CJIS) Security policies. - CJIS = 2 - - # FedRAMP High data protection controls - FEDRAMP_HIGH = 3 - - # FedRAMP Moderate data protection controls - FEDRAMP_MODERATE = 4 - - # Assured Workloads For US Regions data protection controls - US_REGIONAL_ACCESS = 5 - - # Health Insurance Portability and Accountability Act controls - HIPAA = 6 - - # Health Information Trust Alliance controls - HITRUST = 7 - - # Assured Workloads For EU Regions and Support controls - EU_REGIONS_AND_SUPPORT = 8 - - # Assured Workloads For Canada Regions and Support controls - CA_REGIONS_AND_SUPPORT = 9 - - # International Traffic in Arms Regulations - ITAR = 10 - - # Assured Workloads for Australia Regions and Support controls - # Available for public preview consumption. - # Don't create production workloads. - AU_REGIONS_AND_US_SUPPORT = 11 - - # Assured Workloads for Partners - ASSURED_WORKLOADS_FOR_PARTNERS = 12 - end - - # Key Access Justifications(KAJ) Enrollment State. - module KajEnrollmentState - # Default State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 - - # Pending State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_PENDING = 1 - - # Complete State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_COMPLETE = 2 - end - - # Supported Assured Workloads Partners. - module Partner - # Unknown partner regime/controls. - PARTNER_UNSPECIFIED = 0 - - # S3NS regime/controls. - LOCAL_CONTROLS_BY_S3NS = 1 - end - end - - # Operation metadata to give request details of CreateWorkload. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Time when the operation was created. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the workload. - # @!attribute [rw] parent - # @return [::String] - # Optional. The parent of the workload. - # @!attribute [rw] compliance_regime - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ComplianceRegime] - # Optional. Compliance controls that should be applied to the resources managed by - # the workload. - class CreateWorkloadOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for restricting list of available resources in Workload environment. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @!attribute [rw] restriction_type - # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - class RestrictAllowedResourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of restriction. - module RestrictionType - # Unknown restriction type. - RESTRICTION_TYPE_UNSPECIFIED = 0 - - # Allow the use all of all gcp products, irrespective of the compliance - # posture. This effectively removes gcp.restrictServiceUsage OrgPolicy - # on the AssuredWorkloads Folder. - ALLOW_ALL_GCP_RESOURCES = 1 - - # Based on Workload's compliance regime, allowed list changes. - # See - https://cloud.google.com/assured-workloads/docs/supported-products - # for the list of supported resources. - ALLOW_COMPLIANT_RESOURCES = 2 - end - end - - # Response for restricting the list of allowed resources. - class RestrictAllowedResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for acknowledging the violation - # Next Id: 4 - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Violation to acknowledge. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} - # @!attribute [rw] comment - # @return [::String] - # Required. Business justification explaining the need for violation acknowledgement - # @!attribute [rw] non_compliant_org_policy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. This field is deprecated and will be removed in future version of the API. - # Name of the OrgPolicy which was modified with non-compliant change and - # resulted in this violation. - # Format: - # projects/\\{project_number}/policies/\\{constraint_name} - # folders/\\{folder_id}/policies/\\{constraint_name} - # organizations/\\{organization_id}/policies/\\{constraint_name} - class AcknowledgeViolationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for violation acknowledgement - class AcknowledgeViolationResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Interval defining a time window. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The start of the time window. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The end of the time window. - class TimeWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching violations in an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. The Workload name. - # Format `organizations/{org_id}/locations/{location}/workloads/{workload}`. - # @!attribute [rw] interval - # @return [::Google::Cloud::AssuredWorkloads::V1::TimeWindow] - # Optional. Specifies the time window for retrieving active Violations. - # When specified, retrieves Violations that were active between start_time - # and end_time. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Page size. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token returned from previous request. - # @!attribute [rw] filter - # @return [::String] - # Optional. A custom filter for filtering by the Violations properties. - class ListViolationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of ListViolations endpoint. - # @!attribute [rw] violations - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Violation>] - # List of Violations under a Workload. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. Returns empty if reached the last page. - class ListViolationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching a Workload Violation. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Violation to fetch (ie. Violation.name). - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} - class GetViolationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Workload monitoring Violation. - # @!attribute [r] name - # @return [::String] - # Output only. Immutable. Name of the Violation. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload_id}/violations/\\{violations_id} - # @!attribute [r] description - # @return [::String] - # Output only. Description for the Violation. - # e.g. OrgPolicy gcp.resourceLocations has non compliant value. - # @!attribute [r] begin_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time of the event which triggered the Violation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time when the Violation record was updated. - # @!attribute [r] resolve_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time of the event which fixed the Violation. - # If the violation is ACTIVE this will be empty. - # @!attribute [r] category - # @return [::String] - # Output only. Category under which this violation is mapped. - # e.g. Location, Service Usage, Access, Encryption, etc. - # @!attribute [r] state - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::State] - # Output only. State of the violation - # @!attribute [r] org_policy_constraint - # @return [::String] - # Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in - # this violation. - # @!attribute [r] audit_log_link - # @return [::String] - # Output only. Immutable. Audit Log Link for violated resource - # Format: - # https://console.cloud.google.com/logs/query;query=\\{logName}\\{protoPayload.resourceName}\\{timeRange}\\{folder} - # @!attribute [r] non_compliant_org_policy - # @return [::String] - # Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and - # resulted this violation. - # Format: - # projects/\\{project_number}/policies/\\{constraint_name} - # folders/\\{folder_id}/policies/\\{constraint_name} - # organizations/\\{organization_id}/policies/\\{constraint_name} - # @!attribute [r] remediation - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation] - # Output only. Compliance violation remediation - # @!attribute [r] acknowledged - # @return [::Boolean] - # Output only. A boolean that indicates if the violation is acknowledged - # @!attribute [rw] acknowledgement_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Timestamp when this violation was acknowledged last. - # This will be absent when acknowledged field is marked as false. - # @!attribute [r] exception_audit_log_link - # @return [::String] - # Output only. Immutable. Audit Log link to find business justification provided for violation - # exception. Format: - # https://console.cloud.google.com/logs/query;query=\\{logName}\\{protoPayload.resourceName}\\{protoPayload.methodName}\\{timeRange}\\{organization} - class Violation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents remediation guidance to resolve compliance violation for - # AssuredWorkload - # @!attribute [rw] instructions - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions] - # Required. Remediation instructions to resolve violations - # @!attribute [rw] compliant_values - # @return [::Array<::String>] - # Values that can resolve the violation - # For example: for list org policy violations, this will either be the list - # of allowed or denied values - # @!attribute [r] remediation_type - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::RemediationType] - # Output only. Reemediation type based on the type of org policy values violated - class Remediation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Instructions to remediate violation - # @!attribute [rw] gcloud_instructions - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions::Gcloud] - # Remediation instructions to resolve violation via gcloud cli - # @!attribute [rw] console_instructions - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions::Console] - # Remediation instructions to resolve violation via cloud console - class Instructions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Remediation instructions to resolve violation via gcloud cli - # @!attribute [rw] gcloud_commands - # @return [::Array<::String>] - # Gcloud command to resolve violation - # @!attribute [rw] steps - # @return [::Array<::String>] - # Steps to resolve violation via gcloud cli - # @!attribute [rw] additional_links - # @return [::Array<::String>] - # Additional urls for more information about steps - class Gcloud - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Remediation instructions to resolve violation via cloud console - # @!attribute [rw] console_uris - # @return [::Array<::String>] - # Link to console page where violations can be resolved - # @!attribute [rw] steps - # @return [::Array<::String>] - # Steps to resolve violation via cloud console - # @!attribute [rw] additional_links - # @return [::Array<::String>] - # Additional urls for more information about steps - class Console - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Classifying remediation into various types based on the kind of - # violation. For example, violations caused due to changes in boolean org - # policy requires different remediation instructions compared to violation - # caused due to changes in allowed values of list org policy. - module RemediationType - # Unspecified remediation type - REMEDIATION_TYPE_UNSPECIFIED = 0 - - # Remediation type for boolean org policy - REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION = 1 - - # Remediation type for list org policy which have allowed values in the - # monitoring rule - REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION = 2 - - # Remediation type for list org policy which have denied values in the - # monitoring rule - REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION = 3 - - # Remediation type for gcp.restrictCmekCryptoKeyProjects - REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION = 4 - end - end - - # Violation State Values - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # Violation is resolved. - RESOLVED = 2 - - # Violation is Unresolved - UNRESOLVED = 3 - - # Violation is Exception - EXCEPTION = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile deleted file mode 100644 index 49bd814d146e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1", path: "../" -else - gem "google-cloud-assured_workloads-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-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb deleted file mode 100644 index e2828db3324c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the acknowledge_violation call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation. -# -def acknowledge_violation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new - - # Call the acknowledge_violation method. - result = client.acknowledge_violation request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb deleted file mode 100644 index c3ab7fb1bcf6..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.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 assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the create_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload. -# -def create_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new - - # Call the create_workload method. - result = client.create_workload request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb deleted file mode 100644 index 9b95aca15297..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the delete_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload. -# -def delete_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new - - # Call the delete_workload method. - result = client.delete_workload request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb deleted file mode 100644 index c957fe2e6f20..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the get_violation call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation. -# -def get_violation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new - - # Call the get_violation method. - result = client.get_violation request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Violation. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb deleted file mode 100644 index 4c570c4bf025..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the get_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload. -# -def get_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new - - # Call the get_workload method. - result = client.get_workload request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb deleted file mode 100644 index 8592a9b4a1c6..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the list_violations call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations. -# -def list_violations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new - - # Call the list_violations method. - result = client.list_violations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Violation. - p item - end -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb deleted file mode 100644 index 480c6982ac6a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the list_workloads call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads. -# -def list_workloads - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new - - # Call the list_workloads method. - result = client.list_workloads request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. - p item - end -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb deleted file mode 100644 index e6804ae174be..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources. -# -def restrict_allowed_resources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new - - # Call the restrict_allowed_resources method. - result = client.restrict_allowed_resources request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb deleted file mode 100644 index 6a0d2952fd66..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the update_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload. -# -def update_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new - - # Call the update_workload method. - result = client.update_workload request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json deleted file mode 100644 index 95dad32c09ec..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json +++ /dev/null @@ -1,375 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-assured_workloads-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.assuredworkloads.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync", - "title": "Snippet for the create_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload.", - "file": "assured_workloads_service/create_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "CreateWorkload", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.CreateWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync", - "title": "Snippet for the update_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload.", - "file": "assured_workloads_service/update_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::Workload", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "UpdateWorkload", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.UpdateWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync", - "title": "Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources.", - "file": "assured_workloads_service/restrict_allowed_resources.rb", - "language": "RUBY", - "client_method": { - "short_name": "restrict_allowed_resources", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "RestrictAllowedResources", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.RestrictAllowedResources", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync", - "title": "Snippet for the delete_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload.", - "file": "assured_workloads_service/delete_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "DeleteWorkload", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.DeleteWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync", - "title": "Snippet for the get_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload.", - "file": "assured_workloads_service/get_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::Workload", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "GetWorkload", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync", - "title": "Snippet for the list_workloads call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads.", - "file": "assured_workloads_service/list_workloads.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workloads", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "ListWorkloads", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListWorkloads", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync", - "title": "Snippet for the list_violations call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations.", - "file": "assured_workloads_service/list_violations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_violations", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "ListViolations", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListViolations", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync", - "title": "Snippet for the get_violation call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation.", - "file": "assured_workloads_service/get_violation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_violation", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::Violation", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "GetViolation", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetViolation", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync", - "title": "Snippet for the acknowledge_violation call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation.", - "file": "assured_workloads_service/acknowledge_violation.rb", - "language": "RUBY", - "client_method": { - "short_name": "acknowledge_violation", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "AcknowledgeViolation", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.AcknowledgeViolation", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "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-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb deleted file mode 100644 index 5527cbf0077f..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_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/assuredworkloads/v1/assuredworkloads_pb" -require "google/cloud/assuredworkloads/v1/assuredworkloads_services_pb" -require "google/cloud/assured_workloads/v1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb deleted file mode 100644 index a6a2edfb3038..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_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/assured_workloads/v1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_violation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.violation_path organization: "value0", location: "value1", workload: "value2", violation: "value3" - assert_equal "organizations/value0/locations/value1/workloads/value2/violations/value3", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path organization: "value0", location: "value1", workload: "value2" - assert_equal "organizations/value0/locations/value1/workloads/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb deleted file mode 100644 index 7154f9af9842..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb +++ /dev/null @@ -1,431 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" - - -class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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_workload - # Create test objects. - 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" - workload = {} - external_id = "hello world" - - create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_workload parent: parent, workload: workload, external_id: external_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_workload ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_workload({ parent: parent, workload: workload, external_id: external_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_workload(::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workload_client_stub.call_count - end - end - end - - def test_update_workload - # Create test objects. - client_result = ::Google::Cloud::AssuredWorkloads::V1::Workload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - workload = {} - update_mask = {} - - update_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_update_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_workload({ workload: workload, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_workload workload: workload, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_workload ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_workload({ workload: workload, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_workload(::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workload_client_stub.call_count - end - end - end - - def test_restrict_allowed_resources - # Create test objects. - client_result = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - restriction_type = :RESTRICTION_TYPE_UNSPECIFIED - - restrict_allowed_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::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_restrict_allowed_resources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restrict_allowed_resources_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.restrict_allowed_resources name: name, restriction_type: restriction_type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restrict_allowed_resources_client_stub.call_count - end - end - end - - def test_delete_workload - # 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_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workload({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workload name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_workload ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_workload({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_workload(::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.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_workload_client_stub.call_count - end - end - end - - def test_get_workload - # Create test objects. - client_result = ::Google::Cloud::AssuredWorkloads::V1::Workload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_workload ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_workload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_workload(::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_count - end - end - end - - def test_list_workloads - # Create test objects. - client_result = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.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_workloads_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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb deleted file mode 100644 index d79badf210d5..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb +++ /dev/null @@ -1,683 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/assuredworkloads/v1/assuredworkloads_pb" -require "google/cloud/assured_workloads/v1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workload = {} - external_id = "hello world" - - create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::Workload), request["workload"] - assert_equal "hello world", request["external_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_workload({ parent: parent, workload: workload, external_id: external_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_workload parent: parent, workload: workload, external_id: external_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_workload ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_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_workload({ parent: parent, workload: workload, external_id: external_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_workload(::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_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_workload_client_stub.call_rpc_count - end - end - - def test_update_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workload = {} - update_mask = {} - - update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::Workload), request["workload"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_workload({ workload: workload, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_workload workload: workload, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_workload ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, 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_workload({ workload: workload, 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_workload(::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, 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_workload_client_stub.call_rpc_count - end - end - - def test_restrict_allowed_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - restriction_type = :RESTRICTION_TYPE_UNSPECIFIED - - restrict_allowed_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restrict_allowed_resources, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, request - assert_equal "hello world", request["name"] - assert_equal :RESTRICTION_TYPE_UNSPECIFIED, request["restriction_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, restrict_allowed_resources_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.restrict_allowed_resources name: name, restriction_type: restriction_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restrict_allowed_resources_client_stub.call_rpc_count - end - end - - def test_delete_workload - # 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_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_workload({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_workload name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_workload ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.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_workload({ 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_workload(::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.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_workload_client_stub.call_rpc_count - end - end - - def test_get_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_workload ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_workload({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_workload(::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_rpc_count - end - end - - def test_list_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workloads, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workloads_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.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_workloads_client_stub.call_rpc_count - end - end - - def test_list_violations - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - interval = {} - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_violations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_violations, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::TimeWindow), request["interval"] - 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_violations_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_violations({ parent: parent, interval: interval, 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_violations parent: parent, interval: interval, 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_violations ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new(parent: parent, interval: interval, 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_violations({ parent: parent, interval: interval, 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_violations(::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new(parent: parent, interval: interval, 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_violations_client_stub.call_rpc_count - end - end - - def test_get_violation - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Violation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_violation, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_violation_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_violation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_violation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_violation ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_violation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_violation(::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_violation_client_stub.call_rpc_count - end - end - - def test_acknowledge_violation - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - comment = "hello world" - non_compliant_org_policy = "hello world" - - acknowledge_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :acknowledge_violation, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["comment"] - assert_equal "hello world", request["non_compliant_org_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, acknowledge_violation_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.acknowledge_violation({ name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.acknowledge_violation name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.acknowledge_violation ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new(name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.acknowledge_violation({ name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.acknowledge_violation(::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new(name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, acknowledge_violation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::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::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/.gitignore b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json deleted file mode 100644 index f2e12959542e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "assuredworkloads.googleapis.com", - "api_shortname": "assuredworkloads", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1beta1/latest", - "distribution_name": "google-cloud-assured_workloads-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "assuredworkloads", - "name_pretty": "Assured Workloads for Government V1beta1 API", - "product_documentation": "https://cloud.google.com/assured-workloads/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details.", - "ruby-cloud-env-prefix": "ASSURED_WORKLOADS", - "ruby-cloud-product-url": "https://cloud.google.com/assured-workloads/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml deleted file mode 100644 index 81a9ba91c667..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-assured_workloads-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-assured_workloads-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/.yardopts b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts deleted file mode 100644 index a6fffa2ff6ae..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Assured Workloads for Government 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-assured_workloads-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 741738ed213d..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-assured_workloads-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-assured_workloads-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/assured_workloads/v1beta1" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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-assured_workloads-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/assured_workloads/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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-assured_workloads-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md deleted file mode 100644 index 340da681774a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Assured Workloads for Government V1beta1 API - -API Client library for the Assured Workloads for Government V1beta1 API - -Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads 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 Assured Workloads for Government V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-assured_workloads](https://rubygems.org/gems/google-cloud-assured_workloads). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-assured_workloads-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/assuredworkloads.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new -request = ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new # (request fields as keyword arguments...) -response = client.create_workload request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/assured-workloads/) -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/assured_workloads/v1beta1" -require "logger" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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-assured_workloads`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-assured_workloads-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-assured_workloads`. -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-assured_workloads-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-assured_workloads-v1beta1/Rakefile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile deleted file mode 100644 index d453b207ad79..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ASSURED_WORKLOADS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ASSURED_WORKLOADS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ASSURED_WORKLOADS_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 ASSURED_WORKLOADS_TEST_PROJECT=test123 ASSURED_WORKLOADS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ASSURED_WORKLOADS_PROJECT"] = project - ENV["ASSURED_WORKLOADS_TEST_PROJECT"] = project - ENV["ASSURED_WORKLOADS_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-assured_workloads-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-assured_workloads-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-assured_workloads-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-assured_workloads-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-assured_workloads-v1beta1" - header "google-cloud-assured_workloads-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-assured_workloads-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-assured_workloads-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-assured_workloads-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-assured_workloads-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-assured_workloads-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json deleted file mode 100644 index 578c2e88d018..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.assuredworkloads.v1beta1", - "libraryPackage": "::Google::Cloud::AssuredWorkloads::V1beta1", - "services": { - "AssuredWorkloadsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client", - "rpcs": { - "CreateWorkload": { - "methods": [ - "create_workload" - ] - }, - "UpdateWorkload": { - "methods": [ - "update_workload" - ] - }, - "RestrictAllowedResources": { - "methods": [ - "restrict_allowed_resources" - ] - }, - "DeleteWorkload": { - "methods": [ - "delete_workload" - ] - }, - "GetWorkload": { - "methods": [ - "get_workload" - ] - }, - "AnalyzeWorkloadMove": { - "methods": [ - "analyze_workload_move" - ] - }, - "ListWorkloads": { - "methods": [ - "list_workloads" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec deleted file mode 100644 index f71457c6bfc6..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/assured_workloads/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-assured_workloads-v1beta1" - gem.version = Google::Cloud::AssuredWorkloads::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details." - gem.summary = "API Client library for the Assured Workloads for Government 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-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb deleted file mode 100644 index 4b23acdd7178..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-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/assured_workloads/v1beta1" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb deleted file mode 100644 index 4395df713d7c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/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/assured_workloads/v1beta1/assured_workloads_service" -require "google/cloud/assured_workloads/v1beta1/version" - -module Google - module Cloud - module AssuredWorkloads - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/assured_workloads/v1beta1" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/assured_workloads/v1beta1" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/assured_workloads/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb deleted file mode 100644 index 077d6ddf1b47..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/assured_workloads/v1beta1/version" - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/client" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - ## - # Service to manage AssuredWorkloads. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - module AssuredWorkloadsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "assured_workloads_service", "helpers.rb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb deleted file mode 100644 index e6d7c99a4c68..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb +++ /dev/null @@ -1,1123 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/assuredworkloads/v1beta1/assuredworkloads_service_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - ## - # Client for the AssuredWorkloadsService service. - # - # Service to manage AssuredWorkloads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :assured_workloads_service_stub - - ## - # Configure the AssuredWorkloadsService Client class. - # - # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssuredWorkloadsService clients - # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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", "AssuredWorkloads", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_workload.timeout = 60.0 - - default_config.rpcs.update_workload.timeout = 60.0 - - default_config.rpcs.delete_workload.timeout = 60.0 - default_config.rpcs.delete_workload.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.analyze_workload_move.timeout = 60.0 - default_config.rpcs.analyze_workload_move.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService 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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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 - @assured_workloads_service_stub.universe_domain - end - - ## - # Create a new AssuredWorkloadsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssuredWorkloadsService 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/assuredworkloads/v1beta1/assuredworkloads_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 - - @assured_workloads_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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 - ) - - @assured_workloads_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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @assured_workloads_service_stub.logger - end - - # Service calls - - ## - # Creates Assured Workload. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workload(parent: nil, workload: nil, external_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] - # Required. Assured Workload to create - # @param external_id [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest - - # Converts hash and nil to 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::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_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing workload. - # Currently allows updating of workload display_name and labels. - # For force updates don't set etag field in the Workload. - # Only one update operation per workload can be in progress. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workload(workload: nil, update_mask: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] - # Required. The workload to update. - # The workload's `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. - # p result - # - def update_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest - - # Converts hash and nil to 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::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.update_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restrict the list of resources allowed in the Workload environment. - # The current list of allowed products can be found at - # https://cloud.google.com/assured-workloads/docs/supported-products - # In addition to assuredworkloads.workload.update permission, the user should - # also have orgpolicy.policy.set permission on the folder resource - # to use this functionality. - # - # @overload restrict_allowed_resources(request, options = nil) - # Pass arguments to `restrict_allowed_resources` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restrict_allowed_resources(name: nil, restriction_type: nil) - # Pass arguments to `restrict_allowed_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 name [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new - # - # # Call the restrict_allowed_resources method. - # result = client.restrict_allowed_resources request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. - # p result - # - def restrict_allowed_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restrict_allowed_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::AssuredWorkloads::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.restrict_allowed_resources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :restrict_allowed_resources, request, 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 workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - # In addition to assuredworkloads.workload.delete permission, the user should - # also have orgpolicy.policy.set permission on the deleted folder to remove - # Assured Workloads OrgPolicies. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workload(name: nil, etag: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param etag [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - # - # @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/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest - - # Converts hash and nil to 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::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_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets Assured Workload associated with a CRM Node - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload to fetch. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::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.get_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Analyze if the source Assured Workloads can be moved to the target Assured - # Workload - # - # @overload analyze_workload_move(request, options = nil) - # Pass arguments to `analyze_workload_move` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload analyze_workload_move(source: nil, project: nil, target: nil) - # Pass arguments to `analyze_workload_move` via keyword arguments. Note that at - # least one keyword argument is 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 [::String] - # The source type is a project-based workload. Specify the workloads's - # relative resource name, formatted as: - # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" - # For example: - # "organizations/123/locations/us-east1/workloads/assured-workload-1" - # - # Note: The following parameters are mutually exclusive: `source`, `project`. 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 project [::String] - # The source type is a project. Specify the project's relative resource - # name, formatted as either a project number or a project ID: - # "projects/\\{PROJECT_NUMBER}" or "projects/\\{PROJECT_ID}" - # For example: - # "projects/951040570662" when specifying a project number, or - # "projects/my-project-123" when specifying a project ID. - # - # Note: The following parameters are mutually exclusive: `project`, `source`. 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 target [::String] - # Required. The resource ID of the folder-based destination workload. This workload is - # where the source project will hypothetically be moved to. Specify the - # workload's relative resource name, formatted as: - # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" - # For example: - # "organizations/123/locations/us-east1/workloads/assured-workload-2" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new - # - # # Call the analyze_workload_move method. - # result = client.analyze_workload_move request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse. - # p result - # - def analyze_workload_move request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.analyze_workload_move.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::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.analyze_workload_move.timeout, - metadata: metadata, - retry_policy: @config.rpcs.analyze_workload_move.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :analyze_workload_move, request, 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 Assured Workloads under a CRM Node. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @param filter [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::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.list_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AssuredWorkloadsService API. - # - # This class represents the configuration for AssuredWorkloadsService, - # providing control 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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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 = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::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 AssuredWorkloadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `restrict_allowed_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :restrict_allowed_resources - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `analyze_workload_move` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_workload_move - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - - # @private - def initialize parent_rpcs = nil - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources - @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - analyze_workload_move_config = parent_rpcs.analyze_workload_move if parent_rpcs.respond_to? :analyze_workload_move - @analyze_workload_move = ::Gapic::Config::Method.new analyze_workload_move_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb deleted file mode 100644 index c940ead393b1..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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 AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - # Credentials for the AssuredWorkloadsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "ASSURED_WORKLOADS_CREDENTIALS", - "ASSURED_WORKLOADS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "ASSURED_WORKLOADS_CREDENTIALS_JSON", - "ASSURED_WORKLOADS_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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb deleted file mode 100644 index 2ff113682d1a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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 AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssuredWorkloadsService 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 AssuredWorkloadsService 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::AssuredWorkloads::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::AssuredWorkloads::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::AssuredWorkloads::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::AssuredWorkloads::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::AssuredWorkloads::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 = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb deleted file mode 100644 index abdcfdd68cde..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.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 AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - # Path helper methods for the AssuredWorkloadsService API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/workloads/{workload}` - # - # @param organization [String] - # @param location [String] - # @param workload [String] - # - # @return [::String] - def workload_path organization:, location:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb deleted file mode 100644 index 6c4602274f15..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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/assured_workloads/v1beta1/version" - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - ## - # Service to manage AssuredWorkloads. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - module AssuredWorkloadsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb deleted file mode 100644 index 40d652c51c19..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb +++ /dev/null @@ -1,655 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/assuredworkloads/v1beta1/assuredworkloads_service_pb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - module Rest - ## - # REST client for the AssuredWorkloadsService service. - # - # Service to manage AssuredWorkloads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :assured_workloads_service_stub - - ## - # Configure the AssuredWorkloadsService Client class. - # - # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssuredWorkloadsService clients - # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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", "AssuredWorkloads", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_workload.timeout = 60.0 - - default_config.rpcs.delete_workload.timeout = 60.0 - default_config.rpcs.delete_workload.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService 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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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 - @assured_workloads_service_stub.universe_domain - end - - ## - # Create a new AssuredWorkloadsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssuredWorkloadsService 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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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 - - @assured_workloads_service_stub = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @assured_workloads_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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @assured_workloads_service_stub.logger - end - - # Service calls - - ## - # Creates Assured Workload. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workload(parent: nil, workload: nil, external_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] - # Required. Assured Workload to create - # @param external_id [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest - - # Converts hash and nil to an 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::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_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.create_workload request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restrict the list of resources allowed in the Workload environment. - # The current list of allowed products can be found at - # https://cloud.google.com/assured-workloads/docs/supported-products - # In addition to assuredworkloads.workload.update permission, the user should - # also have orgpolicy.policy.set permission on the folder resource - # to use this functionality. - # - # @overload restrict_allowed_resources(request, options = nil) - # Pass arguments to `restrict_allowed_resources` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restrict_allowed_resources(name: nil, restriction_type: nil) - # Pass arguments to `restrict_allowed_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 name [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new - # - # # Call the restrict_allowed_resources method. - # result = client.restrict_allowed_resources request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. - # p result - # - def restrict_allowed_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restrict_allowed_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::AssuredWorkloads::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.restrict_allowed_resources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.restrict_allowed_resources request, 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 workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - # In addition to assuredworkloads.workload.delete permission, the user should - # also have orgpolicy.policy.set permission on the deleted folder to remove - # Assured Workloads OrgPolicies. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workload(name: nil, etag: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param etag [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - # @yield [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/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest - - # Converts hash and nil to an 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_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::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_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.delete_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AssuredWorkloadsService REST API. - # - # This class represents the configuration for AssuredWorkloadsService 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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::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 AssuredWorkloadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `restrict_allowed_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :restrict_allowed_resources - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - - # @private - def initialize parent_rpcs = nil - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources - @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb deleted file mode 100644 index 95867d5f579e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_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 AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssuredWorkloadsService 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 AssuredWorkloadsService 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::AssuredWorkloads::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::AssuredWorkloads::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::AssuredWorkloads::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::AssuredWorkloads::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 = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::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{^organizations/[^/]+/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{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__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-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb deleted file mode 100644 index e3b6724a99f7..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb +++ /dev/null @@ -1,266 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - module Rest - ## - # REST service stub for the AssuredWorkloadsService 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_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the restrict_allowed_resources REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # A result object deserialized from the server's reply - def restrict_allowed_resources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restrict_allowed_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: "restrict_allowed_resources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.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_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_workload", - 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_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest] - # 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_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/workloads", - body: "workload", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restrict_allowed_resources REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restrict_allowed_resources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:restrictAllowedResources", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest] - # 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_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb deleted file mode 100644 index 8e2c6c93872f..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/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/assured_workloads/v1beta1/assured_workloads_service/rest" -require "google/cloud/assured_workloads/v1beta1/version" - -module Google - module Cloud - module AssuredWorkloads - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/assured_workloads/v1beta1/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - module V1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb deleted file mode 100644 index 871b2223ff1d..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/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 AssuredWorkloads - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb deleted file mode 100644 index 8c8ba5ca8ba8..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads.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' - - -descriptor_data = "\n\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x12GetWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\"s\n\x1a\x41nalyzeWorkloadMoveRequest\x12\x10\n\x06source\x18\x01 \x01(\tH\x00\x12\x11\n\x07project\x18\x03 \x01(\tH\x00\x12\x13\n\x06target\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x1b\n\x19projectOrWorkloadResource\"/\n\x1b\x41nalyzeWorkloadMoveResponse\x12\x10\n\x08\x62lockers\x18\x01 \x03(\t\"\x8f\x01\n\x14ListWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"t\n\x15ListWorkloadsResponse\x12\x42\n\tworkloads\x18\x01 \x03(\x0b\x32/.google.cloud.assuredworkloads.v1beta1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd2\x1b\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\tresources\x18\x03 \x03(\x0b\x32<.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfoB\x03\xe0\x41\x03\x12\x63\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegimeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x37\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1c\n\x0f\x62illing_account\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12]\n\x0cil4_settings\x18\x07 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.IL4SettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12_\n\rcjis_settings\x18\x08 \x01(\x0b\x32<.google.cloud.assuredworkloads.v1beta1.Workload.CJISSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12n\n\x15\x66\x65\x64ramp_high_settings\x18\x0b \x01(\x0b\x32\x43.google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12v\n\x19\x66\x65\x64ramp_moderate_settings\x18\x0c \x01(\x0b\x32G.google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\n \x03(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.LabelsEntryB\x03\xe0\x41\x01\x12)\n\x1cprovisioned_resources_parent\x18\r \x01(\tB\x03\xe0\x41\x04\x12X\n\x0ckms_settings\x18\x0e \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x05\x18\x01\xe0\x41\x04\x12`\n\x11resource_settings\x18\x0f \x03(\x0b\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettingsB\x03\xe0\x41\x04\x12\x65\n\x14kaj_enrollment_state\x18\x11 \x01(\x0e\x32\x42.google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentStateB\x03\xe0\x41\x03\x12&\n\x19\x65nable_sovereign_controls\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12k\n\x17saa_enrollment_response\x18\x14 \x01(\x0b\x32\x45.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponseB\x03\xe0\x41\x03\x12.\n!compliant_but_disallowed_services\x18\x18 \x03(\tB\x03\xe0\x41\x03\x1a\x8e\x02\n\x0cResourceInfo\x12\x13\n\x0bresource_id\x18\x01 \x01(\x03\x12`\n\rresource_type\x18\x02 \x01(\x0e\x32I.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType\"\x86\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x10\x43ONSUMER_PROJECT\x10\x01\x1a\x02\x08\x01\x12\x13\n\x0f\x43ONSUMER_FOLDER\x10\x04\x12\x1b\n\x17\x45NCRYPTION_KEYS_PROJECT\x10\x02\x12\x0b\n\x07KEYRING\x10\x03\x1a\x93\x01\n\x0bKMSSettings\x12\x41\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05\x12=\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1al\n\x0bIL4Settings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1am\n\x0c\x43JISSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1at\n\x13\x46\x65\x64rampHighSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1ax\n\x17\x46\x65\x64rampModerateSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1a\x9f\x01\n\x10ResourceSettings\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12`\n\rresource_type\x18\x02 \x01(\x0e\x32I.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x1a\x86\x04\n\x15SaaEnrollmentResponse\x12k\n\x0csetup_status\x18\x01 \x01(\x0e\x32P.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupStateH\x00\x88\x01\x01\x12\x66\n\x0csetup_errors\x18\x02 \x03(\x0e\x32P.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError\"R\n\nSetupState\x12\x1b\n\x17SETUP_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_PENDING\x10\x01\x12\x13\n\x0fSTATUS_COMPLETE\x10\x02\"\xb2\x01\n\nSetupError\x12\x1b\n\x17SETUP_ERROR_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45RROR_INVALID_BASE_SETUP\x10\x01\x12&\n\"ERROR_MISSING_EXTERNAL_SIGNING_KEY\x10\x02\x12#\n\x1f\x45RROR_NOT_ALL_SERVICES_ENROLLED\x10\x03\x12\x1c\n\x18\x45RROR_SETUP_CHECK_FAILED\x10\x04\x42\x0f\n\r_setup_status\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x81\x02\n\x10\x43omplianceRegime\x12!\n\x1d\x43OMPLIANCE_REGIME_UNSPECIFIED\x10\x00\x12\x07\n\x03IL4\x10\x01\x12\x08\n\x04\x43JIS\x10\x02\x12\x10\n\x0c\x46\x45\x44RAMP_HIGH\x10\x03\x12\x14\n\x10\x46\x45\x44RAMP_MODERATE\x10\x04\x12\x16\n\x12US_REGIONAL_ACCESS\x10\x05\x12\t\n\x05HIPAA\x10\x06\x12\x0b\n\x07HITRUST\x10\x07\x12\x1a\n\x16\x45U_REGIONS_AND_SUPPORT\x10\x08\x12\x1a\n\x16\x43\x41_REGIONS_AND_SUPPORT\x10\t\x12\x08\n\x04ITAR\x10\n\x12\x1d\n\x19\x41U_REGIONS_AND_US_SUPPORT\x10\x0b\"\x7f\n\x12KajEnrollmentState\x12$\n KAJ_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cKAJ_ENROLLMENT_STATE_PENDING\x10\x01\x12!\n\x1dKAJ_ENROLLMENT_STATE_COMPLETE\x10\x02:u\xea\x41r\n(assuredworkloads.googleapis.com/Workload\x12\x46organizations/{organization}/locations/{location}/workloads/{workload}B\x1c\n\x1a\x63ompliance_regime_settings\"\xcb\x02\n\x1f\x43reateWorkloadOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12`\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegimeB\x03\xe0\x41\x01\x12`\n\x11resource_settings\x18\x05 \x03(\x0b\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettingsB\x03\xe0\x41\x01\x42\xf6\x02\n)com.google.cloud.assuredworkloads.v1beta1B\x15\x41ssuredworkloadsProtoP\x01ZUcloud.google.com/go/assuredworkloads/apiv1beta1/assuredworkloadspb;assuredworkloadspb\xaa\x02%Google.Cloud.AssuredWorkloads.V1Beta1\xca\x02%Google\\Cloud\\AssuredWorkloads\\V1beta1\xea\x02(Google::Cloud::AssuredWorkloads::V1beta1\xea\x41]\n(assuredworkloads.googleapis.com/Location\x12\x31organizations/{organization}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - CreateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest").msgclass - UpdateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest").msgclass - RestrictAllowedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest").msgclass - RestrictAllowedResourcesRequest::RestrictionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest.RestrictionType").enummodule - RestrictAllowedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesResponse").msgclass - DeleteWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest").msgclass - GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest").msgclass - AnalyzeWorkloadMoveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest").msgclass - AnalyzeWorkloadMoveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveResponse").msgclass - ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest").msgclass - ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse").msgclass - Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload").msgclass - Workload::ResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo").msgclass - Workload::ResourceInfo::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType").enummodule - Workload::KMSSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings").msgclass - Workload::IL4Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings").msgclass - Workload::CJISSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings").msgclass - Workload::FedrampHighSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings").msgclass - Workload::FedrampModerateSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings").msgclass - Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings").msgclass - Workload::SaaEnrollmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse").msgclass - Workload::SaaEnrollmentResponse::SetupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState").enummodule - Workload::SaaEnrollmentResponse::SetupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError").enummodule - Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime").enummodule - Workload::KajEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState").enummodule - CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb deleted file mode 100644 index 99b60a0169c0..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_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/assuredworkloads/v1beta1/assuredworkloads_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\nDgoogle/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto\x12%google.cloud.assuredworkloads.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a] - # 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-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb deleted file mode 100644 index dac4e9559b55..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb +++ /dev/null @@ -1,557 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - # Request for creating a workload. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @!attribute [rw] workload - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # Required. Assured Workload to create - # @!attribute [rw] external_id - # @return [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - class CreateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for Updating a workload. - # @!attribute [rw] workload - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # Required. The workload to update. - # The workload's `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to be updated. - class UpdateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for restricting list of available resources in Workload environment. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @!attribute [rw] restriction_type - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - class RestrictAllowedResourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of restriction. - module RestrictionType - # Unknown restriction type. - RESTRICTION_TYPE_UNSPECIFIED = 0 - - # Allow the use all of all gcp products, irrespective of the compliance - # posture. This effectively removes gcp.restrictServiceUsage OrgPolicy - # on the AssuredWorkloads Folder. - ALLOW_ALL_GCP_RESOURCES = 1 - - # Based on Workload's compliance regime, allowed list changes. - # See - https://cloud.google.com/assured-workloads/docs/supported-products - # for the list of supported resources. - ALLOW_COMPLIANT_RESOURCES = 2 - end - end - - # Response for restricting the list of allowed resources. - class RestrictAllowedResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a Workload. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - class DeleteWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching a workload. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Workload to fetch. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - class GetWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to analyze a hypothetical move of a source project or project-based - # workload to a target (destination) folder-based workload. - # @!attribute [rw] source - # @return [::String] - # The source type is a project-based workload. Specify the workloads's - # relative resource name, formatted as: - # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" - # For example: - # "organizations/123/locations/us-east1/workloads/assured-workload-1" - # - # Note: The following fields are mutually exclusive: `source`, `project`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] project - # @return [::String] - # The source type is a project. Specify the project's relative resource - # name, formatted as either a project number or a project ID: - # "projects/\\{PROJECT_NUMBER}" or "projects/\\{PROJECT_ID}" - # For example: - # "projects/951040570662" when specifying a project number, or - # "projects/my-project-123" when specifying a project ID. - # - # Note: The following fields are mutually exclusive: `project`, `source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] target - # @return [::String] - # Required. The resource ID of the folder-based destination workload. This workload is - # where the source project will hypothetically be moved to. Specify the - # workload's relative resource name, formatted as: - # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" - # For example: - # "organizations/123/locations/us-east1/workloads/assured-workload-2" - class AnalyzeWorkloadMoveRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response that includes the analysis of the hypothetical resource move. - # @!attribute [rw] blockers - # @return [::Array<::String>] - # A list of blockers that should be addressed before moving the source - # project or project-based workload to the destination folder-based workload. - class AnalyzeWorkloadMoveResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching workloads in an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. - # @!attribute [rw] page_token - # @return [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @!attribute [rw] filter - # @return [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - class ListWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of ListWorkloads endpoint. - # @!attribute [rw] workloads - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] - # List of Workloads under a given parent. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. Return empty if reached the last page. - class ListWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An Workload object for managing highly regulated workloads of cloud - # customers. - # @!attribute [rw] name - # @return [::String] - # Optional. The resource name of the workload. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload} - # - # Read-only. - # @!attribute [rw] display_name - # @return [::String] - # Required. The user-assigned display name of the Workload. - # When present it must be between 4 to 30 characters. - # Allowed characters are: lowercase and uppercase letters, numbers, - # hyphen, and spaces. - # - # Example: My Workload - # @!attribute [r] resources - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo>] - # Output only. The resources associated with this workload. - # These resources will be created when creating the workload. - # If any of the projects already exist, the workload creation will fail. - # Always read only. - # @!attribute [rw] compliance_regime - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] - # Required. Immutable. Compliance Regime associated with this workload. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Immutable. The Workload creation timestamp. - # @!attribute [r] billing_account - # @return [::String] - # Output only. The billing account used for the resources which are - # direct children of workload. This billing account is initially associated - # with the resources created as part of Workload creation. - # After the initial creation of these resources, the customer can change - # the assigned billing account. - # The resource name has the form - # `billingAccounts/{billing_account_id}`. For example, - # `billingAccounts/012345-567890-ABCDEF`. - # @!attribute [rw] il4_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::IL4Settings] - # Input only. Immutable. Settings specific to resources needed for IL4. - # - # Note: The following fields are mutually exclusive: `il4_settings`, `cjis_settings`, `fedramp_high_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cjis_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::CJISSettings] - # Input only. Immutable. Settings specific to resources needed for CJIS. - # - # Note: The following fields are mutually exclusive: `cjis_settings`, `il4_settings`, `fedramp_high_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] fedramp_high_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampHighSettings] - # Input only. Immutable. Settings specific to resources needed for FedRAMP High. - # - # Note: The following fields are mutually exclusive: `fedramp_high_settings`, `il4_settings`, `cjis_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] fedramp_moderate_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampModerateSettings] - # Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. - # - # Note: The following fields are mutually exclusive: `fedramp_moderate_settings`, `il4_settings`, `cjis_settings`, `fedramp_high_settings`. 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 workload, it is calculated on the basis - # of the Workload contents. It will be used in Update & Delete operations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels applied to the workload. - # @!attribute [rw] provisioned_resources_parent - # @return [::String] - # Input only. The parent resource for the resources managed by this Assured Workload. May - # be either empty or a folder resource which is a child of the - # Workload parent. If not specified all resources are created under the - # parent organization. - # Format: - # folders/\\{folder_id} - # @!attribute [rw] kms_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS - # CMEK key is provisioned. - # This field is deprecated as of Feb 28, 2022. - # In order to create a Keyring, callers should specify, - # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. - # @!attribute [rw] resource_settings - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] - # Input only. Resource properties that are used to customize workload resources. - # These properties (such as custom project id) will be used to create - # workload resources if possible. This field is optional. - # @!attribute [r] kaj_enrollment_state - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KajEnrollmentState] - # Output only. Represents the KAJ enrollment state of the given workload. - # @!attribute [rw] enable_sovereign_controls - # @return [::Boolean] - # Optional. Indicates the sovereignty status of the given workload. - # Currently meant to be used by Europe/Canada customers. - # @!attribute [r] saa_enrollment_response - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse] - # Output only. Represents the SAA enrollment response of the given workload. - # SAA enrollment response is queried during GetWorkload call. - # In failure cases, user friendly error message is shown in SAA details page. - # @!attribute [r] compliant_but_disallowed_services - # @return [::Array<::String>] - # Output only. Urls for services which are compliant for this Assured Workload, but which - # are currently disallowed by the ResourceUsageRestriction org policy. - # Invoke RestrictAllowedResources endpoint to allow your project developers - # to use these services in their environment." - class Workload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represent the resources that are children of this Workload. - # @!attribute [rw] resource_id - # @return [::Integer] - # Resource identifier. - # For a project this represents project_number. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo::ResourceType] - # Indicates the type of resource. - class ResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of resource. - module ResourceType - # Unknown resource type. - RESOURCE_TYPE_UNSPECIFIED = 0 - - # Deprecated. Existing workloads will continue to support this, but new - # CreateWorkloadRequests should not specify this as an input value. - CONSUMER_PROJECT = 1 - - # Consumer Folder. - CONSUMER_FOLDER = 4 - - # Consumer project containing encryption keys. - ENCRYPTION_KEYS_PROJECT = 2 - - # Keyring resource that hosts encryption keys. - KEYRING = 3 - end - end - - # Settings specific to the Key Management Service. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] next_rotation_time - # @return [::Google::Protobuf::Timestamp] - # Required. Input only. Immutable. The time at which the Key Management Service will automatically create a - # new version of the crypto key and mark it as the primary. - # @!attribute [rw] rotation_period - # @return [::Google::Protobuf::Duration] - # Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key - # Management Service automatically rotates a key. Must be at least 24 hours - # and at most 876,000 hours. - class KMSSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for IL4. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Immutable. Settings used to create a CMEK crypto key. - class IL4Settings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for CJIS. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Immutable. Settings used to create a CMEK crypto key. - class CJISSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for FedRAMP High. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Immutable. Settings used to create a CMEK crypto key. - class FedrampHighSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for FedRAMP Moderate. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Immutable. Settings used to create a CMEK crypto key. - class FedrampModerateSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represent the custom settings for the resources to be created. - # @!attribute [rw] resource_id - # @return [::String] - # Resource identifier. - # For a project this represents project_id. If the project is already - # taken, the workload creation will fail. - # For KeyRing, this represents the keyring_id. - # For a folder, don't set this value as folder_id is assigned by Google. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo::ResourceType] - # Indicates the type of resource. This field should be specified to - # correspond the id to the right project type (CONSUMER_PROJECT or - # ENCRYPTION_KEYS_PROJECT) - # @!attribute [rw] display_name - # @return [::String] - # User-assigned resource display name. - # If not empty it will be used to create a resource with the specified - # name. - class ResourceSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Signed Access Approvals (SAA) enrollment response. - # @!attribute [rw] setup_status - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupState] - # Indicates SAA enrollment status of a given workload. - # @!attribute [rw] setup_errors - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupError>] - # Indicates SAA enrollment setup error if any. - class SaaEnrollmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Setup state of SAA enrollment. - module SetupState - # Unspecified. - SETUP_STATE_UNSPECIFIED = 0 - - # SAA enrollment pending. - STATUS_PENDING = 1 - - # SAA enrollment comopleted. - STATUS_COMPLETE = 2 - end - - # Setup error of SAA enrollment. - module SetupError - # Unspecified. - SETUP_ERROR_UNSPECIFIED = 0 - - # Invalid states for all customers, to be redirected to AA UI for - # additional details. - ERROR_INVALID_BASE_SETUP = 1 - - # Returned when there is not an EKM key configured. - ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 - - # Returned when there are no enrolled services or the customer is - # enrolled in CAA only for a subset of services. - ERROR_NOT_ALL_SERVICES_ENROLLED = 3 - - # Returned when exception was encountered during evaluation of other - # criteria. - ERROR_SETUP_CHECK_FAILED = 4 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Supported Compliance Regimes. - module ComplianceRegime - # Unknown compliance regime. - COMPLIANCE_REGIME_UNSPECIFIED = 0 - - # Information protection as per DoD IL4 requirements. - IL4 = 1 - - # Criminal Justice Information Services (CJIS) Security policies. - CJIS = 2 - - # FedRAMP High data protection controls - FEDRAMP_HIGH = 3 - - # FedRAMP Moderate data protection controls - FEDRAMP_MODERATE = 4 - - # Assured Workloads For US Regions data protection controls - US_REGIONAL_ACCESS = 5 - - # Health Insurance Portability and Accountability Act controls - HIPAA = 6 - - # Health Information Trust Alliance controls - HITRUST = 7 - - # Assured Workloads For EU Regions and Support controls - EU_REGIONS_AND_SUPPORT = 8 - - # Assured Workloads For Canada Regions and Support controls - CA_REGIONS_AND_SUPPORT = 9 - - # International Traffic in Arms Regulations - ITAR = 10 - - # Assured Workloads for Australia Regions and Support controls - AU_REGIONS_AND_US_SUPPORT = 11 - end - - # Key Access Justifications(KAJ) Enrollment State. - module KajEnrollmentState - # Default State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 - - # Pending State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_PENDING = 1 - - # Complete State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_COMPLETE = 2 - end - end - - # Operation metadata to give request details of CreateWorkload. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Time when the operation was created. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the workload. - # @!attribute [rw] parent - # @return [::String] - # Optional. The parent of the workload. - # @!attribute [rw] compliance_regime - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] - # Optional. Compliance controls that should be applied to the resources managed by - # the workload. - # @!attribute [rw] resource_settings - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] - # Optional. Resource properties in the input that are used for creating/customizing - # workload resources. - class CreateWorkloadOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile deleted file mode 100644 index fa17d8d9c654..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-assured_workloads-v1beta1", path: "../" -else - gem "google-cloud-assured_workloads-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-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb deleted file mode 100644 index 81b408eee261..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the analyze_workload_move call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move. -# -def analyze_workload_move - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new - - # Call the analyze_workload_move method. - result = client.analyze_workload_move request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse. - p result -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb deleted file mode 100644 index 014d6ac23a14..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.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 assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the create_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload. -# -def create_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new - - # Call the create_workload method. - result = client.create_workload request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb deleted file mode 100644 index 4f48c90e6969..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the delete_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload. -# -def delete_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new - - # Call the delete_workload method. - result = client.delete_workload request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb deleted file mode 100644 index 32cce0425b59..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the get_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload. -# -def get_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new - - # Call the get_workload method. - result = client.get_workload request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. - p result -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb deleted file mode 100644 index f5978bf7a2ef..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the list_workloads call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads. -# -def list_workloads - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new - - # Call the list_workloads method. - result = client.list_workloads request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload. - p item - end -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb deleted file mode 100644 index 4323e4795eac..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources. -# -def restrict_allowed_resources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new - - # Call the restrict_allowed_resources method. - result = client.restrict_allowed_resources request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. - p result -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb deleted file mode 100644 index 3f066388fe20..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the update_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload. -# -def update_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new - - # Call the update_workload method. - result = client.update_workload request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. - p result -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json deleted file mode 100644 index 5156be35c227..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-assured_workloads-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.assuredworkloads.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync", - "title": "Snippet for the create_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload.", - "file": "assured_workloads_service/create_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "CreateWorkload", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.CreateWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync", - "title": "Snippet for the update_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload.", - "file": "assured_workloads_service/update_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::Workload", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "UpdateWorkload", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.UpdateWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync", - "title": "Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources.", - "file": "assured_workloads_service/restrict_allowed_resources.rb", - "language": "RUBY", - "client_method": { - "short_name": "restrict_allowed_resources", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "RestrictAllowedResources", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.RestrictAllowedResources", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync", - "title": "Snippet for the delete_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload.", - "file": "assured_workloads_service/delete_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "DeleteWorkload", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.DeleteWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync", - "title": "Snippet for the get_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload.", - "file": "assured_workloads_service/get_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::Workload", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "GetWorkload", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.GetWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync", - "title": "Snippet for the analyze_workload_move call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move.", - "file": "assured_workloads_service/analyze_workload_move.rb", - "language": "RUBY", - "client_method": { - "short_name": "analyze_workload_move", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "AnalyzeWorkloadMove", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.AnalyzeWorkloadMove", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync", - "title": "Snippet for the list_workloads call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads.", - "file": "assured_workloads_service/list_workloads.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workloads", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "ListWorkloads", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.ListWorkloads", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "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-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb deleted file mode 100644 index 37e84aaa124c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_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/assuredworkloads/v1beta1/assuredworkloads_service_pb" -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb deleted file mode 100644 index e911089b4572..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path organization: "value0", location: "value1", workload: "value2" - assert_equal "organizations/value0/locations/value1/workloads/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb deleted file mode 100644 index 3f1893f059fe..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" - - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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_workload - # Create test objects. - 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" - workload = {} - external_id = "hello world" - - create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_workload parent: parent, workload: workload, external_id: external_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_workload ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_workload({ parent: parent, workload: workload, external_id: external_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_workload(::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workload_client_stub.call_count - end - end - end - - def test_restrict_allowed_resources - # Create test objects. - client_result = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - restriction_type = :RESTRICTION_TYPE_UNSPECIFIED - - restrict_allowed_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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_restrict_allowed_resources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restrict_allowed_resources_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.restrict_allowed_resources name: name, restriction_type: restriction_type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restrict_allowed_resources_client_stub.call_count - end - end - end - - def test_delete_workload - # 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_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workload({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workload name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_workload ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_workload({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_workload(::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.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_workload_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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb deleted file mode 100644 index 2c16e5d2cfde..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb +++ /dev/null @@ -1,553 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/assuredworkloads/v1beta1/assuredworkloads_service_pb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workload = {} - external_id = "hello world" - - create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1beta1::Workload), request["workload"] - assert_equal "hello world", request["external_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_workload({ parent: parent, workload: workload, external_id: external_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_workload parent: parent, workload: workload, external_id: external_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_workload ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_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_workload({ parent: parent, workload: workload, external_id: external_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_workload(::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_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_workload_client_stub.call_rpc_count - end - end - - def test_update_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workload = {} - update_mask = {} - - update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1beta1::Workload), request["workload"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_workload({ workload: workload, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_workload workload: workload, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_workload ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new(workload: workload, 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_workload({ workload: workload, 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_workload(::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new(workload: workload, 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_workload_client_stub.call_rpc_count - end - end - - def test_restrict_allowed_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - restriction_type = :RESTRICTION_TYPE_UNSPECIFIED - - restrict_allowed_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restrict_allowed_resources, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, request - assert_equal "hello world", request["name"] - assert_equal :RESTRICTION_TYPE_UNSPECIFIED, request["restriction_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, restrict_allowed_resources_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.restrict_allowed_resources name: name, restriction_type: restriction_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restrict_allowed_resources_client_stub.call_rpc_count - end - end - - def test_delete_workload - # 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_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_workload({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_workload name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_workload ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.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_workload({ 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_workload(::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.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_workload_client_stub.call_rpc_count - end - end - - def test_get_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workload_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_workload ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_workload({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_workload(::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_rpc_count - end - end - - def test_analyze_workload_move - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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 = "hello world" - target = "hello world" - - analyze_workload_move_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :analyze_workload_move, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest, request - assert_equal "hello world", request["source"] - assert_equal :source, request.projectOrWorkloadResource - assert_equal "hello world", request["target"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, analyze_workload_move_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.analyze_workload_move({ source: source, target: target }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.analyze_workload_move source: source, target: target do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.analyze_workload_move ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new(source: source, target: target) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.analyze_workload_move({ source: source, target: target }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.analyze_workload_move(::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new(source: source, target: target), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, analyze_workload_move_client_stub.call_rpc_count - end - end - - def test_list_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workloads, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workloads_client_stub do - # Create client - c = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.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_workloads_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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-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-audit_manager-v1/.gitignore b/owl-bot-staging/google-cloud-audit_manager-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-audit_manager-v1/.repo-metadata.json deleted file mode 100644 index 79b6f54eca7a..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "auditmanager.googleapis.com", - "api_shortname": "auditmanager", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-audit_manager-v1/latest", - "distribution_name": "google-cloud-audit_manager-v1", - "is_cloud": true, - "language": "ruby", - "name": "auditmanager", - "name_pretty": "Audit Manager V1 API", - "product_documentation": "https://cloud.google.com/audit-manager/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-audit_manager-v1 is the official client library for the Audit Manager V1 API. Note that google-cloud-audit_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-audit_manager instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/audit-manager/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/.rubocop.yml b/owl-bot-staging/google-cloud-audit_manager-v1/.rubocop.yml deleted file mode 100644 index df2253ebb8eb..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-audit_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-audit_manager-v1.rb" diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/.toys.rb b/owl-bot-staging/google-cloud-audit_manager-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/.yardopts b/owl-bot-staging/google-cloud-audit_manager-v1/.yardopts deleted file mode 100644 index 7527916b9591..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Audit 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-audit_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-audit_manager-v1/AUTHENTICATION.md deleted file mode 100644 index dd712b122b90..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-audit_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-audit_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/audit_manager/v1" - -client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/audit_manager/v1" - -::Google::Cloud::AuditManager::V1::AuditManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AuditManager::V1::AuditManager::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-audit_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/audit_manager/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AuditManager::V1::AuditManager::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-audit_manager-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-audit_manager-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/Gemfile b/owl-bot-staging/google-cloud-audit_manager-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/LICENSE.md b/owl-bot-staging/google-cloud-audit_manager-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/README.md b/owl-bot-staging/google-cloud-audit_manager-v1/README.md deleted file mode 100644 index b9d5c9381c4b..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Audit Manager V1 API - -API Client library for the Audit Manager V1 API - -google-cloud-audit_manager-v1 is the official client library for the Audit Manager V1 API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Audit Manager V1 API. Most users should consider using -the main client gem, -[google-cloud-audit_manager](https://rubygems.org/gems/google-cloud-audit_manager). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-audit_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/auditmanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/audit_manager/v1" - -client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new -request = ::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new # (request fields as keyword arguments...) -response = client.enroll_resource request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-audit_manager-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/audit-manager/docs) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/audit_manager/v1" -require "logger" - -client = ::Google::Cloud::AuditManager::V1::AuditManager::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-audit_manager`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-audit_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-audit_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-audit_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-audit_manager-v1/Rakefile b/owl-bot-staging/google-cloud-audit_manager-v1/Rakefile deleted file mode 100644 index c2a304288a91..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_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/audit_manager/v1/audit_manager/credentials" - ::Google::Cloud::AuditManager::V1::AuditManager::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-audit_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-audit_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-audit_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-audit_manager-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-audit_manager-v1" - header "google-cloud-audit_manager-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-audit_manager-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-audit_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-audit_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-audit_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-audit_manager-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-audit_manager-v1/gapic_metadata.json deleted file mode 100644 index 7c6bcdb7df81..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/gapic_metadata.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.auditmanager.v1", - "libraryPackage": "::Google::Cloud::AuditManager::V1", - "services": { - "AuditManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AuditManager::V1::AuditManager::Client", - "rpcs": { - "EnrollResource": { - "methods": [ - "enroll_resource" - ] - }, - "GenerateAuditScopeReport": { - "methods": [ - "generate_audit_scope_report" - ] - }, - "GenerateAuditReport": { - "methods": [ - "generate_audit_report" - ] - }, - "ListAuditReports": { - "methods": [ - "list_audit_reports" - ] - }, - "GetAuditReport": { - "methods": [ - "get_audit_report" - ] - }, - "GetResourceEnrollmentStatus": { - "methods": [ - "get_resource_enrollment_status" - ] - }, - "ListResourceEnrollmentStatuses": { - "methods": [ - "list_resource_enrollment_statuses" - ] - }, - "ListControls": { - "methods": [ - "list_controls" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/google-cloud-audit_manager-v1.gemspec b/owl-bot-staging/google-cloud-audit_manager-v1/google-cloud-audit_manager-v1.gemspec deleted file mode 100644 index 06238bb1f723..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/google-cloud-audit_manager-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/audit_manager/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-audit_manager-v1" - gem.version = Google::Cloud::AuditManager::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-audit_manager-v1 is the official client library for the Audit Manager V1 API. Note that google-cloud-audit_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-audit_manager instead. See the readme for more details." - gem.summary = "API Client library for the Audit Manager V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.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-audit_manager-v1/lib/google-cloud-audit_manager-v1.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google-cloud-audit_manager-v1.rb deleted file mode 100644 index bb20369bcc56..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google-cloud-audit_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/audit_manager/v1" diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1.rb deleted file mode 100644 index 8a50aa11c308..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_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/audit_manager/v1/audit_manager" -require "google/cloud/audit_manager/v1/version" - -module Google - module Cloud - module AuditManager - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/audit_manager/v1" - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/audit_manager/v1" - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/audit_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager.rb deleted file mode 100644 index 2c30855f4db6..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_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/audit_manager/v1/version" - -require "google/cloud/audit_manager/v1/audit_manager/credentials" -require "google/cloud/audit_manager/v1/audit_manager/paths" -require "google/cloud/audit_manager/v1/audit_manager/operations" -require "google/cloud/audit_manager/v1/audit_manager/client" -require "google/cloud/audit_manager/v1/audit_manager/rest" - -module Google - module Cloud - module AuditManager - module V1 - ## - # Service describing handlers for resources - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/audit_manager/v1/audit_manager" - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/audit_manager/v1/audit_manager/rest" - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - module AuditManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "audit_manager", "helpers.rb" -require "google/cloud/audit_manager/v1/audit_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/client.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/client.rb deleted file mode 100644 index a399ea04dab4..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/client.rb +++ /dev/null @@ -1,1275 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/auditmanager/v1/auditmanager_pb" -require "google/cloud/location" - -module Google - module Cloud - module AuditManager - module V1 - module AuditManager - ## - # Client for the AuditManager service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "auditmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :audit_manager_stub - - ## - # Configure the AuditManager Client class. - # - # See {::Google::Cloud::AuditManager::V1::AuditManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AuditManager clients - # ::Google::Cloud::AuditManager::V1::AuditManager::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", "AuditManager", "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.enroll_resource.timeout = 60.0 - - default_config.rpcs.generate_audit_scope_report.timeout = 60.0 - - default_config.rpcs.generate_audit_report.timeout = 60.0 - - default_config.rpcs.list_audit_reports.timeout = 60.0 - default_config.rpcs.list_audit_reports.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_audit_report.timeout = 60.0 - default_config.rpcs.get_audit_report.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_resource_enrollment_status.timeout = 60.0 - default_config.rpcs.get_resource_enrollment_status.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_resource_enrollment_statuses.timeout = 60.0 - default_config.rpcs.list_resource_enrollment_statuses.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_controls.timeout = 60.0 - default_config.rpcs.list_controls.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AuditManager 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::AuditManager::V1::AuditManager::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 - @audit_manager_stub.universe_domain - end - - ## - # Create a new AuditManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AuditManager 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/auditmanager/v1/auditmanager_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 - - @audit_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AuditManager::V1::AuditManager::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 - ) - - @audit_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 = @audit_manager_stub.endpoint - config.universe_domain = @audit_manager_stub.universe_domain - config.logger = @audit_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AuditManager::V1::AuditManager::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @audit_manager_stub.logger - end - - # Service calls - - ## - # Enrolls the customer resource(folder/project/organization) to the audit - # manager service by creating the audit managers Service Agent in customers - # workload and granting required permissions to the Service Agent. Please - # note that if enrollment request is made on the already enrolled workload - # then enrollment is executed overriding the existing set of destinations. - # - # @overload enroll_resource(request, options = nil) - # Pass arguments to `enroll_resource` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::EnrollResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::EnrollResourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enroll_resource(scope: nil, destinations: nil) - # Pass arguments to `enroll_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 scope [::String] - # Required. The resource to be enrolled to the audit manager. Scope format - # should be resource_type/resource_identifier Eg: - # projects/\\{project}/locations/\\{location}, - # folders/\\{folder}/locations/\\{location} - # organizations/\\{organization}/locations/\\{location} - # @param destinations [::Array<::Google::Cloud::AuditManager::V1::EnrollResourceRequest::EligibleDestination, ::Hash>] - # Required. List of destination among which customer can choose to upload - # their reports during the audit process. While enrolling at a - # organization/folder level, customer can choose Cloud storage bucket in any - # project. If the audit is triggered at project level using the service agent - # at organization/folder level, all the destination options associated with - # respective organization/folder level service agent will be available to - # auditing projects. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AuditManager::V1::Enrollment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AuditManager::V1::Enrollment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::EnrollResourceRequest.new - # - # # Call the enroll_resource method. - # result = client.enroll_resource request - # - # # The returned object is of type Google::Cloud::AuditManager::V1::Enrollment. - # p result - # - def enroll_resource request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::EnrollResourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enroll_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::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope - header_params["scope"] = request.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.enroll_resource.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enroll_resource.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.call_rpc :enroll_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 - - ## - # Generates a demo report highlighting different responsibilities - # (Google/Customer/ shared) required to be fulfilled for the customer's - # workload to be compliant with the given standard. - # - # @overload generate_audit_scope_report(request, options = nil) - # Pass arguments to `generate_audit_scope_report` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_audit_scope_report(scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil) - # Pass arguments to `generate_audit_scope_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 scope [::String] - # Required. Scope for which the AuditScopeReport is required. Must be of - # format resource_type/resource_identifier Eg: - # projects/\\{project}/locations/\\{location}, - # folders/\\{folder}/locations/\\{location} - # @param compliance_standard [::String] - # Required. Compliance Standard against which the Scope Report must be - # generated. Eg: FEDRAMP_MODERATE - # @param report_format [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest::AuditScopeReportFormat] - # Required. The format in which the Scope report bytes should be returned. - # @param compliance_framework [::String] - # Required. Compliance framework against which the Scope Report must be - # generated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditScopeReport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AuditManager::V1::AuditScopeReport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new - # - # # Call the generate_audit_scope_report method. - # result = client.generate_audit_scope_report request - # - # # The returned object is of type Google::Cloud::AuditManager::V1::AuditScopeReport. - # p result - # - def generate_audit_scope_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest - - # Converts hash and nil to 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_audit_scope_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::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope - header_params["scope"] = request.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.generate_audit_scope_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_audit_scope_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.call_rpc :generate_audit_scope_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 - - ## - # Register the Audit Report generation requests and returns the OperationId - # using which the customer can track the report generation progress. - # - # @overload generate_audit_report(request, options = nil) - # Pass arguments to `generate_audit_report` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_audit_report(gcs_uri: nil, scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil) - # Pass arguments to `generate_audit_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 gcs_uri [::String] - # Destination Cloud storage bucket where report and evidence must be - # uploaded. The Cloud storage bucket provided here must be selected among - # the buckets entered during the enrollment process. - # @param scope [::String] - # Required. Scope for which the AuditScopeReport is required. Must be of - # format resource_type/resource_identifier Eg: - # projects/\\{project}/locations/\\{location}, - # folders/\\{folder}/locations/\\{location} - # @param compliance_standard [::String] - # Required. Compliance Standard against which the Scope Report must be - # generated. Eg: FEDRAMP_MODERATE - # @param report_format [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest::AuditReportFormat] - # Required. The format in which the audit report should be created. - # @param compliance_framework [::String] - # Required. Compliance framework against which the Report must be generated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new - # - # # Call the generate_audit_report method. - # result = client.generate_audit_report request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def generate_audit_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest - - # Converts hash and nil to 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_audit_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::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope - header_params["scope"] = request.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.generate_audit_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_audit_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.call_rpc :generate_audit_report, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 audit reports in the selected parent scope - # - # @overload list_audit_reports(request, options = nil) - # Pass arguments to `list_audit_reports` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::ListAuditReportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::ListAuditReportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_audit_reports(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_audit_reports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent scope for which to list the reports. - # @param page_size [::Integer] - # Optional. The maximum number of resources to return. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditReport>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditReport>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::ListAuditReportsRequest.new - # - # # Call the list_audit_reports method. - # result = client.list_audit_reports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AuditManager::V1::AuditReport. - # p item - # end - # - def list_audit_reports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListAuditReportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_audit_reports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_audit_reports.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_audit_reports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.call_rpc :list_audit_reports, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @audit_manager_stub, :list_audit_reports, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the overall audit report - # - # @overload get_audit_report(request, options = nil) - # Pass arguments to `get_audit_report` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::GetAuditReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::GetAuditReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_audit_report(name: nil) - # Pass arguments to `get_audit_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 name [::String] - # Required. Format - # projects/\\{project}/locations/\\{location}/auditReports/\\{audit_report}, - # folders/\\{folder}/locations/\\{location}/auditReports/\\{audit_report} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditReport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AuditManager::V1::AuditReport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::GetAuditReportRequest.new - # - # # Call the get_audit_report method. - # result = client.get_audit_report request - # - # # The returned object is of type Google::Cloud::AuditManager::V1::AuditReport. - # p result - # - def get_audit_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GetAuditReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_audit_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::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_audit_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_audit_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.call_rpc :get_audit_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 - - ## - # Get a resource along with its enrollment status. - # - # @overload get_resource_enrollment_status(request, options = nil) - # Pass arguments to `get_resource_enrollment_status` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_enrollment_status(name: nil) - # Pass arguments to `get_resource_enrollment_status` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Format - # folders/\\{folder}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, - # projects/\\{project}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, - # organizations/\\{organization}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new - # - # # Call the get_resource_enrollment_status method. - # result = client.get_resource_enrollment_status request - # - # # The returned object is of type Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. - # p result - # - def get_resource_enrollment_status request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest - - # Converts hash and nil to an 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_enrollment_status.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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_enrollment_status.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_resource_enrollment_status.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.call_rpc :get_resource_enrollment_status, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches all resources under the parent along with their enrollment. - # - # @overload list_resource_enrollment_statuses(request, options = nil) - # Pass arguments to `list_resource_enrollment_statuses` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_enrollment_statuses(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_resource_enrollment_statuses` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent scope for which the list of resources with enrollments - # are required. - # @param page_size [::Integer] - # Optional. The maximum number of resources to return. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.new - # - # # Call the list_resource_enrollment_statuses method. - # result = client.list_resource_enrollment_statuses request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. - # p item - # end - # - def list_resource_enrollment_statuses request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest - - # Converts hash and nil to an 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_enrollment_statuses.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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_enrollment_statuses.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_resource_enrollment_statuses.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.call_rpc :list_resource_enrollment_statuses, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @audit_manager_stub, :list_resource_enrollment_statuses, request, response, 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 controls needed to be implemented to be compliant to a standard. - # - # @overload list_controls(request, options = nil) - # Pass arguments to `list_controls` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::ListControlsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::ListControlsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_controls(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_controls` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Format - # projects/\\{project}/locations/\\{location}/standards/\\{standard}, - # folders/\\{folder}/locations/\\{location}/standards/\\{standard} - # @param page_size [::Integer] - # Optional. The maximum number of resources to return. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::Control>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::Control>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::ListControlsRequest.new - # - # # Call the list_controls method. - # result = client.list_controls request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AuditManager::V1::Control. - # p item - # end - # - def list_controls request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListControlsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_controls.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_controls.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_controls.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.call_rpc :list_controls, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @audit_manager_stub, :list_controls, request, response, 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 AuditManager API. - # - # This class represents the configuration for AuditManager, - # providing control 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::AuditManager::V1::AuditManager::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # enroll_resource to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AuditManager::V1::AuditManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.enroll_resource.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.enroll_resource.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::AuditManager::V1::AuditManager::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 = "auditmanager.googleapis.com" - - config_attr :endpoint, nil, ::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 AuditManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `enroll_resource` - # @return [::Gapic::Config::Method] - # - attr_reader :enroll_resource - ## - # RPC-specific configuration for `generate_audit_scope_report` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_audit_scope_report - ## - # RPC-specific configuration for `generate_audit_report` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_audit_report - ## - # RPC-specific configuration for `list_audit_reports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_audit_reports - ## - # RPC-specific configuration for `get_audit_report` - # @return [::Gapic::Config::Method] - # - attr_reader :get_audit_report - ## - # RPC-specific configuration for `get_resource_enrollment_status` - # @return [::Gapic::Config::Method] - # - attr_reader :get_resource_enrollment_status - ## - # RPC-specific configuration for `list_resource_enrollment_statuses` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_enrollment_statuses - ## - # RPC-specific configuration for `list_controls` - # @return [::Gapic::Config::Method] - # - attr_reader :list_controls - - # @private - def initialize parent_rpcs = nil - enroll_resource_config = parent_rpcs.enroll_resource if parent_rpcs.respond_to? :enroll_resource - @enroll_resource = ::Gapic::Config::Method.new enroll_resource_config - generate_audit_scope_report_config = parent_rpcs.generate_audit_scope_report if parent_rpcs.respond_to? :generate_audit_scope_report - @generate_audit_scope_report = ::Gapic::Config::Method.new generate_audit_scope_report_config - generate_audit_report_config = parent_rpcs.generate_audit_report if parent_rpcs.respond_to? :generate_audit_report - @generate_audit_report = ::Gapic::Config::Method.new generate_audit_report_config - list_audit_reports_config = parent_rpcs.list_audit_reports if parent_rpcs.respond_to? :list_audit_reports - @list_audit_reports = ::Gapic::Config::Method.new list_audit_reports_config - get_audit_report_config = parent_rpcs.get_audit_report if parent_rpcs.respond_to? :get_audit_report - @get_audit_report = ::Gapic::Config::Method.new get_audit_report_config - get_resource_enrollment_status_config = parent_rpcs.get_resource_enrollment_status if parent_rpcs.respond_to? :get_resource_enrollment_status - @get_resource_enrollment_status = ::Gapic::Config::Method.new get_resource_enrollment_status_config - list_resource_enrollment_statuses_config = parent_rpcs.list_resource_enrollment_statuses if parent_rpcs.respond_to? :list_resource_enrollment_statuses - @list_resource_enrollment_statuses = ::Gapic::Config::Method.new list_resource_enrollment_statuses_config - list_controls_config = parent_rpcs.list_controls if parent_rpcs.respond_to? :list_controls - @list_controls = ::Gapic::Config::Method.new list_controls_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/credentials.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/credentials.rb deleted file mode 100644 index 9551642692e0..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_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 AuditManager - module V1 - module AuditManager - # Credentials for the AuditManager 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-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/operations.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/operations.rb deleted file mode 100644 index 704f717f2bb1..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_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 AuditManager - module V1 - module AuditManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "auditmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AuditManager 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 AuditManager 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::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AuditManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AuditManager::V1::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 = "auditmanager.googleapis.com" - - config_attr :endpoint, nil, ::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-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/paths.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/paths.rb deleted file mode 100644 index 76a8d180931b..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/paths.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 AuditManager - module V1 - module AuditManager - # Path helper methods for the AuditManager API. - module Paths - ## - # Create a fully-qualified AuditReport resource string. - # - # @overload audit_report_path(project:, location:, audit_report:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/auditReports/{audit_report}` - # - # @param project [String] - # @param location [String] - # @param audit_report [String] - # - # @overload audit_report_path(folder:, location:, audit_report:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/auditReports/{audit_report}` - # - # @param folder [String] - # @param location [String] - # @param audit_report [String] - # - # @return [::String] - def audit_report_path **args - resources = { - "audit_report:location:project" => (proc do |project:, location:, audit_report:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/auditReports/#{audit_report}" - end), - "audit_report:folder:location" => (proc do |folder:, location:, audit_report:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/auditReports/#{audit_report}" - 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 EnrollmentStatusScope resource string. - # - # @overload enrollment_status_scope_path(folder:, location:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @overload enrollment_status_scope_path(organization:, location:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def enrollment_status_scope_path **args - resources = { - "folder:location" => (proc do |folder:, location:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end), - "location:organization" => (proc do |organization:, location:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - 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 ResourceEnrollmentStatus resource string. - # - # @overload resource_enrollment_status_path(folder:, location:, resource_enrollment_status:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - # - # @param folder [String] - # @param location [String] - # @param resource_enrollment_status [String] - # - # @overload resource_enrollment_status_path(project:, location:, resource_enrollment_status:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - # - # @param project [String] - # @param location [String] - # @param resource_enrollment_status [String] - # - # @overload resource_enrollment_status_path(organization:, location:, resource_enrollment_status:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - # - # @param organization [String] - # @param location [String] - # @param resource_enrollment_status [String] - # - # @return [::String] - def resource_enrollment_status_path **args - resources = { - "folder:location:resource_enrollment_status" => (proc do |folder:, location:, resource_enrollment_status:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/resourceEnrollmentStatuses/#{resource_enrollment_status}" - end), - "location:project:resource_enrollment_status" => (proc do |project:, location:, resource_enrollment_status:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/resourceEnrollmentStatuses/#{resource_enrollment_status}" - end), - "location:organization:resource_enrollment_status" => (proc do |organization:, location:, resource_enrollment_status:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/resourceEnrollmentStatuses/#{resource_enrollment_status}" - 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 Standard resource string. - # - # @overload standard_path(project:, location:, standard:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/standards/{standard}` - # - # @param project [String] - # @param location [String] - # @param standard [String] - # - # @overload standard_path(folder:, location:, standard:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/standards/{standard}` - # - # @param folder [String] - # @param location [String] - # @param standard [String] - # - # @overload standard_path(organization:, location:, standard:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/standards/{standard}` - # - # @param organization [String] - # @param location [String] - # @param standard [String] - # - # @return [::String] - def standard_path **args - resources = { - "location:project:standard" => (proc do |project:, location:, standard:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/standards/#{standard}" - end), - "folder:location:standard" => (proc do |folder:, location:, standard:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/standards/#{standard}" - end), - "location:organization:standard" => (proc do |organization:, location:, standard:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/standards/#{standard}" - 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-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest.rb deleted file mode 100644 index 264bb06fe47e..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_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/audit_manager/v1/version" -require "google/cloud/audit_manager/v1/bindings_override" - -require "google/cloud/audit_manager/v1/audit_manager/credentials" -require "google/cloud/audit_manager/v1/audit_manager/paths" -require "google/cloud/audit_manager/v1/audit_manager/rest/operations" -require "google/cloud/audit_manager/v1/audit_manager/rest/client" - -module Google - module Cloud - module AuditManager - module V1 - ## - # Service describing handlers for resources - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/audit_manager/v1/audit_manager/rest" - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - module AuditManager - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/audit_manager/v1/audit_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/client.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/client.rb deleted file mode 100644 index 50460b66f329..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/client.rb +++ /dev/null @@ -1,1184 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/auditmanager/v1/auditmanager_pb" -require "google/cloud/audit_manager/v1/audit_manager/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module AuditManager - module V1 - module AuditManager - module Rest - ## - # REST client for the AuditManager service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "auditmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :audit_manager_stub - - ## - # Configure the AuditManager Client class. - # - # See {::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AuditManager clients - # ::Google::Cloud::AuditManager::V1::AuditManager::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", "AuditManager", "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.enroll_resource.timeout = 60.0 - - default_config.rpcs.generate_audit_scope_report.timeout = 60.0 - - default_config.rpcs.generate_audit_report.timeout = 60.0 - - default_config.rpcs.list_audit_reports.timeout = 60.0 - default_config.rpcs.list_audit_reports.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_audit_report.timeout = 60.0 - default_config.rpcs.get_audit_report.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_resource_enrollment_status.timeout = 60.0 - default_config.rpcs.get_resource_enrollment_status.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_resource_enrollment_statuses.timeout = 60.0 - default_config.rpcs.list_resource_enrollment_statuses.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_controls.timeout = 60.0 - default_config.rpcs.list_controls.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AuditManager 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::AuditManager::V1::AuditManager::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 - @audit_manager_stub.universe_domain - end - - ## - # Create a new AuditManager REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AuditManager 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::AuditManager::V1::AuditManager::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 - - @audit_manager_stub = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @audit_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 = @audit_manager_stub.endpoint - config.universe_domain = @audit_manager_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @audit_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AuditManager::V1::AuditManager::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @audit_manager_stub.logger - end - - # Service calls - - ## - # Enrolls the customer resource(folder/project/organization) to the audit - # manager service by creating the audit managers Service Agent in customers - # workload and granting required permissions to the Service Agent. Please - # note that if enrollment request is made on the already enrolled workload - # then enrollment is executed overriding the existing set of destinations. - # - # @overload enroll_resource(request, options = nil) - # Pass arguments to `enroll_resource` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::EnrollResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::EnrollResourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enroll_resource(scope: nil, destinations: nil) - # Pass arguments to `enroll_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 scope [::String] - # Required. The resource to be enrolled to the audit manager. Scope format - # should be resource_type/resource_identifier Eg: - # projects/\\{project}/locations/\\{location}, - # folders/\\{folder}/locations/\\{location} - # organizations/\\{organization}/locations/\\{location} - # @param destinations [::Array<::Google::Cloud::AuditManager::V1::EnrollResourceRequest::EligibleDestination, ::Hash>] - # Required. List of destination among which customer can choose to upload - # their reports during the audit process. While enrolling at a - # organization/folder level, customer can choose Cloud storage bucket in any - # project. If the audit is triggered at project level using the service agent - # at organization/folder level, all the destination options associated with - # respective organization/folder level service agent will be available to - # auditing projects. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::Enrollment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::Enrollment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::EnrollResourceRequest.new - # - # # Call the enroll_resource method. - # result = client.enroll_resource request - # - # # The returned object is of type Google::Cloud::AuditManager::V1::Enrollment. - # p result - # - def enroll_resource request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::EnrollResourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enroll_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::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enroll_resource.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enroll_resource.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.enroll_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 - - ## - # Generates a demo report highlighting different responsibilities - # (Google/Customer/ shared) required to be fulfilled for the customer's - # workload to be compliant with the given standard. - # - # @overload generate_audit_scope_report(request, options = nil) - # Pass arguments to `generate_audit_scope_report` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_audit_scope_report(scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil) - # Pass arguments to `generate_audit_scope_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 scope [::String] - # Required. Scope for which the AuditScopeReport is required. Must be of - # format resource_type/resource_identifier Eg: - # projects/\\{project}/locations/\\{location}, - # folders/\\{folder}/locations/\\{location} - # @param compliance_standard [::String] - # Required. Compliance Standard against which the Scope Report must be - # generated. Eg: FEDRAMP_MODERATE - # @param report_format [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest::AuditScopeReportFormat] - # Required. The format in which the Scope report bytes should be returned. - # @param compliance_framework [::String] - # Required. Compliance framework against which the Scope Report must be - # generated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::AuditScopeReport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::AuditScopeReport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new - # - # # Call the generate_audit_scope_report method. - # result = client.generate_audit_scope_report request - # - # # The returned object is of type Google::Cloud::AuditManager::V1::AuditScopeReport. - # p result - # - def generate_audit_scope_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest - - # Converts hash and nil to an 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_audit_scope_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::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_audit_scope_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_audit_scope_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.generate_audit_scope_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 - - ## - # Register the Audit Report generation requests and returns the OperationId - # using which the customer can track the report generation progress. - # - # @overload generate_audit_report(request, options = nil) - # Pass arguments to `generate_audit_report` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_audit_report(gcs_uri: nil, scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil) - # Pass arguments to `generate_audit_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 gcs_uri [::String] - # Destination Cloud storage bucket where report and evidence must be - # uploaded. The Cloud storage bucket provided here must be selected among - # the buckets entered during the enrollment process. - # @param scope [::String] - # Required. Scope for which the AuditScopeReport is required. Must be of - # format resource_type/resource_identifier Eg: - # projects/\\{project}/locations/\\{location}, - # folders/\\{folder}/locations/\\{location} - # @param compliance_standard [::String] - # Required. Compliance Standard against which the Scope Report must be - # generated. Eg: FEDRAMP_MODERATE - # @param report_format [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest::AuditReportFormat] - # Required. The format in which the audit report should be created. - # @param compliance_framework [::String] - # Required. Compliance framework against which the Report must be generated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new - # - # # Call the generate_audit_report method. - # result = client.generate_audit_report request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def generate_audit_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest - - # Converts hash and nil to an 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_audit_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::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_audit_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_audit_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.generate_audit_report request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 audit reports in the selected parent scope - # - # @overload list_audit_reports(request, options = nil) - # Pass arguments to `list_audit_reports` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::ListAuditReportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::ListAuditReportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_audit_reports(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_audit_reports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent scope for which to list the reports. - # @param page_size [::Integer] - # Optional. The maximum number of resources to return. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditReport>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditReport>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::ListAuditReportsRequest.new - # - # # Call the list_audit_reports method. - # result = client.list_audit_reports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AuditManager::V1::AuditReport. - # p item - # end - # - def list_audit_reports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListAuditReportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_audit_reports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_audit_reports.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_audit_reports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.list_audit_reports request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @audit_manager_stub, :list_audit_reports, "audit_reports", request, result, 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 the overall audit report - # - # @overload get_audit_report(request, options = nil) - # Pass arguments to `get_audit_report` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::GetAuditReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::GetAuditReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_audit_report(name: nil) - # Pass arguments to `get_audit_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 name [::String] - # Required. Format - # projects/\\{project}/locations/\\{location}/auditReports/\\{audit_report}, - # folders/\\{folder}/locations/\\{location}/auditReports/\\{audit_report} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::AuditReport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::AuditReport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::GetAuditReportRequest.new - # - # # Call the get_audit_report method. - # result = client.get_audit_report request - # - # # The returned object is of type Google::Cloud::AuditManager::V1::AuditReport. - # p result - # - def get_audit_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GetAuditReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_audit_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::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_audit_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_audit_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.get_audit_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 - - ## - # Get a resource along with its enrollment status. - # - # @overload get_resource_enrollment_status(request, options = nil) - # Pass arguments to `get_resource_enrollment_status` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_enrollment_status(name: nil) - # Pass arguments to `get_resource_enrollment_status` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Format - # folders/\\{folder}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, - # projects/\\{project}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, - # organizations/\\{organization}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new - # - # # Call the get_resource_enrollment_status method. - # result = client.get_resource_enrollment_status request - # - # # The returned object is of type Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. - # p result - # - def get_resource_enrollment_status request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest - - # Converts hash and nil to an options 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_enrollment_status.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_enrollment_status.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_resource_enrollment_status.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.get_resource_enrollment_status request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches all resources under the parent along with their enrollment. - # - # @overload list_resource_enrollment_statuses(request, options = nil) - # Pass arguments to `list_resource_enrollment_statuses` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_enrollment_statuses(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_resource_enrollment_statuses` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent scope for which the list of resources with enrollments - # are required. - # @param page_size [::Integer] - # Optional. The maximum number of resources to return. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.new - # - # # Call the list_resource_enrollment_statuses method. - # result = client.list_resource_enrollment_statuses request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. - # p item - # end - # - def list_resource_enrollment_statuses request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest - - # Converts hash and nil to an options 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_enrollment_statuses.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_enrollment_statuses.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_resource_enrollment_statuses.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.list_resource_enrollment_statuses request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @audit_manager_stub, :list_resource_enrollment_statuses, "resource_enrollment_statuses", request, result, 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 controls needed to be implemented to be compliant to a standard. - # - # @overload list_controls(request, options = nil) - # Pass arguments to `list_controls` via a request object, either of type - # {::Google::Cloud::AuditManager::V1::ListControlsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AuditManager::V1::ListControlsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_controls(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_controls` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Format - # projects/\\{project}/locations/\\{location}/standards/\\{standard}, - # folders/\\{folder}/locations/\\{location}/standards/\\{standard} - # @param page_size [::Integer] - # Optional. The maximum number of resources to return. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::Control>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::Control>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/audit_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AuditManager::V1::ListControlsRequest.new - # - # # Call the list_controls method. - # result = client.list_controls request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AuditManager::V1::Control. - # p item - # end - # - def list_controls request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListControlsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_controls.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_controls.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_controls.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_manager_stub.list_controls request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @audit_manager_stub, :list_controls, "controls", request, result, 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 AuditManager REST API. - # - # This class represents the configuration for AuditManager 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::AuditManager::V1::AuditManager::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 - # # enroll_resource to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.enroll_resource.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.enroll_resource.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "auditmanager.googleapis.com" - - config_attr :endpoint, nil, ::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 AuditManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `enroll_resource` - # @return [::Gapic::Config::Method] - # - attr_reader :enroll_resource - ## - # RPC-specific configuration for `generate_audit_scope_report` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_audit_scope_report - ## - # RPC-specific configuration for `generate_audit_report` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_audit_report - ## - # RPC-specific configuration for `list_audit_reports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_audit_reports - ## - # RPC-specific configuration for `get_audit_report` - # @return [::Gapic::Config::Method] - # - attr_reader :get_audit_report - ## - # RPC-specific configuration for `get_resource_enrollment_status` - # @return [::Gapic::Config::Method] - # - attr_reader :get_resource_enrollment_status - ## - # RPC-specific configuration for `list_resource_enrollment_statuses` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_enrollment_statuses - ## - # RPC-specific configuration for `list_controls` - # @return [::Gapic::Config::Method] - # - attr_reader :list_controls - - # @private - def initialize parent_rpcs = nil - enroll_resource_config = parent_rpcs.enroll_resource if parent_rpcs.respond_to? :enroll_resource - @enroll_resource = ::Gapic::Config::Method.new enroll_resource_config - generate_audit_scope_report_config = parent_rpcs.generate_audit_scope_report if parent_rpcs.respond_to? :generate_audit_scope_report - @generate_audit_scope_report = ::Gapic::Config::Method.new generate_audit_scope_report_config - generate_audit_report_config = parent_rpcs.generate_audit_report if parent_rpcs.respond_to? :generate_audit_report - @generate_audit_report = ::Gapic::Config::Method.new generate_audit_report_config - list_audit_reports_config = parent_rpcs.list_audit_reports if parent_rpcs.respond_to? :list_audit_reports - @list_audit_reports = ::Gapic::Config::Method.new list_audit_reports_config - get_audit_report_config = parent_rpcs.get_audit_report if parent_rpcs.respond_to? :get_audit_report - @get_audit_report = ::Gapic::Config::Method.new get_audit_report_config - get_resource_enrollment_status_config = parent_rpcs.get_resource_enrollment_status if parent_rpcs.respond_to? :get_resource_enrollment_status - @get_resource_enrollment_status = ::Gapic::Config::Method.new get_resource_enrollment_status_config - list_resource_enrollment_statuses_config = parent_rpcs.list_resource_enrollment_statuses if parent_rpcs.respond_to? :list_resource_enrollment_statuses - @list_resource_enrollment_statuses = ::Gapic::Config::Method.new list_resource_enrollment_statuses_config - list_controls_config = parent_rpcs.list_controls if parent_rpcs.respond_to? :list_controls - @list_controls = ::Gapic::Config::Method.new list_controls_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/operations.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/operations.rb deleted file mode 100644 index 6744afa311af..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/operations.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 "gapic/operation" - -module Google - module Cloud - module AuditManager - module V1 - module AuditManager - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "auditmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AuditManager 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 AuditManager 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::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::AuditManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "auditmanager.googleapis.com" - - config_attr :endpoint, nil, ::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] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^organizations/[^/]+/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] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/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] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/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] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/service_stub.rb deleted file mode 100644 index 7bc0b7637823..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/audit_manager/rest/service_stub.rb +++ /dev/null @@ -1,660 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/auditmanager/v1/auditmanager_pb" - -module Google - module Cloud - module AuditManager - module V1 - module AuditManager - module Rest - ## - # REST service stub for the AuditManager 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 enroll_resource REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::EnrollResourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::Enrollment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::Enrollment] - # A result object deserialized from the server's reply - def enroll_resource request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enroll_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: "enroll_resource", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AuditManager::V1::Enrollment.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_audit_scope_report REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::AuditScopeReport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::AuditScopeReport] - # A result object deserialized from the server's reply - def generate_audit_scope_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_audit_scope_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_audit_scope_report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AuditManager::V1::AuditScopeReport.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_audit_report REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def generate_audit_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_audit_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_audit_report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_audit_reports REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::ListAuditReportsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::ListAuditReportsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::ListAuditReportsResponse] - # A result object deserialized from the server's reply - def list_audit_reports request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_audit_reports_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_audit_reports", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AuditManager::V1::ListAuditReportsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_audit_report REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::GetAuditReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::AuditReport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::AuditReport] - # A result object deserialized from the server's reply - def get_audit_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_audit_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: "get_audit_report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AuditManager::V1::AuditReport.decode_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_enrollment_status REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus] - # A result object deserialized from the server's reply - def get_resource_enrollment_status request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_enrollment_status_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_enrollment_status", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus.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_enrollment_statuses REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse] - # A result object deserialized from the server's reply - def list_resource_enrollment_statuses request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_enrollment_statuses_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_enrollment_statuses", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse.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_controls REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::ListControlsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AuditManager::V1::ListControlsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AuditManager::V1::ListControlsResponse] - # A result object deserialized from the server's reply - def list_controls request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_controls_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_controls", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AuditManager::V1::ListControlsResponse.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 enroll_resource REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::EnrollResourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enroll_resource_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{scope}:enrollResource", - body: "*", - matches: [ - ["scope", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{scope}:enrollResource", - body: "*", - matches: [ - ["scope", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{scope}:enrollResource", - body: "*", - matches: [ - ["scope", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_audit_scope_report REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest] - # 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_audit_scope_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{scope}/auditScopeReports:generate", - body: "*", - matches: [ - ["scope", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{scope}/auditScopeReports:generate", - body: "*", - matches: [ - ["scope", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_audit_report REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest] - # 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_audit_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{scope}/auditReports:generate", - body: "*", - matches: [ - ["scope", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{scope}/auditReports:generate", - body: "*", - matches: [ - ["scope", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_audit_reports REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::ListAuditReportsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_audit_reports_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/auditReports", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/auditReports", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/auditReports", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_audit_report REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::GetAuditReportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_audit_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/auditReports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/auditReports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_resource_enrollment_status REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest] - # A 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_enrollment_status_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/resourceEnrollmentStatuses/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/resourceEnrollmentStatuses/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/resourceEnrollmentStatuses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_resource_enrollment_statuses REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest] - # A 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_enrollment_statuses_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/resourceEnrollmentStatuses", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/resourceEnrollmentStatuses", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_controls REST call - # - # @param request_pb [::Google::Cloud::AuditManager::V1::ListControlsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_controls_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/controls", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/standards/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/controls", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/standards/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/controls", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/standards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/bindings_override.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/bindings_override.rb deleted file mode 100644 index b5176b1cd8ed..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module AuditManager - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/audit_manager/v1/rest" - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AuditManager"] - 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-audit_manager-v1/lib/google/cloud/audit_manager/v1/rest.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/rest.rb deleted file mode 100644 index 38bac9cedcb3..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_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/audit_manager/v1/audit_manager/rest" -require "google/cloud/audit_manager/v1/bindings_override" -require "google/cloud/audit_manager/v1/version" - -module Google - module Cloud - module AuditManager - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/audit_manager/v1/rest" - # client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/version.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_manager/v1/version.rb deleted file mode 100644 index 535462f00857..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/audit_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 AuditManager - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/auditmanager/v1/auditmanager_pb.rb b/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/auditmanager/v1/auditmanager_pb.rb deleted file mode 100644 index 6f949db9ad30..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/lib/google/cloud/auditmanager/v1/auditmanager_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/auditmanager/v1/auditmanager.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/auditmanager/v1/auditmanager.proto\x12\x1cgoogle.cloud.auditmanager.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\"\xde\x01\n\x15\x45nrollResourceRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x62\n\x0c\x64\x65stinations\x18\x02 \x03(\x0b\x32G.google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestinationB\x03\xe0\x41\x02\x1aM\n\x13\x45ligibleDestination\x12\x1d\n\x13\x65ligible_gcs_bucket\x18\x03 \x01(\tH\x00\x42\x17\n\x15\x65ligible_destinations\"\xd4\x02\n\x1fGenerateAuditScopeReportRequest\x12\x12\n\x05scope\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x63ompliance_standard\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12p\n\rreport_format\x18\x04 \x01(\x0e\x32T.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormatB\x03\xe0\x41\x02\x12!\n\x14\x63ompliance_framework\x18\x05 \x01(\tB\x03\xe0\x41\x02\"f\n\x16\x41uditScopeReportFormat\x12)\n%AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12!\n\x1d\x41UDIT_SCOPE_REPORT_FORMAT_ODF\x10\x01\"\xd6\x02\n\x1aGenerateAuditReportRequest\x12\x11\n\x07gcs_uri\x18\x02 \x01(\tH\x00\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x63ompliance_standard\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x66\n\rreport_format\x18\x04 \x01(\x0e\x32J.google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormatB\x03\xe0\x41\x02\x12!\n\x14\x63ompliance_framework\x18\x05 \x01(\tB\x03\xe0\x41\x02\"U\n\x11\x41uditReportFormat\x12#\n\x1f\x41UDIT_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x41UDIT_REPORT_FORMAT_ODF\x10\x01\x42\r\n\x0b\x64\x65stination\"p\n\"GetResourceEnrollmentStatusRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4auditmanager.googleapis.com/ResourceEnrollmentStatus\"\xa3\x01\n%ListResourceEnrollmentStatusesRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1auditmanager.googleapis.com/EnrollmentStatusScope\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\"\xa4\x01\n&ListResourceEnrollmentStatusesResponse\x12\\\n\x1cresource_enrollment_statuses\x18\x01 \x03(\x0b\x32\x36.google.cloud.auditmanager.v1.ResourceEnrollmentStatus\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x8b\x01\n\x17ListAuditReportsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'auditmanager.googleapis.com/AuditReport\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\x18ListAuditReportsResponse\x12\x45\n\raudit_reports\x18\x01 \x03(\x0b\x32).google.cloud.auditmanager.v1.AuditReportB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"V\n\x15GetAuditReportRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'auditmanager.googleapis.com/AuditReport\"\x84\x01\n\x13ListControlsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$auditmanager.googleapis.com/Standard\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\"r\n\x14ListControlsResponse\x12<\n\x08\x63ontrols\x18\x01 \x03(\x0b\x32%.google.cloud.auditmanager.v1.ControlB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xe1\x02\n\x18ReportGenerationProgress\x12@\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.auditmanager.v1.OperationStateB\x03\xe0\x41\x03\x12\x1b\n\x0e\x66\x61ilure_reason\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x1b\x65valuation_percent_complete\x18\x14 \x01(\x01\x12*\n\"report_generation_percent_complete\x18\x1e \x01(\x01\x12)\n!report_uploading_percent_complete\x18( \x01(\x01\x12#\n\x16\x64\x65stination_gcs_bucket\x18\x32 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x0c\x61udit_report\x18\x33 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'auditmanager.googleapis.com/AuditReport\"\x89\x03\n\nEnrollment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12R\n\x13\x64\x65stination_details\x18\x03 \x03(\x0b\x32\x30.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xe0\x41\x03:\x93\x02\xea\x41\x8f\x02\n&auditmanager.googleapis.com/Enrollment\x12@projects/{project}/locations/{location}/enrollments/{enrollment}\x12>folders/{folder}/locations/{location}/enrollments/{enrollment}\x12Jorganizations/{organization}/locations/{location}/enrollments/{enrollment}*\x0b\x65nrollments2\nenrollment\"\xce\x02\n\x10\x41uditScopeReport\x12\x1f\n\x15scope_report_contents\x18\x01 \x01(\x0cH\x00\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x08:\xf5\x01\xea\x41\xf1\x01\n,auditmanager.googleapis.com/AuditScopeReport\x12Nprojects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Lfolders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}*\x11\x61uditScopeReports2\x10\x61uditScopeReportB\x0e\n\x0c\x61udit_report\"\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\"\xa6\x06\n\x18ResourceEnrollmentStatus\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x41\n\nenrollment\x18\x02 \x01(\x0b\x32(.google.cloud.auditmanager.v1.EnrollmentB\x03\xe0\x41\x03\x12\x17\n\x08\x65nrolled\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12m\n\x10\x65nrollment_state\x18\x05 \x01(\x0e\x32N.google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentStateB\x03\xe0\x41\x03\"s\n\x17ResourceEnrollmentState\x12)\n%RESOURCE_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_ENROLLED\x10\x01\x12\r\n\tINHERITED\x10\x02\x12\x0c\n\x08\x45NROLLED\x10\x03:\x9b\x03\xea\x41\x97\x03\n4auditmanager.googleapis.com/ResourceEnrollmentStatus\x12]folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12_projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12iorganizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}*\x1aresourceEnrollmentStatuses2\x18resourceEnrollmentStatus\"\x89\x07\n\x0b\x41uditReport\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x0ereport_summary\x18\x02 \x01(\x0b\x32+.google.cloud.auditmanager.v1.ReportSummaryB\x03\xe0\x41\x03\x12\x19\n\x0coperation_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12R\n\x13\x64\x65stination_details\x18\x04 \x01(\x0b\x32\x30.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xe0\x41\x03\x12 \n\x13\x63ompliance_standard\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05scope\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x0f\x63ontrol_details\x18\x08 \x03(\x0b\x32,.google.cloud.auditmanager.v1.ControlDetailsB\x03\xe0\x41\x03\x12\x65\n\x17report_generation_state\x18\t \x01(\x0e\x32?.google.cloud.auditmanager.v1.AuditReport.ReportGenerationStateB\x03\xe0\x41\x03\x12!\n\x14\x63ompliance_framework\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08scope_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\"\x81\x01\n\x15ReportGenerationState\x12\'\n#REPORT_GENERATION_STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x13\n\x0fSUMMARY_UNKNOWN\x10\x04:\xd0\x01\xea\x41\xcc\x01\n\'auditmanager.googleapis.com/AuditReport\x12\x43projects/{project}/locations/{location}/auditReports/{audit_report}\x12\x41\x66olders/{folder}/locations/{location}/auditReports/{audit_report}*\x0c\x61uditReports2\x0b\x61uditReport\"8\n\rControlFamily\x12\x11\n\tfamily_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xfb\x04\n\x07\x43ontrol\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x06\x66\x61mily\x18\x03 \x01(\x0e\x32,.google.cloud.auditmanager.v1.Control.FamilyB\x03\xe0\x41\x03\x12H\n\x0e\x63ontrol_family\x18\n \x01(\x0b\x32+.google.cloud.auditmanager.v1.ControlFamilyB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13responsibility_type\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12.\n!google_responsibility_description\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x31\n$google_responsibility_implementation\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x30\n#customer_responsibility_description\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x33\n&customer_responsibility_implementation\x18\t \x01(\tB\x03\xe0\x41\x03\"\xb0\x01\n\x06\x46\x61mily\x12\x16\n\x12\x46\x41MILY_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41\x43\x10\x01\x12\x06\n\x02\x41T\x10\x02\x12\x06\n\x02\x41U\x10\x03\x12\x06\n\x02\x43\x41\x10\x04\x12\x06\n\x02\x43M\x10\x05\x12\x06\n\x02\x43P\x10\x06\x12\x06\n\x02IA\x10\x07\x12\x06\n\x02IR\x10\x08\x12\x06\n\x02MA\x10\t\x12\x06\n\x02MP\x10\n\x12\x06\n\x02PE\x10\x0b\x12\x06\n\x02PL\x10\x0c\x12\x06\n\x02PS\x10\r\x12\x06\n\x02RA\x10\x0e\x12\x06\n\x02SA\x10\x0f\x12\x06\n\x02SC\x10\x10\x12\x06\n\x02SI\x10\x11\x12\x06\n\x02SR\x10\x12\"=\n\x12\x44\x65stinationDetails\x12\x18\n\x0egcs_bucket_uri\x18\x01 \x01(\tH\x00\x42\r\n\x0b\x64\x65stination\"\x8f\x01\n\rReportSummary\x12\x13\n\x0btotal_count\x18\x01 \x01(\x05\x12\x17\n\x0f\x63ompliant_count\x18\x02 \x01(\x05\x12\x17\n\x0fviolation_count\x18\x03 \x01(\x05\x12\"\n\x1amanual_review_needed_count\x18\x04 \x01(\x05\x12\x13\n\x0b\x65rror_count\x18\x05 \x01(\x05\"\xe3\x01\n\x0e\x43ontrolDetails\x12\x36\n\x07\x63ontrol\x18\x01 \x01(\x0b\x32%.google.cloud.auditmanager.v1.Control\x12L\n\x10\x63ompliance_state\x18\x02 \x01(\x0e\x32-.google.cloud.auditmanager.v1.ComplianceStateB\x03\xe0\x41\x03\x12K\n\x16\x63ontrol_report_summary\x18\x03 \x01(\x0b\x32+.google.cloud.auditmanager.v1.ReportSummary*\xfb\x02\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bOPERATION_STATE_NOT_STARTED\x10\n\x12*\n&OPERATION_STATE_EVALUATION_IN_PROGRESS\x10\x14\x12#\n\x1fOPERATION_STATE_EVALUATION_DONE\x10\x15\x12:\n6OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS\x10\x1e\x12\x33\n/OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE\x10\x1f\x12/\n+OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS\x10(\x12\x18\n\x14OPERATION_STATE_DONE\x10\x32\x12\x1a\n\x16OPERATION_STATE_FAILED\x10<*\x8f\x01\n\x0f\x43omplianceState\x12 \n\x1c\x43OMPLIANCE_STATE_UNSPECIFIED\x10\x00\x12\r\n\tCOMPLIANT\x10\x01\x12\r\n\tVIOLATION\x10\x02\x12\x18\n\x14MANUAL_REVIEW_NEEDED\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x17\n\x13\x41UDIT_NOT_SUPPORTED\x10\x05\x32\xc0\x14\n\x0c\x41uditManager\x12\xb8\x02\n\x0e\x45nrollResource\x12\x33.google.cloud.auditmanager.v1.EnrollResourceRequest\x1a(.google.cloud.auditmanager.v1.Enrollment\"\xc6\x01\xda\x41\x12scope,destinations\x82\xd3\xe4\x93\x02\xaa\x01\"0/v1/{scope=folders/*/locations/*}:enrollResource:\x01*Z6\"1/v1/{scope=projects/*/locations/*}:enrollResource:\x01*Z;\"6/v1/{scope=organizations/*/locations/*}:enrollResource:\x01*\x12\xc2\x02\n\x18GenerateAuditScopeReport\x12=.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest\x1a..google.cloud.auditmanager.v1.AuditScopeReport\"\xb6\x01\xda\x41\'scope,compliance_standard,report_format\x82\xd3\xe4\x93\x02\x85\x01\"/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}Z?\x12=/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}ZE\x12\x43/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}\x12\xc4\x02\n\x1eListResourceEnrollmentStatuses\x12\x43.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest\x1a\x44.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse\"\x96\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x86\x01\x12\x43/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatusesZ?\x12=/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses\x12\xbe\x02\n\x0cListControls\x12\x31.google.cloud.auditmanager.v1.ListControlsRequest\x1a\x32.google.cloud.auditmanager.v1.ListControlsResponse\"\xc6\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb6\x01\x12=/v1/{parent=organizations/*/locations/*/standards/*}/controlsZ9\x12\x37/v1/{parent=folders/*/locations/*/standards/*}/controlsZ:\x12\x38/v1/{parent=projects/*/locations/*/standards/*}/controls\x1aO\xca\x41\x1b\x61uditmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x92\x06\n com.google.cloud.auditmanager.v1B\x0bV1mainProtoP\x01ZDcloud.google.com/go/auditmanager/apiv1/auditmanagerpb;auditmanagerpb\xaa\x02\x1cGoogle.Cloud.AuditManager.V1\xca\x02\x1cGoogle\\Cloud\\AuditManager\\V1\xea\x02\x1fGoogle::Cloud::AuditManager::V1\xea\x41S\n*auditmanager.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41\x65\n0auditmanager.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41\xe8\x01\n$auditmanager.googleapis.com/Standard\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-audit_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/cloud/auditmanager/v1/auditmanager.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/cloud/auditmanager/v1/auditmanager.rb deleted file mode 100644 index 66b9516a2b9a..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/cloud/auditmanager/v1/auditmanager.rb +++ /dev/null @@ -1,648 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AuditManager - module V1 - # Request message to subscribe the Audit Manager service for given resource. - # @!attribute [rw] scope - # @return [::String] - # Required. The resource to be enrolled to the audit manager. Scope format - # should be resource_type/resource_identifier Eg: - # projects/\\{project}/locations/\\{location}, - # folders/\\{folder}/locations/\\{location} - # organizations/\\{organization}/locations/\\{location} - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::AuditManager::V1::EnrollResourceRequest::EligibleDestination>] - # Required. List of destination among which customer can choose to upload - # their reports during the audit process. While enrolling at a - # organization/folder level, customer can choose Cloud storage bucket in any - # project. If the audit is triggered at project level using the service agent - # at organization/folder level, all the destination options associated with - # respective organization/folder level service agent will be available to - # auditing projects. - class EnrollResourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The destination details where the audit report must be uploaded. - # @!attribute [rw] eligible_gcs_bucket - # @return [::String] - # The Cloud Storage bucket location where the audit report and evidences - # can be uploaded during the `GenerateAuditReport` API call. - class EligibleDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Message for requesting audit scope report. - # @!attribute [rw] scope - # @return [::String] - # Required. Scope for which the AuditScopeReport is required. Must be of - # format resource_type/resource_identifier Eg: - # projects/\\{project}/locations/\\{location}, - # folders/\\{folder}/locations/\\{location} - # @!attribute [rw] compliance_standard - # @return [::String] - # Required. Compliance Standard against which the Scope Report must be - # generated. Eg: FEDRAMP_MODERATE - # @!attribute [rw] report_format - # @return [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest::AuditScopeReportFormat] - # Required. The format in which the Scope report bytes should be returned. - # @!attribute [rw] compliance_framework - # @return [::String] - # Required. Compliance framework against which the Scope Report must be - # generated. - class GenerateAuditScopeReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The options for the audit scope report format. - module AuditScopeReportFormat - # Unspecified. Invalid format. - AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0 - - # Audit Scope Report creation format is Open Document. - AUDIT_SCOPE_REPORT_FORMAT_ODF = 1 - end - end - - # Message for requesting the Audit Report. - # @!attribute [rw] gcs_uri - # @return [::String] - # Destination Cloud storage bucket where report and evidence must be - # uploaded. The Cloud storage bucket provided here must be selected among - # the buckets entered during the enrollment process. - # @!attribute [rw] scope - # @return [::String] - # Required. Scope for which the AuditScopeReport is required. Must be of - # format resource_type/resource_identifier Eg: - # projects/\\{project}/locations/\\{location}, - # folders/\\{folder}/locations/\\{location} - # @!attribute [rw] compliance_standard - # @return [::String] - # Required. Compliance Standard against which the Scope Report must be - # generated. Eg: FEDRAMP_MODERATE - # @!attribute [rw] report_format - # @return [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest::AuditReportFormat] - # Required. The format in which the audit report should be created. - # @!attribute [rw] compliance_framework - # @return [::String] - # Required. Compliance framework against which the Report must be generated. - class GenerateAuditReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The options for the audit report format. - module AuditReportFormat - # Unspecified. Invalid state. - AUDIT_REPORT_FORMAT_UNSPECIFIED = 0 - - # Audit Report creation format is Open Document. - AUDIT_REPORT_FORMAT_ODF = 1 - end - end - - # Message for getting the enrollment status of a resource. - # @!attribute [rw] name - # @return [::String] - # Required. Format - # folders/\\{folder}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, - # projects/\\{project}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}, - # organizations/\\{organization}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status} - class GetResourceEnrollmentStatusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for listing all the descendent resources under parent with - # enrollment. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent scope for which the list of resources with enrollments - # are required. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of resources to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - class ListResourceEnrollmentStatusesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with all the descendent resources with enrollment. - # @!attribute [rw] resource_enrollment_statuses - # @return [::Array<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>] - # The resources with their enrollment status. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The token to retrieve the next page of results. - class ListResourceEnrollmentStatusesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting to list the audit reports. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent scope for which to list the reports. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of resources to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - class ListAuditReportsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with all the audit reports. - # @!attribute [r] audit_reports - # @return [::Array<::Google::Cloud::AuditManager::V1::AuditReport>] - # Output only. The audit reports. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The token to retrieve the next page of results. - class ListAuditReportsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the overall audit report for an audit report name. - # @!attribute [rw] name - # @return [::String] - # Required. Format - # projects/\\{project}/locations/\\{location}/auditReports/\\{audit_report}, - # folders/\\{folder}/locations/\\{location}/auditReports/\\{audit_report} - class GetAuditReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting all the controls for a compliance standard. - # @!attribute [rw] parent - # @return [::String] - # Required. Format - # projects/\\{project}/locations/\\{location}/standards/\\{standard}, - # folders/\\{folder}/locations/\\{location}/standards/\\{standard} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of resources to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - class ListControlsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with all the controls for a compliance standard. - # @!attribute [r] controls - # @return [::Array<::Google::Cloud::AuditManager::V1::Control>] - # Output only. The controls for the compliance standard. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The token to retrieve the next page of results. - class ListControlsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ReportGenerationProgress` is part of - # {::Google::Longrunning::Operation google.longrunning.Operation} returned to the - # client for every `GetOperation` request. - # @!attribute [r] state - # @return [::Google::Cloud::AuditManager::V1::OperationState] - # Output only. The current state of execution for report generation. - # @!attribute [r] failure_reason - # @return [::String] - # Output only. States the reason of failure during the audit report - # generation process. This field is set only if the state attribute is - # OPERATION_STATE_FAILED. - # @!attribute [rw] evaluation_percent_complete - # @return [::Float] - # Shows the progress of the CESS service evaluation process. The progress is - # defined in terms of percentage complete and is being fetched from the CESS - # service. - # @!attribute [rw] report_generation_percent_complete - # @return [::Float] - # Shows the report generation progress of the CESS Result Processor Service. - # The // progress is defined in terms of percentage complete and is being - # fetched from the CESS service. If report_generation_in_progress is non zero - # then evaluation_percent_complete will be 100%. - # @!attribute [rw] report_uploading_percent_complete - # @return [::Float] - # Shows the report uploading progress of the CESS Result Processor Service. - # The progress is defined in terms of percentage complete and is being - # fetched from the CESS service. If report_uploading_in_progress is non zero - # then evaluation_percent_complete and report_generation_percent_complete - # will be 100%. - # @!attribute [r] destination_gcs_bucket - # @return [::String] - # Output only. The Cloud Storage bucket where the audit report will be - # uploaded once the evaluation process is completed. - # @!attribute [r] audit_report - # @return [::String] - # Output only. The name of the audit report. - class ReportGenerationProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The enrollment resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of this Enrollment, in the format of scope given in - # request. - # @!attribute [r] destination_details - # @return [::Array<::Google::Cloud::AuditManager::V1::DestinationDetails>] - # Output only. The locations where the generated reports can be uploaded. - class Enrollment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The audit scope report. - # @!attribute [rw] scope_report_contents - # @return [::String] - # The audit scope report content in byte format. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of this Audit Report, in the format of scope given in - # request. - class AuditScopeReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have been cancelled successfully - # have [Operation.error][] 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 - - # A resource with its enrollment status. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of this resource. - # @!attribute [r] enrollment - # @return [::Google::Cloud::AuditManager::V1::Enrollment] - # Output only. Enrollment which contains enrolled destination details for a - # resource - # @!attribute [r] enrolled - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Output only. Is resource enrolled. - # @!attribute [r] display_name - # @return [::String] - # Output only. Display name of the project/folder/organization. - # @!attribute [r] enrollment_state - # @return [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus::ResourceEnrollmentState] - # Output only. Enrollment state of the resource. - class ResourceEnrollmentStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The different enrollment states of a resource. - module ResourceEnrollmentState - # Unspecified. Invalid state. - RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0 - - # Not enrolled. - NOT_ENROLLED = 1 - - # Resource is not enrolled but the parent is enrolled. - INHERITED = 2 - - # Enrolled. - ENROLLED = 3 - end - end - - # An audit report. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of this Audit Report, in the format of scope given in - # request. - # @!attribute [r] report_summary - # @return [::Google::Cloud::AuditManager::V1::ReportSummary] - # Output only. Report summary with compliance, violation counts etc. - # @!attribute [r] operation_id - # @return [::String] - # Output only. ClientOperationId - # @!attribute [r] destination_details - # @return [::Google::Cloud::AuditManager::V1::DestinationDetails] - # Output only. The location where the generated report will be uploaded. - # @!attribute [r] compliance_standard - # @return [::String] - # Output only. Compliance Standard. - # @!attribute [r] scope - # @return [::String] - # Output only. The parent scope on which the report was generated. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation time of the audit report. - # @!attribute [r] control_details - # @return [::Array<::Google::Cloud::AuditManager::V1::ControlDetails>] - # Output only. The overall status of controls - # @!attribute [r] report_generation_state - # @return [::Google::Cloud::AuditManager::V1::AuditReport::ReportGenerationState] - # Output only. The state of Audit Report Generation. - # @!attribute [r] compliance_framework - # @return [::String] - # Output only. Compliance Framework of Audit Report - # @!attribute [r] scope_id - # @return [::String] - # Output only. The ID/ Number for the scope on which the audit report was - # generated. - class AuditReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The different states of the Audit Manager report generation. - module ReportGenerationState - # Unspecified. Invalid state. - REPORT_GENERATION_STATE_UNSPECIFIED = 0 - - # Audit report generation process is in progress, ie. operation state is - # neither OPERATION_STATE_DONE nor OPERATION_STATE_FAILED. - IN_PROGRESS = 1 - - # Audit report generation process is completed. Operation state is - # OPERATION_STATE_DONE. - COMPLETED = 2 - - # Audit report generation process has failed. Operation state is - # OPERATION_STATE_FAILED. - FAILED = 3 - - # Audit report generation process has completed. But report summary is - # unknown. This is valid for older reports. - SUMMARY_UNKNOWN = 4 - end - end - - # The regulatory family of the control. - # @!attribute [rw] family_id - # @return [::String] - # The ID of the regulatory control family. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the regulatory control family. - class ControlFamily - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A control. - # @!attribute [r] id - # @return [::String] - # Output only. The control identifier used to fetch the findings. This is - # same as the control report name. - # @!attribute [r] display_name - # @return [::String] - # Output only. Display name of the control. - # @!attribute [r] family - # @return [::Google::Cloud::AuditManager::V1::Control::Family] - # Output only. Group where the control belongs. E.g. Access Control. - # @!attribute [r] control_family - # @return [::Google::Cloud::AuditManager::V1::ControlFamily] - # Output only. Regulatory Family of the control E.g. Access Control - # @!attribute [r] description - # @return [::String] - # Output only. Regulatory control ask of the control - # @!attribute [r] responsibility_type - # @return [::String] - # Output only. The type of responsibility for implementing this control. It - # can be google, customer or shared. - # @!attribute [r] google_responsibility_description - # @return [::String] - # Output only. Description of the google responsibility for implementing this - # control. - # @!attribute [r] google_responsibility_implementation - # @return [::String] - # Output only. Implementation of the google responsibility for implementing - # this control. - # @!attribute [r] customer_responsibility_description - # @return [::String] - # Output only. Description of the customer responsibility for implementing - # this control. - # @!attribute [r] customer_responsibility_implementation - # @return [::String] - # Output only. Implementation of the customer responsibility for implementing - # this control. - class Control - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The family of the control. For example, Access Control. - module Family - # Unspecified. Invalid state. - FAMILY_UNSPECIFIED = 0 - - # Access Control - AC = 1 - - # Awareness and Training - AT = 2 - - # Audit and Accountability - AU = 3 - - # Certification, Accreditation and Security Assessments - CA = 4 - - # Configuration Management - CM = 5 - - # Contingency Planning - CP = 6 - - # Identification and Authentication - IA = 7 - - # Incident Response - IR = 8 - - # Maintenance - MA = 9 - - # Media Protection - MP = 10 - - # Physical and Environmental Protection - PE = 11 - - # Security Planning - PL = 12 - - # Personnel Security - PS = 13 - - # Risk Assessment - RA = 14 - - # System Services and Acquisition - SA = 15 - - # System and Communications Protection - SC = 16 - - # System and Information Integrity - SI = 17 - - # Supply Chain Risk Management - SR = 18 - end - end - - # The locations where the generated reports are saved. - # @!attribute [rw] gcs_bucket_uri - # @return [::String] - # The Cloud Storage bucket where the audit report is/will be uploaded. - class DestinationDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The additional information for an audit operation. - # @!attribute [rw] total_count - # @return [::Integer] - # Total number of checks. - # @!attribute [rw] compliant_count - # @return [::Integer] - # Number of compliant checks. - # @!attribute [rw] violation_count - # @return [::Integer] - # Number of checks with violations. - # @!attribute [rw] manual_review_needed_count - # @return [::Integer] - # Number of checks with "manual review needed" status. - # @!attribute [rw] error_count - # @return [::Integer] - # Number of checks that could not be performed due to errors. - class ReportSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The evaluation details for a control. - # @!attribute [rw] control - # @return [::Google::Cloud::AuditManager::V1::Control] - # The control for which the findings are being reported. - # @!attribute [r] compliance_state - # @return [::Google::Cloud::AuditManager::V1::ComplianceState] - # Output only. Overall status of the findings for the control. - # @!attribute [rw] control_report_summary - # @return [::Google::Cloud::AuditManager::V1::ReportSummary] - # Report summary with compliance, violation counts etc. - class ControlDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The different execution states of the Audit Manager service. - module OperationState - # Unspecified. Invalid state. - OPERATION_STATE_UNSPECIFIED = 0 - - # Audit report generation process has not started. - OPERATION_STATE_NOT_STARTED = 10 - - # Audit Manager is currently evaluating the workloads against specific - # standard. - OPERATION_STATE_EVALUATION_IN_PROGRESS = 20 - - # Audit Manager has completed Evaluation for the workload. - OPERATION_STATE_EVALUATION_DONE = 21 - - # Audit Manager is creating audit report from the evaluated data. - OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30 - - # Audit Manager has completed generation of the audit report. - OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31 - - # Audit Manager is uploading the audit report and evidences to the customer - # provided destination. - OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40 - - # Audit report generation process is completed. - OPERATION_STATE_DONE = 50 - - # Audit report generation process has failed. - OPERATION_STATE_FAILED = 60 - end - - # The compliance state after evaluation. - module ComplianceState - # Unspecified. Invalid state. - COMPLIANCE_STATE_UNSPECIFIED = 0 - - # Compliant. - COMPLIANT = 1 - - # Violation. - VIOLATION = 2 - - # MANUAL_REVIEW_NEEDED, requires manual review - MANUAL_REVIEW_NEEDED = 3 - - # Error while computing status. - ERROR = 4 - - # Cannot be audited - AUDIT_NOT_SUPPORTED = 5 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-audit_manager-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/Gemfile deleted file mode 100644 index 6a593b3a1f71..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-audit_manager-v1", path: "../" -else - gem "google-cloud-audit_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-audit_manager-v1/snippets/audit_manager/enroll_resource.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/enroll_resource.rb deleted file mode 100644 index f4e27d4d6644..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/enroll_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 auditmanager_v1_generated_AuditManager_EnrollResource_sync] -require "google/cloud/audit_manager/v1" - -## -# Snippet for the enroll_resource call in the AuditManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AuditManager::V1::AuditManager::Client#enroll_resource. -# -def enroll_resource - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AuditManager::V1::EnrollResourceRequest.new - - # Call the enroll_resource method. - result = client.enroll_resource request - - # The returned object is of type Google::Cloud::AuditManager::V1::Enrollment. - p result -end -# [END auditmanager_v1_generated_AuditManager_EnrollResource_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_report.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_report.rb deleted file mode 100644 index a66bbafb9561..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_report.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 auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] -require "google/cloud/audit_manager/v1" - -## -# Snippet for the generate_audit_report call in the AuditManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_report. -# -def generate_audit_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new - - # Call the generate_audit_report method. - result = client.generate_audit_report request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_scope_report.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_scope_report.rb deleted file mode 100644 index d672331d624b..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/generate_audit_scope_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 auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] -require "google/cloud/audit_manager/v1" - -## -# Snippet for the generate_audit_scope_report call in the AuditManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_scope_report. -# -def generate_audit_scope_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new - - # Call the generate_audit_scope_report method. - result = client.generate_audit_scope_report request - - # The returned object is of type Google::Cloud::AuditManager::V1::AuditScopeReport. - p result -end -# [END auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_audit_report.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_audit_report.rb deleted file mode 100644 index 4ae57d254882..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_audit_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 auditmanager_v1_generated_AuditManager_GetAuditReport_sync] -require "google/cloud/audit_manager/v1" - -## -# Snippet for the get_audit_report call in the AuditManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AuditManager::V1::AuditManager::Client#get_audit_report. -# -def get_audit_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AuditManager::V1::GetAuditReportRequest.new - - # Call the get_audit_report method. - result = client.get_audit_report request - - # The returned object is of type Google::Cloud::AuditManager::V1::AuditReport. - p result -end -# [END auditmanager_v1_generated_AuditManager_GetAuditReport_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_resource_enrollment_status.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_resource_enrollment_status.rb deleted file mode 100644 index cfffa28a2c18..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/get_resource_enrollment_status.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync] -require "google/cloud/audit_manager/v1" - -## -# Snippet for the get_resource_enrollment_status call in the AuditManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AuditManager::V1::AuditManager::Client#get_resource_enrollment_status. -# -def get_resource_enrollment_status - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new - - # Call the get_resource_enrollment_status method. - result = client.get_resource_enrollment_status request - - # The returned object is of type Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. - p result -end -# [END auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_audit_reports.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_audit_reports.rb deleted file mode 100644 index bdb156045e4a..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_audit_reports.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 auditmanager_v1_generated_AuditManager_ListAuditReports_sync] -require "google/cloud/audit_manager/v1" - -## -# Snippet for the list_audit_reports call in the AuditManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AuditManager::V1::AuditManager::Client#list_audit_reports. -# -def list_audit_reports - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AuditManager::V1::ListAuditReportsRequest.new - - # Call the list_audit_reports method. - result = client.list_audit_reports request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AuditManager::V1::AuditReport. - p item - end -end -# [END auditmanager_v1_generated_AuditManager_ListAuditReports_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_controls.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_controls.rb deleted file mode 100644 index 59e1306d9b01..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_controls.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 auditmanager_v1_generated_AuditManager_ListControls_sync] -require "google/cloud/audit_manager/v1" - -## -# Snippet for the list_controls call in the AuditManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AuditManager::V1::AuditManager::Client#list_controls. -# -def list_controls - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AuditManager::V1::ListControlsRequest.new - - # Call the list_controls method. - result = client.list_controls request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AuditManager::V1::Control. - p item - end -end -# [END auditmanager_v1_generated_AuditManager_ListControls_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_resource_enrollment_statuses.rb b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_resource_enrollment_statuses.rb deleted file mode 100644 index 592849c1dbf9..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/audit_manager/list_resource_enrollment_statuses.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 auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync] -require "google/cloud/audit_manager/v1" - -## -# Snippet for the list_resource_enrollment_statuses call in the AuditManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AuditManager::V1::AuditManager::Client#list_resource_enrollment_statuses. -# -def list_resource_enrollment_statuses - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AuditManager::V1::AuditManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.new - - # Call the list_resource_enrollment_statuses method. - result = client.list_resource_enrollment_statuses request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus. - p item - end -end -# [END auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync] diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/snippet_metadata_google.cloud.auditmanager.v1.json b/owl-bot-staging/google-cloud-audit_manager-v1/snippets/snippet_metadata_google.cloud.auditmanager.v1.json deleted file mode 100644 index bf885f16543b..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/snippets/snippet_metadata_google.cloud.auditmanager.v1.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-audit_manager-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.auditmanager.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "auditmanager_v1_generated_AuditManager_EnrollResource_sync", - "title": "Snippet for the enroll_resource call in the AuditManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#enroll_resource.", - "file": "audit_manager/enroll_resource.rb", - "language": "RUBY", - "client_method": { - "short_name": "enroll_resource", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#enroll_resource", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AuditManager::V1::EnrollResourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AuditManager::V1::Enrollment", - "client": { - "short_name": "AuditManager::Client", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" - }, - "method": { - "short_name": "EnrollResource", - "full_name": "google.cloud.auditmanager.v1.AuditManager.EnrollResource", - "service": { - "short_name": "AuditManager", - "full_name": "google.cloud.auditmanager.v1.AuditManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync", - "title": "Snippet for the generate_audit_scope_report call in the AuditManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_scope_report.", - "file": "audit_manager/generate_audit_scope_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_audit_scope_report", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_scope_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AuditManager::V1::AuditScopeReport", - "client": { - "short_name": "AuditManager::Client", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" - }, - "method": { - "short_name": "GenerateAuditScopeReport", - "full_name": "google.cloud.auditmanager.v1.AuditManager.GenerateAuditScopeReport", - "service": { - "short_name": "AuditManager", - "full_name": "google.cloud.auditmanager.v1.AuditManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync", - "title": "Snippet for the generate_audit_report call in the AuditManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_report.", - "file": "audit_manager/generate_audit_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_audit_report", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#generate_audit_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AuditManager::Client", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" - }, - "method": { - "short_name": "GenerateAuditReport", - "full_name": "google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport", - "service": { - "short_name": "AuditManager", - "full_name": "google.cloud.auditmanager.v1.AuditManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "auditmanager_v1_generated_AuditManager_ListAuditReports_sync", - "title": "Snippet for the list_audit_reports call in the AuditManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#list_audit_reports.", - "file": "audit_manager/list_audit_reports.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_audit_reports", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#list_audit_reports", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AuditManager::V1::ListAuditReportsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AuditManager::V1::ListAuditReportsResponse", - "client": { - "short_name": "AuditManager::Client", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" - }, - "method": { - "short_name": "ListAuditReports", - "full_name": "google.cloud.auditmanager.v1.AuditManager.ListAuditReports", - "service": { - "short_name": "AuditManager", - "full_name": "google.cloud.auditmanager.v1.AuditManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "auditmanager_v1_generated_AuditManager_GetAuditReport_sync", - "title": "Snippet for the get_audit_report call in the AuditManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#get_audit_report.", - "file": "audit_manager/get_audit_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_audit_report", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#get_audit_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AuditManager::V1::GetAuditReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AuditManager::V1::AuditReport", - "client": { - "short_name": "AuditManager::Client", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" - }, - "method": { - "short_name": "GetAuditReport", - "full_name": "google.cloud.auditmanager.v1.AuditManager.GetAuditReport", - "service": { - "short_name": "AuditManager", - "full_name": "google.cloud.auditmanager.v1.AuditManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync", - "title": "Snippet for the get_resource_enrollment_status call in the AuditManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#get_resource_enrollment_status.", - "file": "audit_manager/get_resource_enrollment_status.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_resource_enrollment_status", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#get_resource_enrollment_status", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus", - "client": { - "short_name": "AuditManager::Client", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" - }, - "method": { - "short_name": "GetResourceEnrollmentStatus", - "full_name": "google.cloud.auditmanager.v1.AuditManager.GetResourceEnrollmentStatus", - "service": { - "short_name": "AuditManager", - "full_name": "google.cloud.auditmanager.v1.AuditManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync", - "title": "Snippet for the list_resource_enrollment_statuses call in the AuditManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#list_resource_enrollment_statuses.", - "file": "audit_manager/list_resource_enrollment_statuses.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_resource_enrollment_statuses", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#list_resource_enrollment_statuses", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse", - "client": { - "short_name": "AuditManager::Client", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" - }, - "method": { - "short_name": "ListResourceEnrollmentStatuses", - "full_name": "google.cloud.auditmanager.v1.AuditManager.ListResourceEnrollmentStatuses", - "service": { - "short_name": "AuditManager", - "full_name": "google.cloud.auditmanager.v1.AuditManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "auditmanager_v1_generated_AuditManager_ListControls_sync", - "title": "Snippet for the list_controls call in the AuditManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AuditManager::V1::AuditManager::Client#list_controls.", - "file": "audit_manager/list_controls.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_controls", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client#list_controls", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AuditManager::V1::ListControlsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AuditManager::V1::ListControlsResponse", - "client": { - "short_name": "AuditManager::Client", - "full_name": "::Google::Cloud::AuditManager::V1::AuditManager::Client" - }, - "method": { - "short_name": "ListControls", - "full_name": "google.cloud.auditmanager.v1.AuditManager.ListControls", - "service": { - "short_name": "AuditManager", - "full_name": "google.cloud.auditmanager.v1.AuditManager" - } - } - }, - "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-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_operations_test.rb b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_operations_test.rb deleted file mode 100644 index 4a92e1e7ce47..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_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/auditmanager/v1/auditmanager_pb" -require "google/cloud/auditmanager/v1/auditmanager_services_pb" -require "google/cloud/audit_manager/v1/audit_manager" - -class ::Google::Cloud::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_paths_test.rb b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_paths_test.rb deleted file mode 100644 index d24e37ce9a27..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_paths_test.rb +++ /dev/null @@ -1,133 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/audit_manager/v1/audit_manager" - -class ::Google::Cloud::AuditManager::V1::AuditManager::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_audit_report_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.audit_report_path project: "value0", location: "value1", audit_report: "value2" - assert_equal "projects/value0/locations/value1/auditReports/value2", path - - path = client.audit_report_path folder: "value0", location: "value1", audit_report: "value2" - assert_equal "folders/value0/locations/value1/auditReports/value2", path - end - end - - def test_enrollment_status_scope_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.enrollment_status_scope_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - - path = client.enrollment_status_scope_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", 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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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_resource_enrollment_status_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.resource_enrollment_status_path folder: "value0", location: "value1", resource_enrollment_status: "value2" - assert_equal "folders/value0/locations/value1/resourceEnrollmentStatuses/value2", path - - path = client.resource_enrollment_status_path project: "value0", location: "value1", resource_enrollment_status: "value2" - assert_equal "projects/value0/locations/value1/resourceEnrollmentStatuses/value2", path - - path = client.resource_enrollment_status_path organization: "value0", location: "value1", resource_enrollment_status: "value2" - assert_equal "organizations/value0/locations/value1/resourceEnrollmentStatuses/value2", path - end - end - - def test_standard_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.standard_path project: "value0", location: "value1", standard: "value2" - assert_equal "projects/value0/locations/value1/standards/value2", path - - path = client.standard_path folder: "value0", location: "value1", standard: "value2" - assert_equal "folders/value0/locations/value1/standards/value2", path - - path = client.standard_path organization: "value0", location: "value1", standard: "value2" - assert_equal "organizations/value0/locations/value1/standards/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_rest_test.rb b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_rest_test.rb deleted file mode 100644 index 8441d2f424b9..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_rest_test.rb +++ /dev/null @@ -1,545 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/auditmanager/v1/auditmanager_pb" -require "google/cloud/audit_manager/v1/audit_manager/rest" - - -class ::Google::Cloud::AuditManager::V1::AuditManager::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_enroll_resource - # Create test objects. - client_result = ::Google::Cloud::AuditManager::V1::Enrollment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - destinations = [{}] - - enroll_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::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_enroll_resource_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enroll_resource_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.enroll_resource({ scope: scope, destinations: destinations }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.enroll_resource scope: scope, destinations: destinations do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.enroll_resource ::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new(scope: scope, destinations: destinations) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.enroll_resource({ scope: scope, destinations: destinations }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.enroll_resource(::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new(scope: scope, destinations: destinations), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enroll_resource_client_stub.call_count - end - end - end - - def test_generate_audit_scope_report - # Create test objects. - client_result = ::Google::Cloud::AuditManager::V1::AuditScopeReport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - compliance_standard = "hello world" - report_format = :AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED - compliance_framework = "hello world" - - generate_audit_scope_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::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_generate_audit_scope_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_audit_scope_report_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.generate_audit_scope_report({ scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.generate_audit_scope_report scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.generate_audit_scope_report ::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new(scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.generate_audit_scope_report({ scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.generate_audit_scope_report(::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new(scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_audit_scope_report_client_stub.call_count - end - end - end - - def test_generate_audit_report - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcs_uri = "hello world" - scope = "hello world" - compliance_standard = "hello world" - report_format = :AUDIT_REPORT_FORMAT_UNSPECIFIED - compliance_framework = "hello world" - - generate_audit_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::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_generate_audit_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_audit_report_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.generate_audit_report({ gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.generate_audit_report gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.generate_audit_report ::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new(gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.generate_audit_report({ gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.generate_audit_report(::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new(gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_audit_report_client_stub.call_count - end - end - end - - def test_list_audit_reports - # Create test objects. - client_result = ::Google::Cloud::AuditManager::V1::ListAuditReportsResponse.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_audit_reports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_list_audit_reports_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_audit_reports_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_audit_reports({ 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_audit_reports 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_audit_reports ::Google::Cloud::AuditManager::V1::ListAuditReportsRequest.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_audit_reports({ 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_audit_reports(::Google::Cloud::AuditManager::V1::ListAuditReportsRequest.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_audit_reports_client_stub.call_count - end - end - end - - def test_get_audit_report - # Create test objects. - client_result = ::Google::Cloud::AuditManager::V1::AuditReport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_audit_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::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_get_audit_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_audit_report_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_audit_report({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_audit_report name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_audit_report ::Google::Cloud::AuditManager::V1::GetAuditReportRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_audit_report({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_audit_report(::Google::Cloud::AuditManager::V1::GetAuditReportRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_audit_report_client_stub.call_count - end - end - end - - def test_get_resource_enrollment_status - # Create test objects. - client_result = ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_resource_enrollment_status_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_get_resource_enrollment_status_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_resource_enrollment_status_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_resource_enrollment_status({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_resource_enrollment_status name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_resource_enrollment_status ::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_resource_enrollment_status({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_resource_enrollment_status(::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_resource_enrollment_status_client_stub.call_count - end - end - end - - def test_list_resource_enrollment_statuses - # Create test objects. - client_result = ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse.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_enrollment_statuses_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_list_resource_enrollment_statuses_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_resource_enrollment_statuses_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_resource_enrollment_statuses({ 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_enrollment_statuses 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_enrollment_statuses ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.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_enrollment_statuses({ 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_enrollment_statuses(::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.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_enrollment_statuses_client_stub.call_count - end - end - end - - def test_list_controls - # Create test objects. - client_result = ::Google::Cloud::AuditManager::V1::ListControlsResponse.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_controls_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AuditManager::V1::AuditManager::Rest::ServiceStub.stub :transcode_list_controls_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_controls_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_controls({ 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_controls 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_controls ::Google::Cloud::AuditManager::V1::ListControlsRequest.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_controls({ 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_controls(::Google::Cloud::AuditManager::V1::ListControlsRequest.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_controls_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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_test.rb b/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_test.rb deleted file mode 100644 index 324684babba4..000000000000 --- a/owl-bot-staging/google-cloud-audit_manager-v1/test/google/cloud/audit_manager/v1/audit_manager_test.rb +++ /dev/null @@ -1,631 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/auditmanager/v1/auditmanager_pb" -require "google/cloud/audit_manager/v1/audit_manager" - -class ::Google::Cloud::AuditManager::V1::AuditManager::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_enroll_resource - # Create GRPC objects. - grpc_response = ::Google::Cloud::AuditManager::V1::Enrollment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - destinations = [{}] - - enroll_resource_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enroll_resource, name - assert_kind_of ::Google::Cloud::AuditManager::V1::EnrollResourceRequest, request - assert_equal "hello world", request["scope"] - assert_kind_of ::Google::Cloud::AuditManager::V1::EnrollResourceRequest::EligibleDestination, request["destinations"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, enroll_resource_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.enroll_resource({ scope: scope, destinations: destinations }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.enroll_resource scope: scope, destinations: destinations do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.enroll_resource ::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new(scope: scope, destinations: destinations) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.enroll_resource({ scope: scope, destinations: destinations }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.enroll_resource(::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new(scope: scope, destinations: destinations), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enroll_resource_client_stub.call_rpc_count - end - end - - def test_generate_audit_scope_report - # Create GRPC objects. - grpc_response = ::Google::Cloud::AuditManager::V1::AuditScopeReport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - compliance_standard = "hello world" - report_format = :AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED - compliance_framework = "hello world" - - generate_audit_scope_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_audit_scope_report, name - assert_kind_of ::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest, request - assert_equal "hello world", request["scope"] - assert_equal "hello world", request["compliance_standard"] - assert_equal :AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED, request["report_format"] - assert_equal "hello world", request["compliance_framework"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_audit_scope_report_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.generate_audit_scope_report({ scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.generate_audit_scope_report scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.generate_audit_scope_report ::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new(scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.generate_audit_scope_report({ scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.generate_audit_scope_report(::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest.new(scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_audit_scope_report_client_stub.call_rpc_count - end - end - - def test_generate_audit_report - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcs_uri = "hello world" - scope = "hello world" - compliance_standard = "hello world" - report_format = :AUDIT_REPORT_FORMAT_UNSPECIFIED - compliance_framework = "hello world" - - generate_audit_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_audit_report, name - assert_kind_of ::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest, request - assert_equal "hello world", request["gcs_uri"] - assert_equal :gcs_uri, request.destination - assert_equal "hello world", request["scope"] - assert_equal "hello world", request["compliance_standard"] - assert_equal :AUDIT_REPORT_FORMAT_UNSPECIFIED, request["report_format"] - assert_equal "hello world", request["compliance_framework"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_audit_report_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.generate_audit_report({ gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }) do |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.generate_audit_report gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework do |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.generate_audit_report ::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new(gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework) do |response, operation| - 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.generate_audit_report({ gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework }, grpc_options) do |response, operation| - 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.generate_audit_report(::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest.new(gcs_uri: gcs_uri, scope: scope, compliance_standard: compliance_standard, report_format: report_format, compliance_framework: compliance_framework), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_audit_report_client_stub.call_rpc_count - end - end - - def test_list_audit_reports - # Create GRPC objects. - grpc_response = ::Google::Cloud::AuditManager::V1::ListAuditReportsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_audit_reports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_audit_reports, name - assert_kind_of ::Google::Cloud::AuditManager::V1::ListAuditReportsRequest, 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_audit_reports_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_audit_reports({ parent: parent, page_size: page_size, page_token: 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_audit_reports parent: parent, page_size: page_size, page_token: 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_audit_reports ::Google::Cloud::AuditManager::V1::ListAuditReportsRequest.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_audit_reports({ 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_audit_reports(::Google::Cloud::AuditManager::V1::ListAuditReportsRequest.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_audit_reports_client_stub.call_rpc_count - end - end - - def test_get_audit_report - # Create GRPC objects. - grpc_response = ::Google::Cloud::AuditManager::V1::AuditReport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_audit_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_audit_report, name - assert_kind_of ::Google::Cloud::AuditManager::V1::GetAuditReportRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_audit_report_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_audit_report({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_audit_report name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_audit_report ::Google::Cloud::AuditManager::V1::GetAuditReportRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_audit_report({ 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_audit_report(::Google::Cloud::AuditManager::V1::GetAuditReportRequest.new(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_audit_report_client_stub.call_rpc_count - end - end - - def test_get_resource_enrollment_status - # Create GRPC objects. - grpc_response = ::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_enrollment_status_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_resource_enrollment_status, name - assert_kind_of ::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_resource_enrollment_status_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_resource_enrollment_status({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_resource_enrollment_status name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_resource_enrollment_status ::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.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_enrollment_status({ 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_enrollment_status(::Google::Cloud::AuditManager::V1::GetResourceEnrollmentStatusRequest.new(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_enrollment_status_client_stub.call_rpc_count - end - end - - def test_list_resource_enrollment_statuses - # Create GRPC objects. - grpc_response = ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_enrollment_statuses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_resource_enrollment_statuses, name - assert_kind_of ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest, 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_enrollment_statuses_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_resource_enrollment_statuses({ parent: parent, page_size: page_size, page_token: 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_enrollment_statuses parent: parent, page_size: page_size, page_token: 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_enrollment_statuses ::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.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_enrollment_statuses({ 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_enrollment_statuses(::Google::Cloud::AuditManager::V1::ListResourceEnrollmentStatusesRequest.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_enrollment_statuses_client_stub.call_rpc_count - end - end - - def test_list_controls - # Create GRPC objects. - grpc_response = ::Google::Cloud::AuditManager::V1::ListControlsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_controls_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_controls, name - assert_kind_of ::Google::Cloud::AuditManager::V1::ListControlsRequest, 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_controls_client_stub do - # Create client - c = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_controls({ parent: parent, page_size: page_size, page_token: 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_controls parent: parent, page_size: page_size, page_token: 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_controls ::Google::Cloud::AuditManager::V1::ListControlsRequest.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_controls({ 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_controls(::Google::Cloud::AuditManager::V1::ListControlsRequest.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_controls_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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AuditManager::V1::AuditManager::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::AuditManager::V1::AuditManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AuditManager::V1::AuditManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-audit_manager-v1/test/helper.rb b/owl-bot-staging/google-cloud-audit_manager-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-audit_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-automl-v1/.gitignore b/owl-bot-staging/google-cloud-automl-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json deleted file mode 100644 index d22539d020e5..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "api_id": "automl.googleapis.com", - "api_shortname": "automl", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest", - "distribution_name": "google-cloud-automl-v1", - "is_cloud": true, - "language": "ruby", - "name": "automl", - "name_pretty": "Cloud AutoML V1 API", - "product_documentation": "https://cloud.google.com/automl", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details.", - "ruby-cloud-env-prefix": "AUTOML", - "ruby-cloud-product-url": "https://cloud.google.com/automl", - "ruby-cloud-path-override": "auto_ml=automl", - "ruby-cloud-namespace-override": "AutoMl=AutoML;Automl=AutoML", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml b/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml deleted file mode 100644 index 622056ff5619..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-automl-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-automl-v1.rb" diff --git a/owl-bot-staging/google-cloud-automl-v1/.toys.rb b/owl-bot-staging/google-cloud-automl-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/.yardopts b/owl-bot-staging/google-cloud-automl-v1/.yardopts deleted file mode 100644 index cecfd779ab86..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud AutoML 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-automl-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md deleted file mode 100644 index 5381a147f986..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-automl-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-automl-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/automl/v1" - -client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/automl/v1" - -::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AutoML::V1::PredictionService::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-automl-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/automl/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AutoML::V1::PredictionService::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-automl-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-automl-v1/Gemfile b/owl-bot-staging/google-cloud-automl-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/LICENSE.md b/owl-bot-staging/google-cloud-automl-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/README.md b/owl-bot-staging/google-cloud-automl-v1/README.md deleted file mode 100644 index d0ac6cd9516e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud AutoML V1 API - -Train high-quality custom machine learning models with minimum effort and machine learning expertise. - -AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. - -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 AutoML V1 API. Most users should consider using -the main client gem, -[google-cloud-automl](https://rubygems.org/gems/google-cloud-automl). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-automl-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/automl.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/automl/v1" - -client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new -request = ::Google::Cloud::AutoML::V1::PredictRequest.new # (request fields as keyword arguments...) -response = client.predict request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/automl) -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/automl/v1" -require "logger" - -client = ::Google::Cloud::AutoML::V1::PredictionService::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-automl`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-automl-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-automl`. -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-automl-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-automl-v1/Rakefile b/owl-bot-staging/google-cloud-automl-v1/Rakefile deleted file mode 100644 index 9dd468f3830e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/Rakefile +++ /dev/null @@ -1,168 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-automl-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["AUTOML_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["AUTOML_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["AUTOML_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 AUTOML_TEST_PROJECT=test123 AUTOML_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/automl/v1/prediction_service/credentials" - ::Google::Cloud::AutoML::V1::PredictionService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["AUTOML_PROJECT"] = project - ENV["AUTOML_TEST_PROJECT"] = project - ENV["AUTOML_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-automl-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-automl-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-automl-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-automl-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-automl-v1" - header "google-cloud-automl-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-automl-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-automl-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-automl-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-automl-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-automl-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json deleted file mode 100644 index e3b4d840f3ac..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.automl.v1", - "libraryPackage": "::Google::Cloud::AutoML::V1", - "services": { - "PredictionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AutoML::V1::PredictionService::Client", - "rpcs": { - "Predict": { - "methods": [ - "predict" - ] - }, - "BatchPredict": { - "methods": [ - "batch_predict" - ] - } - } - } - } - }, - "AutoMl": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AutoML::V1::AutoML::Client", - "rpcs": { - "CreateDataset": { - "methods": [ - "create_dataset" - ] - }, - "GetDataset": { - "methods": [ - "get_dataset" - ] - }, - "ListDatasets": { - "methods": [ - "list_datasets" - ] - }, - "UpdateDataset": { - "methods": [ - "update_dataset" - ] - }, - "DeleteDataset": { - "methods": [ - "delete_dataset" - ] - }, - "ImportData": { - "methods": [ - "import_data" - ] - }, - "ExportData": { - "methods": [ - "export_data" - ] - }, - "GetAnnotationSpec": { - "methods": [ - "get_annotation_spec" - ] - }, - "CreateModel": { - "methods": [ - "create_model" - ] - }, - "GetModel": { - "methods": [ - "get_model" - ] - }, - "ListModels": { - "methods": [ - "list_models" - ] - }, - "DeleteModel": { - "methods": [ - "delete_model" - ] - }, - "UpdateModel": { - "methods": [ - "update_model" - ] - }, - "DeployModel": { - "methods": [ - "deploy_model" - ] - }, - "UndeployModel": { - "methods": [ - "undeploy_model" - ] - }, - "ExportModel": { - "methods": [ - "export_model" - ] - }, - "GetModelEvaluation": { - "methods": [ - "get_model_evaluation" - ] - }, - "ListModelEvaluations": { - "methods": [ - "list_model_evaluations" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec b/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec deleted file mode 100644 index d2f57a57231e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/automl/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-automl-v1" - gem.version = Google::Cloud::AutoML::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details." - gem.summary = "Train high-quality custom machine learning models with minimum effort and machine learning expertise." - 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-automl-v1/lib/google-cloud-automl-v1.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb deleted file mode 100644 index 0639f3bfe935..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-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/automl/v1" diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb deleted file mode 100644 index 70b770d6ce68..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/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/automl/v1/prediction_service" -require "google/cloud/automl/v1/automl" -require "google/cloud/automl/v1/version" - -module Google - module Cloud - module AutoML - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/automl/v1" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/automl/v1" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/automl/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb deleted file mode 100644 index 5429cd0a0e66..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/annotation_payload.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/classification_pb' -require 'google/cloud/automl/v1/detection_pb' -require 'google/cloud/automl/v1/text_extraction_pb' -require 'google/cloud/automl/v1/text_sentiment_pb' -require 'google/cloud/automl/v1/translation_pb' - - -descriptor_data = "\n/google/cloud/automl/v1/annotation_payload.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\x1a&google/cloud/automl/v1/detection.proto\x1a,google/cloud/automl/v1/text_extraction.proto\x1a+google/cloud/automl/v1/text_sentiment.proto\x1a(google/cloud/automl/v1/translation.proto\"\xd3\x03\n\x11\x41nnotationPayload\x12\x44\n\x0btranslation\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1.TranslationAnnotationH\x00\x12J\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x30.google.cloud.automl.v1.ClassificationAnnotationH\x00\x12X\n\x16image_object_detection\x18\x04 \x01(\x0b\x32\x36.google.cloud.automl.v1.ImageObjectDetectionAnnotationH\x00\x12K\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x30.google.cloud.automl.v1.TextExtractionAnnotationH\x00\x12I\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32/.google.cloud.automl.v1.TextSentimentAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - AnnotationPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.AnnotationPayload").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb deleted file mode 100644 index 1570c5e4ceeb..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/annotation_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n,google/cloud/automl/v1/annotation_spec.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - AnnotationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.AnnotationSpec").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb deleted file mode 100644 index 62e9c8a5a030..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.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/automl/v1/version" - -require "google/cloud/automl/v1/automl/credentials" -require "google/cloud/automl/v1/automl/paths" -require "google/cloud/automl/v1/automl/operations" -require "google/cloud/automl/v1/automl/client" -require "google/cloud/automl/v1/automl/rest" - -module Google - module Cloud - module AutoML - module V1 - ## - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/automl/v1/automl" - # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/automl/v1/automl/rest" - # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - module AutoML - end - end - end - end -end - -helper_path = ::File.join __dir__, "automl", "helpers.rb" -require "google/cloud/automl/v1/automl/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb deleted file mode 100644 index 7ecc77f69219..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb +++ /dev/null @@ -1,2351 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/automl/v1/service_pb" - -module Google - module Cloud - module AutoML - module V1 - module AutoML - ## - # Client for the AutoMl service. - # - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :auto_ml_stub - - ## - # Configure the AutoMl Client class. - # - # See {::Google::Cloud::AutoML::V1::AutoML::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutoMl clients - # ::Google::Cloud::AutoML::V1::AutoML::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", "AutoML", "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_dataset.timeout = 5.0 - - default_config.rpcs.get_dataset.timeout = 5.0 - default_config.rpcs.get_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_datasets.timeout = 5.0 - default_config.rpcs.list_datasets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_dataset.timeout = 5.0 - - default_config.rpcs.delete_dataset.timeout = 5.0 - default_config.rpcs.delete_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.import_data.timeout = 5.0 - - default_config.rpcs.export_data.timeout = 5.0 - - default_config.rpcs.get_annotation_spec.timeout = 5.0 - default_config.rpcs.get_annotation_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_model.timeout = 5.0 - - default_config.rpcs.get_model.timeout = 5.0 - default_config.rpcs.get_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_models.timeout = 5.0 - default_config.rpcs.list_models.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_model.timeout = 5.0 - default_config.rpcs.delete_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_model.timeout = 5.0 - - default_config.rpcs.deploy_model.timeout = 5.0 - - default_config.rpcs.undeploy_model.timeout = 5.0 - - default_config.rpcs.export_model.timeout = 5.0 - - default_config.rpcs.get_model_evaluation.timeout = 5.0 - default_config.rpcs.get_model_evaluation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_model_evaluations.timeout = 5.0 - default_config.rpcs.list_model_evaluations.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 AutoMl 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::AutoML::V1::AutoML::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 - @auto_ml_stub.universe_domain - end - - ## - # Create a new AutoMl client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutoMl 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/automl/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 - - @auto_ml_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AutoML::V1::AutoMl::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 - ) - - @auto_ml_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::AutoML::V1::AutoML::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @auto_ml_stub.logger - end - - # Service calls - - ## - # Creates a dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_dataset(parent: nil, dataset: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 create the dataset for. - # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] - # Required. The dataset 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/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateDatasetRequest - - # Converts hash and nil to 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :create_dataset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_dataset, request, 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 datasets in a project. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 from which to list datasets. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_datasets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_datasets, request, response, 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 dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_dataset(dataset: nil, update_mask: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] - # Required. The dataset which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - # p result - # - def update_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateDatasetRequest - - # Converts hash and nil to 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.dataset&.name - header_params["dataset.name"] = request.dataset.name - end - - request_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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_dataset, request, 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 dataset and all of its contents. - # Returns empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_dataset(name: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteDatasetRequest - - # Converts hash and nil to 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :delete_dataset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # {::Google::Cloud::AutoML::V1::InputConfig#params schema_inference_version} - # parameter must be explicitly set. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_data(name: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @param input_config [::Google::Cloud::AutoML::V1::InputConfig, ::Hash] - # Required. The desired input location and its domain specific semantics, - # if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ImportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :import_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_data(name: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset. - # @param output_config [::Google::Cloud::AutoML::V1::OutputConfig, ::Hash] - # Required. The desired output location. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 annotation spec. - # - # @overload get_annotation_spec(request, options = nil) - # Pass arguments to `get_annotation_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_annotation_spec(name: nil) - # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 annotation spec to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::AnnotationSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new - # - # # Call the get_annotation_spec method. - # result = client.get_annotation_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. - # p result - # - def get_annotation_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_annotation_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_annotation_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_annotation_spec, request, 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 model. - # Returns a Model in the {::Google::Longrunning::Operation#response response} - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_model(parent: nil, model: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 project where the model is being created. - # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] - # Required. The model 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/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateModelRequest - - # Converts hash and nil to 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :create_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_model, request, 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 models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project, from which to list the models. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_models.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_models, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_models, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_model(name: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model being deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteModelRequest - - # Converts hash and nil to 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :delete_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 model. - # - # @overload update_model(request, options = nil) - # Pass arguments to `update_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UpdateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_model(model: nil, update_mask: nil) - # Pass arguments to `update_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] - # Required. The model which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UpdateModelRequest.new - # - # # Call the update_model method. - # result = client.update_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Model. - # p result - # - def update_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateModelRequest - - # Converts hash and nil to 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.model&.name - header_params["model.name"] = request.model.name - end - - request_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_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_model, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload deploy_model(request, options = nil) - # Pass arguments to `deploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) - # Pass arguments to `deploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. 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 image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Classification. - # - # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. 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 name [::String] - # Required. Resource name of the model to deploy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeployModelRequest.new - # - # # Call the deploy_model method. - # result = client.deploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def deploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.deploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.deploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :deploy_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload undeploy_model(request, options = nil) - # Pass arguments to `undeploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UndeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undeploy_model(name: nil) - # Pass arguments to `undeploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model to undeploy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UndeployModelRequest.new - # - # # Call the undeploy_model method. - # result = client.undeploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undeploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UndeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undeploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undeploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :undeploy_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_model(request, options = nil) - # Pass arguments to `export_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ExportModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ExportModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_model(name: nil, output_config: nil) - # Pass arguments to `export_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 model to export. - # @param output_config [::Google::Cloud::AutoML::V1::ModelExportOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ExportModelRequest.new - # - # # Call the export_model method. - # result = client.export_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 model evaluation. - # - # @overload get_model_evaluation(request, options = nil) - # Pass arguments to `get_model_evaluation` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetModelEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model_evaluation(name: nil) - # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the model evaluation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::ModelEvaluation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new - # - # # Call the get_model_evaluation method. - # result = client.get_model_evaluation request - # - # # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. - # p result - # - def get_model_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_model_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_model_evaluation, request, 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 model evaluations. - # - # @overload list_model_evaluations(request, options = nil) - # Pass arguments to `list_model_evaluations` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @param filter [::String] - # Required. An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new - # - # # Call the list_model_evaluations method. - # result = client.list_model_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. - # p item - # end - # - def list_model_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_model_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_model_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, request, response, 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 AutoMl API. - # - # This class represents the configuration for AutoMl, - # providing control 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::AutoML::V1::AutoML::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_dataset to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1::AutoML::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::AutoML::V1::AutoML::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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 AutoMl API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `get_annotation_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_annotation_spec - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `update_model` - # @return [::Gapic::Config::Method] - # - attr_reader :update_model - ## - # RPC-specific configuration for `deploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :deploy_model - ## - # RPC-specific configuration for `undeploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :undeploy_model - ## - # RPC-specific configuration for `export_model` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model - ## - # RPC-specific configuration for `get_model_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model_evaluation - ## - # RPC-specific configuration for `list_model_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_model_evaluations - - # @private - def initialize parent_rpcs = nil - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec - @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model - @update_model = ::Gapic::Config::Method.new update_model_config - deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model - @deploy_model = ::Gapic::Config::Method.new deploy_model_config - undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model - @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config - export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model - @export_model = ::Gapic::Config::Method.new export_model_config - get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation - @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config - list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations - @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb deleted file mode 100644 index bafb75c5f4ab..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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 AutoML - module V1 - module AutoML - # Credentials for the AutoMl API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "AUTOML_CREDENTIALS", - "AUTOML_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "AUTOML_CREDENTIALS_JSON", - "AUTOML_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-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb deleted file mode 100644 index ec9bb5dce369..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb +++ /dev/null @@ -1,851 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 AutoML - module V1 - module AutoML - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AutoMl 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 AutoMl 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::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - 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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb deleted file mode 100644 index 7cfa7f1b018d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/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 AutoML - module V1 - module AutoML - # Path helper methods for the AutoMl API. - module Paths - ## - # Create a fully-qualified AnnotationSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param annotation_spec [String] - # - # @return [::String] - def annotation_spec_path project:, location:, dataset:, annotation_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, location:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}" - 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 Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - ## - # Create a fully-qualified ModelEvaluation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # @param model_evaluation [String] - # - # @return [::String] - def model_evaluation_path project:, location:, model:, model_evaluation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}/modelEvaluations/#{model_evaluation}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb deleted file mode 100644 index fe9133837455..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1/version" - -require "google/cloud/automl/v1/automl/credentials" -require "google/cloud/automl/v1/automl/paths" -require "google/cloud/automl/v1/automl/rest/operations" -require "google/cloud/automl/v1/automl/rest/client" - -module Google - module Cloud - module AutoML - module V1 - ## - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/automl/v1/automl/rest" - # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - module AutoML - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/automl/v1/automl/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb deleted file mode 100644 index 7198b59b74d4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb +++ /dev/null @@ -1,2182 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/automl/v1/service_pb" -require "google/cloud/automl/v1/automl/rest/service_stub" - -module Google - module Cloud - module AutoML - module V1 - module AutoML - module Rest - ## - # REST client for the AutoMl service. - # - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :auto_ml_stub - - ## - # Configure the AutoMl Client class. - # - # See {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutoMl clients - # ::Google::Cloud::AutoML::V1::AutoML::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", "AutoML", "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_dataset.timeout = 5.0 - - default_config.rpcs.get_dataset.timeout = 5.0 - default_config.rpcs.get_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_datasets.timeout = 5.0 - default_config.rpcs.list_datasets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_dataset.timeout = 5.0 - - default_config.rpcs.delete_dataset.timeout = 5.0 - default_config.rpcs.delete_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.import_data.timeout = 5.0 - - default_config.rpcs.export_data.timeout = 5.0 - - default_config.rpcs.get_annotation_spec.timeout = 5.0 - default_config.rpcs.get_annotation_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_model.timeout = 5.0 - - default_config.rpcs.get_model.timeout = 5.0 - default_config.rpcs.get_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_models.timeout = 5.0 - default_config.rpcs.list_models.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_model.timeout = 5.0 - default_config.rpcs.delete_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_model.timeout = 5.0 - - default_config.rpcs.deploy_model.timeout = 5.0 - - default_config.rpcs.undeploy_model.timeout = 5.0 - - default_config.rpcs.export_model.timeout = 5.0 - - default_config.rpcs.get_model_evaluation.timeout = 5.0 - default_config.rpcs.get_model_evaluation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_model_evaluations.timeout = 5.0 - default_config.rpcs.list_model_evaluations.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 AutoMl 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::AutoML::V1::AutoML::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 - @auto_ml_stub.universe_domain - end - - ## - # Create a new AutoMl REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutoMl 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::AutoML::V1::AutoML::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 - - @auto_ml_stub = ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @auto_ml_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::AutoML::V1::AutoML::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @auto_ml_stub.logger - end - - # Service calls - - ## - # Creates a dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_dataset(parent: nil, dataset: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 create the dataset for. - # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] - # Required. The dataset 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/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateDatasetRequest - - # Converts hash and nil to an 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.create_dataset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_dataset request, 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 datasets in a project. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 from which to list datasets. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_datasets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, 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 dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_dataset(dataset: nil, update_mask: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] - # Required. The dataset which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - # p result - # - def update_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateDatasetRequest - - # Converts hash and nil to an 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_dataset request, 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 dataset and all of its contents. - # Returns empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_dataset(name: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteDatasetRequest - - # Converts hash and nil to an 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.delete_dataset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # {::Google::Cloud::AutoML::V1::InputConfig#params schema_inference_version} - # parameter must be explicitly set. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_data(name: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @param input_config [::Google::Cloud::AutoML::V1::InputConfig, ::Hash] - # Required. The desired input location and its domain specific semantics, - # if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ImportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.import_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_data(name: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset. - # @param output_config [::Google::Cloud::AutoML::V1::OutputConfig, ::Hash] - # Required. The desired output location. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 annotation spec. - # - # @overload get_annotation_spec(request, options = nil) - # Pass arguments to `get_annotation_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_annotation_spec(name: nil) - # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 annotation spec to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::AnnotationSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new - # - # # Call the get_annotation_spec method. - # result = client.get_annotation_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. - # p result - # - def get_annotation_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_annotation_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_annotation_spec request, 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 model. - # Returns a Model in the {::Google::Longrunning::Operation#response response} - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_model(parent: nil, model: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 project where the model is being created. - # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] - # Required. The model 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/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateModelRequest - - # Converts hash and nil to an 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.create_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_model request, 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 models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project, from which to list the models. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_models AutoMl.ListModels} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_models.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_models request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, 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 model. - # Returns `google.protobuf.Empty` in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_model(name: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model being deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteModelRequest - - # Converts hash and nil to an 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.delete_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 model. - # - # @overload update_model(request, options = nil) - # Pass arguments to `update_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UpdateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_model(model: nil, update_mask: nil) - # Pass arguments to `update_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] - # Required. The model which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UpdateModelRequest.new - # - # # Call the update_model method. - # result = client.update_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Model. - # p result - # - def update_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateModelRequest - - # Converts hash and nil to an 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_model request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload deploy_model(request, options = nil) - # Pass arguments to `deploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) - # Pass arguments to `deploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. 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 image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Classification. - # - # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. 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 name [::String] - # Required. Resource name of the model to deploy. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeployModelRequest.new - # - # # Call the deploy_model method. - # result = client.deploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def deploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.deploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.deploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.deploy_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload undeploy_model(request, options = nil) - # Pass arguments to `undeploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UndeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undeploy_model(name: nil) - # Pass arguments to `undeploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model to undeploy. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UndeployModelRequest.new - # - # # Call the undeploy_model method. - # result = client.undeploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undeploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UndeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undeploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undeploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.undeploy_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_model(request, options = nil) - # Pass arguments to `export_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ExportModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ExportModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_model(name: nil, output_config: nil) - # Pass arguments to `export_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 model to export. - # @param output_config [::Google::Cloud::AutoML::V1::ModelExportOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ExportModelRequest.new - # - # # Call the export_model method. - # result = client.export_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 model evaluation. - # - # @overload get_model_evaluation(request, options = nil) - # Pass arguments to `get_model_evaluation` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetModelEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model_evaluation(name: nil) - # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the model evaluation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::ModelEvaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new - # - # # Call the get_model_evaluation method. - # result = client.get_model_evaluation request - # - # # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. - # p result - # - def get_model_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_model_evaluation request, 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 model evaluations. - # - # @overload list_model_evaluations(request, options = nil) - # Pass arguments to `list_model_evaluations` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @param filter [::String] - # Required. An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new - # - # # Call the list_model_evaluations method. - # result = client.list_model_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. - # p item - # end - # - def list_model_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_model_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_model_evaluations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, 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 AutoMl REST API. - # - # This class represents the configuration for AutoMl 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::AutoML::V1::AutoML::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_dataset to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 AutoMl API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `get_annotation_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_annotation_spec - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `update_model` - # @return [::Gapic::Config::Method] - # - attr_reader :update_model - ## - # RPC-specific configuration for `deploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :deploy_model - ## - # RPC-specific configuration for `undeploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :undeploy_model - ## - # RPC-specific configuration for `export_model` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model - ## - # RPC-specific configuration for `get_model_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model_evaluation - ## - # RPC-specific configuration for `list_model_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_model_evaluations - - # @private - def initialize parent_rpcs = nil - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec - @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model - @update_model = ::Gapic::Config::Method.new update_model_config - deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model - @deploy_model = ::Gapic::Config::Method.new deploy_model_config - undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model - @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config - export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model - @export_model = ::Gapic::Config::Method.new export_model_config - get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation - @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config - list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations - @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb deleted file mode 100644 index bbabcd436e9d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb +++ /dev/null @@ -1,1095 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 AutoML - module V1 - module AutoML - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AutoMl 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 AutoMl 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::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - ## - # 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 [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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::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 - call_metadata = @config.rpcs.wait_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::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: call_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.wait_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 - - ## - # 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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 - ## - # 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 - - ## - # @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 - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_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: "wait_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 - - ## - # @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 - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:wait", - 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-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb deleted file mode 100644 index 55b031b23a36..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +++ /dev/null @@ -1,1188 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1/service_pb" - -module Google - module Cloud - module AutoML - module V1 - module AutoML - module Rest - ## - # REST service stub for the AutoMl 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_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::CreateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # A result object deserialized from the server's reply - def get_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::Dataset.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_datasets REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::ListDatasetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::ListDatasetsResponse] - # A result object deserialized from the server's reply - def list_datasets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_datasets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.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_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UpdateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # A result object deserialized from the server's reply - def update_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::Dataset.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_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeleteDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ImportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ExportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_annotation_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::AnnotationSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] - # A result object deserialized from the server's reply - def get_annotation_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_annotation_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::AnnotationSpec.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_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::CreateModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # A result object deserialized from the server's reply - def get_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::Model.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_models REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::ListModelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::ListModelsResponse] - # A result object deserialized from the server's reply - def list_models request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_models", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::ListModelsResponse.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_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeleteModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UpdateModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # A result object deserialized from the server's reply - def update_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::Model.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the deploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeployModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def deploy_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "deploy_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the undeploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UndeployModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def undeploy_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undeploy_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ExportModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_model_evaluation REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::ModelEvaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] - # A result object deserialized from the server's reply - def get_model_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_model_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::ModelEvaluation.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_model_evaluations REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse] - # A result object deserialized from the server's reply - def list_model_evaluations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_model_evaluations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.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_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::CreateDatasetRequest] - # 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_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/datasets", - body: "dataset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_datasets REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_datasets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/datasets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UpdateDatasetRequest] - # 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_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{dataset.name}", - body: "dataset", - matches: [ - ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeleteDatasetRequest] - # 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_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ImportDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:importData", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ExportDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:exportData", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_annotation_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_annotation_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::CreateModelRequest] - # 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_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/models", - body: "model", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_models REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_models_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/models", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeleteModelRequest] - # 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_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UpdateModelRequest] - # 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_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{model.name}", - body: "model", - matches: [ - ["model.name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the deploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeployModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_deploy_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:deploy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undeploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UndeployModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undeploy_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:undeploy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ExportModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:export", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model_evaluation REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_model_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/modelEvaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_model_evaluations REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_model_evaluations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/modelEvaluations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb deleted file mode 100644 index 333190be5c39..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/classification.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/automl/v1/classification.proto\x12\x16google.cloud.automl.v1\")\n\x18\x43lassificationAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\"\x81\x07\n\x1f\x43lassificationEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12\x0e\n\x06\x61u_roc\x18\x06 \x01(\x02\x12\x10\n\x08log_loss\x18\x07 \x01(\x02\x12p\n\x18\x63onfidence_metrics_entry\x18\x03 \x03(\x0b\x32N.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry\x12\x61\n\x10\x63onfusion_matrix\x18\x04 \x01(\x0b\x32G.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x05 \x03(\t\x1a\xfc\x02\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x1a\n\x12position_threshold\x18\x0e \x01(\x05\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x1b\n\x13\x66\x61lse_positive_rate\x18\x08 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\x12\x12\n\nrecall_at1\x18\x05 \x01(\x02\x12\x15\n\rprecision_at1\x18\x06 \x01(\x02\x12\x1f\n\x17\x66\x61lse_positive_rate_at1\x18\t \x01(\x02\x12\x14\n\x0c\x66\x31_score_at1\x18\x07 \x01(\x02\x12\x1b\n\x13true_positive_count\x18\n \x01(\x03\x12\x1c\n\x14\x66\x61lse_positive_count\x18\x0b \x01(\x03\x12\x1c\n\x14\x66\x61lse_negative_count\x18\x0c \x01(\x03\x12\x1b\n\x13true_negative_count\x18\r \x01(\x03\x1a\xbb\x01\n\x0f\x43onfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x03(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x03(\t\x12X\n\x03row\x18\x02 \x03(\x0b\x32K.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row\x1a\x1c\n\x03Row\x12\x15\n\rexample_count\x18\x01 \x03(\x05*Y\n\x12\x43lassificationType\x12#\n\x1f\x43LASSIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTICLASS\x10\x01\x12\x0e\n\nMULTILABEL\x10\x02\x42\xb5\x01\n\x1a\x63om.google.cloud.automl.v1B\x13\x43lassificationProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - ClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationAnnotation").msgclass - ClassificationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics").msgclass - ClassificationEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry").msgclass - ClassificationEvaluationMetrics::ConfusionMatrix = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix").msgclass - ClassificationEvaluationMetrics::ConfusionMatrix::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row").msgclass - ClassificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb deleted file mode 100644 index 06071be6eda6..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/data_items.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/geometry_pb' -require 'google/cloud/automl/v1/io_pb' -require 'google/cloud/automl/v1/text_segment_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1/data_items.proto\x12\x16google.cloud.automl.v1\x1a%google/cloud/automl/v1/geometry.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a)google/cloud/automl/v1/text_segment.proto\"=\n\x05Image\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\x0cH\x00\x12\x15\n\rthumbnail_uri\x18\x04 \x01(\tB\x06\n\x04\x64\x61ta\"F\n\x0bTextSnippet\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x13\n\x0b\x63ontent_uri\x18\x04 \x01(\t\"\xea\x01\n\x12\x44ocumentDimensions\x12N\n\x04unit\x18\x01 \x01(\x0e\x32@.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit\x12\r\n\x05width\x18\x02 \x01(\x02\x12\x0e\n\x06height\x18\x03 \x01(\x02\"e\n\x15\x44ocumentDimensionUnit\x12\'\n#DOCUMENT_DIMENSION_UNIT_UNSPECIFIED\x10\x00\x12\x08\n\x04INCH\x10\x01\x12\x0e\n\nCENTIMETER\x10\x02\x12\t\n\x05POINT\x10\x03\"\xd6\x05\n\x08\x44ocument\x12\x41\n\x0cinput_config\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1.DocumentInputConfig\x12:\n\rdocument_text\x18\x02 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippet\x12\x37\n\x06layout\x18\x03 \x03(\x0b\x32\'.google.cloud.automl.v1.Document.Layout\x12G\n\x13\x64ocument_dimensions\x18\x04 \x01(\x0b\x32*.google.cloud.automl.v1.DocumentDimensions\x12\x12\n\npage_count\x18\x05 \x01(\x05\x1a\xb4\x03\n\x06Layout\x12\x39\n\x0ctext_segment\x18\x01 \x01(\x0b\x32#.google.cloud.automl.v1.TextSegment\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\x12;\n\rbounding_poly\x18\x03 \x01(\x0b\x32$.google.cloud.automl.v1.BoundingPoly\x12R\n\x11text_segment_type\x18\x04 \x01(\x0e\x32\x37.google.cloud.automl.v1.Document.Layout.TextSegmentType\"\xc8\x01\n\x0fTextSegmentType\x12!\n\x1dTEXT_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOKEN\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x0e\n\nFORM_FIELD\x10\x03\x12\x13\n\x0f\x46ORM_FIELD_NAME\x10\x04\x12\x17\n\x13\x46ORM_FIELD_CONTENTS\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x10\n\x0cTABLE_HEADER\x10\x07\x12\r\n\tTABLE_ROW\x10\x08\x12\x0e\n\nTABLE_CELL\x10\t\"\xbe\x01\n\x0e\x45xamplePayload\x12.\n\x05image\x18\x01 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ImageH\x00\x12;\n\x0ctext_snippet\x18\x02 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippetH\x00\x12\x34\n\x08\x64ocument\x18\x04 \x01(\x0b\x32 .google.cloud.automl.v1.DocumentH\x00\x42\t\n\x07payloadB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Image").msgclass - TextSnippet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSnippet").msgclass - DocumentDimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentDimensions").msgclass - DocumentDimensions::DocumentDimensionUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit").enummodule - Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document").msgclass - Document::Layout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document.Layout").msgclass - Document::Layout::TextSegmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document.Layout.TextSegmentType").enummodule - ExamplePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExamplePayload").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb deleted file mode 100644 index af1155523150..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/dataset.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1/image_pb' -require 'google/cloud/automl/v1/text_pb' -require 'google/cloud/automl/v1/translation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n$google/cloud/automl/v1/dataset.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a\"google/cloud/automl/v1/image.proto\x1a!google/cloud/automl/v1/text.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x07\n\x07\x44\x61taset\x12Z\n\x1ctranslation_dataset_metadata\x18\x17 \x01(\x0b\x32\x32.google.cloud.automl.v1.TranslationDatasetMetadataH\x00\x12k\n%image_classification_dataset_metadata\x18\x18 \x01(\x0b\x32:.google.cloud.automl.v1.ImageClassificationDatasetMetadataH\x00\x12i\n$text_classification_dataset_metadata\x18\x19 \x01(\x0b\x32\x39.google.cloud.automl.v1.TextClassificationDatasetMetadataH\x00\x12n\n\'image_object_detection_dataset_metadata\x18\x1a \x01(\x0b\x32;.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadataH\x00\x12\x61\n text_extraction_dataset_metadata\x18\x1c \x01(\x0b\x32\x35.google.cloud.automl.v1.TextExtractionDatasetMetadataH\x00\x12_\n\x1ftext_sentiment_dataset_metadata\x18\x1e \x01(\x0b\x32\x34.google.cloud.automl.v1.TextSentimentDatasetMetadataH\x00\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\x15\n\rexample_count\x18\x15 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12;\n\x06labels\x18\' \x03(\x0b\x32+.google.cloud.automl.v1.Dataset.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:^\xea\x41[\n\x1d\x61utoml.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}B\x12\n\x10\x64\x61taset_metadataB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Dataset").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb deleted file mode 100644 index 644c36eb549f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/detection.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/geometry_pb' - - -descriptor_data = "\n&google/cloud/automl/v1/detection.proto\x12\x16google.cloud.automl.v1\x1a%google/cloud/automl/v1/geometry.proto\"k\n\x1eImageObjectDetectionAnnotation\x12:\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32$.google.cloud.automl.v1.BoundingPoly\x12\r\n\x05score\x18\x02 \x01(\x02\"\xa9\x02\n\x17\x42oundingBoxMetricsEntry\x12\x15\n\riou_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16mean_average_precision\x18\x02 \x01(\x02\x12j\n\x1a\x63onfidence_metrics_entries\x18\x03 \x03(\x0b\x32\x46.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\"\xd1\x01\n%ImageObjectDetectionEvaluationMetrics\x12$\n\x1c\x65valuated_bounding_box_count\x18\x01 \x01(\x05\x12U\n\x1c\x62ounding_box_metrics_entries\x18\x02 \x03(\x0b\x32/.google.cloud.automl.v1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x03 \x01(\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - ImageObjectDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionAnnotation").msgclass - BoundingBoxMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingBoxMetricsEntry").msgclass - BoundingBoxMetricsEntry::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry").msgclass - ImageObjectDetectionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb deleted file mode 100644 index 7d463bb0a1e4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/geometry.proto - -require 'google/protobuf' - - -descriptor_data = "\n%google/cloud/automl/v1/geometry.proto\x12\x16google.cloud.automl.v1\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"U\n\x0c\x42oundingPoly\x12\x45\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32(.google.cloud.automl.v1.NormalizedVertexB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.NormalizedVertex").msgclass - BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingPoly").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb deleted file mode 100644 index 537e7a464184..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/image.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/automl/v1/classification_pb' - - -descriptor_data = "\n\"google/cloud/automl/v1/image.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a+google/cloud/automl/v1/classification.proto\"r\n\"ImageClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationTypeB\x03\xe0\x41\x02\"%\n#ImageObjectDetectionDatasetMetadata\"\xf7\x01\n ImageClassificationModelMetadata\x12\x1a\n\rbase_model_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12*\n\x1dtrain_budget_milli_node_hours\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12(\n\x1btrain_cost_milli_node_hours\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bstop_reason\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nmodel_type\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08node_qps\x18\r \x01(\x01\x42\x03\xe0\x41\x03\x12\x17\n\nnode_count\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03\"\xdc\x01\n!ImageObjectDetectionModelMetadata\x12\x17\n\nmodel_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nnode_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08node_qps\x18\x04 \x01(\x01\x42\x03\xe0\x41\x03\x12\x18\n\x0bstop_reason\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12*\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01\x12(\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\"E\n*ImageClassificationModelDeploymentMetadata\x12\x17\n\nnode_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x04\"F\n+ImageObjectDetectionModelDeploymentMetadata\x12\x17\n\nnode_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x04\x42\xac\x01\n\x1a\x63om.google.cloud.automl.v1B\nImageProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - ImageClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationDatasetMetadata").msgclass - ImageObjectDetectionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata").msgclass - ImageClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationModelMetadata").msgclass - ImageObjectDetectionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionModelMetadata").msgclass - ImageClassificationModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata").msgclass - ImageObjectDetectionModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb deleted file mode 100644 index 3eabed59230d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/io.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\x1fgoogle/cloud/automl/v1/io.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xc0\x01\n\x0bInputConfig\x12\x37\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSourceH\x00\x12?\n\x06params\x18\x02 \x03(\x0b\x32/.google.cloud.automl.v1.InputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"a\n\x17\x42\x61tchPredictInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSourceB\x03\xe0\x41\x02H\x00\x42\x08\n\x06source\"L\n\x13\x44ocumentInputConfig\x12\x35\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSource\"e\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"q\n\x18\x42\x61tchPredictOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"\x82\x02\n\x17ModelExportOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x12\x14\n\x0cmodel_format\x18\x04 \x01(\t\x12K\n\x06params\x18\x02 \x03(\x0b\x32;.google.cloud.automl.v1.ModelExportOutputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x64\x65stination\"$\n\tGcsSource\x12\x17\n\ninput_uris\x18\x01 \x03(\tB\x03\xe0\x41\x02\"0\n\x0eGcsDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.InputConfig").msgclass - BatchPredictInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictInputConfig").msgclass - DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentInputConfig").msgclass - OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.OutputConfig").msgclass - BatchPredictOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOutputConfig").msgclass - ModelExportOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ModelExportOutputConfig").msgclass - GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GcsSource").msgclass - GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GcsDestination").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb deleted file mode 100644 index 7a64d0c09e95..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/model_evaluation.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1/classification_pb' -require 'google/cloud/automl/v1/detection_pb' -require 'google/cloud/automl/v1/text_extraction_pb' -require 'google/cloud/automl/v1/text_sentiment_pb' -require 'google/cloud/automl/v1/translation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/automl/v1/model_evaluation.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a+google/cloud/automl/v1/classification.proto\x1a&google/cloud/automl/v1/detection.proto\x1a,google/cloud/automl/v1/text_extraction.proto\x1a+google/cloud/automl/v1/text_sentiment.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x06\n\x0fModelEvaluation\x12\x64\n!classification_evaluation_metrics\x18\x08 \x01(\x0b\x32\x37.google.cloud.automl.v1.ClassificationEvaluationMetricsH\x00\x12^\n\x1etranslation_evaluation_metrics\x18\t \x01(\x0b\x32\x34.google.cloud.automl.v1.TranslationEvaluationMetricsH\x00\x12r\n)image_object_detection_evaluation_metrics\x18\x0c \x01(\x0b\x32=.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsH\x00\x12\x63\n!text_sentiment_evaluation_metrics\x18\x0b \x01(\x0b\x32\x36.google.cloud.automl.v1.TextSentimentEvaluationMetricsH\x00\x12\x65\n\"text_extraction_evaluation_metrics\x18\r \x01(\x0b\x32\x37.google.cloud.automl.v1.TextExtractionEvaluationMetricsH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x61nnotation_spec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0f \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x17\x65valuated_example_count\x18\x06 \x01(\x05:\x87\x01\xea\x41\x83\x01\n%automl.googleapis.com/ModelEvaluation\x12Zprojects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}B\t\n\x07metricsB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - ModelEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ModelEvaluation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb deleted file mode 100644 index 813290824876..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/model.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1/image_pb' -require 'google/cloud/automl/v1/text_pb' -require 'google/cloud/automl/v1/translation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\"google/cloud/automl/v1/model.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a\"google/cloud/automl/v1/image.proto\x1a!google/cloud/automl/v1/text.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf1\x08\n\x05Model\x12V\n\x1atranslation_model_metadata\x18\x0f \x01(\x0b\x32\x30.google.cloud.automl.v1.TranslationModelMetadataH\x00\x12g\n#image_classification_model_metadata\x18\r \x01(\x0b\x32\x38.google.cloud.automl.v1.ImageClassificationModelMetadataH\x00\x12\x65\n\"text_classification_model_metadata\x18\x0e \x01(\x0b\x32\x37.google.cloud.automl.v1.TextClassificationModelMetadataH\x00\x12j\n%image_object_detection_model_metadata\x18\x14 \x01(\x0b\x32\x39.google.cloud.automl.v1.ImageObjectDetectionModelMetadataH\x00\x12]\n\x1etext_extraction_model_metadata\x18\x13 \x01(\x0b\x32\x33.google.cloud.automl.v1.TextExtractionModelMetadataH\x00\x12[\n\x1dtext_sentiment_model_metadata\x18\x16 \x01(\x0b\x32\x32.google.cloud.automl.v1.TextSentimentModelMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12G\n\x10\x64\x65ployment_state\x18\x08 \x01(\x0e\x32-.google.cloud.automl.v1.Model.DeploymentState\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12\x39\n\x06labels\x18\" \x03(\x0b\x32).google.cloud.automl.v1.Model.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0e\n\nUNDEPLOYED\x10\x02:X\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\x10\n\x0emodel_metadataB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Model").msgclass - Model::DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Model.DeploymentState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb deleted file mode 100644 index f253d09dfae0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/operations.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/io_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1/operations.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xc9\x07\n\x11OperationMetadata\x12I\n\x0e\x64\x65lete_details\x18\x08 \x01(\x0b\x32/.google.cloud.automl.v1.DeleteOperationMetadataH\x00\x12T\n\x14\x64\x65ploy_model_details\x18\x18 \x01(\x0b\x32\x34.google.cloud.automl.v1.DeployModelOperationMetadataH\x00\x12X\n\x16undeploy_model_details\x18\x19 \x01(\x0b\x32\x36.google.cloud.automl.v1.UndeployModelOperationMetadataH\x00\x12T\n\x14\x63reate_model_details\x18\n \x01(\x0b\x32\x34.google.cloud.automl.v1.CreateModelOperationMetadataH\x00\x12X\n\x16\x63reate_dataset_details\x18\x1e \x01(\x0b\x32\x36.google.cloud.automl.v1.CreateDatasetOperationMetadataH\x00\x12R\n\x13import_data_details\x18\x0f \x01(\x0b\x32\x33.google.cloud.automl.v1.ImportDataOperationMetadataH\x00\x12V\n\x15\x62\x61tch_predict_details\x18\x10 \x01(\x0b\x32\x35.google.cloud.automl.v1.BatchPredictOperationMetadataH\x00\x12R\n\x13\x65xport_data_details\x18\x15 \x01(\x0b\x32\x33.google.cloud.automl.v1.ExportDataOperationMetadataH\x00\x12T\n\x14\x65xport_model_details\x18\x16 \x01(\x0b\x32\x34.google.cloud.automl.v1.ExportModelOperationMetadataH\x00\x12\x18\n\x10progress_percent\x18\r \x01(\x05\x12,\n\x10partial_failures\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x64\x65tails\"\x19\n\x17\x44\x65leteOperationMetadata\"\x1e\n\x1c\x44\x65ployModelOperationMetadata\" \n\x1eUndeployModelOperationMetadata\" \n\x1e\x43reateDatasetOperationMetadata\"\x1e\n\x1c\x43reateModelOperationMetadata\"\x1d\n\x1bImportDataOperationMetadata\"\xc7\x01\n\x1b\x45xportDataOperationMetadata\x12]\n\x0boutput_info\x18\x01 \x01(\x0b\x32H.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo\x1aI\n\x14\x45xportDataOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\x96\x02\n\x1d\x42\x61tchPredictOperationMetadata\x12\x45\n\x0cinput_config\x18\x01 \x01(\x0b\x32/.google.cloud.automl.v1.BatchPredictInputConfig\x12\x61\n\x0boutput_info\x18\x02 \x01(\x0b\x32L.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo\x1aK\n\x16\x42\x61tchPredictOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xb6\x01\n\x1c\x45xportModelOperationMetadata\x12_\n\x0boutput_info\x18\x02 \x01(\x0b\x32J.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo\x1a\x35\n\x15\x45xportModelOutputInfo\x12\x1c\n\x14gcs_output_directory\x18\x01 \x01(\tB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.OperationMetadata").msgclass - DeleteOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteOperationMetadata").msgclass - DeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeployModelOperationMetadata").msgclass - UndeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UndeployModelOperationMetadata").msgclass - CreateDatasetOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateDatasetOperationMetadata").msgclass - CreateModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateModelOperationMetadata").msgclass - ImportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImportDataOperationMetadata").msgclass - ExportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataOperationMetadata").msgclass - ExportDataOperationMetadata::ExportDataOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo").msgclass - BatchPredictOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOperationMetadata").msgclass - BatchPredictOperationMetadata::BatchPredictOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo").msgclass - ExportModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelOperationMetadata").msgclass - ExportModelOperationMetadata::ExportModelOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb deleted file mode 100644 index 6c5045916cb7..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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/automl/v1/version" - -require "google/cloud/automl/v1/prediction_service/credentials" -require "google/cloud/automl/v1/prediction_service/paths" -require "google/cloud/automl/v1/prediction_service/operations" -require "google/cloud/automl/v1/prediction_service/client" -require "google/cloud/automl/v1/prediction_service/rest" - -module Google - module Cloud - module AutoML - module V1 - ## - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/automl/v1/prediction_service" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/automl/v1/prediction_service/rest" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - module PredictionService - end - end - end - end -end - -helper_path = ::File.join __dir__, "prediction_service", "helpers.rb" -require "google/cloud/automl/v1/prediction_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb deleted file mode 100644 index 6b3f20499814..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb +++ /dev/null @@ -1,770 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/automl/v1/prediction_service_pb" - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - ## - # Client for the PredictionService service. - # - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :prediction_service_stub - - ## - # Configure the PredictionService Client class. - # - # See {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PredictionService clients - # ::Google::Cloud::AutoML::V1::PredictionService::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", "AutoML", "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.predict.timeout = 60.0 - - default_config.rpcs.batch_predict.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService 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::AutoML::V1::PredictionService::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 - @prediction_service_stub.universe_domain - end - - ## - # Create a new PredictionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PredictionService 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/automl/v1/prediction_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 - - @prediction_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AutoML::V1::PredictionService::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 - ) - - @prediction_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::AutoML::V1::PredictionService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @prediction_service_stub.logger - end - - # Service calls - - ## - # Perform an online prediction. The prediction result is directly - # returned in the response. - # Available for following ML scenarios, and their expected request payloads: - # - # AutoML Vision Classification - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Vision Object Detection - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Natural Language Classification - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Natural Language Entity Extraction - # - # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document - # in .PDF, .TIF or .TIFF format with size upto 20MB. - # - # AutoML Natural Language Sentiment Analysis - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Translation - # - # * A TextSnippet up to 25,000 characters, UTF-8 encoded. - # - # AutoML Tables - # - # * A row with column values matching - # the columns of the model, up to 5MB. Not available for FORECASTING - # `prediction_type`. - # - # @overload predict(request, options = nil) - # Pass arguments to `predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1::PredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::PredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload predict(name: nil, payload: nil, params: nil) - # Pass arguments to `predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model requested to serve the prediction. - # @param payload [::Google::Cloud::AutoML::V1::ExamplePayload, ::Hash] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned. The default is 100. The - # number of returned bounding boxes might be limited by the server. - # - # AutoML Tables - # - # `feature_importance` - # : (boolean) Whether - # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] - # is populated in the returned list of - # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] - # objects. The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::PredictResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::PredictResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::PredictionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::PredictRequest.new - # - # # Call the predict method. - # result = client.predict request - # - # # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. - # p result - # - def predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::PredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.predict.timeout, - metadata: metadata, - retry_policy: @config.rpcs.predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.call_rpc :predict, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1::PredictionService::Client#predict Predict}, batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via GetOperation - # method. Once the operation is done, {::Google::Cloud::AutoML::V1::BatchPredictResult BatchPredictResult} is returned in - # the {::Google::Longrunning::Operation#response response} field. - # Available for following ML scenarios: - # - # * AutoML Vision Classification - # * AutoML Vision Object Detection - # * AutoML Video Intelligence Classification - # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification - # * AutoML Natural Language Entity Extraction - # * AutoML Natural Language Sentiment Analysis - # * AutoML Tables - # - # @overload batch_predict(request, options = nil) - # Pass arguments to `batch_predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1::BatchPredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_predict(name: nil, input_config: nil, output_config: nil, params: nil) - # Pass arguments to `batch_predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model requested to serve the batch prediction. - # @param input_config [::Google::Cloud::AutoML::V1::BatchPredictInputConfig, ::Hash] - # Required. The input configuration for batch prediction. - # @param output_config [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig, ::Hash] - # Required. The Configuration specifying where output predictions should - # be written. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # AutoML Natural Language Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # AutoML Video Intelligence Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # `segment_classification` - # : (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is true. - # - # `shot_classification` - # : (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # The default is false. - # - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. - # - # `1s_interval_classification` - # : (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. The default is false. - # - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # - # AutoML Video Intelligence Object Tracking - # - # `score_threshold` - # : (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # - # `min_bounding_box_size` - # : (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size are - # returned. Value in 0 to 1 range. Default is 0. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::PredictionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::BatchPredictRequest.new - # - # # Call the batch_predict method. - # result = client.batch_predict request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::BatchPredictRequest - - # Converts hash and nil to 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_predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_predict.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.call_rpc :batch_predict, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 PredictionService API. - # - # This class represents the configuration for PredictionService, - # providing control 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::AutoML::V1::PredictionService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # predict to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::AutoML::V1::PredictionService::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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 PredictionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `predict` - # @return [::Gapic::Config::Method] - # - attr_reader :predict - ## - # RPC-specific configuration for `batch_predict` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_predict - - # @private - def initialize parent_rpcs = nil - predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict - @predict = ::Gapic::Config::Method.new predict_config - batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict - @batch_predict = ::Gapic::Config::Method.new batch_predict_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb deleted file mode 100644 index 4fe31b05d81c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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 AutoML - module V1 - module PredictionService - # Credentials for the PredictionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "AUTOML_CREDENTIALS", - "AUTOML_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "AUTOML_CREDENTIALS_JSON", - "AUTOML_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-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb deleted file mode 100644 index d1c4f5788ef3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb +++ /dev/null @@ -1,851 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 AutoML - module V1 - module PredictionService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PredictionService 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 PredictionService 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::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - 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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb deleted file mode 100644 index b529a1fcf51f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - # Path helper methods for the PredictionService API. - module Paths - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb deleted file mode 100644 index 566a8b946d44..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_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/automl/v1/version" - -require "google/cloud/automl/v1/prediction_service/credentials" -require "google/cloud/automl/v1/prediction_service/paths" -require "google/cloud/automl/v1/prediction_service/rest/operations" -require "google/cloud/automl/v1/prediction_service/rest/client" - -module Google - module Cloud - module AutoML - module V1 - ## - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/automl/v1/prediction_service/rest" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - module PredictionService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/automl/v1/prediction_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb deleted file mode 100644 index e9f9264051f9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +++ /dev/null @@ -1,713 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/automl/v1/prediction_service_pb" -require "google/cloud/automl/v1/prediction_service/rest/service_stub" - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - module Rest - ## - # REST client for the PredictionService service. - # - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :prediction_service_stub - - ## - # Configure the PredictionService Client class. - # - # See {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PredictionService clients - # ::Google::Cloud::AutoML::V1::PredictionService::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", "AutoML", "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.predict.timeout = 60.0 - - default_config.rpcs.batch_predict.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService 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::AutoML::V1::PredictionService::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 - @prediction_service_stub.universe_domain - end - - ## - # Create a new PredictionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PredictionService 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::AutoML::V1::PredictionService::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 - - @prediction_service_stub = ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @prediction_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::AutoML::V1::PredictionService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @prediction_service_stub.logger - end - - # Service calls - - ## - # Perform an online prediction. The prediction result is directly - # returned in the response. - # Available for following ML scenarios, and their expected request payloads: - # - # AutoML Vision Classification - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Vision Object Detection - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Natural Language Classification - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Natural Language Entity Extraction - # - # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document - # in .PDF, .TIF or .TIFF format with size upto 20MB. - # - # AutoML Natural Language Sentiment Analysis - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Translation - # - # * A TextSnippet up to 25,000 characters, UTF-8 encoded. - # - # AutoML Tables - # - # * A row with column values matching - # the columns of the model, up to 5MB. Not available for FORECASTING - # `prediction_type`. - # - # @overload predict(request, options = nil) - # Pass arguments to `predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1::PredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::PredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload predict(name: nil, payload: nil, params: nil) - # Pass arguments to `predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model requested to serve the prediction. - # @param payload [::Google::Cloud::AutoML::V1::ExamplePayload, ::Hash] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned. The default is 100. The - # number of returned bounding boxes might be limited by the server. - # - # AutoML Tables - # - # `feature_importance` - # : (boolean) Whether - # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] - # is populated in the returned list of - # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] - # objects. The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::PredictResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::PredictResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::PredictRequest.new - # - # # Call the predict method. - # result = client.predict request - # - # # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. - # p result - # - def predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::PredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.predict.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.predict request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client#predict Predict}, batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via GetOperation - # method. Once the operation is done, {::Google::Cloud::AutoML::V1::BatchPredictResult BatchPredictResult} is returned in - # the {::Google::Longrunning::Operation#response response} field. - # Available for following ML scenarios: - # - # * AutoML Vision Classification - # * AutoML Vision Object Detection - # * AutoML Video Intelligence Classification - # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification - # * AutoML Natural Language Entity Extraction - # * AutoML Natural Language Sentiment Analysis - # * AutoML Tables - # - # @overload batch_predict(request, options = nil) - # Pass arguments to `batch_predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1::BatchPredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_predict(name: nil, input_config: nil, output_config: nil, params: nil) - # Pass arguments to `batch_predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model requested to serve the batch prediction. - # @param input_config [::Google::Cloud::AutoML::V1::BatchPredictInputConfig, ::Hash] - # Required. The input configuration for batch prediction. - # @param output_config [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig, ::Hash] - # Required. The Configuration specifying where output predictions should - # be written. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # AutoML Natural Language Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # AutoML Video Intelligence Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # `segment_classification` - # : (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is true. - # - # `shot_classification` - # : (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # The default is false. - # - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. - # - # `1s_interval_classification` - # : (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. The default is false. - # - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # - # AutoML Video Intelligence Object Tracking - # - # `score_threshold` - # : (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # - # `min_bounding_box_size` - # : (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size are - # returned. Value in 0 to 1 range. Default is 0. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::BatchPredictRequest.new - # - # # Call the batch_predict method. - # result = client.batch_predict request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::BatchPredictRequest - - # Converts hash and nil to an 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_predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_predict.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.batch_predict request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 PredictionService REST API. - # - # This class represents the configuration for PredictionService 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::AutoML::V1::PredictionService::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 - # # predict to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 PredictionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `predict` - # @return [::Gapic::Config::Method] - # - attr_reader :predict - ## - # RPC-specific configuration for `batch_predict` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_predict - - # @private - def initialize parent_rpcs = nil - predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict - @predict = ::Gapic::Config::Method.new predict_config - batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict - @batch_predict = ::Gapic::Config::Method.new batch_predict_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb deleted file mode 100644 index 9d66ea3048ba..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +++ /dev/null @@ -1,1095 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 AutoML - module V1 - module PredictionService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PredictionService 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 PredictionService 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::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - ## - # 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 [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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::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 - call_metadata = @config.rpcs.wait_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::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: call_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.wait_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 - - ## - # 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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 - ## - # 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 - - ## - # @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 - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_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: "wait_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 - - ## - # @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 - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:wait", - 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-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb deleted file mode 100644 index ed831fb87e44..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/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/cloud/automl/v1/prediction_service_pb" - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - module Rest - ## - # REST service stub for the PredictionService 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 predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::PredictRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::PredictResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::PredictResponse] - # A result object deserialized from the server's reply - def predict request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_predict_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "predict", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::PredictResponse.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_predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::BatchPredictRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_predict request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_predict_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_predict", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::PredictRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_predict_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:predict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::BatchPredictRequest] - # 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_predict_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:batchPredict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb deleted file mode 100644 index bd25b445ea06..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/prediction_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/automl/v1/annotation_payload_pb' -require 'google/cloud/automl/v1/data_items_pb' -require 'google/cloud/automl/v1/io_pb' -require 'google/longrunning/operations_pb' - - -descriptor_data = "\n/google/cloud/automl/v1/prediction_service.proto\x12\x16google.cloud.automl.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/automl/v1/annotation_payload.proto\x1a\'google/cloud/automl/v1/data_items.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a#google/longrunning/operations.proto\"\xf4\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12<\n\x07payload\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1.ExamplePayloadB\x03\xe0\x41\x02\x12\x42\n\x06params\x18\x03 \x03(\x0b\x32\x32.google.cloud.automl.v1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8b\x02\n\x0fPredictResponse\x12:\n\x07payload\x18\x01 \x03(\x0b\x32).google.cloud.automl.v1.AnnotationPayload\x12\x42\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32&.google.cloud.automl.v1.ExamplePayload\x12G\n\x08metadata\x18\x02 \x03(\x0b\x32\x35.google.cloud.automl.v1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xda\x02\n\x13\x42\x61tchPredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12J\n\x0cinput_config\x18\x03 \x01(\x0b\x32/.google.cloud.automl.v1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12L\n\routput_config\x18\x04 \x01(\x0b\x32\x30.google.cloud.automl.v1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12G\n\x06params\x18\x05 \x03(\x0b\x32\x37.google.cloud.automl.v1.BatchPredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x12\x42\x61tchPredictResult\x12J\n\x08metadata\x18\x01 \x03(\x0b\x32\x38.google.cloud.automl.v1.BatchPredictResult.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\x85\x04\n\x11PredictionService\x12\xaf\x01\n\x07Predict\x12&.google.cloud.automl.v1.PredictRequest\x1a\'.google.cloud.automl.v1.PredictResponse\"S\xda\x41\x13name,payload,params\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/models/*}:predict:\x01*\x12\xf2\x01\n\x0c\x42\x61tchPredict\x12+.google.cloud.automl.v1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41\'\n\x12\x42\x61tchPredictResult\x12\x11OperationMetadata\xda\x41&name,input_config,output_config,params\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/models/*}:batchPredict:\x01*\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x01\n\x1a\x63om.google.cloud.automl.v1B\x16PredictionServiceProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - PredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.PredictRequest").msgclass - PredictResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.PredictResponse").msgclass - BatchPredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictRequest").msgclass - BatchPredictResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictResult").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb deleted file mode 100644 index fa9f4cd6c333..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb +++ /dev/null @@ -1,99 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/automl/v1/prediction_service.proto for package 'Google.Cloud.AutoML.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/automl/v1/prediction_service_pb' - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.automl.v1.PredictionService' - - # Perform an online prediction. The prediction result is directly - # returned in the response. - # Available for following ML scenarios, and their expected request payloads: - # - # AutoML Vision Classification - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Vision Object Detection - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Natural Language Classification - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Natural Language Entity Extraction - # - # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document - # in .PDF, .TIF or .TIFF format with size upto 20MB. - # - # AutoML Natural Language Sentiment Analysis - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Translation - # - # * A TextSnippet up to 25,000 characters, UTF-8 encoded. - # - # AutoML Tables - # - # * A row with column values matching - # the columns of the model, up to 5MB. Not available for FORECASTING - # `prediction_type`. - rpc :Predict, ::Google::Cloud::AutoML::V1::PredictRequest, ::Google::Cloud::AutoML::V1::PredictResponse - # Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1.PredictionService.Predict], batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via [GetOperation][google.longrunning.Operations.GetOperation] - # method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1.BatchPredictResult] is returned in - # the [response][google.longrunning.Operation.response] field. - # Available for following ML scenarios: - # - # * AutoML Vision Classification - # * AutoML Vision Object Detection - # * AutoML Video Intelligence Classification - # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification - # * AutoML Natural Language Entity Extraction - # * AutoML Natural Language Sentiment Analysis - # * AutoML Tables - rpc :BatchPredict, ::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb deleted file mode 100644 index e7f6441bacb9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/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/automl/v1/prediction_service/rest" -require "google/cloud/automl/v1/automl/rest" -require "google/cloud/automl/v1/version" - -module Google - module Cloud - module AutoML - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/automl/v1/rest" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb deleted file mode 100644 index 965c37c6de4c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/automl/v1/annotation_payload_pb' -require 'google/cloud/automl/v1/annotation_spec_pb' -require 'google/cloud/automl/v1/dataset_pb' -require 'google/cloud/automl/v1/image_pb' -require 'google/cloud/automl/v1/io_pb' -require 'google/cloud/automl/v1/model_pb' -require 'google/cloud/automl/v1/model_evaluation_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n$google/cloud/automl/v1/service.proto\x12\x16google.cloud.automl.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/automl/v1/annotation_payload.proto\x1a,google/cloud/automl/v1/annotation_spec.proto\x1a$google/cloud/automl/v1/dataset.proto\x1a\"google/cloud/automl/v1/image.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a\"google/cloud/automl/v1/model.proto\x1a-google/cloud/automl/v1/model_evaluation.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x88\x01\n\x14\x43reateDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x35\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32\x1f.google.cloud.automl.v1.DatasetB\x03\xe0\x41\x02\"H\n\x11GetDatasetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\"\x87\x01\n\x13ListDatasetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"b\n\x14ListDatasetsResponse\x12\x31\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x1f.google.cloud.automl.v1.Dataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x14UpdateDatasetRequest\x12\x35\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x1f.google.cloud.automl.v1.DatasetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"K\n\x14\x44\x65leteDatasetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\"\x88\x01\n\x11ImportDataRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\x12>\n\x0cinput_config\x18\x03 \x01(\x0b\x32#.google.cloud.automl.v1.InputConfigB\x03\xe0\x41\x02\"\x8a\x01\n\x11\x45xportDataRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\x12@\n\routput_config\x18\x03 \x01(\x0b\x32$.google.cloud.automl.v1.OutputConfigB\x03\xe0\x41\x02\"V\n\x18GetAnnotationSpecRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$automl.googleapis.com/AnnotationSpec\"\x82\x01\n\x12\x43reateModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x31\n\x05model\x18\x04 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ModelB\x03\xe0\x41\x02\"D\n\x0fGetModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"\x85\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"[\n\x12ListModelsResponse\x12,\n\x05model\x18\x01 \x03(\x0b\x32\x1d.google.cloud.automl.v1.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x12\x44\x65leteModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"}\n\x12UpdateModelRequest\x12\x31\n\x05model\x18\x01 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ModelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe3\x02\n\x12\x44\x65ployModelRequest\x12\x7f\n0image_object_detection_model_deployment_metadata\x18\x02 \x01(\x0b\x32\x43.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataH\x00\x12|\n.image_classification_model_deployment_metadata\x18\x04 \x01(\x0b\x32\x42.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataH\x00\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/ModelB\x1b\n\x19model_deployment_metadata\"I\n\x14UndeployModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"\x94\x01\n\x12\x45xportModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12K\n\routput_config\x18\x03 \x01(\x0b\x32/.google.cloud.automl.v1.ModelExportOutputConfigB\x03\xe0\x41\x02\"X\n\x19GetModelEvaluationRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%automl.googleapis.com/ModelEvaluation\"\x8e\x01\n\x1bListModelEvaluationsRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"z\n\x1cListModelEvaluationsResponse\x12\x41\n\x10model_evaluation\x18\x01 \x03(\x0b\x32\'.google.cloud.automl.v1.ModelEvaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe8\x1b\n\x06\x41utoMl\x12\xcb\x01\n\rCreateDataset\x12,.google.cloud.automl.v1.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41\x1c\n\x07\x44\x61taset\x12\x11OperationMetadata\xda\x41\x0eparent,dataset\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/datasets:\x07\x64\x61taset\x12\x95\x01\n\nGetDataset\x12).google.cloud.automl.v1.GetDatasetRequest\x1a\x1f.google.cloud.automl.v1.Dataset\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/datasets/*}\x12\xa8\x01\n\x0cListDatasets\x12+.google.cloud.automl.v1.ListDatasetsRequest\x1a,.google.cloud.automl.v1.ListDatasetsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/datasets\x12\xbb\x01\n\rUpdateDataset\x12,.google.cloud.automl.v1.UpdateDatasetRequest\x1a\x1f.google.cloud.automl.v1.Dataset\"[\xda\x41\x13\x64\x61taset,update_mask\x82\xd3\xe4\x93\x02?24/v1/{dataset.name=projects/*/locations/*/datasets/*}:\x07\x64\x61taset\x12\xc6\x01\n\rDeleteDataset\x12,.google.cloud.automl.v1.DeleteDatasetRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/datasets/*}\x12\xdc\x01\n\nImportData\x12).google.cloud.automl.v1.ImportDataRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x11name,input_config\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/datasets/*}:importData:\x01*\x12\xdd\x01\n\nExportData\x12).google.cloud.automl.v1.ExportDataRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/datasets/*}:exportData:\x01*\x12\xbc\x01\n\x11GetAnnotationSpec\x12\x30.google.cloud.automl.v1.GetAnnotationSpecRequest\x1a&.google.cloud.automl.v1.AnnotationSpec\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}\x12\xbf\x01\n\x0b\x43reateModel\x12*.google.cloud.automl.v1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/models:\x05model\x12\x8d\x01\n\x08GetModel\x12\'.google.cloud.automl.v1.GetModelRequest\x1a\x1d.google.cloud.automl.v1.Model\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/models/*}\x12\xa0\x01\n\nListModels\x12).google.cloud.automl.v1.ListModelsRequest\x1a*.google.cloud.automl.v1.ListModelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/models\x12\xc0\x01\n\x0b\x44\x65leteModel\x12*.google.cloud.automl.v1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/models/*}\x12\xad\x01\n\x0bUpdateModel\x12*.google.cloud.automl.v1.UpdateModelRequest\x1a\x1d.google.cloud.automl.v1.Model\"S\xda\x41\x11model,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{model.name=projects/*/locations/*/models/*}:\x05model\x12\xca\x01\n\x0b\x44\x65ployModel\x12*.google.cloud.automl.v1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:deploy:\x01*\x12\xd0\x01\n\rUndeployModel\x12,.google.cloud.automl.v1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/locations/*/models/*}:undeploy:\x01*\x12\xd8\x01\n\x0b\x45xportModel\x12*.google.cloud.automl.v1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\xbe\x01\n\x12GetModelEvaluation\x12\x31.google.cloud.automl.v1.GetModelEvaluationRequest\x1a\'.google.cloud.automl.v1.ModelEvaluation\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/models/*/modelEvaluations/*}\x12\xd8\x01\n\x14ListModelEvaluations\x12\x33.google.cloud.automl.v1.ListModelEvaluationsRequest\x1a\x34.google.cloud.automl.v1.ListModelEvaluationsResponse\"U\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/models/*}/modelEvaluations\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xad\x01\n\x1a\x63om.google.cloud.automl.v1B\x0b\x41utoMlProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateDatasetRequest").msgclass - GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetDatasetRequest").msgclass - ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListDatasetsRequest").msgclass - ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListDatasetsResponse").msgclass - UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UpdateDatasetRequest").msgclass - DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteDatasetRequest").msgclass - ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImportDataRequest").msgclass - ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataRequest").msgclass - GetAnnotationSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetAnnotationSpecRequest").msgclass - CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateModelRequest").msgclass - GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetModelRequest").msgclass - ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelsRequest").msgclass - ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelsResponse").msgclass - DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteModelRequest").msgclass - UpdateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UpdateModelRequest").msgclass - DeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeployModelRequest").msgclass - UndeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UndeployModelRequest").msgclass - ExportModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelRequest").msgclass - GetModelEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetModelEvaluationRequest").msgclass - ListModelEvaluationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelEvaluationsRequest").msgclass - ListModelEvaluationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelEvaluationsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb deleted file mode 100644 index da906eec628a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb +++ /dev/null @@ -1,136 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/automl/v1/service.proto for package 'Google.Cloud.AutoML.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/automl/v1/service_pb' - -module Google - module Cloud - module AutoML - module V1 - module AutoMl - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.automl.v1.AutoMl' - - # Creates a dataset. - rpc :CreateDataset, ::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Google::Longrunning::Operation - # Gets a dataset. - rpc :GetDataset, ::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Google::Cloud::AutoML::V1::Dataset - # Lists datasets in a project. - rpc :ListDatasets, ::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Google::Cloud::AutoML::V1::ListDatasetsResponse - # Updates a dataset. - rpc :UpdateDataset, ::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Google::Cloud::AutoML::V1::Dataset - # Deletes a dataset and all of its contents. - # Returns empty response in the - # [response][google.longrunning.Operation.response] field when it completes, - # and `delete_details` in the - # [metadata][google.longrunning.Operation.metadata] field. - rpc :DeleteDataset, ::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Google::Longrunning::Operation - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # [schema_inference_version][google.cloud.automl.v1.InputConfig.params] - # parameter must be explicitly set. - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ImportData, ::Google::Cloud::AutoML::V1::ImportDataRequest, ::Google::Longrunning::Operation - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportData, ::Google::Cloud::AutoML::V1::ExportDataRequest, ::Google::Longrunning::Operation - # Gets an annotation spec. - rpc :GetAnnotationSpec, ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Google::Cloud::AutoML::V1::AnnotationSpec - # Creates a model. - # Returns a Model in the [response][google.longrunning.Operation.response] - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - rpc :CreateModel, ::Google::Cloud::AutoML::V1::CreateModelRequest, ::Google::Longrunning::Operation - # Gets a model. - rpc :GetModel, ::Google::Cloud::AutoML::V1::GetModelRequest, ::Google::Cloud::AutoML::V1::Model - # Lists models. - rpc :ListModels, ::Google::Cloud::AutoML::V1::ListModelsRequest, ::Google::Cloud::AutoML::V1::ListModelsResponse - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # [response][google.longrunning.Operation.response] field when it completes, - # and `delete_details` in the - # [metadata][google.longrunning.Operation.metadata] field. - rpc :DeleteModel, ::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Google::Longrunning::Operation - # Updates a model. - rpc :UpdateModel, ::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Google::Cloud::AutoML::V1::Model - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :DeployModel, ::Google::Cloud::AutoML::V1::DeployModelRequest, ::Google::Longrunning::Operation - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :UndeployModel, ::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Google::Longrunning::Operation - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig]. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportModel, ::Google::Cloud::AutoML::V1::ExportModelRequest, ::Google::Longrunning::Operation - # Gets a model evaluation. - rpc :GetModelEvaluation, ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Google::Cloud::AutoML::V1::ModelEvaluation - # Lists model evaluations. - rpc :ListModelEvaluations, ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb deleted file mode 100644 index 97da0ef8bb22..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/text_extraction.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/text_segment_pb' - - -descriptor_data = "\n,google/cloud/automl/v1/text_extraction.proto\x12\x16google.cloud.automl.v1\x1a)google/cloud/automl/v1/text_segment.proto\"t\n\x18TextExtractionAnnotation\x12;\n\x0ctext_segment\x18\x03 \x01(\x0b\x32#.google.cloud.automl.v1.TextSegmentH\x00\x12\r\n\x05score\x18\x01 \x01(\x02\x42\x0c\n\nannotation\"\x92\x02\n\x1fTextExtractionEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12r\n\x1a\x63onfidence_metrics_entries\x18\x02 \x03(\x0b\x32N.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x03 \x01(\x02\x12\x11\n\tprecision\x18\x04 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x05 \x01(\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - TextExtractionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionAnnotation").msgclass - TextExtractionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionEvaluationMetrics").msgclass - TextExtractionEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb deleted file mode 100644 index 92ccffaa6e09..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/text.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/classification_pb' - - -descriptor_data = "\n!google/cloud/automl/v1/text.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\"l\n!TextClassificationDatasetMetadata\x12G\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationType\"j\n\x1fTextClassificationModelMetadata\x12G\n\x13\x63lassification_type\x18\x03 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationType\"\x1f\n\x1dTextExtractionDatasetMetadata\"\x1d\n\x1bTextExtractionModelMetadata\"5\n\x1cTextSentimentDatasetMetadata\x12\x15\n\rsentiment_max\x18\x01 \x01(\x05\"\x1c\n\x1aTextSentimentModelMetadataB\xab\x01\n\x1a\x63om.google.cloud.automl.v1B\tTextProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - TextClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextClassificationDatasetMetadata").msgclass - TextClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextClassificationModelMetadata").msgclass - TextExtractionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionDatasetMetadata").msgclass - TextExtractionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionModelMetadata").msgclass - TextSentimentDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentDatasetMetadata").msgclass - TextSentimentModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentModelMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb deleted file mode 100644 index f8ac0e311fe0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/text_segment.proto - -require 'google/protobuf' - - -descriptor_data = "\n)google/cloud/automl/v1/text_segment.proto\x12\x16google.cloud.automl.v1\"H\n\x0bTextSegment\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x14\n\x0cstart_offset\x18\x01 \x01(\x03\x12\x12\n\nend_offset\x18\x02 \x01(\x03\x42\xb2\x01\n\x1a\x63om.google.cloud.automl.v1B\x10TextSegmentProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSegment").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb deleted file mode 100644 index 4f4061a1a5e2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/text_sentiment.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/classification_pb' - - -descriptor_data = "\n+google/cloud/automl/v1/text_sentiment.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\",\n\x17TextSentimentAnnotation\x12\x11\n\tsentiment\x18\x01 \x01(\x05\"\xa0\x02\n\x1eTextSentimentEvaluationMetrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12\x1b\n\x13mean_absolute_error\x18\x04 \x01(\x02\x12\x1a\n\x12mean_squared_error\x18\x05 \x01(\x02\x12\x14\n\x0clinear_kappa\x18\x06 \x01(\x02\x12\x17\n\x0fquadratic_kappa\x18\x07 \x01(\x02\x12\x61\n\x10\x63onfusion_matrix\x18\x08 \x01(\x0b\x32G.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrixB\xb4\x01\n\x1a\x63om.google.cloud.automl.v1B\x12TextSentimentProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - TextSentimentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentAnnotation").msgclass - TextSentimentEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentEvaluationMetrics").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb deleted file mode 100644 index 728635fe1c9a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/translation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/automl/v1/data_items_pb' - - -descriptor_data = "\n(google/cloud/automl/v1/translation.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\'google/cloud/automl/v1/data_items.proto\"b\n\x1aTranslationDatasetMetadata\x12!\n\x14source_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14target_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"K\n\x1cTranslationEvaluationMetrics\x12\x12\n\nbleu_score\x18\x01 \x01(\x01\x12\x17\n\x0f\x62\x61se_bleu_score\x18\x02 \x01(\x01\"j\n\x18TranslationModelMetadata\x12\x12\n\nbase_model\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\"X\n\x15TranslationAnnotation\x12?\n\x12translated_content\x18\x01 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippetB\xb2\x01\n\x1a\x63om.google.cloud.automl.v1B\x10TranslationProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - TranslationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationDatasetMetadata").msgclass - TranslationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationEvaluationMetrics").msgclass - TranslationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationModelMetadata").msgclass - TranslationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationAnnotation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb deleted file mode 100644 index 33b9ec43d3df..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/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 AutoML - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md deleted file mode 100644 index fcbf60ce5647..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud AutoML 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-automl-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb deleted file mode 100644 index 9bd24ebc2a4b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.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 AutoML - module V1 - # Contains annotation information that is relevant to AutoML. - # @!attribute [rw] translation - # @return [::Google::Cloud::AutoML::V1::TranslationAnnotation] - # Annotation details for translation. - # - # Note: The following fields are mutually exclusive: `translation`, `classification`, `image_object_detection`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] classification - # @return [::Google::Cloud::AutoML::V1::ClassificationAnnotation] - # Annotation details for content or image classification. - # - # Note: The following fields are mutually exclusive: `classification`, `translation`, `image_object_detection`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection - # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionAnnotation] - # Annotation details for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection`, `translation`, `classification`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction - # @return [::Google::Cloud::AutoML::V1::TextExtractionAnnotation] - # Annotation details for text extraction. - # - # Note: The following fields are mutually exclusive: `text_extraction`, `translation`, `classification`, `image_object_detection`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment - # @return [::Google::Cloud::AutoML::V1::TextSentimentAnnotation] - # Annotation details for text sentiment. - # - # Note: The following fields are mutually exclusive: `text_sentiment`, `translation`, `classification`, `image_object_detection`, `text_extraction`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] annotation_spec_id - # @return [::String] - # Output only . The resource ID of the annotation spec that - # this annotation pertains to. The annotation spec comes from either an - # ancestor dataset, or the dataset that was used to train the model in use. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The value of - # {::Google::Cloud::AutoML::V1::AnnotationSpec#display_name display_name} - # when the model was trained. Because this field returns a value at model - # training time, for different models trained using the same dataset, the - # returned value could be different as model owner could update the - # `display_name` between any two model training. - class AnnotationPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb deleted file mode 100644 index 942cbd6b09ad..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.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 AutoML - module V1 - # A definition of an annotation spec. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the annotation spec. - # Form: - # 'projects/\\{project_id}/locations/\\{location_id}/datasets/\\{dataset_id}/annotationSpecs/\\{annotation_spec_id}' - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the annotation spec to show in the interface. The name can be - # up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. - # @!attribute [rw] example_count - # @return [::Integer] - # Output only. The number of examples in the parent dataset - # labeled by the annotation spec. - class AnnotationSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb deleted file mode 100644 index 9044a0c41bef..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.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 AutoML - module V1 - # Contains annotation details specific to classification. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0. A higher value - # means greater confidence that the annotation is positive. If a user - # approves an annotation as negative or positive, the score value remains - # unchanged. If a user creates an annotation, the score is 0 for negative or - # 1 for positive. - class ClassificationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for classification problems. - # Note: For Video Classification this metrics only describe quality of the - # Video Classification predictions of "segment_classification" type. - # @!attribute [rw] au_prc - # @return [::Float] - # Output only. The Area Under Precision-Recall Curve metric. Micro-averaged - # for the overall evaluation. - # @!attribute [rw] au_roc - # @return [::Float] - # Output only. The Area Under Receiver Operating Characteristic curve metric. - # Micro-averaged for the overall evaluation. - # @!attribute [rw] log_loss - # @return [::Float] - # Output only. The Log Loss metric. - # @!attribute [rw] confidence_metrics_entry - # @return [::Array<::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>] - # Output only. Metrics for each confidence_threshold in - # 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and - # position_threshold = INT32_MAX_VALUE. - # ROC and precision-recall curves, and other aggregated metrics are derived - # from them. The confidence metrics entries may also be supplied for - # additional values of position_threshold, but from these no aggregated - # metrics are computed. - # @!attribute [rw] confusion_matrix - # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix] - # Output only. Confusion matrix of the evaluation. - # Only set for MULTICLASS classification problems where number - # of labels is no more than 10. - # Only set for model level evaluation, not for evaluation per label. - # @!attribute [rw] annotation_spec_id - # @return [::Array<::String>] - # Output only. The annotation spec ids used for this evaluation. - class ClassificationEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. Metrics are computed with an assumption that the model - # never returns predictions with score lower than this value. - # @!attribute [rw] position_threshold - # @return [::Integer] - # Output only. Metrics are computed with an assumption that the model - # always returns at most this many predictions (ordered by their score, - # descendingly), but they all still need to meet the confidence_threshold. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall (True Positive Rate) for the given confidence - # threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision for the given confidence threshold. - # @!attribute [rw] false_positive_rate - # @return [::Float] - # Output only. False Positive Rate for the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - # @!attribute [rw] recall_at1 - # @return [::Float] - # Output only. The Recall (True Positive Rate) when only considering the - # label that has the highest prediction score and not below the confidence - # threshold for each example. - # @!attribute [rw] precision_at1 - # @return [::Float] - # Output only. The precision when only considering the label that has the - # highest prediction score and not below the confidence threshold for each - # example. - # @!attribute [rw] false_positive_rate_at1 - # @return [::Float] - # Output only. The False Positive Rate when only considering the label that - # has the highest prediction score and not below the confidence threshold - # for each example. - # @!attribute [rw] f1_score_at1 - # @return [::Float] - # Output only. The harmonic mean of {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}. - # @!attribute [rw] true_positive_count - # @return [::Integer] - # Output only. The number of model created labels that match a ground truth - # label. - # @!attribute [rw] false_positive_count - # @return [::Integer] - # Output only. The number of model created labels that do not match a - # ground truth label. - # @!attribute [rw] false_negative_count - # @return [::Integer] - # Output only. The number of ground truth labels that are not matched - # by a model created label. - # @!attribute [rw] true_negative_count - # @return [::Integer] - # Output only. The number of labels that were not created by the model, - # but if they would, they would not match a ground truth label. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Confusion matrix of the model running the classification. - # @!attribute [rw] annotation_spec_id - # @return [::Array<::String>] - # Output only. IDs of the annotation specs used in the confusion matrix. - # For Tables CLASSIFICATION - # [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type] - # only list of [annotation_spec_display_name-s][] is populated. - # @!attribute [rw] display_name - # @return [::Array<::String>] - # Output only. Display name of the annotation specs used in the confusion - # matrix, as they were at the moment of the evaluation. For Tables - # CLASSIFICATION - # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type], - # distinct values of the target column at the moment of the model - # evaluation are populated here. - # @!attribute [rw] row - # @return [::Array<::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>] - # Output only. Rows in the confusion matrix. The number of rows is equal to - # the size of `annotation_spec_id`. - # `row[i].example_count[j]` is the number of examples that have ground - # truth of the `annotation_spec_id[i]` and are predicted as - # `annotation_spec_id[j]` by the model being evaluated. - class ConfusionMatrix - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. A row in the confusion matrix. - # @!attribute [rw] example_count - # @return [::Array<::Integer>] - # Output only. Value of the specific cell in the confusion matrix. - # The number of values each row has (i.e. the length of the row) is equal - # to the length of the `annotation_spec_id` field or, if that one is not - # populated, length of the {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Type of the classification problem. - module ClassificationType - # An un-set value of this enum. - CLASSIFICATION_TYPE_UNSPECIFIED = 0 - - # At most one label is allowed per example. - MULTICLASS = 1 - - # Multiple labels are allowed for one example. - MULTILABEL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb deleted file mode 100644 index 27054977211d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb +++ /dev/null @@ -1,202 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # A representation of an image. - # Only images up to 30MB in size are supported. - # @!attribute [rw] image_bytes - # @return [::String] - # Image content represented as a stream of bytes. - # Note: As with all `bytes` fields, protobuffers use a pure binary - # representation, whereas JSON representations use base64. - # @!attribute [rw] thumbnail_uri - # @return [::String] - # Output only. HTTP URI to the thumbnail image. - class Image - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A representation of a text snippet. - # @!attribute [rw] content - # @return [::String] - # Required. The content of the text snippet as a string. Up to 250000 - # characters long. - # @!attribute [rw] mime_type - # @return [::String] - # Optional. The format of {::Google::Cloud::AutoML::V1::TextSnippet#content content}. Currently the only two allowed - # values are "text/html" and "text/plain". If left blank, the format is - # automatically determined from the type of the uploaded {::Google::Cloud::AutoML::V1::TextSnippet#content content}. - # @!attribute [rw] content_uri - # @return [::String] - # Output only. HTTP URI where you can download the content. - class TextSnippet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message that describes dimension of a document. - # @!attribute [rw] unit - # @return [::Google::Cloud::AutoML::V1::DocumentDimensions::DocumentDimensionUnit] - # Unit of the dimension. - # @!attribute [rw] width - # @return [::Float] - # Width value of the document, works together with the unit. - # @!attribute [rw] height - # @return [::Float] - # Height value of the document, works together with the unit. - class DocumentDimensions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Unit of the document dimension. - module DocumentDimensionUnit - # Should not be used. - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0 - - # Document dimension is measured in inches. - INCH = 1 - - # Document dimension is measured in centimeters. - CENTIMETER = 2 - - # Document dimension is measured in points. 72 points = 1 inch. - POINT = 3 - end - end - - # A structured text document e.g. a PDF. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1::DocumentInputConfig] - # An input config specifying the content of the document. - # @!attribute [rw] document_text - # @return [::Google::Cloud::AutoML::V1::TextSnippet] - # The plain text version of this document. - # @!attribute [rw] layout - # @return [::Array<::Google::Cloud::AutoML::V1::Document::Layout>] - # Describes the layout of the document. - # Sorted by [page_number][]. - # @!attribute [rw] document_dimensions - # @return [::Google::Cloud::AutoML::V1::DocumentDimensions] - # The dimensions of the page in the document. - # @!attribute [rw] page_count - # @return [::Integer] - # Number of pages in the document. - class Document - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the layout information of a {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the document. - # @!attribute [rw] text_segment - # @return [::Google::Cloud::AutoML::V1::TextSegment] - # Text Segment that represents a segment in - # [document_text][google.cloud.automl.v1p1beta.Document.document_text]. - # @!attribute [rw] page_number - # @return [::Integer] - # Page number of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the original document, starts - # from 1. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::AutoML::V1::BoundingPoly] - # The position of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the page. - # Contains exactly 4 - # [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] - # and they are connected by edges in the order provided, which will - # represent a rectangle parallel to the frame. The - # [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are - # relative to the page. - # Coordinates are based on top-left as point (0,0). - # @!attribute [rw] text_segment_type - # @return [::Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType] - # The type of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in document. - class Layout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of TextSegment in the context of the original document. - module TextSegmentType - # Should not be used. - TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 - - # The text segment is a token. e.g. word. - TOKEN = 1 - - # The text segment is a paragraph. - PARAGRAPH = 2 - - # The text segment is a form field. - FORM_FIELD = 3 - - # The text segment is the name part of a form field. It will be treated - # as child of another FORM_FIELD TextSegment if its span is subspan of - # another TextSegment with type FORM_FIELD. - FORM_FIELD_NAME = 4 - - # The text segment is the text content part of a form field. It will be - # treated as child of another FORM_FIELD TextSegment if its span is - # subspan of another TextSegment with type FORM_FIELD. - FORM_FIELD_CONTENTS = 5 - - # The text segment is a whole table, including headers, and all rows. - TABLE = 6 - - # The text segment is a table's headers. It will be treated as child of - # another TABLE TextSegment if its span is subspan of another TextSegment - # with type TABLE. - TABLE_HEADER = 7 - - # The text segment is a row in table. It will be treated as child of - # another TABLE TextSegment if its span is subspan of another TextSegment - # with type TABLE. - TABLE_ROW = 8 - - # The text segment is a cell in table. It will be treated as child of - # another TABLE_ROW TextSegment if its span is subspan of another - # TextSegment with type TABLE_ROW. - TABLE_CELL = 9 - end - end - end - - # Example data used for training or prediction. - # @!attribute [rw] image - # @return [::Google::Cloud::AutoML::V1::Image] - # Example image. - # - # Note: The following fields are mutually exclusive: `image`, `text_snippet`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_snippet - # @return [::Google::Cloud::AutoML::V1::TextSnippet] - # Example text. - # - # Note: The following fields are mutually exclusive: `text_snippet`, `image`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] document - # @return [::Google::Cloud::AutoML::V1::Document] - # Example document. - # - # Note: The following fields are mutually exclusive: `document`, `image`, `text_snippet`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExamplePayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb deleted file mode 100644 index afaccfc1a7d1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.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 AutoML - module V1 - # A workspace for solving a single, particular machine learning (ML) problem. - # A workspace contains examples that may be annotated. - # @!attribute [rw] translation_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::TranslationDatasetMetadata] - # Metadata for a dataset used for translation. - # - # Note: The following fields are mutually exclusive: `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::ImageClassificationDatasetMetadata] - # Metadata for a dataset used for image classification. - # - # Note: The following fields are mutually exclusive: `image_classification_dataset_metadata`, `translation_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::TextClassificationDatasetMetadata] - # Metadata for a dataset used for text classification. - # - # Note: The following fields are mutually exclusive: `text_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionDatasetMetadata] - # Metadata for a dataset used for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::TextExtractionDatasetMetadata] - # Metadata for a dataset used for text extraction. - # - # Note: The following fields are mutually exclusive: `text_extraction_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::TextSentimentDatasetMetadata] - # Metadata for a dataset used for text sentiment. - # - # Note: The following fields are mutually exclusive: `text_sentiment_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the dataset. - # Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the dataset to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores - # (_), and ASCII digits 0-9. - # @!attribute [rw] description - # @return [::String] - # User-provided description of the dataset. The description can be up to - # 25000 characters long. - # @!attribute [rw] example_count - # @return [::Integer] - # Output only. The number of examples in the dataset. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this dataset was created. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata to organize your dataset. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://goo.gl/xmQnxf for more information on and examples of labels. - class Dataset - 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-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb deleted file mode 100644 index 3a1323a1c88d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Annotation details for image object detection. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::AutoML::V1::BoundingPoly] - # Output only. The rectangle representing the object location. - # @!attribute [rw] score - # @return [::Float] - # Output only. The confidence that this annotation is positive for the parent example, - # value in [0, 1], higher means higher positivity confidence. - class ImageObjectDetectionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Bounding box matching model metrics for a single intersection-over-union - # threshold and multiple label match confidence thresholds. - # @!attribute [rw] iou_threshold - # @return [::Float] - # Output only. The intersection-over-union threshold value used to compute - # this metrics entry. - # @!attribute [rw] mean_average_precision - # @return [::Float] - # Output only. The mean average precision, most often close to au_prc. - # @!attribute [rw] confidence_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1::BoundingBoxMetricsEntry::ConfidenceMetricsEntry>] - # Output only. Metrics for each label-match confidence_threshold from - # 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is - # derived from them. - class BoundingBoxMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. The confidence threshold value used to compute the metrics. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall under the given confidence threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision under the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Model evaluation metrics for image object detection problems. - # Evaluates prediction quality of labeled bounding boxes. - # @!attribute [rw] evaluated_bounding_box_count - # @return [::Integer] - # Output only. The total number of bounding boxes (i.e. summed over all - # images) the ground truth used to create this evaluation had. - # @!attribute [rw] bounding_box_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1::BoundingBoxMetricsEntry>] - # Output only. The bounding boxes match metrics for each - # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # pair. - # @!attribute [rw] bounding_box_mean_average_precision - # @return [::Float] - # Output only. The single metric for bounding boxes evaluation: - # the mean_average_precision averaged over all bounding_box_metrics_entries. - class ImageObjectDetectionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb deleted file mode 100644 index 74a562769bfa..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.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 AutoML - module V1 - # A vertex represents a 2D point in the image. - # The normalized vertex coordinates are between 0 to 1 fractions relative to - # the original plane (image, video). E.g. if the plane (e.g. whole image) would - # have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would - # be at the position (1, 6) on that plane. - # @!attribute [rw] x - # @return [::Float] - # Required. Horizontal coordinate. - # @!attribute [rw] y - # @return [::Float] - # Required. Vertical coordinate. - class NormalizedVertex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A bounding polygon of a detected object on a plane. - # On output both vertices and normalized_vertices are provided. - # The polygon is formed by connecting vertices in the order they are listed. - # @!attribute [rw] normalized_vertices - # @return [::Array<::Google::Cloud::AutoML::V1::NormalizedVertex>] - # Output only . The bounding polygon normalized vertices. - class BoundingPoly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb deleted file mode 100644 index 4e520cdd2e8b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb +++ /dev/null @@ -1,215 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Dataset metadata that is specific to image classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1::ClassificationType] - # Required. Type of the classification problem. - class ImageClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata specific to image object detection. - class ImageObjectDetectionDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata for image classification. - # @!attribute [rw] base_model_id - # @return [::String] - # Optional. The ID of the `base` model. If it is specified, the new model - # will be created based on the `base` model. Otherwise, the new model will be - # created from scratch. The `base` model must be in the same - # `project` and `location` as the new model to create, and have the same - # `model_type`. - # @!attribute [rw] train_budget_milli_node_hours - # @return [::Integer] - # Optional. The train budget of creating this model, expressed in milli node - # hours i.e. 1,000 value in this field means 1 node hour. The actual - # `train_cost` will be equal or less than this value. If further model - # training ceases to provide any improvements, it will stop without using - # full budget and the stop_reason will be `MODEL_CONVERGED`. - # Note, node_hour = actual_hour * number_of_nodes_invovled. - # For model type `cloud`(default), the train budget must be between 8,000 - # and 800,000 milli node hours, inclusive. The default value is 192, 000 - # which represents one day in wall time. For model type - # `mobile-low-latency-1`, `mobile-versatile-1`, `mobile-high-accuracy-1`, - # `mobile-core-ml-low-latency-1`, `mobile-core-ml-versatile-1`, - # `mobile-core-ml-high-accuracy-1`, the train budget must be between 1,000 - # and 100,000 milli node hours, inclusive. The default value is 24, 000 which - # represents one day in wall time. - # @!attribute [r] train_cost_milli_node_hours - # @return [::Integer] - # Output only. The actual train cost of creating this model, expressed in - # milli node hours, i.e. 1,000 value in this field means 1 node hour. - # Guaranteed to not exceed the train budget. - # @!attribute [r] stop_reason - # @return [::String] - # Output only. The reason that this create model operation stopped, - # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - # @!attribute [rw] model_type - # @return [::String] - # Optional. Type of the model. The available values are: - # * `cloud` - Model to be used via prediction calls to AutoML API. - # This is the default value. - # * `mobile-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have low latency, but - # may have lower prediction quality than other models. - # * `mobile-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. - # * `mobile-high-accuracy-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have a higher - # latency, but should also have a higher prediction quality - # than other models. - # * `mobile-core-ml-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core - # ML afterwards. Expected to have low latency, but may have - # lower prediction quality than other models. - # * `mobile-core-ml-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core - # ML afterwards. - # * `mobile-core-ml-high-accuracy-1` - A model that, in addition to - # providing prediction via AutoML API, can also be exported - # (see {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with - # Core ML afterwards. Expected to have a higher latency, but - # should also have a higher prediction quality than other - # models. - # @!attribute [r] node_qps - # @return [::Float] - # Output only. An approximate number of online prediction QPS that can - # be supported by this model per each node on which it is deployed. - # @!attribute [r] node_count - # @return [::Integer] - # Output only. The number of nodes this model is deployed on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the node_qps field. - class ImageClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to image object detection. - # @!attribute [rw] model_type - # @return [::String] - # Optional. Type of the model. The available values are: - # * `cloud-high-accuracy-1` - (default) A model to be used via prediction - # calls to AutoML API. Expected to have a higher latency, but - # should also have a higher prediction quality than other - # models. - # * `cloud-low-latency-1` - A model to be used via prediction - # calls to AutoML API. Expected to have low latency, but may - # have lower prediction quality than other models. - # * `mobile-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have low latency, but - # may have lower prediction quality than other models. - # * `mobile-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. - # * `mobile-high-accuracy-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have a higher - # latency, but should also have a higher prediction quality - # than other models. - # @!attribute [r] node_count - # @return [::Integer] - # Output only. The number of nodes this model is deployed on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the qps_per_node field. - # @!attribute [r] node_qps - # @return [::Float] - # Output only. An approximate number of online prediction QPS that can - # be supported by this model per each node on which it is deployed. - # @!attribute [r] stop_reason - # @return [::String] - # Output only. The reason that this create model operation stopped, - # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - # @!attribute [rw] train_budget_milli_node_hours - # @return [::Integer] - # Optional. The train budget of creating this model, expressed in milli node - # hours i.e. 1,000 value in this field means 1 node hour. The actual - # `train_cost` will be equal or less than this value. If further model - # training ceases to provide any improvements, it will stop without using - # full budget and the stop_reason will be `MODEL_CONVERGED`. - # Note, node_hour = actual_hour * number_of_nodes_invovled. - # For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, - # the train budget must be between 20,000 and 900,000 milli node hours, - # inclusive. The default value is 216, 000 which represents one day in - # wall time. - # For model type `mobile-low-latency-1`, `mobile-versatile-1`, - # `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, - # `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train - # budget must be between 1,000 and 100,000 milli node hours, inclusive. - # The default value is 24, 000 which represents one day in wall time. - # @!attribute [r] train_cost_milli_node_hours - # @return [::Integer] - # Output only. The actual train cost of creating this model, expressed in - # milli node hours, i.e. 1,000 value in this field means 1 node hour. - # Guaranteed to not exceed the train budget. - class ImageObjectDetectionModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model deployment metadata specific to Image Classification. - # @!attribute [rw] node_count - # @return [::Integer] - # Input only. The number of nodes to deploy the model on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the model's - # {::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata#node_qps node_qps}. - # Must be between 1 and 100, inclusive on both ends. - class ImageClassificationModelDeploymentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model deployment metadata specific to Image Object Detection. - # @!attribute [rw] node_count - # @return [::Integer] - # Input only. The number of nodes to deploy the model on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the model's - # [qps_per_node][google.cloud.automl.v1.ImageObjectDetectionModelMetadata.qps_per_node]. - # Must be between 1 and 100, inclusive on both ends. - class ImageObjectDetectionModelDeploymentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb deleted file mode 100644 index 07e37b650808..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb +++ /dev/null @@ -1,1345 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Input configuration for - # {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData} action. - # - # The format of input depends on dataset_metadata the Dataset into which - # the import is happening has. As input source the - # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} - # is expected, unless specified otherwise. Additionally any input .CSV file - # by itself must be 100MB or smaller, unless specified otherwise. - # If an "example" file (that is, image, video etc.) with identical content - # (even if it had different `GCS_FILE_PATH`) is mentioned multiple times, then - # its label, bounding boxes etc. are appended. The same file should be always - # provided with the same `ML_USE` and `GCS_FILE_PATH`, if it is not, then - # these values are nondeterministically selected from the given ones. - # - # The formats are represented in EBNF with commas being literal and with - # non-terminal symbols defined near the end of this comment. The formats are: - # - # #### AutoML Vision - # - # - # ##### Classification - # - # See [Preparing your training - # data](https://cloud.google.com/vision/automl/docs/prepare) for more - # information. - # - # CSV file(s) with each line in format: - # - # ML_USE,GCS_FILE_PATH,LABEL,LABEL,... - # - # * `ML_USE` - Identifies the data set that the current row (file) applies - # to. - # This value can be one of the following: - # * `TRAIN` - Rows in this file are used to train the model. - # * `TEST` - Rows in this file are used to test the model during training. - # * `UNASSIGNED` - Rows in this file are not categorized. They are - # Automatically divided into train and test data. 80% for training and - # 20% for testing. - # - # * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to - # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, - # .TIFF, .ICO. - # - # * `LABEL` - A label that identifies the object in the image. - # - # For the `MULTICLASS` classification type, at most one `LABEL` is allowed - # per image. If an image has not yet been labeled, then it should be - # mentioned just once with no `LABEL`. - # - # Some sample rows: - # - # TRAIN,gs://folder/image1.jpg,daisy - # TEST,gs://folder/image2.jpg,dandelion,tulip,rose - # UNASSIGNED,gs://folder/image3.jpg,daisy - # UNASSIGNED,gs://folder/image4.jpg - # - # - # ##### Object Detection - # See [Preparing your training - # data](https://cloud.google.com/vision/automl/object-detection/docs/prepare) - # for more information. - # - # A CSV file(s) with each line in format: - # - # ML_USE,GCS_FILE_PATH,[LABEL],(BOUNDING_BOX | ,,,,,,,) - # - # * `ML_USE` - Identifies the data set that the current row (file) applies - # to. - # This value can be one of the following: - # * `TRAIN` - Rows in this file are used to train the model. - # * `TEST` - Rows in this file are used to test the model during training. - # * `UNASSIGNED` - Rows in this file are not categorized. They are - # Automatically divided into train and test data. 80% for training and - # 20% for testing. - # - # * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to - # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. Each image - # is assumed to be exhaustively labeled. - # - # * `LABEL` - A label that identifies the object in the image specified by the - # `BOUNDING_BOX`. - # - # * `BOUNDING BOX` - The vertices of an object in the example image. - # The minimum allowed `BOUNDING_BOX` edge length is 0.01, and no more than - # 500 `BOUNDING_BOX` instances per image are allowed (one `BOUNDING_BOX` - # per line). If an image has no looked for objects then it should be - # mentioned just once with no LABEL and the ",,,,,,," in place of the - # `BOUNDING_BOX`. - # - # **Four sample rows:** - # - # TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, - # TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, - # UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 - # TEST,gs://folder/im3.png,,,,,,,,, - # - # - # - # - # #### AutoML Video Intelligence - # - # - # ##### Classification - # - # See [Preparing your training - # data](https://cloud.google.com/video-intelligence/automl/docs/prepare) for - # more information. - # - # CSV file(s) with each line in format: - # - # ML_USE,GCS_FILE_PATH - # - # For `ML_USE`, do not use `VALIDATE`. - # - # `GCS_FILE_PATH` is the path to another .csv file that describes training - # example for a given `ML_USE`, using the following row format: - # - # GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) - # - # Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up - # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # - # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the - # length of the video, and the end time must be after the start time. Any - # segment of a video which has one or more labels on it, is considered a - # hard negative for all other labels. Any segment with no labels on - # it is considered to be unknown. If a whole video is unknown, then - # it should be mentioned just once with ",," in place of `LABEL, - # TIME_SEGMENT_START,TIME_SEGMENT_END`. - # - # Sample top level CSV file: - # - # TRAIN,gs://folder/train_videos.csv - # TEST,gs://folder/test_videos.csv - # UNASSIGNED,gs://folder/other_videos.csv - # - # Sample rows of a CSV file for a particular ML_USE: - # - # gs://folder/video1.avi,car,120,180.000021 - # gs://folder/video1.avi,bike,150,180.000021 - # gs://folder/vid2.avi,car,0,60.5 - # gs://folder/vid3.avi,,, - # - # - # - # ##### Object Tracking - # - # See [Preparing your training - # data](/video-intelligence/automl/object-tracking/docs/prepare) for more - # information. - # - # CSV file(s) with each line in format: - # - # ML_USE,GCS_FILE_PATH - # - # For `ML_USE`, do not use `VALIDATE`. - # - # `GCS_FILE_PATH` is the path to another .csv file that describes training - # example for a given `ML_USE`, using the following row format: - # - # GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX - # - # or - # - # GCS_FILE_PATH,,,,,,,,,, - # - # Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up - # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # Providing `INSTANCE_ID`s can help to obtain a better model. When - # a specific labeled entity leaves the video frame, and shows up - # afterwards it is not required, albeit preferable, that the same - # `INSTANCE_ID` is given to it. - # - # `TIMESTAMP` must be within the length of the video, the - # `BOUNDING_BOX` is assumed to be drawn on the closest video's frame - # to the `TIMESTAMP`. Any mentioned by the `TIMESTAMP` frame is expected - # to be exhaustively labeled and no more than 500 `BOUNDING_BOX`-es per - # frame are allowed. If a whole video is unknown, then it should be - # mentioned just once with ",,,,,,,,,," in place of `LABEL, - # [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX`. - # - # Sample top level CSV file: - # - # TRAIN,gs://folder/train_videos.csv - # TEST,gs://folder/test_videos.csv - # UNASSIGNED,gs://folder/other_videos.csv - # - # Seven sample rows of a CSV file for a particular ML_USE: - # - # gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 - # gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 - # gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 - # gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, - # gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, - # gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, - # gs://folder/video2.avi,,,,,,,,,,, - # - # - # #### AutoML Natural Language - # - # - # ##### Entity Extraction - # - # See [Preparing your training - # data](/natural-language/automl/entity-analysis/docs/prepare) for more - # information. - # - # One or more CSV file(s) with each line in the following format: - # - # ML_USE,GCS_FILE_PATH - # - # * `ML_USE` - Identifies the data set that the current row (file) applies - # to. - # This value can be one of the following: - # * `TRAIN` - Rows in this file are used to train the model. - # * `TEST` - Rows in this file are used to test the model during training. - # * `UNASSIGNED` - Rows in this file are not categorized. They are - # Automatically divided into train and test data. 80% for training and - # 20% for testing.. - # - # * `GCS_FILE_PATH` - a Identifies JSON Lines (.JSONL) file stored in - # Google Cloud Storage that contains in-line text in-line as documents - # for model training. - # - # After the training data set has been determined from the `TRAIN` and - # `UNASSIGNED` CSV files, the training data is divided into train and - # validation data sets. 70% for training and 30% for validation. - # - # For example: - # - # TRAIN,gs://folder/file1.jsonl - # VALIDATE,gs://folder/file2.jsonl - # TEST,gs://folder/file3.jsonl - # - # **In-line JSONL files** - # - # In-line .JSONL files contain, per line, a JSON document that wraps a - # {::Google::Cloud::AutoML::V1::TextSnippet `text_snippet`} field followed by - # one or more {::Google::Cloud::AutoML::V1::AnnotationPayload `annotations`} - # fields, which have `display_name` and `text_extraction` fields to describe - # the entity from the text snippet. Multiple JSON documents can be separated - # using line breaks (\n). - # - # The supplied text must be annotated exhaustively. For example, if you - # include the text "horse", but do not label it as "animal", - # then "horse" is assumed to not be an "animal". - # - # Any given text snippet content must have 30,000 characters or - # less, and also be UTF-8 NFC encoded. ASCII is accepted as it is - # UTF-8 NFC encoded. - # - # For example: - # - # { - # "text_snippet": { - # "content": "dog car cat" - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": {"start_offset": 0, "end_offset": 2} - # } - # }, - # { - # "display_name": "vehicle", - # "text_extraction": { - # "text_segment": {"start_offset": 4, "end_offset": 6} - # } - # }, - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": {"start_offset": 8, "end_offset": 10} - # } - # } - # ] - # }\n - # { - # "text_snippet": { - # "content": "This dog is good." - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": {"start_offset": 5, "end_offset": 7} - # } - # } - # ] - # } - # - # **JSONL files that reference documents** - # - # .JSONL files contain, per line, a JSON document that wraps a - # `input_config` that contains the path to a source document. - # Multiple JSON documents can be separated using line breaks (\n). - # - # Supported document extensions: .PDF, .TIF, .TIFF - # - # For example: - # - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - # } - # } - # } - # }\n - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] - # } - # } - # } - # } - # - # **In-line JSONL files with document layout information** - # - # **Note:** You can only annotate documents using the UI. The format described - # below applies to annotated documents exported using the UI or `exportData`. - # - # In-line .JSONL files for documents contain, per line, a JSON document - # that wraps a `document` field that provides the textual content of the - # document and the layout information. - # - # For example: - # - # { - # "document": { - # "document_text": { - # "content": "dog car cat" - # } - # "layout": [ - # { - # "text_segment": { - # "start_offset": 0, - # "end_offset": 11, - # }, - # "page_number": 1, - # "bounding_poly": { - # "normalized_vertices": [ - # {"x": 0.1, "y": 0.1}, - # {"x": 0.1, "y": 0.3}, - # {"x": 0.3, "y": 0.3}, - # {"x": 0.3, "y": 0.1}, - # ], - # }, - # "text_segment_type": TOKEN, - # } - # ], - # "document_dimensions": { - # "width": 8.27, - # "height": 11.69, - # "unit": INCH, - # } - # "page_count": 3, - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": {"start_offset": 0, "end_offset": 3} - # } - # }, - # { - # "display_name": "vehicle", - # "text_extraction": { - # "text_segment": {"start_offset": 4, "end_offset": 7} - # } - # }, - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": {"start_offset": 8, "end_offset": 11} - # } - # }, - # ], - # - # - # - # - # ##### Classification - # - # See [Preparing your training - # data](https://cloud.google.com/natural-language/automl/docs/prepare) for more - # information. - # - # One or more CSV file(s) with each line in the following format: - # - # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... - # - # * `ML_USE` - Identifies the data set that the current row (file) applies - # to. - # This value can be one of the following: - # * `TRAIN` - Rows in this file are used to train the model. - # * `TEST` - Rows in this file are used to test the model during training. - # * `UNASSIGNED` - Rows in this file are not categorized. They are - # Automatically divided into train and test data. 80% for training and - # 20% for testing. - # - # * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If - # the column content is a valid Google Cloud Storage file path, that is, - # prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if - # the content is enclosed in double quotes (""), it is treated as a - # `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a - # file with supported extension and UTF-8 encoding, for example, - # "gs://folder/content.txt" AutoML imports the file content - # as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content - # excluding quotes. In both cases, size of the content must be 10MB or - # less in size. For zip files, the size of each file inside the zip must be - # 10MB or less in size. - # - # For the `MULTICLASS` classification type, at most one `LABEL` is allowed. - # - # The `ML_USE` and `LABEL` columns are optional. - # Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP - # - # A maximum of 100 unique labels are allowed per CSV row. - # - # Sample rows: - # - # TRAIN,"They have bad food and very rude",RudeService,BadFood - # gs://folder/content.txt,SlowService - # TEST,gs://folder/document.pdf - # VALIDATE,gs://folder/text_files.zip,BadFood - # - # - # - # ##### Sentiment Analysis - # - # See [Preparing your training - # data](https://cloud.google.com/natural-language/automl/docs/prepare) for more - # information. - # - # CSV file(s) with each line in format: - # - # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT - # - # * `ML_USE` - Identifies the data set that the current row (file) applies - # to. - # This value can be one of the following: - # * `TRAIN` - Rows in this file are used to train the model. - # * `TEST` - Rows in this file are used to test the model during training. - # * `UNASSIGNED` - Rows in this file are not categorized. They are - # Automatically divided into train and test data. 80% for training and - # 20% for testing. - # - # * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If - # the column content is a valid Google Cloud Storage file path, that is, - # prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if - # the content is enclosed in double quotes (""), it is treated as a - # `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a - # file with supported extension and UTF-8 encoding, for example, - # "gs://folder/content.txt" AutoML imports the file content - # as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content - # excluding quotes. In both cases, size of the content must be 128kB or - # less in size. For zip files, the size of each file inside the zip must be - # 128kB or less in size. - # - # The `ML_USE` and `SENTIMENT` columns are optional. - # Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP - # - # * `SENTIMENT` - An integer between 0 and - # Dataset.text_sentiment_dataset_metadata.sentiment_max - # (inclusive). Describes the ordinal of the sentiment - higher - # value means a more positive sentiment. All the values are - # completely relative, i.e. neither 0 needs to mean a negative or - # neutral sentiment nor sentiment_max needs to mean a positive one - - # it is just required that 0 is the least positive sentiment - # in the data, and sentiment_max is the most positive one. - # The SENTIMENT shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - # All SENTIMENT values between 0 and sentiment_max must be - # represented in the imported data. On prediction the same 0 to - # sentiment_max range will be used. The difference between - # neighboring sentiment values needs not to be uniform, e.g. 1 and - # 2 may be similar whereas the difference between 2 and 3 may be - # large. - # - # Sample rows: - # - # TRAIN,"@freewrytin this is way too good for your product",2 - # gs://folder/content.txt,3 - # TEST,gs://folder/document.pdf - # VALIDATE,gs://folder/text_files.zip,2 - # - # - # - # #### AutoML Tables - # - # See [Preparing your training - # data](https://cloud.google.com/automl-tables/docs/prepare) for more - # information. - # - # You can use either - # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} or - # [bigquery_source][google.cloud.automl.v1.InputConfig.bigquery_source]. - # All input is concatenated into a - # single - # [primary_table_spec_id][google.cloud.automl.v1.TablesDatasetMetadata.primary_table_spec_id] - # - # **For gcs_source:** - # - # CSV file(s), where the first row of the first file is the header, - # containing unique column names. If the first row of a subsequent - # file is the same as the header, then it is also treated as a - # header. All other rows contain values for the corresponding - # columns. - # - # Each .CSV file by itself must be 10GB or smaller, and their total - # size must be 100GB or smaller. - # - # First three sample rows of a CSV file: - #
-        # "Id","First Name","Last Name","Dob","Addresses"
-        # "1","John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
-        # "2","Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
-        # 
- # **For bigquery_source:** - # - # An URI of a BigQuery table. The user data size of the BigQuery - # table must be 100GB or smaller. - # - # An imported table must have between 2 and 1,000 columns, inclusive, - # and between 1000 and 100,000,000 rows, inclusive. There are at most 5 - # import data running in parallel. - # - # - # - # **Input field definitions:** - # - # `ML_USE` - # : ("TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED") - # Describes how the given example (file) should be used for model - # training. "UNASSIGNED" can be used when user has no preference. - # - # `GCS_FILE_PATH` - # : The path to a file on Google Cloud Storage. For example, - # "gs://folder/image1.png". - # - # `LABEL` - # : A display name of an object on an image, video etc., e.g. "dog". - # Must be up to 32 characters long and can consist only of ASCII - # Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. - # For each label an AnnotationSpec is created which display_name - # becomes the label; AnnotationSpecs are given back in predictions. - # - # `INSTANCE_ID` - # : A positive integer that identifies a specific instance of a - # labeled entity on an example. Used e.g. to track two cars on - # a video while being able to tell apart which one is which. - # - # `BOUNDING_BOX` - # : (`VERTEX,VERTEX,VERTEX,VERTEX` | `VERTEX,,,VERTEX,,`) - # A rectangle parallel to the frame of the example (image, - # video). If 4 vertices are given they are connected by edges - # in the order provided, if 2 are given they are recognized - # as diagonally opposite vertices of the rectangle. - # - # `VERTEX` - # : (`COORDINATE,COORDINATE`) - # First coordinate is horizontal (x), the second is vertical (y). - # - # `COORDINATE` - # : A float in 0 to 1 range, relative to total length of - # image or video in given dimension. For fractions the - # leading non-decimal 0 can be omitted (i.e. 0.3 = .3). - # Point 0,0 is in top left. - # - # `TIME_SEGMENT_START` - # : (`TIME_OFFSET`) - # Expresses a beginning, inclusive, of a time segment - # within an example that has a time dimension - # (e.g. video). - # - # `TIME_SEGMENT_END` - # : (`TIME_OFFSET`) - # Expresses an end, exclusive, of a time segment within - # n example that has a time dimension (e.g. video). - # - # `TIME_OFFSET` - # : A number of seconds as measured from the start of an - # example (e.g. video). Fractions are allowed, up to a - # microsecond precision. "inf" is allowed, and it means the end - # of the example. - # - # `TEXT_SNIPPET` - # : The content of a text snippet, UTF-8 encoded, enclosed within - # double quotes (""). - # - # `DOCUMENT` - # : A field that provides the textual content with document and the layout - # information. - # - # - # **Errors:** - # - # If any of the provided CSV files can't be parsed or if more than certain - # percent of CSV rows cannot be processed then the operation fails and - # nothing is imported. Regardless of overall success or failure the per-row - # failures, up to a certain count cap, is listed in - # Operation.metadata.partial_failures. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1::GcsSource] - # The Google Cloud Storage location for the input content. - # For {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData}, - # `gcs_source` points to a CSV file with a structure described in - # {::Google::Cloud::AutoML::V1::InputConfig InputConfig}. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters describing the semantic of the - # imported data, any string must be up to 25000 - # characters long. - # - # #### AutoML Tables - # - # `schema_inference_version` - # : (integer) This value must be supplied. - # The version of the - # algorithm to use for the initial inference of the - # column data types of the imported table. Allowed values: "1". - class InputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Input configuration for BatchPredict Action. - # - # The format of input depends on the ML problem of the model used for - # prediction. As input source the - # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} - # is expected, unless specified otherwise. - # - # The formats are represented in EBNF with commas being literal and with - # non-terminal symbols defined near the end of this comment. The formats - # are: - # - # #### AutoML Vision - # ##### Classification - # - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH - # - # The Google Cloud Storage location of an image of up to - # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. - # This path is treated as the ID in the batch predict output. - # - # Sample rows: - # - # gs://folder/image1.jpeg - # gs://folder/image2.gif - # gs://folder/image3.png - # - # ##### Object Detection - # - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH - # - # The Google Cloud Storage location of an image of up to - # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. - # This path is treated as the ID in the batch predict output. - # - # Sample rows: - # - # gs://folder/image1.jpeg - # gs://folder/image2.gif - # gs://folder/image3.png - # - # #### AutoML Video Intelligence - # ##### Classification - # - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - # - # `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in - # size and up to 3h in duration duration. - # Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # - # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the - # length of the video, and the end time must be after the start time. - # - # Sample rows: - # - # gs://folder/video1.mp4,10,40 - # gs://folder/video1.mp4,20,60 - # gs://folder/vid2.mov,0,inf - # - # ##### Object Tracking - # - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - # - # `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in - # size and up to 3h in duration duration. - # Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # - # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the - # length of the video, and the end time must be after the start time. - # - # Sample rows: - # - # gs://folder/video1.mp4,10,40 - # gs://folder/video1.mp4,20,60 - # gs://folder/vid2.mov,0,inf - # - # #### AutoML Natural Language - # ##### Classification - # - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH - # - # `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. - # Supported file extensions: .TXT, .PDF, .TIF, .TIFF - # - # Text files can be no larger than 10MB in size. - # - # Sample rows: - # - # gs://folder/text1.txt - # gs://folder/text2.pdf - # gs://folder/text3.tif - # - # ##### Sentiment Analysis - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH - # - # `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. - # Supported file extensions: .TXT, .PDF, .TIF, .TIFF - # - # Text files can be no larger than 128kB in size. - # - # Sample rows: - # - # gs://folder/text1.txt - # gs://folder/text2.pdf - # gs://folder/text3.tif - # - # ##### Entity Extraction - # - # One or more JSONL (JSON Lines) files that either provide inline text or - # documents. You can only use one format, either inline text or documents, - # for a single call to [AutoMl.BatchPredict]. - # - # Each JSONL file contains a per line a proto that - # wraps a temporary user-assigned TextSnippet ID (string up to 2000 - # characters long) called "id", a TextSnippet proto (in - # JSON representation) and zero or more TextFeature protos. Any given - # text snippet content must have 30,000 characters or less, and also - # be UTF-8 NFC encoded (ASCII already is). The IDs provided should be - # unique. - # - # Each document JSONL file contains, per line, a proto that wraps a Document - # proto with `input_config` set. Each document cannot exceed 2MB in size. - # - # Supported document extensions: .PDF, .TIF, .TIFF - # - # Each JSONL file must not exceed 100MB in size, and no more than 20 - # JSONL files may be passed. - # - # Sample inline JSONL file (Shown with artificial line - # breaks. Actual line breaks are denoted by "\n".): - # - # { - # "id": "my_first_id", - # "text_snippet": { "content": "dog car cat"}, - # "text_features": [ - # { - # "text_segment": \\{"start_offset": 4, "end_offset": 6}, - # "structural_type": PARAGRAPH, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.1, "y": 0.1}, - # \\{"x": 0.1, "y": 0.3}, - # \\{"x": 0.3, "y": 0.3}, - # \\{"x": 0.3, "y": 0.1}, - # ] - # }, - # } - # ], - # }\n - # { - # "id": "2", - # "text_snippet": { - # "content": "Extended sample content", - # "mime_type": "text/plain" - # } - # } - # - # Sample document JSONL file (Shown with artificial line - # breaks. Actual line breaks are denoted by "\n".): - # - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - # } - # } - # } - # }\n - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] - # } - # } - # } - # } - # - # #### AutoML Tables - # - # See [Preparing your training - # data](https://cloud.google.com/automl-tables/docs/predict-batch) for more - # information. - # - # You can use either - # {::Google::Cloud::AutoML::V1::BatchPredictInputConfig#gcs_source gcs_source} - # or - # [bigquery_source][BatchPredictInputConfig.bigquery_source]. - # - # **For gcs_source:** - # - # CSV file(s), each by itself 10GB or smaller and total size must be - # 100GB or smaller, where first file must have a header containing - # column names. If the first row of a subsequent file is the same as - # the header, then it is also treated as a header. All other rows - # contain values for the corresponding columns. - # - # The column names must contain the model's - # [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs] - # [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name] - # (order doesn't matter). The columns corresponding to the model's - # input feature column specs must contain values compatible with the - # column spec's data types. Prediction on all the rows, i.e. the CSV - # lines, will be attempted. - # - # - # Sample rows from a CSV file: - #
-        # "First Name","Last Name","Dob","Addresses"
-        # "John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
-        # "Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
-        # 
- # **For bigquery_source:** - # - # The URI of a BigQuery table. The user data size of the BigQuery - # table must be 100GB or smaller. - # - # The column names must contain the model's - # [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs] - # [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name] - # (order doesn't matter). The columns corresponding to the model's - # input feature column specs must contain values compatible with the - # column spec's data types. Prediction on all the rows of the table - # will be attempted. - # - # **Input field definitions:** - # - # `GCS_FILE_PATH` - # : The path to a file on Google Cloud Storage. For example, - # "gs://folder/video.avi". - # - # `TIME_SEGMENT_START` - # : (`TIME_OFFSET`) - # Expresses a beginning, inclusive, of a time segment - # within an example that has a time dimension - # (e.g. video). - # - # `TIME_SEGMENT_END` - # : (`TIME_OFFSET`) - # Expresses an end, exclusive, of a time segment within - # n example that has a time dimension (e.g. video). - # - # `TIME_OFFSET` - # : A number of seconds as measured from the start of an - # example (e.g. video). Fractions are allowed, up to a - # microsecond precision. "inf" is allowed, and it means the end - # of the example. - # - # **Errors:** - # - # If any of the provided CSV files can't be parsed or if more than certain - # percent of CSV rows cannot be processed then the operation fails and - # prediction does not happen. Regardless of overall success or failure the - # per-row failures, up to a certain count cap, will be listed in - # Operation.metadata.partial_failures. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1::GcsSource] - # Required. The Google Cloud Storage location for the input content. - class BatchPredictInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input configuration of a {::Google::Cloud::AutoML::V1::Document Document}. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1::GcsSource] - # The Google Cloud Storage location of the document file. Only a single path - # should be given. - # - # Max supported size: 512MB. - # - # Supported extensions: .PDF. - class DocumentInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # * For Translation: - # CSV file `translation.csv`, with each line in format: - # ML_USE,GCS_FILE_PATH - # GCS_FILE_PATH leads to a .TSV file which describes examples that have - # given ML_USE, using the following row format per line: - # TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target - # language) - # - # * For Tables: - # Output depends on whether the dataset was imported from Google Cloud - # Storage or BigQuery. - # Google Cloud Storage case: - # [gcs_destination][google.cloud.automl.v1p1beta.OutputConfig.gcs_destination] - # must be set. Exported are CSV file(s) `tables_1.csv`, - # `tables_2.csv`,...,`tables_N.csv` with each having as header line - # the table's column names, and all other lines contain values for - # the header columns. - # BigQuery case: - # [bigquery_destination][google.cloud.automl.v1p1beta.OutputConfig.bigquery_destination] - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # `export_data__` - # where will be made - # BigQuery-dataset-name compatible (e.g. most special characters will - # become underscores), and timestamp will be in - # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that - # dataset a new table called `primary_table` will be created, and - # filled with precisely the same data as this obtained on import. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1::GcsDestination] - # Required. The Google Cloud Storage location where the output is to be - # written to. For Image Object Detection, Text Extraction, Video - # Classification and Tables, in the given directory a new directory will be - # created with name: - # export_data-- where - # timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export - # output will be written into that directory. - class OutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for BatchPredict Action. - # - # As destination the - # {::Google::Cloud::AutoML::V1::BatchPredictOutputConfig#gcs_destination gcs_destination} - # must be set unless specified otherwise for a domain. If gcs_destination is - # set then in the given directory a new directory is created. Its name - # will be - # "prediction--", - # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents - # of it depends on the ML problem the predictions are made for. - # - # * For Image Classification: - # In the created directory files `image_classification_1.jsonl`, - # `image_classification_2.jsonl`,...,`image_classification_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of the successfully predicted images and annotations. - # A single image will be listed only once with all its annotations, - # and its annotations will never be split across files. - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps image's "ID" : "" followed by a list of - # zero or more AnnotationPayload protos (called annotations), which - # have classification detail populated. - # If prediction for any image failed (partially or completely), then an - # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - # files will be created (N depends on total number of failed - # predictions). These files will have a JSON representation of a proto - # that wraps the same "ID" : "" but here followed by - # exactly one - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`fields. - # - # * For Image Object Detection: - # In the created directory files `image_object_detection_1.jsonl`, - # `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of the successfully predicted images and annotations. - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps image's "ID" : "" followed by a list of - # zero or more AnnotationPayload protos (called annotations), which - # have image_object_detection detail populated. A single image will - # be listed only once with all its annotations, and its annotations - # will never be split across files. - # If prediction for any image failed (partially or completely), then - # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - # files will be created (N depends on total number of failed - # predictions). These files will have a JSON representation of a proto - # that wraps the same "ID" : "" but here followed by - # exactly one - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`fields. - # * For Video Classification: - # In the created directory a video_classification.csv file, and a .JSON - # file per each video classification requested in the input (i.e. each - # line in given CSV(s)), will be created. - # - # The format of video_classification.csv is: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - # where: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - # the prediction input lines (i.e. video_classification.csv has - # precisely the same number of lines as the prediction input had.) - # JSON_FILE_NAME = Name of .JSON file in the output directory, which - # contains prediction responses for the video time segment. - # STATUS = "OK" if prediction completed successfully, or an error code - # with message otherwise. If STATUS is not "OK" then the .JSON file - # for that line may not exist or be empty. - # - # Each .JSON file, assuming STATUS is "OK", will contain a list of - # AnnotationPayload protos in JSON format, which are the predictions - # for the video time segment the file is assigned to in the - # video_classification.csv. All AnnotationPayload protos will have - # video_classification field set, and will be sorted by - # video_classification.type field (note that the returned types are - # governed by `classifaction_types` parameter in - # [PredictService.BatchPredictRequest.params][]). - # - # * For Video Object Tracking: - # In the created directory a video_object_tracking.csv file will be - # created, and multiple files video_object_trackinng_1.json, - # video_object_trackinng_2.json,..., video_object_trackinng_N.json, - # where N is the number of requests in the input (i.e. the number of - # lines in given CSV(s)). - # - # The format of video_object_tracking.csv is: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - # where: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - # the prediction input lines (i.e. video_object_tracking.csv has - # precisely the same number of lines as the prediction input had.) - # JSON_FILE_NAME = Name of .JSON file in the output directory, which - # contains prediction responses for the video time segment. - # STATUS = "OK" if prediction completed successfully, or an error - # code with message otherwise. If STATUS is not "OK" then the .JSON - # file for that line may not exist or be empty. - # - # Each .JSON file, assuming STATUS is "OK", will contain a list of - # AnnotationPayload protos in JSON format, which are the predictions - # for each frame of the video time segment the file is assigned to in - # video_object_tracking.csv. All AnnotationPayload protos will have - # video_object_tracking field set. - # * For Text Classification: - # In the created directory files `text_classification_1.jsonl`, - # `text_classification_2.jsonl`,...,`text_classification_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps input text file (or document) in - # the text snippet (or document) proto and a list of - # zero or more AnnotationPayload protos (called annotations), which - # have classification detail populated. A single text file (or - # document) will be listed only once with all its annotations, and its - # annotations will never be split across files. - # - # If prediction for any input file (or document) failed (partially or - # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps input file followed by exactly one - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Text Sentiment: - # In the created directory files `text_sentiment_1.jsonl`, - # `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps input text file (or document) in - # the text snippet (or document) proto and a list of - # zero or more AnnotationPayload protos (called annotations), which - # have text_sentiment detail populated. A single text file (or - # document) will be listed only once with all its annotations, and its - # annotations will never be split across files. - # - # If prediction for any input file (or document) failed (partially or - # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps input file followed by exactly one - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Text Extraction: - # In the created directory files `text_extraction_1.jsonl`, - # `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # The contents of these .JSONL file(s) depend on whether the input - # used inline text, or documents. - # If input was inline, then each .JSONL file will contain, per line, - # a JSON representation of a proto that wraps given in request text - # snippet's "id" (if specified), followed by input text snippet, - # and a list of zero or more - # AnnotationPayload protos (called annotations), which have - # text_extraction detail populated. A single text snippet will be - # listed only once with all its annotations, and its annotations will - # never be split across files. - # If input used documents, then each .JSONL file will contain, per - # line, a JSON representation of a proto that wraps given in request - # document proto, followed by its OCR-ed representation in the form - # of a text snippet, finally followed by a list of zero or more - # AnnotationPayload protos (called annotations), which have - # text_extraction detail populated and refer, via their indices, to - # the OCR-ed text snippet. A single document (and its text snippet) - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # If prediction for any text snippet failed (partially or completely), - # then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps either the "id" : "" (in case of inline) - # or the document proto (in case of document) but here followed by - # exactly one - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Tables: - # Output depends on whether - # [gcs_destination][google.cloud.automl.v1p1beta.BatchPredictOutputConfig.gcs_destination] - # or - # [bigquery_destination][google.cloud.automl.v1p1beta.BatchPredictOutputConfig.bigquery_destination] - # is set (either is allowed). - # Google Cloud Storage case: - # In the created directory files `tables_1.csv`, `tables_2.csv`,..., - # `tables_N.csv` will be created, where N may be 1, and depends on - # the total number of the successfully predicted rows. - # For all CLASSIFICATION - # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]: - # Each .csv file will contain a header, listing all columns' - # [display_name-s][google.cloud.automl.v1p1beta.ColumnSpec.display_name] - # given on input followed by M target column names in the format of - # "<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] - # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>__score" where M is the number of distinct target values, - # i.e. number of distinct values in the target column of the table - # used to train the model. Subsequent lines will contain the - # respective values of successfully predicted rows, with the last, - # i.e. the target, columns having the corresponding prediction - # [scores][google.cloud.automl.v1p1beta.TablesAnnotation.score]. - # For REGRESSION and FORECASTING - # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]: - # Each .csv file will contain a header, listing all columns' - # [display_name-s][google.cloud.automl.v1p1beta.display_name] - # given on input followed by the predicted target column with name - # in the format of - # "predicted_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] - # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>" - # Subsequent lines will contain the respective values of - # successfully predicted rows, with the last, i.e. the target, - # column having the predicted target value. - # If prediction for any rows failed, then an additional - # `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be - # created (N depends on total number of failed rows). These files - # will have analogous format as `tables_*.csv`, but always with a - # single target column having - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # represented as a JSON string, and containing only `code` and - # `message`. - # BigQuery case: - # [bigquery_destination][google.cloud.automl.v1p1beta.OutputConfig.bigquery_destination] - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # `prediction__` - # where will be made - # BigQuery-dataset-name compatible (e.g. most special characters will - # become underscores), and timestamp will be in - # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset - # two tables will be created, `predictions`, and `errors`. - # The `predictions` table's column names will be the input columns' - # [display_name-s][google.cloud.automl.v1p1beta.ColumnSpec.display_name] - # followed by the target column with name in the format of - # "predicted_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] - # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>" - # The input feature columns will contain the respective values of - # successfully predicted rows, with the target column having an - # ARRAY of - # [AnnotationPayloads][google.cloud.automl.v1p1beta.AnnotationPayload], - # represented as STRUCT-s, containing - # [TablesAnnotation][google.cloud.automl.v1p1beta.TablesAnnotation]. - # The `errors` table contains rows for which the prediction has - # failed, it has analogous input columns while the target column name - # is in the format of - # "errors_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] - # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>", - # and as a value has - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # represented as a STRUCT, and containing only `code` and `message`. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1::GcsDestination] - # Required. The Google Cloud Storage location of the directory where the - # output is to be written to. - class BatchPredictOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for ModelExport Action. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1::GcsDestination] - # Required. The Google Cloud Storage location where the model is to be - # written to. This location may only be set for the following model - # formats: - # "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". - # - # Under the directory given as the destination a new one with name - # "model-export--", - # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, - # will be created. Inside the model and any of its supporting files - # will be written. - # @!attribute [rw] model_format - # @return [::String] - # The format in which the model must be exported. The available, and default, - # formats depend on the problem and model type (if given problem and type - # combination doesn't have a format listed, it means its models are not - # exportable): - # - # * For Image Classification mobile-low-latency-1, mobile-versatile-1, - # mobile-high-accuracy-1: - # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", - # "docker". - # - # * For Image Classification mobile-core-ml-low-latency-1, - # mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: - # "core_ml" (default). - # - # * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, - # mobile-high-accuracy-1: - # "tflite", "tf_saved_model", "tf_js". - # Formats description: - # - # * tflite - Used for Android mobile devices. - # * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) - # devices. - # * tf_saved_model - A tensorflow model in SavedModel format. - # * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can - # be used in the browser and in Node.js using JavaScript. - # * docker - Used for Docker containers. Use the params field to customize - # the container. The container is verified to work correctly on - # ubuntu 16.04 operating system. See more at - # [containers - # quickstart](https://cloud.google.com/vision/automl/docs/containers-gcs-quickstart) - # * core_ml - Used for iOS mobile devices. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional model-type and format specific parameters describing the - # requirements for the to be exported model files, any string must be up to - # 25000 characters long. - # - # * For `docker` format: - # `cpu_architecture` - (string) "x86_64" (default). - # `gpu_architecture` - (string) "none" (default), "nvidia". - class ModelExportOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The Google Cloud Storage location for the input content. - # @!attribute [rw] input_uris - # @return [::Array<::String>] - # Required. Google Cloud Storage URIs to input files, up to 2000 - # characters long. Accepted forms: - # * Full object path, e.g. gs://bucket/directory/object.csv - class GcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location where the output is to be written to. - # @!attribute [rw] output_uri_prefix - # @return [::String] - # Required. Google Cloud Storage URI to output directory, up to 2000 - # characters long. - # Accepted forms: - # * Prefix path: gs://bucket/directory - # The requesting user must have write permission to the bucket. - # The directory is created if it doesn't exist. - class GcsDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb deleted file mode 100644 index 37165c8fbf69..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb +++ /dev/null @@ -1,121 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # API proto representing a trained machine learning model. - # @!attribute [rw] translation_model_metadata - # @return [::Google::Cloud::AutoML::V1::TranslationModelMetadata] - # Metadata for translation models. - # - # Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata] - # Metadata for image classification models. - # - # Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1::TextClassificationModelMetadata] - # Metadata for text classification models. - # - # Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_model_metadata - # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelMetadata] - # Metadata for image object detection models. - # - # Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_model_metadata - # @return [::Google::Cloud::AutoML::V1::TextExtractionModelMetadata] - # Metadata for text extraction models. - # - # Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_model_metadata - # @return [::Google::Cloud::AutoML::V1::TextSentimentModelMetadata] - # Metadata for text sentiment models. - # - # Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the model. - # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the model to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores - # (_), and ASCII digits 0-9. It must start with a letter. - # @!attribute [rw] dataset_id - # @return [::String] - # Required. The resource ID of the dataset used to create the model. The dataset must - # come from the same ancestor project and location. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the model training finished and can be used for prediction. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model was last updated. - # @!attribute [rw] deployment_state - # @return [::Google::Cloud::AutoML::V1::Model::DeploymentState] - # Output only. Deployment state of the model. A model can only serve - # prediction requests after it gets deployed. - # @!attribute [rw] etag - # @return [::String] - # Used to perform a consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata to organize your model. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://goo.gl/xmQnxf for more information on and examples of labels. - class Model - 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 - - # Deployment state of the model. - module DeploymentState - # Should not be used, an un-set enum has this value by default. - DEPLOYMENT_STATE_UNSPECIFIED = 0 - - # Model is deployed. - DEPLOYED = 1 - - # Model is not deployed. - UNDEPLOYED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb deleted file mode 100644 index 729817ff4233..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb +++ /dev/null @@ -1,100 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Evaluation results of a model. - # @!attribute [rw] classification_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics] - # Model evaluation metrics for image, text, video and tables - # classification. - # Tables problem is considered a classification when the target column - # is CATEGORY DataType. - # - # Note: The following fields are mutually exclusive: `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] translation_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1::TranslationEvaluationMetrics] - # Model evaluation metrics for translation. - # - # Note: The following fields are mutually exclusive: `translation_evaluation_metrics`, `classification_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionEvaluationMetrics] - # Model evaluation metrics for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1::TextSentimentEvaluationMetrics] - # Evaluation metrics for text sentiment models. - # - # Note: The following fields are mutually exclusive: `text_sentiment_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1::TextExtractionEvaluationMetrics] - # Evaluation metrics for text extraction models. - # - # Note: The following fields are mutually exclusive: `text_extraction_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the model evaluation. - # Format: - # `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` - # @!attribute [rw] annotation_spec_id - # @return [::String] - # Output only. The ID of the annotation spec that the model evaluation applies to. The - # The ID is empty for the overall model evaluation. - # For Tables annotation specs in the dataset do not exist and this ID is - # always not set, but for CLASSIFICATION - # [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] - # the - # {::Google::Cloud::AutoML::V1::ModelEvaluation#display_name display_name} - # field is used. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The value of - # {::Google::Cloud::AutoML::V1::AnnotationSpec#display_name display_name} - # at the moment when the model was trained. Because this field returns a - # value at model training time, for different models trained from the same - # dataset, the values may differ, since display names could had been changed - # between the two model's trainings. For Tables CLASSIFICATION - # [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] - # distinct values of the target column at the moment of the model evaluation - # are populated here. - # The display_name is empty for the overall model evaluation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model evaluation was created. - # @!attribute [rw] evaluated_example_count - # @return [::Integer] - # Output only. The number of examples used for model evaluation, i.e. for - # which ground truth from time of model creation is compared against the - # predicted annotations created by the model. - # For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is - # the total number of all examples used for evaluation. - # Otherwise, this is the count of examples that according to the ground - # truth were annotated by the - # {::Google::Cloud::AutoML::V1::ModelEvaluation#annotation_spec_id annotation_spec_id}. - class ModelEvaluation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb deleted file mode 100644 index 78d79e45a942..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb +++ /dev/null @@ -1,197 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Metadata used across all long running operations returned by AutoML API. - # @!attribute [rw] delete_details - # @return [::Google::Cloud::AutoML::V1::DeleteOperationMetadata] - # Details of a Delete operation. - # - # Note: The following fields are mutually exclusive: `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] deploy_model_details - # @return [::Google::Cloud::AutoML::V1::DeployModelOperationMetadata] - # Details of a DeployModel operation. - # - # Note: The following fields are mutually exclusive: `deploy_model_details`, `delete_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] undeploy_model_details - # @return [::Google::Cloud::AutoML::V1::UndeployModelOperationMetadata] - # Details of an UndeployModel operation. - # - # Note: The following fields are mutually exclusive: `undeploy_model_details`, `delete_details`, `deploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_model_details - # @return [::Google::Cloud::AutoML::V1::CreateModelOperationMetadata] - # Details of CreateModel operation. - # - # Note: The following fields are mutually exclusive: `create_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_dataset_details - # @return [::Google::Cloud::AutoML::V1::CreateDatasetOperationMetadata] - # Details of CreateDataset operation. - # - # Note: The following fields are mutually exclusive: `create_dataset_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] import_data_details - # @return [::Google::Cloud::AutoML::V1::ImportDataOperationMetadata] - # Details of ImportData operation. - # - # Note: The following fields are mutually exclusive: `import_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] batch_predict_details - # @return [::Google::Cloud::AutoML::V1::BatchPredictOperationMetadata] - # Details of BatchPredict operation. - # - # Note: The following fields are mutually exclusive: `batch_predict_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_data_details - # @return [::Google::Cloud::AutoML::V1::ExportDataOperationMetadata] - # Details of ExportData operation. - # - # Note: The following fields are mutually exclusive: `export_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_model_details - # @return [::Google::Cloud::AutoML::V1::ExportModelOperationMetadata] - # Details of ExportModel operation. - # - # Note: The following fields are mutually exclusive: `export_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] progress_percent - # @return [::Integer] - # Output only. Progress of operation. Range: [0, 100]. - # Not used currently. - # @!attribute [rw] partial_failures - # @return [::Array<::Google::Rpc::Status>] - # Output only. Partial failures encountered. - # E.g. single files that couldn't be read. - # This field should never exceed 20 entries. - # Status details field will contain standard GCP error details. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was updated for the last time. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of operations that perform deletes of any entities. - class DeleteOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of DeployModel operation. - class DeployModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of UndeployModel operation. - class UndeployModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of CreateDataset operation. - class CreateDatasetOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of CreateModel operation. - class CreateModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of ImportData operation. - class ImportDataOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of ExportData operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1::ExportDataOperationMetadata::ExportDataOutputInfo] - # Output only. Information further describing this export data's output. - class ExportDataOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes this export data's output. - # Supplements - # {::Google::Cloud::AutoML::V1::OutputConfig OutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the exported data is written. - class ExportDataOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of BatchPredict operation. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1::BatchPredictInputConfig] - # Output only. The input config that was given upon starting this - # batch predict operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1::BatchPredictOperationMetadata::BatchPredictOutputInfo] - # Output only. Information further describing this batch predict's output. - class BatchPredictOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes this batch predict's output. - # Supplements - # {::Google::Cloud::AutoML::V1::BatchPredictOutputConfig BatchPredictOutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the prediction output is written. - class BatchPredictOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of ExportModel operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1::ExportModelOperationMetadata::ExportModelOutputInfo] - # Output only. Information further describing the output of this model - # export. - class ExportModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes the output of model export. - # Supplements - # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the model will be exported. - class ExportModelOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb deleted file mode 100644 index 0811f3318b09..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.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 AutoML - module V1 - # Request message for {::Google::Cloud::AutoML::V1::PredictionService::Client#predict PredictionService.Predict}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the model requested to serve the prediction. - # @!attribute [rw] payload - # @return [::Google::Cloud::AutoML::V1::ExamplePayload] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned. The default is 100. The - # number of returned bounding boxes might be limited by the server. - # - # AutoML Tables - # - # `feature_importance` - # : (boolean) Whether - # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] - # is populated in the returned list of - # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] - # objects. The default is false. - class PredictRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for {::Google::Cloud::AutoML::V1::PredictionService::Client#predict PredictionService.Predict}. - # @!attribute [rw] payload - # @return [::Array<::Google::Cloud::AutoML::V1::AnnotationPayload>] - # Prediction result. - # AutoML Translation and AutoML Natural Language Sentiment Analysis - # return precisely one payload. - # @!attribute [rw] preprocessed_input - # @return [::Google::Cloud::AutoML::V1::ExamplePayload] - # The preprocessed example that AutoML actually makes prediction on. - # Empty if AutoML does not preprocess the input example. - # - # For AutoML Natural Language (Classification, Entity Extraction, and - # Sentiment Analysis), if the input is a document, the recognized text is - # returned in the - # {::Google::Cloud::AutoML::V1::Document#document_text document_text} - # property. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific prediction response metadata. - # - # AutoML Vision Object Detection - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding boxes to return per image. - # - # AutoML Natural Language Sentiment Analysis - # - # `sentiment_score` - # : (float, deprecated) A value between -1 and 1, - # -1 maps to least positive sentiment, while 1 maps to the most positive - # one and the higher the score, the more positive the sentiment in the - # document is. Yet these values are relative to the training data, so - # e.g. if all data was positive then -1 is also positive (though - # the least). - # `sentiment_score` is not the same as "score" and "magnitude" - # from Sentiment Analysis in the Natural Language API. - class PredictResponse - 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 - - # Request message for {::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the model requested to serve the batch prediction. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1::BatchPredictInputConfig] - # Required. The input configuration for batch prediction. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig] - # Required. The Configuration specifying where output predictions should - # be written. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # AutoML Natural Language Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # AutoML Video Intelligence Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # `segment_classification` - # : (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is true. - # - # `shot_classification` - # : (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # The default is false. - # - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. - # - # `1s_interval_classification` - # : (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. The default is false. - # - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # - # AutoML Video Intelligence Object Tracking - # - # `score_threshold` - # : (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # - # `min_bounding_box_size` - # : (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size are - # returned. Value in 0 to 1 range. Default is 0. - class BatchPredictRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Result of the Batch Predict. This message is returned in - # {::Google::Longrunning::Operation#response response} of the operation returned - # by the {::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific prediction response metadata. - # - # AutoML Vision Object Detection - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding boxes returned per image. - # - # AutoML Video Intelligence Object Tracking - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding boxes returned per frame. - class BatchPredictResult - 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-automl-v1/proto_docs/google/cloud/automl/v1/service.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb deleted file mode 100644 index 3185ecd7a149..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb +++ /dev/null @@ -1,326 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#create_dataset AutoMl.CreateDataset}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project to create the dataset for. - # @!attribute [rw] dataset - # @return [::Google::Cloud::AutoML::V1::Dataset] - # Required. The dataset to create. - class CreateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_dataset AutoMl.GetDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to retrieve. - class GetDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project from which to list datasets. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. - class ListDatasetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets}. - # @!attribute [rw] datasets - # @return [::Array<::Google::Cloud::AutoML::V1::Dataset>] - # The datasets read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1::ListDatasetsRequest#page_token ListDatasetsRequest.page_token} to obtain that page. - class ListDatasetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#update_dataset AutoMl.UpdateDataset} - # @!attribute [rw] dataset - # @return [::Google::Cloud::AutoML::V1::Dataset] - # Required. The dataset which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. - class UpdateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset AutoMl.DeleteDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to delete. - class DeleteDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData}. - # @!attribute [rw] name - # @return [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1::InputConfig] - # Required. The desired input location and its domain specific semantics, - # if any. - class ImportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#export_data AutoMl.ExportData}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1::OutputConfig] - # Required. The desired output location. - class ExportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec AutoMl.GetAnnotationSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the annotation spec to retrieve. - class GetAnnotationSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#create_model AutoMl.CreateModel}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent project where the model is being created. - # @!attribute [rw] model - # @return [::Google::Cloud::AutoML::V1::Model] - # Required. The model to create. - class CreateModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_model AutoMl.GetModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model. - class GetModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project, from which to list the models. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels} call. - class ListModelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels}. - # @!attribute [rw] model - # @return [::Array<::Google::Cloud::AutoML::V1::Model>] - # List of models in the requested page. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1::ListModelsRequest#page_token ListModelsRequest.page_token} to obtain that page. - class ListModelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#delete_model AutoMl.DeleteModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model being deleted. - class DeleteModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#update_model AutoMl.UpdateModel} - # @!attribute [rw] model - # @return [::Google::Cloud::AutoML::V1::Model] - # Required. The model which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. - class UpdateModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#deploy_model AutoMl.DeployModel}. - # @!attribute [rw] image_object_detection_model_deployment_metadata - # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_model_deployment_metadata - # @return [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata] - # Model deployment metadata specific to Image Classification. - # - # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model to deploy. - class DeployModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model AutoMl.UndeployModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model to undeploy. - class UndeployModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}. - # Models need to be enabled for exporting, otherwise an error code will be - # returned. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the model to export. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1::ModelExportOutputConfig] - # Required. The desired output location and configuration. - class ExportModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation AutoMl.GetModelEvaluation}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the model evaluation. - class GetModelEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @!attribute [rw] filter - # @return [::String] - # Required. An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - class ListModelEvaluationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. - # @!attribute [rw] model_evaluation - # @return [::Array<::Google::Cloud::AutoML::V1::ModelEvaluation>] - # List of model evaluations in the requested page. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to the {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest#page_token ListModelEvaluationsRequest.page_token} field of a new - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} request to obtain that page. - class ListModelEvaluationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb deleted file mode 100644 index aa705d31cb5d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Dataset metadata for classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1::ClassificationType] - # Required. Type of the classification problem. - class TextClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1::ClassificationType] - # Output only. Classification type of the dataset used to train this model. - class TextClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata that is specific to text extraction - class TextExtractionDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text extraction. - class TextExtractionModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata for text sentiment. - # @!attribute [rw] sentiment_max - # @return [::Integer] - # Required. A sentiment is expressed as an integer ordinal, where higher value - # means a more positive sentiment. The range of sentiments that will be used - # is between 0 and sentiment_max (inclusive on both ends), and all the values - # in the range must be represented in the dataset before a model can be - # created. - # sentiment_max value must be between 1 and 10 (inclusive). - class TextSentimentDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text sentiment. - class TextSentimentModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb deleted file mode 100644 index 817c0921c657..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.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 AutoML - module V1 - # Annotation for identifying spans of text. - # @!attribute [rw] text_segment - # @return [::Google::Cloud::AutoML::V1::TextSegment] - # An entity annotation will set this, which is the part of the original - # text to which the annotation pertains. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0. A higher value - # means greater confidence in correctness of the annotation. - class TextExtractionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for text extraction problems. - # @!attribute [rw] au_prc - # @return [::Float] - # Output only. The Area under precision recall curve metric. - # @!attribute [rw] confidence_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1::TextExtractionEvaluationMetrics::ConfidenceMetricsEntry>] - # Output only. Metrics that have confidence thresholds. - # Precision-recall curve can be derived from it. - class TextExtractionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. The confidence threshold value used to compute the metrics. - # Only annotations with score of at least this threshold are considered to - # be ones the model would return. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall under the given confidence threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision under the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb deleted file mode 100644 index 93eddac0a79f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.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 AutoML - module V1 - # A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. - # @!attribute [rw] content - # @return [::String] - # Output only. The content of the TextSegment. - # @!attribute [rw] start_offset - # @return [::Integer] - # Required. Zero-based character index of the first character of the text - # segment (counting characters from the beginning of the text). - # @!attribute [rw] end_offset - # @return [::Integer] - # Required. Zero-based character index of the first character past the end of - # the text segment (counting character from the beginning of the text). - # The character at the end_offset is NOT included in the text segment. - class TextSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb deleted file mode 100644 index 1c4bc080ceb3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.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 Cloud - module AutoML - module V1 - # Contains annotation details specific to text sentiment. - # @!attribute [rw] sentiment - # @return [::Integer] - # Output only. The sentiment with the semantic, as given to the - # {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData} when populating the dataset from which the model used - # for the prediction had been trained. - # The sentiment values are between 0 and - # Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), - # with higher value meaning more positive sentiment. They are completely - # relative, i.e. 0 means least positive sentiment and sentiment_max means - # the most positive from the sentiments present in the train data. Therefore - # e.g. if train data had only negative sentiment, then sentiment_max, would - # be still negative (although least negative). - # The sentiment shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - class TextSentimentAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for text sentiment problems. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - # @!attribute [rw] mean_absolute_error - # @return [::Float] - # Output only. Mean absolute error. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] mean_squared_error - # @return [::Float] - # Output only. Mean squared error. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] linear_kappa - # @return [::Float] - # Output only. Linear weighted kappa. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] quadratic_kappa - # @return [::Float] - # Output only. Quadratic weighted kappa. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] confusion_matrix - # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix] - # Output only. Confusion matrix of the evaluation. - # Only set for the overall model evaluation, not for evaluation of a single - # annotation spec. - class TextSentimentEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb deleted file mode 100644 index b41617bc0ea1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.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 AutoML - module V1 - # Dataset metadata that is specific to translation. - # @!attribute [rw] source_language_code - # @return [::String] - # Required. The BCP-47 language code of the source language. - # @!attribute [rw] target_language_code - # @return [::String] - # Required. The BCP-47 language code of the target language. - class TranslationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluation metrics for the dataset. - # @!attribute [rw] bleu_score - # @return [::Float] - # Output only. BLEU score. - # @!attribute [rw] base_bleu_score - # @return [::Float] - # Output only. BLEU score for base model. - class TranslationEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to translation. - # @!attribute [rw] base_model - # @return [::String] - # The resource name of the model to use as a baseline to train the custom - # model. If unset, we use the default base model provided by Google - # Translate. Format: - # `projects/{project_id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] source_language_code - # @return [::String] - # Output only. Inferred from the dataset. - # The source language (The BCP-47 language code) that is used for training. - # @!attribute [rw] target_language_code - # @return [::String] - # Output only. The target language (The BCP-47 language code) that is used - # for training. - class TranslationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation details specific to translation. - # @!attribute [rw] translated_content - # @return [::Google::Cloud::AutoML::V1::TextSnippet] - # Output only . The translated content. - class TranslationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile deleted file mode 100644 index a30bcdf1095a..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1", path: "../" -else - gem "google-cloud-automl-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-automl-v1/snippets/automl/create_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb deleted file mode 100644 index b5039ab44d72..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.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 automl_v1_generated_AutoML_CreateDataset_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the create_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#create_dataset. -# -def create_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new - - # Call the create_dataset method. - result = client.create_dataset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb deleted file mode 100644 index 5d3c31c2a84e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.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 automl_v1_generated_AutoML_CreateModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the create_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#create_model. -# -def create_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::CreateModelRequest.new - - # Call the create_model method. - result = client.create_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb deleted file mode 100644 index 5d9f3bddfa4c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.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 automl_v1_generated_AutoML_DeleteDataset_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the delete_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset. -# -def delete_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new - - # Call the delete_dataset method. - result = client.delete_dataset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb deleted file mode 100644 index 31d572dc4ae4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.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 automl_v1_generated_AutoML_DeleteModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the delete_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#delete_model. -# -def delete_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::DeleteModelRequest.new - - # Call the delete_model method. - result = client.delete_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb deleted file mode 100644 index 6bf6b9d1894a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.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 automl_v1_generated_AutoML_DeployModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the deploy_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#deploy_model. -# -def deploy_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::DeployModelRequest.new - - # Call the deploy_model method. - result = client.deploy_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_DeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb deleted file mode 100644 index 0c6ccde37676..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.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 automl_v1_generated_AutoML_ExportData_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the export_data call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#export_data. -# -def export_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ExportDataRequest.new - - # Call the export_data method. - result = client.export_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_ExportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb deleted file mode 100644 index a8d8b903e76d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.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 automl_v1_generated_AutoML_ExportModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the export_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#export_model. -# -def export_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ExportModelRequest.new - - # Call the export_model method. - result = client.export_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_ExportModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb deleted file mode 100644 index 1370dd7f6de2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_GetAnnotationSpec_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the get_annotation_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec. -# -def get_annotation_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new - - # Call the get_annotation_spec method. - result = client.get_annotation_spec request - - # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. - p result -end -# [END automl_v1_generated_AutoML_GetAnnotationSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb deleted file mode 100644 index 653b941b6763..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_GetDataset_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the get_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#get_dataset. -# -def get_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::GetDatasetRequest.new - - # Call the get_dataset method. - result = client.get_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - p result -end -# [END automl_v1_generated_AutoML_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb deleted file mode 100644 index 3cfec8bd9f5b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_GetModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the get_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#get_model. -# -def get_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::GetModelRequest.new - - # Call the get_model method. - result = client.get_model request - - # The returned object is of type Google::Cloud::AutoML::V1::Model. - p result -end -# [END automl_v1_generated_AutoML_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb deleted file mode 100644 index 66b9f5107d85..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_GetModelEvaluation_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the get_model_evaluation call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation. -# -def get_model_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new - - # Call the get_model_evaluation method. - result = client.get_model_evaluation request - - # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. - p result -end -# [END automl_v1_generated_AutoML_GetModelEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb deleted file mode 100644 index 69bb6c83c5dc..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.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 automl_v1_generated_AutoML_ImportData_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the import_data call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#import_data. -# -def import_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ImportDataRequest.new - - # Call the import_data method. - result = client.import_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_ImportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb deleted file mode 100644 index c5a76dbcd997..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.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 automl_v1_generated_AutoML_ListDatasets_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the list_datasets call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#list_datasets. -# -def list_datasets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new - - # Call the list_datasets method. - result = client.list_datasets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. - p item - end -end -# [END automl_v1_generated_AutoML_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb deleted file mode 100644 index c9798178e36c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.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 automl_v1_generated_AutoML_ListModelEvaluations_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the list_model_evaluations call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations. -# -def list_model_evaluations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new - - # Call the list_model_evaluations method. - result = client.list_model_evaluations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. - p item - end -end -# [END automl_v1_generated_AutoML_ListModelEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb deleted file mode 100644 index 9b3102e77406..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.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 automl_v1_generated_AutoML_ListModels_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the list_models call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#list_models. -# -def list_models - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ListModelsRequest.new - - # Call the list_models method. - result = client.list_models request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1::Model. - p item - end -end -# [END automl_v1_generated_AutoML_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb deleted file mode 100644 index 9044e6b31e6d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.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 automl_v1_generated_AutoML_UndeployModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the undeploy_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model. -# -def undeploy_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::UndeployModelRequest.new - - # Call the undeploy_model method. - result = client.undeploy_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_UndeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb deleted file mode 100644 index 097b11573307..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_UpdateDataset_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the update_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#update_dataset. -# -def update_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new - - # Call the update_dataset method. - result = client.update_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - p result -end -# [END automl_v1_generated_AutoML_UpdateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb deleted file mode 100644 index 8b945e7f28c5..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_UpdateModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the update_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#update_model. -# -def update_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::UpdateModelRequest.new - - # Call the update_model method. - result = client.update_model request - - # The returned object is of type Google::Cloud::AutoML::V1::Model. - p result -end -# [END automl_v1_generated_AutoML_UpdateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb deleted file mode 100644 index 97f5c94f0b1a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.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 automl_v1_generated_PredictionService_BatchPredict_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the batch_predict call in the PredictionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict. -# -def batch_predict - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::PredictionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::BatchPredictRequest.new - - # Call the batch_predict method. - result = client.batch_predict request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_PredictionService_BatchPredict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb deleted file mode 100644 index bc742b1e85e0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_PredictionService_Predict_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the predict call in the PredictionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::PredictionService::Client#predict. -# -def predict - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::PredictionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::PredictRequest.new - - # Call the predict method. - result = client.predict request - - # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. - p result -end -# [END automl_v1_generated_PredictionService_Predict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json b/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json deleted file mode 100644 index 96e1da944c03..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json +++ /dev/null @@ -1,815 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-automl-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.automl.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "automl_v1_generated_PredictionService_Predict_sync", - "title": "Snippet for the predict call in the PredictionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::PredictionService::Client#predict.", - "file": "prediction_service/predict.rb", - "language": "RUBY", - "client_method": { - "short_name": "predict", - "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client#predict", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::PredictRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::PredictResponse", - "client": { - "short_name": "PredictionService::Client", - "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client" - }, - "method": { - "short_name": "Predict", - "full_name": "google.cloud.automl.v1.PredictionService.Predict", - "service": { - "short_name": "PredictionService", - "full_name": "google.cloud.automl.v1.PredictionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_PredictionService_BatchPredict_sync", - "title": "Snippet for the batch_predict call in the PredictionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict.", - "file": "prediction_service/batch_predict.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_predict", - "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::BatchPredictRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PredictionService::Client", - "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client" - }, - "method": { - "short_name": "BatchPredict", - "full_name": "google.cloud.automl.v1.PredictionService.BatchPredict", - "service": { - "short_name": "PredictionService", - "full_name": "google.cloud.automl.v1.PredictionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_CreateDataset_sync", - "title": "Snippet for the create_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#create_dataset.", - "file": "automl/create_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_dataset", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#create_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::CreateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "CreateDataset", - "full_name": "google.cloud.automl.v1.AutoMl.CreateDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_GetDataset_sync", - "title": "Snippet for the get_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_dataset.", - "file": "automl/get_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dataset", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::GetDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "GetDataset", - "full_name": "google.cloud.automl.v1.AutoMl.GetDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ListDatasets_sync", - "title": "Snippet for the list_datasets call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_datasets.", - "file": "automl/list_datasets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_datasets", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ListDatasetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::ListDatasetsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ListDatasets", - "full_name": "google.cloud.automl.v1.AutoMl.ListDatasets", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_UpdateDataset_sync", - "title": "Snippet for the update_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#update_dataset.", - "file": "automl/update_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_dataset", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#update_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::UpdateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "UpdateDataset", - "full_name": "google.cloud.automl.v1.AutoMl.UpdateDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_DeleteDataset_sync", - "title": "Snippet for the delete_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset.", - "file": "automl/delete_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_dataset", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::DeleteDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "DeleteDataset", - "full_name": "google.cloud.automl.v1.AutoMl.DeleteDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ImportData_sync", - "title": "Snippet for the import_data call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#import_data.", - "file": "automl/import_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_data", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#import_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ImportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ImportData", - "full_name": "google.cloud.automl.v1.AutoMl.ImportData", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ExportData_sync", - "title": "Snippet for the export_data call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#export_data.", - "file": "automl/export_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_data", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#export_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ExportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ExportData", - "full_name": "google.cloud.automl.v1.AutoMl.ExportData", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_GetAnnotationSpec_sync", - "title": "Snippet for the get_annotation_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec.", - "file": "automl/get_annotation_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_annotation_spec", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::AnnotationSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "GetAnnotationSpec", - "full_name": "google.cloud.automl.v1.AutoMl.GetAnnotationSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_CreateModel_sync", - "title": "Snippet for the create_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#create_model.", - "file": "automl/create_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#create_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::CreateModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "CreateModel", - "full_name": "google.cloud.automl.v1.AutoMl.CreateModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_GetModel_sync", - "title": "Snippet for the get_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_model.", - "file": "automl/get_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::GetModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::Model", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "GetModel", - "full_name": "google.cloud.automl.v1.AutoMl.GetModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ListModels_sync", - "title": "Snippet for the list_models call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_models.", - "file": "automl/list_models.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_models", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_models", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ListModelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::ListModelsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ListModels", - "full_name": "google.cloud.automl.v1.AutoMl.ListModels", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_DeleteModel_sync", - "title": "Snippet for the delete_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#delete_model.", - "file": "automl/delete_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#delete_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::DeleteModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "DeleteModel", - "full_name": "google.cloud.automl.v1.AutoMl.DeleteModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_UpdateModel_sync", - "title": "Snippet for the update_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#update_model.", - "file": "automl/update_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#update_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::UpdateModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::Model", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "UpdateModel", - "full_name": "google.cloud.automl.v1.AutoMl.UpdateModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_DeployModel_sync", - "title": "Snippet for the deploy_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#deploy_model.", - "file": "automl/deploy_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "deploy_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#deploy_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::DeployModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "DeployModel", - "full_name": "google.cloud.automl.v1.AutoMl.DeployModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_UndeployModel_sync", - "title": "Snippet for the undeploy_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model.", - "file": "automl/undeploy_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "undeploy_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::UndeployModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "UndeployModel", - "full_name": "google.cloud.automl.v1.AutoMl.UndeployModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ExportModel_sync", - "title": "Snippet for the export_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#export_model.", - "file": "automl/export_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#export_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ExportModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ExportModel", - "full_name": "google.cloud.automl.v1.AutoMl.ExportModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_GetModelEvaluation_sync", - "title": "Snippet for the get_model_evaluation call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation.", - "file": "automl/get_model_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model_evaluation", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::GetModelEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::ModelEvaluation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "GetModelEvaluation", - "full_name": "google.cloud.automl.v1.AutoMl.GetModelEvaluation", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ListModelEvaluations_sync", - "title": "Snippet for the list_model_evaluations call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations.", - "file": "automl/list_model_evaluations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_model_evaluations", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ListModelEvaluations", - "full_name": "google.cloud.automl.v1.AutoMl.ListModelEvaluations", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "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-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb deleted file mode 100644 index 856cda1fb3b2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_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/automl/v1/service_pb" -require "google/cloud/automl/v1/service_services_pb" -require "google/cloud/automl/v1/automl" - -class ::Google::Cloud::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb deleted file mode 100644 index be60ed069bd5..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_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/automl/v1/automl" - -class ::Google::Cloud::AutoML::V1::AutoML::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_annotation_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.annotation_spec_path project: "value0", location: "value1", dataset: "value2", annotation_spec: "value3" - assert_equal "projects/value0/locations/value1/datasets/value2/annotationSpecs/value3", path - end - end - - def test_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", location: "value1", dataset: "value2" - assert_equal "projects/value0/locations/value1/datasets/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::AutoML::V1::AutoML::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_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end - - def test_model_evaluation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_evaluation_path project: "value0", location: "value1", model: "value2", model_evaluation: "value3" - assert_equal "projects/value0/locations/value1/models/value2/modelEvaluations/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb deleted file mode 100644 index 433cd2fb25dd..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb +++ /dev/null @@ -1,1088 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/automl/v1/service_pb" -require "google/cloud/automl/v1/automl/rest" - - -class ::Google::Cloud::AutoML::V1::AutoML::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_dataset - # Create test objects. - 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" - dataset = {} - - create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_dataset parent: parent, dataset: dataset do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_dataset ::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_dataset(::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_dataset_client_stub.call_count - end - end - end - - def test_get_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_dataset ::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_dataset(::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dataset_client_stub.call_count - end - end - end - - def test_list_datasets - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.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_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_datasets({ 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_datasets 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_datasets ::Google::Cloud::AutoML::V1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::AutoML::V1::ListDatasetsRequest.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_datasets_client_stub.call_count - end - end - end - - def test_update_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - dataset = {} - update_mask = {} - - update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_dataset({ dataset: dataset, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_dataset dataset: dataset, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_dataset ::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_dataset({ dataset: dataset, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_dataset(::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_dataset_client_stub.call_count - end - end - end - - def test_delete_dataset - # Create test objects. - 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_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_dataset ::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_dataset(::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_dataset_client_stub.call_count - end - end - end - - def test_import_data - # Create test objects. - 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" - input_config = {} - - import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.import_data({ name: name, input_config: input_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.import_data name: name, input_config: input_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.import_data ::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.import_data({ name: name, input_config: input_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.import_data(::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_data_client_stub.call_count - end - end - end - - def test_export_data - # Create test objects. - 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" - output_config = {} - - export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.export_data({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.export_data name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.export_data ::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.export_data({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.export_data(::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_count - end - end - end - - def test_get_annotation_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::AnnotationSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_annotation_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_annotation_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_annotation_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_annotation_spec({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_annotation_spec name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_annotation_spec ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_annotation_spec({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_annotation_spec(::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_annotation_spec_client_stub.call_count - end - end - end - - def test_create_model - # Create test objects. - 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" - model = {} - - create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_model({ parent: parent, model: model }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_model parent: parent, model: model do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_model ::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_model({ parent: parent, model: model }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_model(::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_model_client_stub.call_count - end - end - end - - def test_get_model - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::Model.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_model ::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_model(::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_client_stub.call_count - end - end - end - - def test_list_models - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::ListModelsResponse.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_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_models_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_models({ 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_models 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_models ::Google::Cloud::AutoML::V1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::AutoML::V1::ListModelsRequest.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_models_client_stub.call_count - end - end - end - - def test_delete_model - # Create test objects. - 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_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_model ::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_model(::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_model_client_stub.call_count - end - end - end - - def test_update_model - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::Model.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - model = {} - update_mask = {} - - update_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_update_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_model({ model: model, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_model model: model, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_model ::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_model({ model: model, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_model(::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_model_client_stub.call_count - end - end - end - - def test_deploy_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - image_object_detection_model_deployment_metadata = {} - name = "hello world" - - deploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_deploy_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, deploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.deploy_model ::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.deploy_model(::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, deploy_model_client_stub.call_count - end - end - end - - def test_undeploy_model - # Create test objects. - 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" - - undeploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_undeploy_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undeploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.undeploy_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.undeploy_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.undeploy_model ::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.undeploy_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.undeploy_model(::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undeploy_model_client_stub.call_count - end - end - end - - def test_export_model - # Create test objects. - 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" - output_config = {} - - export_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_export_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.export_model({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.export_model name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.export_model ::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.export_model({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.export_model(::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_model_client_stub.call_count - end - end - end - - def test_get_model_evaluation - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::ModelEvaluation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_model_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_evaluation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_model_evaluation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_model_evaluation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_model_evaluation ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_model_evaluation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_model_evaluation(::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_evaluation_client_stub.call_count - end - end - end - - def test_list_model_evaluations - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.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_model_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_model_evaluations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_model_evaluations_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_model_evaluations({ 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_model_evaluations 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_model_evaluations ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.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_model_evaluations({ 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_model_evaluations(::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.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_model_evaluations_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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb deleted file mode 100644 index a8f7d67c1702..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb +++ /dev/null @@ -1,1257 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/automl/v1/service_pb" -require "google/cloud/automl/v1/automl" - -class ::Google::Cloud::AutoML::V1::AutoML::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_dataset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset = {} - - create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1::CreateDatasetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Dataset), request["dataset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_dataset({ parent: parent, dataset: dataset }) do |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_dataset parent: parent, dataset: dataset do |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_dataset ::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| - 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_dataset({ parent: parent, dataset: dataset }, grpc_options) do |response, operation| - 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_dataset(::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| - assert_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_dataset_client_stub.call_rpc_count - end - end - - def test_get_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1::GetDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_dataset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_dataset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_dataset ::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_dataset({ 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_dataset(::Google::Cloud::AutoML::V1::GetDatasetRequest.new(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_dataset_client_stub.call_rpc_count - end - end - - def test_list_datasets - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_datasets, name - assert_kind_of ::Google::Cloud::AutoML::V1::ListDatasetsRequest, 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_datasets_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_datasets({ 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_datasets 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_datasets ::Google::Cloud::AutoML::V1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::AutoML::V1::ListDatasetsRequest.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_datasets_client_stub.call_rpc_count - end - end - - def test_update_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - dataset = {} - update_mask = {} - - update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1::UpdateDatasetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Dataset), request["dataset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_dataset({ dataset: dataset, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_dataset dataset: dataset, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_dataset ::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, 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_dataset({ dataset: dataset, 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_dataset(::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, 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_dataset_client_stub.call_rpc_count - end - end - - def test_delete_dataset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1::DeleteDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_dataset({ 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_dataset 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_dataset ::Google::Cloud::AutoML::V1::DeleteDatasetRequest.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_dataset({ 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_dataset(::Google::Cloud::AutoML::V1::DeleteDatasetRequest.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_dataset_client_stub.call_rpc_count - end - end - - def test_import_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - - import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_data, name - assert_kind_of ::Google::Cloud::AutoML::V1::ImportDataRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::InputConfig), request["input_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.import_data({ name: name, input_config: input_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.import_data name: name, input_config: input_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.import_data ::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_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.import_data({ name: name, input_config: input_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.import_data(::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_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, import_data_client_stub.call_rpc_count - end - end - - def test_export_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_data, name - assert_kind_of ::Google::Cloud::AutoML::V1::ExportDataRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::OutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.export_data({ name: name, 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.export_data name: name, 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.export_data ::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, 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.export_data({ name: name, 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.export_data(::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_rpc_count - end - end - - def test_get_annotation_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::AnnotationSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_annotation_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_annotation_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_annotation_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_annotation_spec({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_annotation_spec name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_annotation_spec ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_annotation_spec({ 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_annotation_spec(::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(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_annotation_spec_client_stub.call_rpc_count - end - end - - def test_create_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - model = {} - - create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::CreateModelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Model), request["model"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_model({ parent: parent, model: model }) do |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_model parent: parent, model: model do |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_model ::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model) do |response, operation| - 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_model({ parent: parent, model: model }, grpc_options) do |response, operation| - 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_model(::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| - assert_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_model_client_stub.call_rpc_count - end - end - - def test_get_model - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::Model.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::GetModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_model({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_model name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_model ::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_model({ 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_model(::Google::Cloud::AutoML::V1::GetModelRequest.new(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_model_client_stub.call_rpc_count - end - end - - def test_list_models - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::ListModelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_models, name - assert_kind_of ::Google::Cloud::AutoML::V1::ListModelsRequest, 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_models_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_models({ 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_models 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_models ::Google::Cloud::AutoML::V1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::AutoML::V1::ListModelsRequest.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_models_client_stub.call_rpc_count - end - end - - def test_delete_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::DeleteModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_model({ 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_model 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_model ::Google::Cloud::AutoML::V1::DeleteModelRequest.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_model({ 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_model(::Google::Cloud::AutoML::V1::DeleteModelRequest.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_model_client_stub.call_rpc_count - end - end - - def test_update_model - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::Model.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - model = {} - update_mask = {} - - update_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::UpdateModelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Model), request["model"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_model({ model: model, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_model model: model, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_model ::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, 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_model({ model: model, 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_model(::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, 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_model_client_stub.call_rpc_count - end - end - - def test_deploy_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - image_object_detection_model_deployment_metadata = {} - name = "hello world" - - deploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :deploy_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::DeployModelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata), request["image_object_detection_model_deployment_metadata"] - assert_equal :image_object_detection_model_deployment_metadata, request.model_deployment_metadata - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, deploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model ::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model(::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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, deploy_model_client_stub.call_rpc_count - end - end - - def test_undeploy_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undeploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undeploy_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::UndeployModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undeploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.undeploy_model({ 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.undeploy_model 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.undeploy_model ::Google::Cloud::AutoML::V1::UndeployModelRequest.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.undeploy_model({ 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.undeploy_model(::Google::Cloud::AutoML::V1::UndeployModelRequest.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, undeploy_model_client_stub.call_rpc_count - end - end - - def test_export_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::ExportModelRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ModelExportOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.export_model({ name: name, 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.export_model name: name, 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.export_model ::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, 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.export_model({ name: name, 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.export_model(::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_model_client_stub.call_rpc_count - end - end - - def test_get_model_evaluation - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::ModelEvaluation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model_evaluation, name - assert_kind_of ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_evaluation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_model_evaluation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_model_evaluation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_model_evaluation ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_model_evaluation({ 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_model_evaluation(::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(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_model_evaluation_client_stub.call_rpc_count - end - end - - def test_list_model_evaluations - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_model_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_model_evaluations, name - assert_kind_of ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, 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_model_evaluations_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_model_evaluations({ 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_model_evaluations 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_model_evaluations ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.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_model_evaluations({ 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_model_evaluations(::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.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_model_evaluations_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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::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::AutoML::V1::AutoML::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::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::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb deleted file mode 100644 index 7cc57a046005..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_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/automl/v1/prediction_service_pb" -require "google/cloud/automl/v1/prediction_service_services_pb" -require "google/cloud/automl/v1/prediction_service" - -class ::Google::Cloud::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb deleted file mode 100644 index f5f666866b67..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_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/automl/v1/prediction_service" - -class ::Google::Cloud::AutoML::V1::PredictionService::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_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb deleted file mode 100644 index 5a2ef57b39ce..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb +++ /dev/null @@ -1,212 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/automl/v1/prediction_service_pb" -require "google/cloud/automl/v1/prediction_service/rest" - - -class ::Google::Cloud::AutoML::V1::PredictionService::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_predict - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::PredictResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - params = {} - - predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.stub :transcode_predict_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.predict({ name: name, payload: payload, params: params }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.predict name: name, payload: payload, params: params do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.predict ::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.predict({ name: name, payload: payload, params: params }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.predict(::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, predict_client_stub.call_count - end - end - end - - def test_batch_predict - # Create test objects. - 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" - input_config = {} - output_config = {} - params = {} - - batch_predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.stub :transcode_batch_predict_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_predict ::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_predict(::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_predict_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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb deleted file mode 100644 index 74ff6f3b9cb7..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb +++ /dev/null @@ -1,249 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/automl/v1/prediction_service_pb" -require "google/cloud/automl/v1/prediction_service" - -class ::Google::Cloud::AutoML::V1::PredictionService::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_predict - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::PredictResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - params = {} - - predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :predict, name - assert_kind_of ::Google::Cloud::AutoML::V1::PredictRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ExamplePayload), request["payload"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.predict({ name: name, payload: payload, params: params }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.predict name: name, payload: payload, params: params do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.predict ::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.predict({ name: name, payload: payload, params: params }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.predict(::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, predict_client_stub.call_rpc_count - end - end - - def test_batch_predict - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - output_config = {} - params = {} - - batch_predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_predict, name - assert_kind_of ::Google::Cloud::AutoML::V1::BatchPredictRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::BatchPredictInputConfig), request["input_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::BatchPredictOutputConfig), request["output_config"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |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_predict name: name, input_config: input_config, output_config: output_config, params: params do |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_predict ::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |response, operation| - 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_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, grpc_options) do |response, operation| - 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_predict(::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), grpc_options) do |response, operation| - assert_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_predict_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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::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::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/helper.rb b/owl-bot-staging/google-cloud-automl-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/.gitignore b/owl-bot-staging/google-cloud-automl-v1beta1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json deleted file mode 100644 index 4b715a4588d1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "api_id": "automl.googleapis.com", - "api_shortname": "automl", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest", - "distribution_name": "google-cloud-automl-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "automl", - "name_pretty": "Cloud AutoML V1beta1 API", - "product_documentation": "https://cloud.google.com/automl", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details.", - "ruby-cloud-env-prefix": "AUTOML", - "ruby-cloud-product-url": "https://cloud.google.com/automl", - "ruby-cloud-path-override": "auto_ml=automl", - "ruby-cloud-namespace-override": "AutoMl=AutoML;Automl=AutoML", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml deleted file mode 100644 index bf48a3e31581..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-automl-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-automl-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/.yardopts b/owl-bot-staging/google-cloud-automl-v1beta1/.yardopts deleted file mode 100644 index 0e8b7f5e7acd..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud AutoML 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-automl-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 038f994f5360..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-automl-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-automl-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/automl/v1beta1" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/automl/v1beta1" - -::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::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-automl-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/automl/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::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-automl-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/Gemfile b/owl-bot-staging/google-cloud-automl-v1beta1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/README.md b/owl-bot-staging/google-cloud-automl-v1beta1/README.md deleted file mode 100644 index 4ef8c795fee3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud AutoML V1beta1 API - -Train high-quality custom machine learning models with minimum effort and machine learning expertise. - -AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. - -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 AutoML V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-automl](https://rubygems.org/gems/google-cloud-automl). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-automl-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/automl.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/automl/v1beta1" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new -request = ::Google::Cloud::AutoML::V1beta1::PredictRequest.new # (request fields as keyword arguments...) -response = client.predict request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/automl) -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/automl/v1beta1" -require "logger" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::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-automl`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-automl-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-automl`. -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-automl-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-automl-v1beta1/Rakefile b/owl-bot-staging/google-cloud-automl-v1beta1/Rakefile deleted file mode 100644 index 0809ccb14b35..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["AUTOML_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["AUTOML_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["AUTOML_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 AUTOML_TEST_PROJECT=test123 AUTOML_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/automl/v1beta1/prediction_service/credentials" - ::Google::Cloud::AutoML::V1beta1::PredictionService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["AUTOML_PROJECT"] = project - ENV["AUTOML_TEST_PROJECT"] = project - ENV["AUTOML_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-automl-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-automl-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-automl-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-automl-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-automl-v1beta1" - header "google-cloud-automl-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-automl-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-automl-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-automl-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-automl-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-automl-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json deleted file mode 100644 index ebf069d33f8d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.automl.v1beta1", - "libraryPackage": "::Google::Cloud::AutoML::V1beta1", - "services": { - "PredictionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client", - "rpcs": { - "Predict": { - "methods": [ - "predict" - ] - }, - "BatchPredict": { - "methods": [ - "batch_predict" - ] - } - } - } - } - }, - "AutoMl": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AutoML::V1beta1::AutoML::Client", - "rpcs": { - "CreateDataset": { - "methods": [ - "create_dataset" - ] - }, - "GetDataset": { - "methods": [ - "get_dataset" - ] - }, - "ListDatasets": { - "methods": [ - "list_datasets" - ] - }, - "UpdateDataset": { - "methods": [ - "update_dataset" - ] - }, - "DeleteDataset": { - "methods": [ - "delete_dataset" - ] - }, - "ImportData": { - "methods": [ - "import_data" - ] - }, - "ExportData": { - "methods": [ - "export_data" - ] - }, - "GetAnnotationSpec": { - "methods": [ - "get_annotation_spec" - ] - }, - "GetTableSpec": { - "methods": [ - "get_table_spec" - ] - }, - "ListTableSpecs": { - "methods": [ - "list_table_specs" - ] - }, - "UpdateTableSpec": { - "methods": [ - "update_table_spec" - ] - }, - "GetColumnSpec": { - "methods": [ - "get_column_spec" - ] - }, - "ListColumnSpecs": { - "methods": [ - "list_column_specs" - ] - }, - "UpdateColumnSpec": { - "methods": [ - "update_column_spec" - ] - }, - "CreateModel": { - "methods": [ - "create_model" - ] - }, - "GetModel": { - "methods": [ - "get_model" - ] - }, - "ListModels": { - "methods": [ - "list_models" - ] - }, - "DeleteModel": { - "methods": [ - "delete_model" - ] - }, - "DeployModel": { - "methods": [ - "deploy_model" - ] - }, - "UndeployModel": { - "methods": [ - "undeploy_model" - ] - }, - "ExportModel": { - "methods": [ - "export_model" - ] - }, - "ExportEvaluatedExamples": { - "methods": [ - "export_evaluated_examples" - ] - }, - "GetModelEvaluation": { - "methods": [ - "get_model_evaluation" - ] - }, - "ListModelEvaluations": { - "methods": [ - "list_model_evaluations" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec b/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec deleted file mode 100644 index eddcd83e44d2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/automl/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-automl-v1beta1" - gem.version = Google::Cloud::AutoML::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details." - gem.summary = "Train high-quality custom machine learning models with minimum effort and machine learning expertise." - 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-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb deleted file mode 100644 index ac7d092bf31e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-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/automl/v1beta1" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb deleted file mode 100644 index 78a600ce0c87..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/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/automl/v1beta1/prediction_service" -require "google/cloud/automl/v1beta1/automl" -require "google/cloud/automl/v1beta1/version" - -module Google - module Cloud - module AutoML - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/automl/v1beta1" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/automl/v1beta1" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/automl/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb deleted file mode 100644 index c031b6200be1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/annotation_payload.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' -require 'google/cloud/automl/v1beta1/detection_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_extraction_pb' -require 'google/cloud/automl/v1beta1/text_sentiment_pb' -require 'google/cloud/automl/v1beta1/translation_pb' - - -descriptor_data = "\n4google/cloud/automl/v1beta1/annotation_payload.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\"\xe6\x05\n\x11\x41nnotationPayload\x12I\n\x0btranslation\x18\x02 \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TranslationAnnotationH\x00\x12O\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotationH\x00\x12]\n\x16image_object_detection\x18\x04 \x01(\x0b\x32;.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationH\x00\x12Z\n\x14video_classification\x18\t \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoClassificationAnnotationH\x00\x12[\n\x15video_object_tracking\x18\x08 \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationH\x00\x12P\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TextExtractionAnnotationH\x00\x12N\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.TextSentimentAnnotationH\x00\x12?\n\x06tables\x18\n \x01(\x0b\x32-.google.cloud.automl.v1beta1.TablesAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - AnnotationPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.AnnotationPayload").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb deleted file mode 100644 index 85b08ebdfc7b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/annotation_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n1google/cloud/automl/v1beta1/annotation_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - AnnotationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.AnnotationSpec").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb deleted file mode 100644 index 3e41d90e7a98..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.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/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/automl/credentials" -require "google/cloud/automl/v1beta1/automl/paths" -require "google/cloud/automl/v1beta1/automl/operations" -require "google/cloud/automl/v1beta1/automl/client" -require "google/cloud/automl/v1beta1/automl/rest" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/automl/v1beta1/automl" - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/automl/v1beta1/automl/rest" - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - module AutoML - end - end - end - end -end - -helper_path = ::File.join __dir__, "automl", "helpers.rb" -require "google/cloud/automl/v1beta1/automl/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb deleted file mode 100644 index 9c7504318c76..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb +++ /dev/null @@ -1,2985 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/automl/v1beta1/service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - ## - # Client for the AutoMl service. - # - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :auto_ml_stub - - ## - # Configure the AutoMl Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutoMl clients - # ::Google::Cloud::AutoML::V1beta1::AutoML::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", "AutoML", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_dataset.timeout = 5.0 - - default_config.rpcs.get_dataset.timeout = 5.0 - default_config.rpcs.get_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_datasets.timeout = 5.0 - default_config.rpcs.list_datasets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_dataset.timeout = 5.0 - - default_config.rpcs.delete_dataset.timeout = 5.0 - default_config.rpcs.delete_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.import_data.timeout = 5.0 - - default_config.rpcs.export_data.timeout = 5.0 - - default_config.rpcs.get_annotation_spec.timeout = 5.0 - default_config.rpcs.get_annotation_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_table_spec.timeout = 5.0 - default_config.rpcs.get_table_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_table_specs.timeout = 5.0 - default_config.rpcs.list_table_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_table_spec.timeout = 5.0 - - default_config.rpcs.get_column_spec.timeout = 5.0 - default_config.rpcs.get_column_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_column_specs.timeout = 5.0 - default_config.rpcs.list_column_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_column_spec.timeout = 5.0 - - default_config.rpcs.create_model.timeout = 5.0 - - default_config.rpcs.get_model.timeout = 5.0 - default_config.rpcs.get_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_models.timeout = 5.0 - default_config.rpcs.list_models.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_model.timeout = 5.0 - default_config.rpcs.delete_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.deploy_model.timeout = 5.0 - - default_config.rpcs.undeploy_model.timeout = 5.0 - - default_config.rpcs.export_model.timeout = 5.0 - - default_config.rpcs.export_evaluated_examples.timeout = 5.0 - - default_config.rpcs.get_model_evaluation.timeout = 5.0 - default_config.rpcs.get_model_evaluation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_model_evaluations.timeout = 5.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl 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::AutoML::V1beta1::AutoML::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 - @auto_ml_stub.universe_domain - end - - ## - # Create a new AutoMl client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutoMl 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/automl/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 - - @auto_ml_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AutoML::V1beta1::AutoMl::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 - ) - - @auto_ml_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::AutoML::V1beta1::AutoML::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @auto_ml_stub.logger - end - - # Service calls - - ## - # Creates a dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_dataset(parent: nil, dataset: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 create the dataset for. - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def create_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest - - # Converts hash and nil to 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :create_dataset, request, 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 dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_dataset, request, 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 datasets in a project. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 from which to list datasets. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of - # using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_datasets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_datasets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_datasets, request, response, 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 dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_dataset(dataset: nil, update_mask: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def update_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest - - # Converts hash and nil to 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.dataset&.name - header_params["dataset.name"] = request.dataset.name - end - - request_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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_dataset, request, 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 dataset and all of its contents. - # Returns empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_dataset(name: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest - - # Converts hash and nil to 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :delete_dataset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version} - # parameter must be explicitly set. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_data(name: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash] - # Required. The desired input location and its domain specific semantics, - # if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.import_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :import_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_data(name: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset. - # @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash] - # Required. The desired output location. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.export_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 annotation spec. - # - # @overload get_annotation_spec(request, options = nil) - # Pass arguments to `get_annotation_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_annotation_spec(name: nil) - # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 annotation spec to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new - # - # # Call the get_annotation_spec method. - # result = client.get_annotation_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. - # p result - # - def get_annotation_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_annotation_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_annotation_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_annotation_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_annotation_spec, request, 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 table spec. - # - # @overload get_table_spec(request, options = nil) - # Pass arguments to `get_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_table_spec(name: nil, field_mask: nil) - # Pass arguments to `get_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 table spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new - # - # # Call the get_table_spec method. - # result = client.get_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def get_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_table_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_table_spec, request, 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 table specs in a dataset. - # - # @overload list_table_specs(request, options = nil) - # Pass arguments to `list_table_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_table_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset to list table specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new - # - # # Call the list_table_specs method. - # result = client.list_table_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. - # p item - # end - # - def list_table_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_table_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_table_specs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_table_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_table_specs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_table_specs, request, response, 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 table spec. - # - # @overload update_table_spec(request, options = nil) - # Pass arguments to `update_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_table_spec(table_spec: nil, update_mask: nil) - # Pass arguments to `update_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash] - # Required. The table spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new - # - # # Call the update_table_spec method. - # result = client.update_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def update_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest - - # Converts hash and nil to 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_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.table_spec&.name - header_params["table_spec.name"] = request.table_spec.name - end - - request_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_table_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_table_spec, request, 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 column spec. - # - # @overload get_column_spec(request, options = nil) - # Pass arguments to `get_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_column_spec(name: nil, field_mask: nil) - # Pass arguments to `get_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 column spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new - # - # # Call the get_column_spec method. - # result = client.get_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def get_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_column_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_column_spec, request, 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 column specs in a table spec. - # - # @overload list_column_specs(request, options = nil) - # Pass arguments to `list_column_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_column_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 table spec to list column specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new - # - # # Call the list_column_specs method. - # result = client.list_column_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p item - # end - # - def list_column_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_column_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_column_specs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_column_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_column_specs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_column_specs, request, response, 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 column spec. - # - # @overload update_column_spec(request, options = nil) - # Pass arguments to `update_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_column_spec(column_spec: nil, update_mask: nil) - # Pass arguments to `update_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash] - # Required. The column spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new - # - # # Call the update_column_spec method. - # result = client.update_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def update_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest - - # Converts hash and nil to 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_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.column_spec&.name - header_params["column_spec.name"] = request.column_spec.name - end - - request_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_column_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_column_spec, request, 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 model. - # Returns a Model in the {::Google::Longrunning::Operation#response response} - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_model(parent: nil, model: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 project where the model is being created. - # @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash] - # Required. The model 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/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest - - # Converts hash and nil to 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :create_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Model] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_model, request, 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 models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project, from which to list the models. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_models.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_models, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_models, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_model(name: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model being deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest - - # Converts hash and nil to 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :delete_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # - # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload deploy_model(request, options = nil) - # Pass arguments to `deploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) - # Pass arguments to `deploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. 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 image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Classification. - # - # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. 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 name [::String] - # Required. Resource name of the model to deploy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new - # - # # Call the deploy_model method. - # result = client.deploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def deploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.deploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.deploy_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.deploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :deploy_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload undeploy_model(request, options = nil) - # Pass arguments to `undeploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undeploy_model(name: nil) - # Pass arguments to `undeploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model to undeploy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new - # - # # Call the undeploy_model method. - # result = client.undeploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undeploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undeploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.undeploy_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undeploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :undeploy_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # - # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_model(request, options = nil) - # Pass arguments to `export_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_model(name: nil, output_config: nil) - # Pass arguments to `export_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 model to export. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new - # - # # Call the export_model method. - # result = client.export_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.export_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports examples on which the model was evaluated (i.e. which were in the - # TEST set of the dataset the model was created from), together with their - # ground truth annotations and the annotations created (predicted) by the - # model. - # The examples, ground truth and predictions are exported in the state - # they were at the moment the model was evaluated. - # - # This export is available only for 30 days since the model evaluation is - # created. - # - # Currently only available for Tables. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_evaluated_examples(request, options = nil) - # Pass arguments to `export_evaluated_examples` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_evaluated_examples(name: nil, output_config: nil) - # Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 model whose evaluated examples are to - # be exported. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new - # - # # Call the export_evaluated_examples method. - # result = client.export_evaluated_examples request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluated_examples request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_evaluated_examples.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.export_evaluated_examples.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_evaluated_examples.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_evaluated_examples, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 model evaluation. - # - # @overload get_model_evaluation(request, options = nil) - # Pass arguments to `get_model_evaluation` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model_evaluation(name: nil) - # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the model evaluation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new - # - # # Call the get_model_evaluation method. - # result = client.get_model_evaluation request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p result - # - def get_model_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_model_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_model_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_model_evaluation, request, 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 model evaluations. - # - # @overload list_model_evaluations(request, options = nil) - # Pass arguments to `list_model_evaluations` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new - # - # # Call the list_model_evaluations method. - # result = client.list_model_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p item - # end - # - def list_model_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_model_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_model_evaluations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_model_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, request, response, 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 AutoMl API. - # - # This class represents the configuration for AutoMl, - # providing control 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::AutoML::V1beta1::AutoML::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_dataset to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::AutoML::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::AutoML::V1beta1::AutoML::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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 AutoMl API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `get_annotation_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_annotation_spec - ## - # RPC-specific configuration for `get_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_table_spec - ## - # RPC-specific configuration for `list_table_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_table_specs - ## - # RPC-specific configuration for `update_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_table_spec - ## - # RPC-specific configuration for `get_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_column_spec - ## - # RPC-specific configuration for `list_column_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_column_specs - ## - # RPC-specific configuration for `update_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_column_spec - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `deploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :deploy_model - ## - # RPC-specific configuration for `undeploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :undeploy_model - ## - # RPC-specific configuration for `export_model` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model - ## - # RPC-specific configuration for `export_evaluated_examples` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluated_examples - ## - # RPC-specific configuration for `get_model_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model_evaluation - ## - # RPC-specific configuration for `list_model_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_model_evaluations - - # @private - def initialize parent_rpcs = nil - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec - @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config - get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec - @get_table_spec = ::Gapic::Config::Method.new get_table_spec_config - list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs - @list_table_specs = ::Gapic::Config::Method.new list_table_specs_config - update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec - @update_table_spec = ::Gapic::Config::Method.new update_table_spec_config - get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec - @get_column_spec = ::Gapic::Config::Method.new get_column_spec_config - list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs - @list_column_specs = ::Gapic::Config::Method.new list_column_specs_config - update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec - @update_column_spec = ::Gapic::Config::Method.new update_column_spec_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model - @deploy_model = ::Gapic::Config::Method.new deploy_model_config - undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model - @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config - export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model - @export_model = ::Gapic::Config::Method.new export_model_config - export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples - @export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config - get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation - @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config - list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations - @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb deleted file mode 100644 index 59c4eb1fb2be..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/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 AutoML - module V1beta1 - module AutoML - # Credentials for the AutoMl API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "AUTOML_CREDENTIALS", - "AUTOML_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "AUTOML_CREDENTIALS_JSON", - "AUTOML_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb deleted file mode 100644 index b166dda91efe..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb +++ /dev/null @@ -1,851 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 AutoML - module V1beta1 - module AutoML - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AutoMl 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 AutoMl 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::AutoML::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::AutoML::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::AutoML::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::AutoML::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::AutoML::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.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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb deleted file mode 100644 index f9a7d5efd31e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb +++ /dev/null @@ -1,174 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - # Path helper methods for the AutoMl API. - module Paths - ## - # Create a fully-qualified AnnotationSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param annotation_spec [String] - # - # @return [::String] - def annotation_spec_path project:, location:, dataset:, annotation_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}" - end - - ## - # Create a fully-qualified ColumnSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param table_spec [String] - # @param column_spec [String] - # - # @return [::String] - def column_spec_path project:, location:, dataset:, table_spec:, column_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - raise ::ArgumentError, "table_spec cannot contain /" if table_spec.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/tableSpecs/#{table_spec}/columnSpecs/#{column_spec}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, location:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}" - 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 Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - ## - # Create a fully-qualified ModelEvaluation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # @param model_evaluation [String] - # - # @return [::String] - def model_evaluation_path project:, location:, model:, model_evaluation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}/modelEvaluations/#{model_evaluation}" - end - - ## - # Create a fully-qualified TableSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param table_spec [String] - # - # @return [::String] - def table_spec_path project:, location:, dataset:, table_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/tableSpecs/#{table_spec}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb deleted file mode 100644 index da55991d354b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/automl/credentials" -require "google/cloud/automl/v1beta1/automl/paths" -require "google/cloud/automl/v1beta1/automl/rest/operations" -require "google/cloud/automl/v1beta1/automl/rest/client" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/automl/v1beta1/automl/rest" - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - module AutoML - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/automl/v1beta1/automl/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb deleted file mode 100644 index 2d1ec590f207..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb +++ /dev/null @@ -1,2774 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/automl/rest/service_stub" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - module Rest - ## - # REST client for the AutoMl service. - # - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :auto_ml_stub - - ## - # Configure the AutoMl Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutoMl clients - # ::Google::Cloud::AutoML::V1beta1::AutoML::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", "AutoML", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_dataset.timeout = 5.0 - - default_config.rpcs.get_dataset.timeout = 5.0 - default_config.rpcs.get_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_datasets.timeout = 5.0 - default_config.rpcs.list_datasets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_dataset.timeout = 5.0 - - default_config.rpcs.delete_dataset.timeout = 5.0 - default_config.rpcs.delete_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.import_data.timeout = 5.0 - - default_config.rpcs.export_data.timeout = 5.0 - - default_config.rpcs.get_annotation_spec.timeout = 5.0 - default_config.rpcs.get_annotation_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_table_spec.timeout = 5.0 - default_config.rpcs.get_table_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_table_specs.timeout = 5.0 - default_config.rpcs.list_table_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_table_spec.timeout = 5.0 - - default_config.rpcs.get_column_spec.timeout = 5.0 - default_config.rpcs.get_column_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_column_specs.timeout = 5.0 - default_config.rpcs.list_column_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_column_spec.timeout = 5.0 - - default_config.rpcs.create_model.timeout = 5.0 - - default_config.rpcs.get_model.timeout = 5.0 - default_config.rpcs.get_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_models.timeout = 5.0 - default_config.rpcs.list_models.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_model.timeout = 5.0 - default_config.rpcs.delete_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.deploy_model.timeout = 5.0 - - default_config.rpcs.undeploy_model.timeout = 5.0 - - default_config.rpcs.export_model.timeout = 5.0 - - default_config.rpcs.export_evaluated_examples.timeout = 5.0 - - default_config.rpcs.get_model_evaluation.timeout = 5.0 - default_config.rpcs.get_model_evaluation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_model_evaluations.timeout = 5.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl 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::AutoML::V1beta1::AutoML::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 - @auto_ml_stub.universe_domain - end - - ## - # Create a new AutoMl REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutoMl 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::AutoML::V1beta1::AutoML::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 - - @auto_ml_stub = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @auto_ml_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::AutoML::V1beta1::AutoML::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @auto_ml_stub.logger - end - - # Service calls - - ## - # Creates a dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_dataset(parent: nil, dataset: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 create the dataset for. - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def create_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest - - # Converts hash and nil to an 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.create_dataset request, 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 dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_dataset request, 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 datasets in a project. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 from which to list datasets. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of - # using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_datasets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_datasets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, 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 dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_dataset(dataset: nil, update_mask: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def update_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest - - # Converts hash and nil to an 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_dataset request, 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 dataset and all of its contents. - # Returns empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_dataset(name: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest - - # Converts hash and nil to an 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.delete_dataset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version} - # parameter must be explicitly set. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_data(name: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash] - # Required. The desired input location and its domain specific semantics, - # if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.import_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.import_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_data(name: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset. - # @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash] - # Required. The desired output location. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.export_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 annotation spec. - # - # @overload get_annotation_spec(request, options = nil) - # Pass arguments to `get_annotation_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_annotation_spec(name: nil) - # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 annotation spec to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new - # - # # Call the get_annotation_spec method. - # result = client.get_annotation_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. - # p result - # - def get_annotation_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_annotation_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_annotation_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_annotation_spec request, 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 table spec. - # - # @overload get_table_spec(request, options = nil) - # Pass arguments to `get_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_table_spec(name: nil, field_mask: nil) - # Pass arguments to `get_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 table spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new - # - # # Call the get_table_spec method. - # result = client.get_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def get_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_table_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_table_spec request, 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 table specs in a dataset. - # - # @overload list_table_specs(request, options = nil) - # Pass arguments to `list_table_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_table_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 dataset to list table specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_table_specs AutoMl.ListTableSpecs} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new - # - # # Call the list_table_specs method. - # result = client.list_table_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. - # p item - # end - # - def list_table_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_table_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_table_specs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_table_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_table_specs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_table_specs, "table_specs", request, result, 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 table spec. - # - # @overload update_table_spec(request, options = nil) - # Pass arguments to `update_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_table_spec(table_spec: nil, update_mask: nil) - # Pass arguments to `update_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash] - # Required. The table spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new - # - # # Call the update_table_spec method. - # result = client.update_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def update_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest - - # Converts hash and nil to an 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_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_table_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_table_spec request, 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 column spec. - # - # @overload get_column_spec(request, options = nil) - # Pass arguments to `get_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_column_spec(name: nil, field_mask: nil) - # Pass arguments to `get_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 column spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new - # - # # Call the get_column_spec method. - # result = client.get_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def get_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_column_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_column_spec request, 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 column specs in a table spec. - # - # @overload list_column_specs(request, options = nil) - # Pass arguments to `list_column_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_column_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 table spec to list column specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_column_specs AutoMl.ListColumnSpecs} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new - # - # # Call the list_column_specs method. - # result = client.list_column_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p item - # end - # - def list_column_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_column_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_column_specs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_column_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_column_specs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_column_specs, "column_specs", request, result, 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 column spec. - # - # @overload update_column_spec(request, options = nil) - # Pass arguments to `update_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_column_spec(column_spec: nil, update_mask: nil) - # Pass arguments to `update_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash] - # Required. The column spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new - # - # # Call the update_column_spec method. - # result = client.update_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def update_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest - - # Converts hash and nil to an 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_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_column_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_column_spec request, 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 model. - # Returns a Model in the {::Google::Longrunning::Operation#response response} - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_model(parent: nil, model: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 project where the model is being created. - # @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash] - # Required. The model 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/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest - - # Converts hash and nil to an 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.create_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_model request, 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 models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project, from which to list the models. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_models AutoMl.ListModels} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_models.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_models request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, 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 model. - # Returns `google.protobuf.Empty` in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_model(name: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model being deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest - - # Converts hash and nil to an 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.delete_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # - # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload deploy_model(request, options = nil) - # Pass arguments to `deploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) - # Pass arguments to `deploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. 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 image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Classification. - # - # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. 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 name [::String] - # Required. Resource name of the model to deploy. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new - # - # # Call the deploy_model method. - # result = client.deploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def deploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.deploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.deploy_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.deploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.deploy_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload undeploy_model(request, options = nil) - # Pass arguments to `undeploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undeploy_model(name: nil) - # Pass arguments to `undeploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model to undeploy. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new - # - # # Call the undeploy_model method. - # result = client.undeploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undeploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undeploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.undeploy_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undeploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.undeploy_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # - # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_model(request, options = nil) - # Pass arguments to `export_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_model(name: nil, output_config: nil) - # Pass arguments to `export_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 model to export. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new - # - # # Call the export_model method. - # result = client.export_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.export_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports examples on which the model was evaluated (i.e. which were in the - # TEST set of the dataset the model was created from), together with their - # ground truth annotations and the annotations created (predicted) by the - # model. - # The examples, ground truth and predictions are exported in the state - # they were at the moment the model was evaluated. - # - # This export is available only for 30 days since the model evaluation is - # created. - # - # Currently only available for Tables. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_evaluated_examples(request, options = nil) - # Pass arguments to `export_evaluated_examples` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_evaluated_examples(name: nil, output_config: nil) - # Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 model whose evaluated examples are to - # be exported. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new - # - # # Call the export_evaluated_examples method. - # result = client.export_evaluated_examples request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluated_examples request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_evaluated_examples.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.export_evaluated_examples.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_evaluated_examples.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_evaluated_examples request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 model evaluation. - # - # @overload get_model_evaluation(request, options = nil) - # Pass arguments to `get_model_evaluation` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model_evaluation(name: nil) - # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the model evaluation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new - # - # # Call the get_model_evaluation method. - # result = client.get_model_evaluation request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p result - # - def get_model_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_model_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_model_evaluation request, 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 model evaluations. - # - # @overload list_model_evaluations(request, options = nil) - # Pass arguments to `list_model_evaluations` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new - # - # # Call the list_model_evaluations method. - # result = client.list_model_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p item - # end - # - def list_model_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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_model_evaluations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_model_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_model_evaluations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, 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 AutoMl REST API. - # - # This class represents the configuration for AutoMl 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::AutoML::V1beta1::AutoML::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_dataset to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 AutoMl API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `get_annotation_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_annotation_spec - ## - # RPC-specific configuration for `get_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_table_spec - ## - # RPC-specific configuration for `list_table_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_table_specs - ## - # RPC-specific configuration for `update_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_table_spec - ## - # RPC-specific configuration for `get_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_column_spec - ## - # RPC-specific configuration for `list_column_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_column_specs - ## - # RPC-specific configuration for `update_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_column_spec - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `deploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :deploy_model - ## - # RPC-specific configuration for `undeploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :undeploy_model - ## - # RPC-specific configuration for `export_model` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model - ## - # RPC-specific configuration for `export_evaluated_examples` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluated_examples - ## - # RPC-specific configuration for `get_model_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model_evaluation - ## - # RPC-specific configuration for `list_model_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_model_evaluations - - # @private - def initialize parent_rpcs = nil - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec - @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config - get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec - @get_table_spec = ::Gapic::Config::Method.new get_table_spec_config - list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs - @list_table_specs = ::Gapic::Config::Method.new list_table_specs_config - update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec - @update_table_spec = ::Gapic::Config::Method.new update_table_spec_config - get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec - @get_column_spec = ::Gapic::Config::Method.new get_column_spec_config - list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs - @list_column_specs = ::Gapic::Config::Method.new list_column_specs_config - update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec - @update_column_spec = ::Gapic::Config::Method.new update_column_spec_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model - @deploy_model = ::Gapic::Config::Method.new deploy_model_config - undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model - @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config - export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model - @export_model = ::Gapic::Config::Method.new export_model_config - export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples - @export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config - get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation - @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config - list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations - @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb deleted file mode 100644 index 8722d3172d66..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb +++ /dev/null @@ -1,1095 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 AutoML - module V1beta1 - module AutoML - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AutoMl 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 AutoMl 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::AutoML::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::AutoML::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::AutoML::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::AutoML::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 - - ## - # 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 [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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::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 - call_metadata = @config.rpcs.wait_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::AutoML::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.wait_operation.timeout, - metadata: call_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.wait_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 - - ## - # 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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 - ## - # 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 - - ## - # @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 - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_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: "wait_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 - - ## - # @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 - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:wait", - 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-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb deleted file mode 100644 index 774d061a2484..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb +++ /dev/null @@ -1,1556 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1beta1/service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - module Rest - ## - # REST service stub for the AutoMl 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_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # A result object deserialized from the server's reply - def create_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # A result object deserialized from the server's reply - def get_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Dataset.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_datasets REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse] - # A result object deserialized from the server's reply - def list_datasets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_datasets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.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_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # A result object deserialized from the server's reply - def update_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Dataset.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_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ImportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_annotation_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # A result object deserialized from the server's reply - def get_annotation_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_annotation_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # A result object deserialized from the server's reply - def get_table_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_table_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_table_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::TableSpec.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_table_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse] - # A result object deserialized from the server's reply - def list_table_specs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_table_specs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_table_specs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.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_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # A result object deserialized from the server's reply - def update_table_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_table_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_table_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::TableSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # A result object deserialized from the server's reply - def get_column_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_column_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_column_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.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_column_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse] - # A result object deserialized from the server's reply - def list_column_specs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_column_specs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_column_specs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.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_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # A result object deserialized from the server's reply - def update_column_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_column_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_column_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.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_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # A result object deserialized from the server's reply - def get_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Model.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_models REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListModelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListModelsResponse] - # A result object deserialized from the server's reply - def list_models request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_models", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.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_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the deploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeployModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def deploy_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "deploy_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the undeploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def undeploy_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undeploy_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_evaluated_examples REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_evaluated_examples request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluated_examples_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_evaluated_examples", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_model_evaluation REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # A result object deserialized from the server's reply - def get_model_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_model_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.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_model_evaluations REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse] - # A result object deserialized from the server's reply - def list_model_evaluations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_model_evaluations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.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_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest] - # 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_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/datasets", - body: "dataset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_datasets REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_datasets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/datasets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest] - # 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_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{dataset.name}", - body: "dataset", - matches: [ - ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest] - # 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_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ImportDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:importData", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:exportData", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_annotation_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_annotation_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_table_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_table_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_table_specs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/tableSpecs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest] - # 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_table_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{table_spec.name}", - body: "table_spec", - matches: [ - ["table_spec.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_column_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/columnSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_column_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_column_specs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/columnSpecs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest] - # 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_column_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{column_spec.name}", - body: "column_spec", - matches: [ - ["column_spec.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/columnSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateModelRequest] - # 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_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/models", - body: "model", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_models REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_models_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/models", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest] - # 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_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the deploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeployModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_deploy_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:deploy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undeploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undeploy_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:undeploy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:export", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_evaluated_examples REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_evaluated_examples_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:exportEvaluatedExamples", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model_evaluation REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_model_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/modelEvaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_model_evaluations REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_model_evaluations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/modelEvaluations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb deleted file mode 100644 index e1ade31b5e08..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/classification.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/temporal_pb' - - -descriptor_data = "\n0google/cloud/automl/v1beta1/classification.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/temporal.proto\")\n\x18\x43lassificationAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\"\xc7\x01\n\x1dVideoClassificationAnnotation\x12\x0c\n\x04type\x18\x01 \x01(\t\x12X\n\x19\x63lassification_annotation\x18\x02 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotation\x12>\n\x0ctime_segment\x18\x03 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TimeSegment\"\xa9\x07\n\x1f\x43lassificationEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12\x17\n\x0b\x62\x61se_au_prc\x18\x02 \x01(\x02\x42\x02\x18\x01\x12\x0e\n\x06\x61u_roc\x18\x06 \x01(\x02\x12\x10\n\x08log_loss\x18\x07 \x01(\x02\x12u\n\x18\x63onfidence_metrics_entry\x18\x03 \x03(\x0b\x32S.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry\x12\x66\n\x10\x63onfusion_matrix\x18\x04 \x01(\x0b\x32L.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x05 \x03(\t\x1a\xfc\x02\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x1a\n\x12position_threshold\x18\x0e \x01(\x05\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x1b\n\x13\x66\x61lse_positive_rate\x18\x08 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\x12\x12\n\nrecall_at1\x18\x05 \x01(\x02\x12\x15\n\rprecision_at1\x18\x06 \x01(\x02\x12\x1f\n\x17\x66\x61lse_positive_rate_at1\x18\t \x01(\x02\x12\x14\n\x0c\x66\x31_score_at1\x18\x07 \x01(\x02\x12\x1b\n\x13true_positive_count\x18\n \x01(\x03\x12\x1c\n\x14\x66\x61lse_positive_count\x18\x0b \x01(\x03\x12\x1c\n\x14\x66\x61lse_negative_count\x18\x0c \x01(\x03\x12\x1b\n\x13true_negative_count\x18\r \x01(\x03\x1a\xc0\x01\n\x0f\x43onfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x03(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x03(\t\x12]\n\x03row\x18\x02 \x03(\x0b\x32P.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row\x1a\x1c\n\x03Row\x12\x15\n\rexample_count\x18\x01 \x03(\x05*Y\n\x12\x43lassificationType\x12#\n\x1f\x43LASSIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTICLASS\x10\x01\x12\x0e\n\nMULTILABEL\x10\x02\x42\xae\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x13\x43lassificationProtoZ7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationAnnotation").msgclass - VideoClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationAnnotation").msgclass - ClassificationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics").msgclass - ClassificationEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry").msgclass - ClassificationEvaluationMetrics::ConfusionMatrix = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix").msgclass - ClassificationEvaluationMetrics::ConfusionMatrix::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row").msgclass - ClassificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb deleted file mode 100644 index 631c71630e0e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/column_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/data_stats_pb' -require 'google/cloud/automl/v1beta1/data_types_pb' - - -descriptor_data = "\n-google/cloud/automl/v1beta1/column_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a,google/cloud/automl/v1beta1/data_stats.proto\x1a,google/cloud/automl/v1beta1/data_types.proto\"\x9b\x04\n\nColumnSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\tdata_type\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12:\n\ndata_stats\x18\x04 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats\x12X\n\x16top_correlated_columns\x18\x05 \x03(\x0b\x32\x38.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x1at\n\x10\x43orrelatedColumn\x12\x16\n\x0e\x63olumn_spec_id\x18\x01 \x01(\t\x12H\n\x11\x63orrelation_stats\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1beta1.CorrelationStats:\x94\x01\xea\x41\x90\x01\n automl.googleapis.com/ColumnSpec\x12lprojects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ColumnSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ColumnSpec").msgclass - ColumnSpec::CorrelatedColumn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb deleted file mode 100644 index 1a0c06144eb3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/data_items.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/geometry_pb' -require 'google/cloud/automl/v1beta1/io_pb' -require 'google/cloud/automl/v1beta1/temporal_pb' -require 'google/cloud/automl/v1beta1/text_segment_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/data_items.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/geometry.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a*google/cloud/automl/v1beta1/temporal.proto\x1a.google/cloud/automl/v1beta1/text_segment.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x7f\n\x05Image\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\x0cH\x00\x12@\n\x0cinput_config\x18\x06 \x01(\x0b\x32(.google.cloud.automl.v1beta1.InputConfigH\x00\x12\x15\n\rthumbnail_uri\x18\x04 \x01(\tB\x06\n\x04\x64\x61ta\"F\n\x0bTextSnippet\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x13\n\x0b\x63ontent_uri\x18\x04 \x01(\t\"\xef\x01\n\x12\x44ocumentDimensions\x12S\n\x04unit\x18\x01 \x01(\x0e\x32\x45.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit\x12\r\n\x05width\x18\x02 \x01(\x02\x12\x0e\n\x06height\x18\x03 \x01(\x02\"e\n\x15\x44ocumentDimensionUnit\x12\'\n#DOCUMENT_DIMENSION_UNIT_UNSPECIFIED\x10\x00\x12\x08\n\x04INCH\x10\x01\x12\x0e\n\nCENTIMETER\x10\x02\x12\t\n\x05POINT\x10\x03\"\xf9\x05\n\x08\x44ocument\x12\x46\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.DocumentInputConfig\x12?\n\rdocument_text\x18\x02 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippet\x12<\n\x06layout\x18\x03 \x03(\x0b\x32,.google.cloud.automl.v1beta1.Document.Layout\x12L\n\x13\x64ocument_dimensions\x18\x04 \x01(\x0b\x32/.google.cloud.automl.v1beta1.DocumentDimensions\x12\x12\n\npage_count\x18\x05 \x01(\x05\x1a\xc3\x03\n\x06Layout\x12>\n\x0ctext_segment\x18\x01 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSegment\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\x12@\n\rbounding_poly\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12W\n\x11text_segment_type\x18\x04 \x01(\x0e\x32<.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType\"\xc8\x01\n\x0fTextSegmentType\x12!\n\x1dTEXT_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOKEN\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x0e\n\nFORM_FIELD\x10\x03\x12\x13\n\x0f\x46ORM_FIELD_NAME\x10\x04\x12\x17\n\x13\x46ORM_FIELD_CONTENTS\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x10\n\x0cTABLE_HEADER\x10\x07\x12\r\n\tTABLE_ROW\x10\x08\x12\x0e\n\nTABLE_CELL\x10\t\"F\n\x03Row\x12\x17\n\x0f\x63olumn_spec_ids\x18\x02 \x03(\t\x12&\n\x06values\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value\"\xfe\x01\n\x0e\x45xamplePayload\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32\".google.cloud.automl.v1beta1.ImageH\x00\x12@\n\x0ctext_snippet\x18\x02 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippetH\x00\x12\x39\n\x08\x64ocument\x18\x04 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DocumentH\x00\x12/\n\x03row\x18\x03 \x01(\x0b\x32 .google.cloud.automl.v1beta1.RowH\x00\x42\t\n\x07payloadB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Image").msgclass - TextSnippet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSnippet").msgclass - DocumentDimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentDimensions").msgclass - DocumentDimensions::DocumentDimensionUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit").enummodule - Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document").msgclass - Document::Layout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document.Layout").msgclass - Document::Layout::TextSegmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document.Layout.TextSegmentType").enummodule - Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Row").msgclass - ExamplePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExamplePayload").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb deleted file mode 100644 index becbd202cf0c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/data_stats.proto - -require 'google/protobuf' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/data_stats.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\xfd\x03\n\tDataStats\x12\x42\n\rfloat64_stats\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.Float64StatsH\x00\x12@\n\x0cstring_stats\x18\x04 \x01(\x0b\x32(.google.cloud.automl.v1beta1.StringStatsH\x00\x12\x46\n\x0ftimestamp_stats\x18\x05 \x01(\x0b\x32+.google.cloud.automl.v1beta1.TimestampStatsH\x00\x12>\n\x0b\x61rray_stats\x18\x06 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.ArrayStatsH\x00\x12@\n\x0cstruct_stats\x18\x07 \x01(\x0b\x32(.google.cloud.automl.v1beta1.StructStatsH\x00\x12\x44\n\x0e\x63\x61tegory_stats\x18\x08 \x01(\x0b\x32*.google.cloud.automl.v1beta1.CategoryStatsH\x00\x12\x1c\n\x14\x64istinct_value_count\x18\x01 \x01(\x03\x12\x18\n\x10null_value_count\x18\x02 \x01(\x03\x12\x19\n\x11valid_value_count\x18\t \x01(\x03\x42\x07\n\x05stats\"\xdd\x01\n\x0c\x46loat64Stats\x12\x0c\n\x04mean\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x02 \x01(\x01\x12\x11\n\tquantiles\x18\x03 \x03(\x01\x12T\n\x11histogram_buckets\x18\x04 \x03(\x0b\x32\x39.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket\x1a:\n\x0fHistogramBucket\x12\x0b\n\x03min\x18\x01 \x01(\x01\x12\x0b\n\x03max\x18\x02 \x01(\x01\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\"\x8d\x01\n\x0bStringStats\x12P\n\x11top_unigram_stats\x18\x01 \x03(\x0b\x32\x35.google.cloud.automl.v1beta1.StringStats.UnigramStats\x1a,\n\x0cUnigramStats\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xf4\x02\n\x0eTimestampStats\x12V\n\x0egranular_stats\x18\x01 \x03(\x0b\x32>.google.cloud.automl.v1beta1.TimestampStats.GranularStatsEntry\x1a\x98\x01\n\rGranularStats\x12W\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x46.google.cloud.automl.v1beta1.TimestampStats.GranularStats.BucketsEntry\x1a.\n\x0c\x42ucketsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1ao\n\x12GranularStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TimestampStats.GranularStats:\x02\x38\x01\"J\n\nArrayStats\x12<\n\x0cmember_stats\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats\"\xb7\x01\n\x0bStructStats\x12M\n\x0b\x66ield_stats\x18\x01 \x03(\x0b\x32\x38.google.cloud.automl.v1beta1.StructStats.FieldStatsEntry\x1aY\n\x0f\x46ieldStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats:\x02\x38\x01\"\xa0\x01\n\rCategoryStats\x12Z\n\x12top_category_stats\x18\x01 \x03(\x0b\x32>.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats\x1a\x33\n\x13SingleCategoryStats\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"%\n\x10\x43orrelationStats\x12\x11\n\tcramers_v\x18\x01 \x01(\x01\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - DataStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DataStats").msgclass - Float64Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Float64Stats").msgclass - Float64Stats::HistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Float64Stats.HistogramBucket").msgclass - StringStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StringStats").msgclass - StringStats::UnigramStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StringStats.UnigramStats").msgclass - TimestampStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimestampStats").msgclass - TimestampStats::GranularStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimestampStats.GranularStats").msgclass - ArrayStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ArrayStats").msgclass - StructStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StructStats").msgclass - CategoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CategoryStats").msgclass - CategoryStats::SingleCategoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats").msgclass - CorrelationStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CorrelationStats").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb deleted file mode 100644 index e1edf66dbe0d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/data_types.proto - -require 'google/protobuf' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/data_types.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\xfc\x01\n\x08\x44\x61taType\x12\x42\n\x11list_element_type\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataTypeH\x00\x12>\n\x0bstruct_type\x18\x03 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.StructTypeH\x00\x12\x15\n\x0btime_format\x18\x05 \x01(\tH\x00\x12\x38\n\ttype_code\x18\x01 \x01(\x0e\x32%.google.cloud.automl.v1beta1.TypeCode\x12\x10\n\x08nullable\x18\x04 \x01(\x08\x42\t\n\x07\x64\x65tails\"\xa7\x01\n\nStructType\x12\x43\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x33.google.cloud.automl.v1beta1.StructType.FieldsEntry\x1aT\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x34\n\x05value\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataType:\x02\x38\x01*r\n\x08TypeCode\x12\x19\n\x15TYPE_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46LOAT64\x10\x03\x12\r\n\tTIMESTAMP\x10\x04\x12\n\n\x06STRING\x10\x06\x12\t\n\x05\x41RRAY\x10\x08\x12\n\n\x06STRUCT\x10\t\x12\x0c\n\x08\x43\x41TEGORY\x10\nB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - DataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DataType").msgclass - StructType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StructType").msgclass - TypeCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TypeCode").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb deleted file mode 100644 index 3135034e2cdc..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/dataset.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/image_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_pb' -require 'google/cloud/automl/v1beta1/translation_pb' -require 'google/cloud/automl/v1beta1/video_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/cloud/automl/v1beta1/dataset.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\t\n\x07\x44\x61taset\x12_\n\x1ctranslation_dataset_metadata\x18\x17 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TranslationDatasetMetadataH\x00\x12p\n%image_classification_dataset_metadata\x18\x18 \x01(\x0b\x32?.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataH\x00\x12n\n$text_classification_dataset_metadata\x18\x19 \x01(\x0b\x32>.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataH\x00\x12s\n\'image_object_detection_dataset_metadata\x18\x1a \x01(\x0b\x32@.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataH\x00\x12p\n%video_classification_dataset_metadata\x18\x1f \x01(\x0b\x32?.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataH\x00\x12q\n&video_object_tracking_dataset_metadata\x18\x1d \x01(\x0b\x32?.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataH\x00\x12\x66\n text_extraction_dataset_metadata\x18\x1c \x01(\x0b\x32:.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataH\x00\x12\x64\n\x1ftext_sentiment_dataset_metadata\x18\x1e \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataH\x00\x12U\n\x17tables_dataset_metadata\x18! \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesDatasetMetadataH\x00\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\x15\n\rexample_count\x18\x15 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t:^\xea\x41[\n\x1d\x61utoml.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}B\x12\n\x10\x64\x61taset_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Dataset").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb deleted file mode 100644 index 2e9510dd00d8..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/detection.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/geometry_pb' -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n+google/cloud/automl/v1beta1/detection.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/geometry.proto\x1a\x1egoogle/protobuf/duration.proto\"p\n\x1eImageObjectDetectionAnnotation\x12?\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12\r\n\x05score\x18\x02 \x01(\x02\"\xb4\x01\n\x1dVideoObjectTrackingAnnotation\x12\x13\n\x0binstance_id\x18\x01 \x01(\t\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12?\n\x0c\x62ounding_box\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12\r\n\x05score\x18\x04 \x01(\x02\"\xae\x02\n\x17\x42oundingBoxMetricsEntry\x12\x15\n\riou_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16mean_average_precision\x18\x02 \x01(\x02\x12o\n\x1a\x63onfidence_metrics_entries\x18\x03 \x03(\x0b\x32K.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\"\xd6\x01\n%ImageObjectDetectionEvaluationMetrics\x12$\n\x1c\x65valuated_bounding_box_count\x18\x01 \x01(\x05\x12Z\n\x1c\x62ounding_box_metrics_entries\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x03 \x01(\x02\"\xf4\x01\n$VideoObjectTrackingEvaluationMetrics\x12\x1d\n\x15\x65valuated_frame_count\x18\x01 \x01(\x05\x12$\n\x1c\x65valuated_bounding_box_count\x18\x02 \x01(\x05\x12Z\n\x1c\x62ounding_box_metrics_entries\x18\x04 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x06 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ImageObjectDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation").msgclass - VideoObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation").msgclass - BoundingBoxMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingBoxMetricsEntry").msgclass - BoundingBoxMetricsEntry::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry").msgclass - ImageObjectDetectionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics").msgclass - VideoObjectTrackingEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb deleted file mode 100644 index 4a92f0a318eb..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/geometry.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/cloud/automl/v1beta1/geometry.proto\x12\x1bgoogle.cloud.automl.v1beta1\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"Z\n\x0c\x42oundingPoly\x12J\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32-.google.cloud.automl.v1beta1.NormalizedVertexB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.NormalizedVertex").msgclass - BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingPoly").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb deleted file mode 100644 index 8631c4f1de2e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/image.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/annotation_spec_pb' -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1beta1/image.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x31google/cloud/automl/v1beta1/annotation_spec.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\"r\n\"ImageClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"%\n#ImageObjectDetectionDatasetMetadata\"\xb2\x01\n ImageClassificationModelMetadata\x12\x15\n\rbase_model_id\x18\x01 \x01(\t\x12\x14\n\x0ctrain_budget\x18\x02 \x01(\x03\x12\x12\n\ntrain_cost\x18\x03 \x01(\x03\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12\x12\n\nmodel_type\x18\x07 \x01(\t\x12\x10\n\x08node_qps\x18\r \x01(\x01\x12\x12\n\nnode_count\x18\x0e \x01(\x03\"\xbe\x01\n!ImageObjectDetectionModelMetadata\x12\x12\n\nmodel_type\x18\x01 \x01(\t\x12\x12\n\nnode_count\x18\x03 \x01(\x03\x12\x10\n\x08node_qps\x18\x04 \x01(\x01\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12%\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x12#\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\"@\n*ImageClassificationModelDeploymentMetadata\x12\x12\n\nnode_count\x18\x01 \x01(\x03\"A\n+ImageObjectDetectionModelDeploymentMetadata\x12\x12\n\nnode_count\x18\x01 \x01(\x03\x42\xa7\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\nImageProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ImageClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata").msgclass - ImageObjectDetectionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata").msgclass - ImageClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationModelMetadata").msgclass - ImageObjectDetectionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata").msgclass - ImageClassificationModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata").msgclass - ImageObjectDetectionModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb deleted file mode 100644 index 0ae4984c691f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/io.proto - -require 'google/protobuf' - - -descriptor_data = "\n$google/cloud/automl/v1beta1/io.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\x92\x02\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x12\x44\n\x06params\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.InputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"\xa9\x01\n\x17\x42\x61tchPredictInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x42\x08\n\x06source\"Q\n\x13\x44ocumentInputConfig\x12:\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSource\"\xb7\x01\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xc3\x01\n\x18\x42\x61tchPredictOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xcf\x02\n\x17ModelExportOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12\x46\n\x0fgcr_destination\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcrDestinationH\x00\x12\x14\n\x0cmodel_format\x18\x04 \x01(\t\x12P\n\x06params\x18\x02 \x03(\x0b\x32@.google.cloud.automl.v1beta1.ModelExportOutputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x64\x65stination\"\x86\x01\n#ExportEvaluatedExamplesOutputConfig\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x1f\n\tGcsSource\x12\x12\n\ninput_uris\x18\x01 \x03(\t\"#\n\x0e\x42igQuerySource\x12\x11\n\tinput_uri\x18\x01 \x01(\t\"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\")\n\x13\x42igQueryDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\t\"$\n\x0eGcrDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.InputConfig").msgclass - BatchPredictInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictInputConfig").msgclass - DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentInputConfig").msgclass - OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.OutputConfig").msgclass - BatchPredictOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOutputConfig").msgclass - ModelExportOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ModelExportOutputConfig").msgclass - ExportEvaluatedExamplesOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig").msgclass - GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcsSource").msgclass - BigQuerySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BigQuerySource").msgclass - GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcsDestination").msgclass - BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BigQueryDestination").msgclass - GcrDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcrDestination").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb deleted file mode 100644 index 0b5f16c6bf27..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/model_evaluation.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/classification_pb' -require 'google/cloud/automl/v1beta1/detection_pb' -require 'google/cloud/automl/v1beta1/regression_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_extraction_pb' -require 'google/cloud/automl/v1beta1/text_sentiment_pb' -require 'google/cloud/automl/v1beta1/translation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/automl/v1beta1/model_evaluation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x08\n\x0fModelEvaluation\x12i\n!classification_evaluation_metrics\x18\x08 \x01(\x0b\x32<.google.cloud.automl.v1beta1.ClassificationEvaluationMetricsH\x00\x12\x61\n\x1dregression_evaluation_metrics\x18\x18 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.RegressionEvaluationMetricsH\x00\x12\x63\n\x1etranslation_evaluation_metrics\x18\t \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TranslationEvaluationMetricsH\x00\x12w\n)image_object_detection_evaluation_metrics\x18\x0c \x01(\x0b\x32\x42.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsH\x00\x12u\n(video_object_tracking_evaluation_metrics\x18\x0e \x01(\x0b\x32\x41.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsH\x00\x12h\n!text_sentiment_evaluation_metrics\x18\x0b \x01(\x0b\x32;.google.cloud.automl.v1beta1.TextSentimentEvaluationMetricsH\x00\x12j\n\"text_extraction_evaluation_metrics\x18\r \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x61nnotation_spec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0f \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x17\x65valuated_example_count\x18\x06 \x01(\x05:\x87\x01\xea\x41\x83\x01\n%automl.googleapis.com/ModelEvaluation\x12Zprojects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}B\t\n\x07metricsB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ModelEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ModelEvaluation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb deleted file mode 100644 index 5e4ceb1dd794..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/model.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/image_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_pb' -require 'google/cloud/automl/v1beta1/translation_pb' -require 'google/cloud/automl/v1beta1/video_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1beta1/model.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\n\n\x05Model\x12[\n\x1atranslation_model_metadata\x18\x0f \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TranslationModelMetadataH\x00\x12l\n#image_classification_model_metadata\x18\r \x01(\x0b\x32=.google.cloud.automl.v1beta1.ImageClassificationModelMetadataH\x00\x12j\n\"text_classification_model_metadata\x18\x0e \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextClassificationModelMetadataH\x00\x12o\n%image_object_detection_model_metadata\x18\x14 \x01(\x0b\x32>.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataH\x00\x12l\n#video_classification_model_metadata\x18\x17 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoClassificationModelMetadataH\x00\x12m\n$video_object_tracking_model_metadata\x18\x15 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataH\x00\x12\x62\n\x1etext_extraction_model_metadata\x18\x13 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.TextExtractionModelMetadataH\x00\x12Q\n\x15tables_model_metadata\x18\x18 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.TablesModelMetadataH\x00\x12`\n\x1dtext_sentiment_model_metadata\x18\x16 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TextSentimentModelMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\x10\x64\x65ployment_state\x18\x08 \x01(\x0e\x32\x32.google.cloud.automl.v1beta1.Model.DeploymentState\"Q\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0e\n\nUNDEPLOYED\x10\x02:X\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\x10\n\x0emodel_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Model").msgclass - Model::DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Model.DeploymentState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb deleted file mode 100644 index 651d885fc239..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/operations.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/io_pb' -require 'google/cloud/automl/v1beta1/model_pb' -require 'google/cloud/automl/v1beta1/model_evaluation_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/operations.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a$google/cloud/automl/v1beta1/io.proto\x1a\'google/cloud/automl/v1beta1/model.proto\x1a\x32google/cloud/automl/v1beta1/model_evaluation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8b\x08\n\x11OperationMetadata\x12N\n\x0e\x64\x65lete_details\x18\x08 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.DeleteOperationMetadataH\x00\x12Y\n\x14\x64\x65ploy_model_details\x18\x18 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.DeployModelOperationMetadataH\x00\x12]\n\x16undeploy_model_details\x18\x19 \x01(\x0b\x32;.google.cloud.automl.v1beta1.UndeployModelOperationMetadataH\x00\x12Y\n\x14\x63reate_model_details\x18\n \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.CreateModelOperationMetadataH\x00\x12W\n\x13import_data_details\x18\x0f \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ImportDataOperationMetadataH\x00\x12[\n\x15\x62\x61tch_predict_details\x18\x10 \x01(\x0b\x32:.google.cloud.automl.v1beta1.BatchPredictOperationMetadataH\x00\x12W\n\x13\x65xport_data_details\x18\x15 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ExportDataOperationMetadataH\x00\x12Y\n\x14\x65xport_model_details\x18\x16 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.ExportModelOperationMetadataH\x00\x12r\n!export_evaluated_examples_details\x18\x1a \x01(\x0b\x32\x45.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataH\x00\x12\x18\n\x10progress_percent\x18\r \x01(\x05\x12,\n\x10partial_failures\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x64\x65tails\"\x19\n\x17\x44\x65leteOperationMetadata\"\x1e\n\x1c\x44\x65ployModelOperationMetadata\" \n\x1eUndeployModelOperationMetadata\"\x1e\n\x1c\x43reateModelOperationMetadata\"\x1d\n\x1bImportDataOperationMetadata\"\xef\x01\n\x1b\x45xportDataOperationMetadata\x12\x62\n\x0boutput_info\x18\x01 \x01(\x0b\x32M.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo\x1al\n\x14\x45xportDataOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xc3\x02\n\x1d\x42\x61tchPredictOperationMetadata\x12J\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfig\x12\x66\n\x0boutput_info\x18\x02 \x01(\x0b\x32Q.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo\x1an\n\x16\x42\x61tchPredictOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xbb\x01\n\x1c\x45xportModelOperationMetadata\x12\x64\n\x0boutput_info\x18\x02 \x01(\x0b\x32O.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo\x1a\x35\n\x15\x45xportModelOutputInfo\x12\x1c\n\x14gcs_output_directory\x18\x01 \x01(\t\"\xee\x01\n(ExportEvaluatedExamplesOperationMetadata\x12|\n\x0boutput_info\x18\x02 \x01(\x0b\x32g.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo\x1a\x44\n!ExportEvaluatedExamplesOutputInfo\x12\x1f\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.OperationMetadata").msgclass - DeleteOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteOperationMetadata").msgclass - DeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeployModelOperationMetadata").msgclass - UndeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UndeployModelOperationMetadata").msgclass - CreateModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateModelOperationMetadata").msgclass - ImportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImportDataOperationMetadata").msgclass - ExportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataOperationMetadata").msgclass - ExportDataOperationMetadata::ExportDataOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo").msgclass - BatchPredictOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOperationMetadata").msgclass - BatchPredictOperationMetadata::BatchPredictOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo").msgclass - ExportModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelOperationMetadata").msgclass - ExportModelOperationMetadata::ExportModelOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo").msgclass - ExportEvaluatedExamplesOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata").msgclass - ExportEvaluatedExamplesOperationMetadata::ExportEvaluatedExamplesOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb deleted file mode 100644 index 3ef3fce3b376..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/prediction_service/credentials" -require "google/cloud/automl/v1beta1/prediction_service/paths" -require "google/cloud/automl/v1beta1/prediction_service/operations" -require "google/cloud/automl/v1beta1/prediction_service/client" -require "google/cloud/automl/v1beta1/prediction_service/rest" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/automl/v1beta1/prediction_service" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/automl/v1beta1/prediction_service/rest" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - module PredictionService - end - end - end - end -end - -helper_path = ::File.join __dir__, "prediction_service", "helpers.rb" -require "google/cloud/automl/v1beta1/prediction_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb deleted file mode 100644 index a82dd9c0abbb..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb +++ /dev/null @@ -1,727 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/automl/v1beta1/prediction_service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - ## - # Client for the PredictionService service. - # - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :prediction_service_stub - - ## - # Configure the PredictionService Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PredictionService clients - # ::Google::Cloud::AutoML::V1beta1::PredictionService::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", "AutoML", "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.predict.timeout = 60.0 - - default_config.rpcs.batch_predict.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService 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::AutoML::V1beta1::PredictionService::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 - @prediction_service_stub.universe_domain - end - - ## - # Create a new PredictionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PredictionService 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/automl/v1beta1/prediction_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 - - @prediction_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AutoML::V1beta1::PredictionService::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 - ) - - @prediction_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::AutoML::V1beta1::PredictionService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @prediction_service_stub.logger - end - - # Service calls - - ## - # Perform an online prediction. The prediction result will be directly - # returned in the response. - # Available for following ML problems, and their expected request payloads: - # * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Text Classification - TextSnippet, content up to 60,000 characters, - # UTF-8 encoded. - # * Text Extraction - TextSnippet, content up to 30,000 characters, - # UTF-8 NFC encoded. - # * Translation - TextSnippet, content up to 25,000 characters, UTF-8 - # encoded. - # * Tables - Row, with column values matching the columns of the model, - # up to 5MB. Not available for FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. - # * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 - # encoded. - # - # @overload predict(request, options = nil) - # Pass arguments to `predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::PredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::PredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload predict(name: nil, payload: nil, params: nil) - # Pass arguments to `predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model requested to serve the prediction. - # @param payload [::Google::Cloud::AutoML::V1beta1::ExamplePayload, ::Hash] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned in the response. Default is 100, the - # requested value may be limited by server. - # * For Tables: - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotation. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::PredictRequest.new - # - # # Call the predict method. - # result = client.predict request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. - # p result - # - def predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::PredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.predict.timeout, - metadata: metadata, - retry_policy: @config.rpcs.predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.call_rpc :predict, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict Predict}, batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via GetOperation - # method. Once the operation is done, {::Google::Cloud::AutoML::V1beta1::BatchPredictResult BatchPredictResult} is returned in - # the {::Google::Longrunning::Operation#response response} field. - # Available for following ML problems: - # * Image Classification - # * Image Object Detection - # * Video Classification - # * Video Object Tracking * Text Extraction - # * Tables - # - # @overload batch_predict(request, options = nil) - # Pass arguments to `batch_predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::BatchPredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_predict(name: nil, input_config: nil, output_config: nil, params: nil) - # Pass arguments to `batch_predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model requested to serve the batch prediction. - # @param input_config [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig, ::Hash] - # Required. The input configuration for batch prediction. - # @param output_config [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig, ::Hash] - # Required. The Configuration specifying where output predictions should - # be written. - # @param params [::Hash{::String => ::String}] - # Required. Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # * For Text Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be produced per image. Default is 100, the - # requested value may be limited by server. - # - # * For Video Classification : - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # `segment_classification` - (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is "true". - # `shot_classification` - (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. The default is "false". - # `1s_interval_classification` - (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. The default is - # "false". - # - # * For Tables: - # - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotations. The - # default is false. - # - # * For Video Object Tracking: - # - # `score_threshold` - (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned per frame. Default is 100, the requested - # value may be limited by server. - # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size will be - # returned. Value in 0 to 1 range. Default is 0. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new - # - # # Call the batch_predict method. - # result = client.batch_predict request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest - - # Converts hash and nil to 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_predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.batch_predict.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.call_rpc :batch_predict, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 PredictionService API. - # - # This class represents the configuration for PredictionService, - # providing control 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::AutoML::V1beta1::PredictionService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # predict to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::AutoML::V1beta1::PredictionService::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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 PredictionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `predict` - # @return [::Gapic::Config::Method] - # - attr_reader :predict - ## - # RPC-specific configuration for `batch_predict` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_predict - - # @private - def initialize parent_rpcs = nil - predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict - @predict = ::Gapic::Config::Method.new predict_config - batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict - @batch_predict = ::Gapic::Config::Method.new batch_predict_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb deleted file mode 100644 index a5db32e08e4d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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 AutoML - module V1beta1 - module PredictionService - # Credentials for the PredictionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "AUTOML_CREDENTIALS", - "AUTOML_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "AUTOML_CREDENTIALS_JSON", - "AUTOML_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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb deleted file mode 100644 index fc03f007a693..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb +++ /dev/null @@ -1,851 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 AutoML - module V1beta1 - module PredictionService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PredictionService 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 PredictionService 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::AutoML::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::AutoML::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::AutoML::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::AutoML::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::AutoML::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.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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb deleted file mode 100644 index a43bf51c919f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - # Path helper methods for the PredictionService API. - module Paths - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb deleted file mode 100644 index 7d3604f143b4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_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/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/prediction_service/credentials" -require "google/cloud/automl/v1beta1/prediction_service/paths" -require "google/cloud/automl/v1beta1/prediction_service/rest/operations" -require "google/cloud/automl/v1beta1/prediction_service/rest/client" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/automl/v1beta1/prediction_service/rest" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - module PredictionService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/automl/v1beta1/prediction_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb deleted file mode 100644 index 43ddbdebe172..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb +++ /dev/null @@ -1,670 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service/rest/service_stub" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - module Rest - ## - # REST client for the PredictionService service. - # - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :prediction_service_stub - - ## - # Configure the PredictionService Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PredictionService clients - # ::Google::Cloud::AutoML::V1beta1::PredictionService::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", "AutoML", "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.predict.timeout = 60.0 - - default_config.rpcs.batch_predict.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService 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::AutoML::V1beta1::PredictionService::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 - @prediction_service_stub.universe_domain - end - - ## - # Create a new PredictionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PredictionService 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::AutoML::V1beta1::PredictionService::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 - - @prediction_service_stub = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @prediction_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::AutoML::V1beta1::PredictionService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @prediction_service_stub.logger - end - - # Service calls - - ## - # Perform an online prediction. The prediction result will be directly - # returned in the response. - # Available for following ML problems, and their expected request payloads: - # * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Text Classification - TextSnippet, content up to 60,000 characters, - # UTF-8 encoded. - # * Text Extraction - TextSnippet, content up to 30,000 characters, - # UTF-8 NFC encoded. - # * Translation - TextSnippet, content up to 25,000 characters, UTF-8 - # encoded. - # * Tables - Row, with column values matching the columns of the model, - # up to 5MB. Not available for FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. - # * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 - # encoded. - # - # @overload predict(request, options = nil) - # Pass arguments to `predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::PredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::PredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload predict(name: nil, payload: nil, params: nil) - # Pass arguments to `predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model requested to serve the prediction. - # @param payload [::Google::Cloud::AutoML::V1beta1::ExamplePayload, ::Hash] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned in the response. Default is 100, the - # requested value may be limited by server. - # * For Tables: - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotation. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::PredictRequest.new - # - # # Call the predict method. - # result = client.predict request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. - # p result - # - def predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::PredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.predict.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.predict request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client#predict Predict}, batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via GetOperation - # method. Once the operation is done, {::Google::Cloud::AutoML::V1beta1::BatchPredictResult BatchPredictResult} is returned in - # the {::Google::Longrunning::Operation#response response} field. - # Available for following ML problems: - # * Image Classification - # * Image Object Detection - # * Video Classification - # * Video Object Tracking * Text Extraction - # * Tables - # - # @overload batch_predict(request, options = nil) - # Pass arguments to `batch_predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::BatchPredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_predict(name: nil, input_config: nil, output_config: nil, params: nil) - # Pass arguments to `batch_predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 model requested to serve the batch prediction. - # @param input_config [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig, ::Hash] - # Required. The input configuration for batch prediction. - # @param output_config [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig, ::Hash] - # Required. The Configuration specifying where output predictions should - # be written. - # @param params [::Hash{::String => ::String}] - # Required. Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # * For Text Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be produced per image. Default is 100, the - # requested value may be limited by server. - # - # * For Video Classification : - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # `segment_classification` - (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is "true". - # `shot_classification` - (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. The default is "false". - # `1s_interval_classification` - (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. The default is - # "false". - # - # * For Tables: - # - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotations. The - # default is false. - # - # * For Video Object Tracking: - # - # `score_threshold` - (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned per frame. Default is 100, the requested - # value may be limited by server. - # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size will be - # returned. Value in 0 to 1 range. Default is 0. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new - # - # # Call the batch_predict method. - # result = client.batch_predict request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest - - # Converts hash and nil to an 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_predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::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.batch_predict.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.batch_predict request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 PredictionService REST API. - # - # This class represents the configuration for PredictionService 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::AutoML::V1beta1::PredictionService::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 - # # predict to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 PredictionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `predict` - # @return [::Gapic::Config::Method] - # - attr_reader :predict - ## - # RPC-specific configuration for `batch_predict` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_predict - - # @private - def initialize parent_rpcs = nil - predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict - @predict = ::Gapic::Config::Method.new predict_config - batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict - @batch_predict = ::Gapic::Config::Method.new batch_predict_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb deleted file mode 100644 index f5e618e44755..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb +++ /dev/null @@ -1,1095 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 AutoML - module V1beta1 - module PredictionService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PredictionService 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 PredictionService 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::AutoML::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::AutoML::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::AutoML::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::AutoML::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 - - ## - # 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 [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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::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 - call_metadata = @config.rpcs.wait_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::AutoML::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.wait_operation.timeout, - metadata: call_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.wait_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 - - ## - # 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 = "automl.googleapis.com" - - config_attr :endpoint, nil, ::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 - ## - # 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 - - ## - # @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 - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_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: "wait_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 - - ## - # @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 - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:wait", - 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-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb deleted file mode 100644 index 4d4927cfe5ad..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/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/cloud/automl/v1beta1/prediction_service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - module Rest - ## - # REST service stub for the PredictionService 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 predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::PredictRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # A result object deserialized from the server's reply - def predict request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_predict_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "predict", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::PredictResponse.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_predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_predict request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_predict_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_predict", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::PredictRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_predict_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:predict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest] - # 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_predict_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:batchPredict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb deleted file mode 100644 index 1d749800e047..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/prediction_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/automl/v1beta1/annotation_payload_pb' -require 'google/cloud/automl/v1beta1/data_items_pb' -require 'google/cloud/automl/v1beta1/io_pb' -require 'google/cloud/automl/v1beta1/operations_pb' -require 'google/longrunning/operations_pb' - - -descriptor_data = "\n4google/cloud/automl/v1beta1/prediction_service.proto\x12\x1bgoogle.cloud.automl.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/automl/v1beta1/annotation_payload.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a,google/cloud/automl/v1beta1/operations.proto\x1a#google/longrunning/operations.proto\"\xfe\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x41\n\x07payload\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayloadB\x03\xe0\x41\x02\x12G\n\x06params\x18\x03 \x03(\x0b\x32\x37.google.cloud.automl.v1beta1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9a\x02\n\x0fPredictResponse\x12?\n\x07payload\x18\x01 \x03(\x0b\x32..google.cloud.automl.v1beta1.AnnotationPayload\x12G\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayload\x12L\n\x08metadata\x18\x02 \x03(\x0b\x32:.google.cloud.automl.v1beta1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xee\x02\n\x13\x42\x61tchPredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12O\n\x0cinput_config\x18\x03 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12Q\n\routput_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12Q\n\x06params\x18\x05 \x03(\x0b\x32<.google.cloud.automl.v1beta1.BatchPredictRequest.ParamsEntryB\x03\xe0\x41\x02\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x96\x01\n\x12\x42\x61tchPredictResult\x12O\n\x08metadata\x18\x01 \x03(\x0b\x32=.google.cloud.automl.v1beta1.BatchPredictResult.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\x9e\x04\n\x11PredictionService\x12\xbe\x01\n\x07Predict\x12+.google.cloud.automl.v1beta1.PredictRequest\x1a,.google.cloud.automl.v1beta1.PredictResponse\"X\xda\x41\x13name,payload,params\x82\xd3\xe4\x93\x02<\"7/v1beta1/{name=projects/*/locations/*/models/*}:predict:\x01*\x12\xfc\x01\n\x0c\x42\x61tchPredict\x12\x30.google.cloud.automl.v1beta1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41\'\n\x12\x42\x61tchPredictResult\x12\x11OperationMetadata\xda\x41&name,input_config,output_config,params\x82\xd3\xe4\x93\x02\x41\"/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}\x12\xca\x01\n\x0eListTableSpecs\x12\x32.google.cloud.automl.v1beta1.ListTableSpecsRequest\x1a\x33.google.cloud.automl.v1beta1.ListTableSpecsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs\x12\xda\x01\n\x0fUpdateTableSpec\x12\x33.google.cloud.automl.v1beta1.UpdateTableSpecRequest\x1a&.google.cloud.automl.v1beta1.TableSpec\"j\xda\x41\ntable_spec\x82\xd3\xe4\x93\x02W2I/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}:\ntable_spec\x12\xc8\x01\n\rGetColumnSpec\x12\x31.google.cloud.automl.v1beta1.GetColumnSpecRequest\x1a\'.google.cloud.automl.v1beta1.ColumnSpec\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}\x12\xdb\x01\n\x0fListColumnSpecs\x12\x33.google.cloud.automl.v1beta1.ListColumnSpecsRequest\x1a\x34.google.cloud.automl.v1beta1.ListColumnSpecsResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs\x12\xee\x01\n\x10UpdateColumnSpec\x12\x34.google.cloud.automl.v1beta1.UpdateColumnSpecRequest\x1a\'.google.cloud.automl.v1beta1.ColumnSpec\"{\xda\x41\x0b\x63olumn_spec\x82\xd3\xe4\x93\x02g2X/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}:\x0b\x63olumn_spec\x12\xc9\x01\n\x0b\x43reateModel\x12/.google.cloud.automl.v1beta1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x38\"//v1beta1/{parent=projects/*/locations/*}/models:\x05model\x12\x9c\x01\n\x08GetModel\x12,.google.cloud.automl.v1beta1.GetModelRequest\x1a\".google.cloud.automl.v1beta1.Model\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{name=projects/*/locations/*/models/*}\x12\xaf\x01\n\nListModels\x12..google.cloud.automl.v1beta1.ListModelsRequest\x1a/.google.cloud.automl.v1beta1.ListModelsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{parent=projects/*/locations/*}/models\x12\xca\x01\n\x0b\x44\x65leteModel\x12/.google.cloud.automl.v1beta1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1beta1/{name=projects/*/locations/*/models/*}\x12\xd4\x01\n\x0b\x44\x65ployModel\x12/.google.cloud.automl.v1beta1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/locations/*/models/*}:deploy:\x01*\x12\xda\x01\n\rUndeployModel\x12\x31.google.cloud.automl.v1beta1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v1beta1/{name=projects/*/locations/*/models/*}:undeploy:\x01*\x12\xe3\x01\n\x0b\x45xportModel\x12/.google.cloud.automl.v1beta1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\x8c\x02\n\x17\x45xportEvaluatedExamples\x12;.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples:\x01*\x12\xcd\x01\n\x12GetModelEvaluation\x12\x36.google.cloud.automl.v1beta1.GetModelEvaluationRequest\x1a,.google.cloud.automl.v1beta1.ModelEvaluation\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}\x12\xe0\x01\n\x14ListModelEvaluations\x12\x38.google.cloud.automl.v1beta1.ListModelEvaluationsRequest\x1a\x39.google.cloud.automl.v1beta1.ListModelEvaluationsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa8\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x0b\x41utoMlProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateDatasetRequest").msgclass - GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetDatasetRequest").msgclass - ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListDatasetsRequest").msgclass - ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListDatasetsResponse").msgclass - UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateDatasetRequest").msgclass - DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteDatasetRequest").msgclass - ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImportDataRequest").msgclass - ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataRequest").msgclass - GetAnnotationSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetAnnotationSpecRequest").msgclass - GetTableSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetTableSpecRequest").msgclass - ListTableSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListTableSpecsRequest").msgclass - ListTableSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListTableSpecsResponse").msgclass - UpdateTableSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateTableSpecRequest").msgclass - GetColumnSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetColumnSpecRequest").msgclass - ListColumnSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListColumnSpecsRequest").msgclass - ListColumnSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListColumnSpecsResponse").msgclass - UpdateColumnSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateColumnSpecRequest").msgclass - CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateModelRequest").msgclass - GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetModelRequest").msgclass - ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelsRequest").msgclass - ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelsResponse").msgclass - DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteModelRequest").msgclass - DeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeployModelRequest").msgclass - UndeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UndeployModelRequest").msgclass - ExportModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelRequest").msgclass - ExportEvaluatedExamplesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest").msgclass - GetModelEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetModelEvaluationRequest").msgclass - ListModelEvaluationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelEvaluationsRequest").msgclass - ListModelEvaluationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelEvaluationsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb deleted file mode 100644 index 3058d28ba237..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb +++ /dev/null @@ -1,163 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/automl/v1beta1/service.proto for package 'Google.Cloud.AutoML.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/automl/v1beta1/service_pb' - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoMl - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.automl.v1beta1.AutoMl' - - # Creates a dataset. - rpc :CreateDataset, ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset - # Gets a dataset. - rpc :GetDataset, ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset - # Lists datasets in a project. - rpc :ListDatasets, ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse - # Updates a dataset. - rpc :UpdateDataset, ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset - # Deletes a dataset and all of its contents. - # Returns empty response in the - # [response][google.longrunning.Operation.response] field when it completes, - # and `delete_details` in the - # [metadata][google.longrunning.Operation.metadata] field. - rpc :DeleteDataset, ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Google::Longrunning::Operation - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] - # parameter must be explicitly set. - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ImportData, ::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Google::Longrunning::Operation - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportData, ::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Google::Longrunning::Operation - # Gets an annotation spec. - rpc :GetAnnotationSpec, ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Google::Cloud::AutoML::V1beta1::AnnotationSpec - # Gets a table spec. - rpc :GetTableSpec, ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Google::Cloud::AutoML::V1beta1::TableSpec - # Lists table specs in a dataset. - rpc :ListTableSpecs, ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse - # Updates a table spec. - rpc :UpdateTableSpec, ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Google::Cloud::AutoML::V1beta1::TableSpec - # Gets a column spec. - rpc :GetColumnSpec, ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Google::Cloud::AutoML::V1beta1::ColumnSpec - # Lists column specs in a table spec. - rpc :ListColumnSpecs, ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse - # Updates a column spec. - rpc :UpdateColumnSpec, ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Google::Cloud::AutoML::V1beta1::ColumnSpec - # Creates a model. - # Returns a Model in the [response][google.longrunning.Operation.response] - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - rpc :CreateModel, ::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Google::Longrunning::Operation - # Gets a model. - rpc :GetModel, ::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Google::Cloud::AutoML::V1beta1::Model - # Lists models. - rpc :ListModels, ::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Google::Cloud::AutoML::V1beta1::ListModelsResponse - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # [response][google.longrunning.Operation.response] field when it completes, - # and `delete_details` in the - # [metadata][google.longrunning.Operation.metadata] field. - rpc :DeleteModel, ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Google::Longrunning::Operation - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # - # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :DeployModel, ::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Google::Longrunning::Operation - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :UndeployModel, ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Google::Longrunning::Operation - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # - # [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportModel, ::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Google::Longrunning::Operation - # Exports examples on which the model was evaluated (i.e. which were in the - # TEST set of the dataset the model was created from), together with their - # ground truth annotations and the annotations created (predicted) by the - # model. - # The examples, ground truth and predictions are exported in the state - # they were at the moment the model was evaluated. - # - # This export is available only for 30 days since the model evaluation is - # created. - # - # Currently only available for Tables. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportEvaluatedExamples, ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Google::Longrunning::Operation - # Gets a model evaluation. - rpc :GetModelEvaluation, ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Google::Cloud::AutoML::V1beta1::ModelEvaluation - # Lists model evaluations. - rpc :ListModelEvaluations, ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb deleted file mode 100644 index 160d97c9614a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/table_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/io_pb' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/table_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a$google/cloud/automl/v1beta1/io.proto\"\xc1\x02\n\tTableSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x13time_column_spec_id\x18\x02 \x01(\t\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x17\n\x0fvalid_row_count\x18\x04 \x01(\x03\x12\x14\n\x0c\x63olumn_count\x18\x07 \x01(\x03\x12?\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.automl.v1beta1.InputConfig\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t:x\xea\x41u\n\x1f\x61utoml.googleapis.com/TableSpec\x12Rprojects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TableSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TableSpec").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb deleted file mode 100644 index f6d3ca925dc9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/tables.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' -require 'google/cloud/automl/v1beta1/column_spec_pb' -require 'google/cloud/automl/v1beta1/data_items_pb' -require 'google/cloud/automl/v1beta1/data_stats_pb' -require 'google/cloud/automl/v1beta1/ranges_pb' -require 'google/cloud/automl/v1beta1/regression_pb' -require 'google/cloud/automl/v1beta1/temporal_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/automl/v1beta1/tables.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a-google/cloud/automl/v1beta1/column_spec.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a,google/cloud/automl/v1beta1/data_stats.proto\x1a(google/cloud/automl/v1beta1/ranges.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a*google/cloud/automl/v1beta1/temporal.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x03\n\x15TablesDatasetMetadata\x12\x1d\n\x15primary_table_spec_id\x18\x01 \x01(\t\x12\x1d\n\x15target_column_spec_id\x18\x02 \x01(\t\x12\x1d\n\x15weight_column_spec_id\x18\x03 \x01(\t\x12\x1d\n\x15ml_use_column_spec_id\x18\x04 \x01(\t\x12t\n\x1atarget_column_correlations\x18\x06 \x03(\x0b\x32P.google.cloud.automl.v1beta1.TablesDatasetMetadata.TargetColumnCorrelationsEntry\x12\x35\n\x11stats_update_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1an\n\x1dTargetColumnCorrelationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1beta1.CorrelationStats:\x02\x38\x01\"\x96\x04\n\x13TablesModelMetadata\x12-\n#optimization_objective_recall_value\x18\x11 \x01(\x02H\x00\x12\x30\n&optimization_objective_precision_value\x18\x12 \x01(\x02H\x00\x12\x43\n\x12target_column_spec\x18\x02 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.ColumnSpec\x12K\n\x1ainput_feature_column_specs\x18\x03 \x03(\x0b\x32\'.google.cloud.automl.v1beta1.ColumnSpec\x12\x1e\n\x16optimization_objective\x18\x04 \x01(\t\x12T\n\x18tables_model_column_info\x18\x05 \x03(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesModelColumnInfo\x12%\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x12#\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\x12\x1e\n\x16\x64isable_early_stopping\x18\x0c \x01(\x08\x42*\n(additional_optimization_objective_config\"\xfd\x01\n\x10TablesAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\x12\x45\n\x13prediction_interval\x18\x04 \x01(\x0b\x32(.google.cloud.automl.v1beta1.DoubleRange\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x12T\n\x18tables_model_column_info\x18\x03 \x03(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesModelColumnInfo\x12\x16\n\x0e\x62\x61seline_score\x18\x05 \x01(\x02\"j\n\x15TablesModelColumnInfo\x12\x18\n\x10\x63olumn_spec_name\x18\x01 \x01(\t\x12\x1b\n\x13\x63olumn_display_name\x18\x02 \x01(\t\x12\x1a\n\x12\x66\x65\x61ture_importance\x18\x03 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TablesDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesDatasetMetadata").msgclass - TablesModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesModelMetadata").msgclass - TablesAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesAnnotation").msgclass - TablesModelColumnInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesModelColumnInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb deleted file mode 100644 index 396cc6fd35e0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/temporal.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n*google/cloud/automl/v1beta1/temporal.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1egoogle/protobuf/duration.proto\"w\n\x0bTimeSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TimeSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimeSegment").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb deleted file mode 100644 index d6721fb18c95..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text_extraction.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/text_segment_pb' - - -descriptor_data = "\n1google/cloud/automl/v1beta1/text_extraction.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a.google/cloud/automl/v1beta1/text_segment.proto\"y\n\x18TextExtractionAnnotation\x12@\n\x0ctext_segment\x18\x03 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSegmentH\x00\x12\r\n\x05score\x18\x01 \x01(\x02\x42\x0c\n\nannotation\"\x97\x02\n\x1fTextExtractionEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12w\n\x1a\x63onfidence_metrics_entries\x18\x02 \x03(\x0b\x32S.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x03 \x01(\x02\x12\x11\n\tprecision\x18\x04 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x05 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextExtractionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionAnnotation").msgclass - TextExtractionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics").msgclass - TextExtractionEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb deleted file mode 100644 index ff6b1ba5b994..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n&google/cloud/automl/v1beta1/text.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\"q\n!TextClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"o\n\x1fTextClassificationModelMetadata\x12L\n\x13\x63lassification_type\x18\x03 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"\x1f\n\x1dTextExtractionDatasetMetadata\"1\n\x1bTextExtractionModelMetadata\x12\x12\n\nmodel_hint\x18\x03 \x01(\t\"5\n\x1cTextSentimentDatasetMetadata\x12\x15\n\rsentiment_max\x18\x01 \x01(\x05\"\x1c\n\x1aTextSentimentModelMetadataB\xa6\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\tTextProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextClassificationDatasetMetadata").msgclass - TextClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextClassificationModelMetadata").msgclass - TextExtractionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionDatasetMetadata").msgclass - TextExtractionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionModelMetadata").msgclass - TextSentimentDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentDatasetMetadata").msgclass - TextSentimentModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentModelMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb deleted file mode 100644 index 33f9468c557a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text_segment.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/automl/v1beta1/text_segment.proto\x12\x1bgoogle.cloud.automl.v1beta1\"H\n\x0bTextSegment\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x14\n\x0cstart_offset\x18\x01 \x01(\x03\x12\x12\n\nend_offset\x18\x02 \x01(\x03\x42\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x10TextSegmentProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSegment").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb deleted file mode 100644 index 0b206376a98e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text_sentiment.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n0google/cloud/automl/v1beta1/text_sentiment.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\",\n\x17TextSentimentAnnotation\x12\x11\n\tsentiment\x18\x01 \x01(\x05\"\xc5\x02\n\x1eTextSentimentEvaluationMetrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12\x1b\n\x13mean_absolute_error\x18\x04 \x01(\x02\x12\x1a\n\x12mean_squared_error\x18\x05 \x01(\x02\x12\x14\n\x0clinear_kappa\x18\x06 \x01(\x02\x12\x17\n\x0fquadratic_kappa\x18\x07 \x01(\x02\x12\x66\n\x10\x63onfusion_matrix\x18\x08 \x01(\x0b\x32L.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1e\n\x12\x61nnotation_spec_id\x18\t \x03(\tB\x02\x18\x01\x42\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x12TextSentimentProtoZ7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextSentimentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentAnnotation").msgclass - TextSentimentEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb deleted file mode 100644 index cbd8923df2c9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/translation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/automl/v1beta1/data_items_pb' - - -descriptor_data = "\n-google/cloud/automl/v1beta1/translation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\"b\n\x1aTranslationDatasetMetadata\x12!\n\x14source_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14target_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"K\n\x1cTranslationEvaluationMetrics\x12\x12\n\nbleu_score\x18\x01 \x01(\x01\x12\x17\n\x0f\x62\x61se_bleu_score\x18\x02 \x01(\x01\"j\n\x18TranslationModelMetadata\x12\x12\n\nbase_model\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\"]\n\x15TranslationAnnotation\x12\x44\n\x12translated_content\x18\x01 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippetB\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x10TranslationProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TranslationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationDatasetMetadata").msgclass - TranslationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationEvaluationMetrics").msgclass - TranslationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationModelMetadata").msgclass - TranslationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationAnnotation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb deleted file mode 100644 index 339624fb94a5..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/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 AutoML - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb deleted file mode 100644 index 0cde809f1c74..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/video.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1beta1/video.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\"$\n\"VideoClassificationDatasetMetadata\"$\n\"VideoObjectTrackingDatasetMetadata\"\"\n VideoClassificationModelMetadata\"\"\n VideoObjectTrackingModelMetadataB\xa7\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\nVideoProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - VideoClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata").msgclass - VideoObjectTrackingDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata").msgclass - VideoClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationModelMetadata").msgclass - VideoObjectTrackingModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md deleted file mode 100644 index 483947fef0b4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud AutoML 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-automl-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb deleted file mode 100644 index a5d64336682a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.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 AutoML - module V1beta1 - # Contains annotation information that is relevant to AutoML. - # @!attribute [rw] translation - # @return [::Google::Cloud::AutoML::V1beta1::TranslationAnnotation] - # Annotation details for translation. - # - # Note: The following fields are mutually exclusive: `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] classification - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationAnnotation] - # Annotation details for content or image classification. - # - # Note: The following fields are mutually exclusive: `classification`, `translation`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionAnnotation] - # Annotation details for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection`, `translation`, `classification`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_classification - # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationAnnotation] - # Annotation details for video classification. - # Returned for Video Classification predictions. - # - # Note: The following fields are mutually exclusive: `video_classification`, `translation`, `classification`, `image_object_detection`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingAnnotation] - # Annotation details for video object tracking. - # - # Note: The following fields are mutually exclusive: `video_object_tracking`, `translation`, `classification`, `image_object_detection`, `video_classification`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionAnnotation] - # Annotation details for text extraction. - # - # Note: The following fields are mutually exclusive: `text_extraction`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentAnnotation] - # Annotation details for text sentiment. - # - # Note: The following fields are mutually exclusive: `text_sentiment`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tables - # @return [::Google::Cloud::AutoML::V1beta1::TablesAnnotation] - # Annotation details for Tables. - # - # Note: The following fields are mutually exclusive: `tables`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] annotation_spec_id - # @return [::String] - # Output only . The resource ID of the annotation spec that - # this annotation pertains to. The annotation spec comes from either an - # ancestor dataset, or the dataset that was used to train the model in use. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The value of - # {::Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name} - # when the model was trained. Because this field returns a value at model - # training time, for different models trained using the same dataset, the - # returned value could be different as model owner could update the - # `display_name` between any two model training. - class AnnotationPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb deleted file mode 100644 index fef4ea17d2ba..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.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 AutoML - module V1beta1 - # A definition of an annotation spec. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the annotation spec. - # Form: - # - # 'projects/\\{project_id}/locations/\\{location_id}/datasets/\\{dataset_id}/annotationSpecs/\\{annotation_spec_id}' - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the annotation spec to show in the interface. The name can be - # up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. - # @!attribute [rw] example_count - # @return [::Integer] - # Output only. The number of examples in the parent dataset - # labeled by the annotation spec. - class AnnotationSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb deleted file mode 100644 index ddcb7dbb8d85..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.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 AutoML - module V1beta1 - # Contains annotation details specific to classification. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0. A higher value - # means greater confidence that the annotation is positive. If a user - # approves an annotation as negative or positive, the score value remains - # unchanged. If a user creates an annotation, the score is 0 for negative or - # 1 for positive. - class ClassificationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains annotation details specific to video classification. - # @!attribute [rw] type - # @return [::String] - # Output only. Expresses the type of video classification. Possible values: - # - # * `segment` - Classification done on a specified by user - # time segment of a video. AnnotationSpec is answered to be present - # in that time segment, if it is present in any part of it. The video - # ML model evaluations are done only for this type of classification. - # - # * `shot`- Shot-level classification. - # AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # - # * `1s_interval` - AutoML Video Intelligence returns labels and their - # confidence scores for each second of the entire segment of the video - # that user specified in the request configuration. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # @!attribute [rw] classification_annotation - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationAnnotation] - # Output only . The classification details of this annotation. - # @!attribute [rw] time_segment - # @return [::Google::Cloud::AutoML::V1beta1::TimeSegment] - # Output only . The time segment of the video to which the - # annotation applies. - class VideoClassificationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for classification problems. - # Note: For Video Classification this metrics only describe quality of the - # Video Classification predictions of "segment_classification" type. - # @!attribute [rw] au_prc - # @return [::Float] - # Output only. The Area Under Precision-Recall Curve metric. Micro-averaged - # for the overall evaluation. - # @!attribute [rw] base_au_prc - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Float] - # Output only. The Area Under Precision-Recall Curve metric based on priors. - # Micro-averaged for the overall evaluation. - # Deprecated. - # @!attribute [rw] au_roc - # @return [::Float] - # Output only. The Area Under Receiver Operating Characteristic curve metric. - # Micro-averaged for the overall evaluation. - # @!attribute [rw] log_loss - # @return [::Float] - # Output only. The Log Loss metric. - # @!attribute [rw] confidence_metrics_entry - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>] - # Output only. Metrics for each confidence_threshold in - # 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and - # position_threshold = INT32_MAX_VALUE. - # ROC and precision-recall curves, and other aggregated metrics are derived - # from them. The confidence metrics entries may also be supplied for - # additional values of position_threshold, but from these no aggregated - # metrics are computed. - # @!attribute [rw] confusion_matrix - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix] - # Output only. Confusion matrix of the evaluation. - # Only set for MULTICLASS classification problems where number - # of labels is no more than 10. - # Only set for model level evaluation, not for evaluation per label. - # @!attribute [rw] annotation_spec_id - # @return [::Array<::String>] - # Output only. The annotation spec ids used for this evaluation. - class ClassificationEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. Metrics are computed with an assumption that the model - # never returns predictions with score lower than this value. - # @!attribute [rw] position_threshold - # @return [::Integer] - # Output only. Metrics are computed with an assumption that the model - # always returns at most this many predictions (ordered by their score, - # descendingly), but they all still need to meet the confidence_threshold. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall (True Positive Rate) for the given confidence - # threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision for the given confidence threshold. - # @!attribute [rw] false_positive_rate - # @return [::Float] - # Output only. False Positive Rate for the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - # @!attribute [rw] recall_at1 - # @return [::Float] - # Output only. The Recall (True Positive Rate) when only considering the - # label that has the highest prediction score and not below the confidence - # threshold for each example. - # @!attribute [rw] precision_at1 - # @return [::Float] - # Output only. The precision when only considering the label that has the - # highest prediction score and not below the confidence threshold for each - # example. - # @!attribute [rw] false_positive_rate_at1 - # @return [::Float] - # Output only. The False Positive Rate when only considering the label that - # has the highest prediction score and not below the confidence threshold - # for each example. - # @!attribute [rw] f1_score_at1 - # @return [::Float] - # Output only. The harmonic mean of {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}. - # @!attribute [rw] true_positive_count - # @return [::Integer] - # Output only. The number of model created labels that match a ground truth - # label. - # @!attribute [rw] false_positive_count - # @return [::Integer] - # Output only. The number of model created labels that do not match a - # ground truth label. - # @!attribute [rw] false_negative_count - # @return [::Integer] - # Output only. The number of ground truth labels that are not matched - # by a model created label. - # @!attribute [rw] true_negative_count - # @return [::Integer] - # Output only. The number of labels that were not created by the model, - # but if they would, they would not match a ground truth label. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Confusion matrix of the model running the classification. - # @!attribute [rw] annotation_spec_id - # @return [::Array<::String>] - # Output only. IDs of the annotation specs used in the confusion matrix. - # For Tables CLASSIFICATION - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - # only list of [annotation_spec_display_name-s][] is populated. - # @!attribute [rw] display_name - # @return [::Array<::String>] - # Output only. Display name of the annotation specs used in the confusion - # matrix, as they were at the moment of the evaluation. For Tables - # CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type], - # distinct values of the target column at the moment of the model - # evaluation are populated here. - # @!attribute [rw] row - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>] - # Output only. Rows in the confusion matrix. The number of rows is equal to - # the size of `annotation_spec_id`. - # `row[i].example_count[j]` is the number of examples that have ground - # truth of the `annotation_spec_id[i]` and are predicted as - # `annotation_spec_id[j]` by the model being evaluated. - class ConfusionMatrix - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. A row in the confusion matrix. - # @!attribute [rw] example_count - # @return [::Array<::Integer>] - # Output only. Value of the specific cell in the confusion matrix. - # The number of values each row has (i.e. the length of the row) is equal - # to the length of the `annotation_spec_id` field or, if that one is not - # populated, length of the {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Type of the classification problem. - module ClassificationType - # An un-set value of this enum. - CLASSIFICATION_TYPE_UNSPECIFIED = 0 - - # At most one label is allowed per example. - MULTICLASS = 1 - - # Multiple labels are allowed for one example. - MULTILABEL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb deleted file mode 100644 index 5a49f3139bdf..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.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 AutoML - module V1beta1 - # A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were - # given on import . - # Used by: - # * Tables - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the column specs. - # Form: - # - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}` - # @!attribute [rw] data_type - # @return [::Google::Cloud::AutoML::V1beta1::DataType] - # The data type of elements stored in the column. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The name of the column to show in the interface. The name can - # be up to 100 characters long and can consist only of ASCII Latin letters - # A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and - # must start with a letter or a digit. - # @!attribute [rw] data_stats - # @return [::Google::Cloud::AutoML::V1beta1::DataStats] - # Output only. Stats of the series of values in the column. - # This field may be stale, see the ancestor's - # Dataset.tables_dataset_metadata.stats_update_time field - # for the timestamp at which these stats were last updated. - # @!attribute [rw] top_correlated_columns - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec::CorrelatedColumn>] - # Deprecated. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - class ColumnSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Identifies the table's column, and its correlation with the column this - # ColumnSpec describes. - # @!attribute [rw] column_spec_id - # @return [::String] - # The column_spec_id of the correlated column, which belongs to the same - # table as the in-context column. - # @!attribute [rw] correlation_stats - # @return [::Google::Cloud::AutoML::V1beta1::CorrelationStats] - # Correlation between this and the in-context column. - class CorrelatedColumn - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb deleted file mode 100644 index c6d3145ce607..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb +++ /dev/null @@ -1,239 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A representation of an image. - # Only images up to 30MB in size are supported. - # @!attribute [rw] image_bytes - # @return [::String] - # Image content represented as a stream of bytes. - # Note: As with all `bytes` fields, protobuffers use a pure binary - # representation, whereas JSON representations use base64. - # - # Note: The following fields are mutually exclusive: `image_bytes`, `input_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::InputConfig] - # An input config specifying the content of the image. - # - # Note: The following fields are mutually exclusive: `input_config`, `image_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] thumbnail_uri - # @return [::String] - # Output only. HTTP URI to the thumbnail image. - class Image - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A representation of a text snippet. - # @!attribute [rw] content - # @return [::String] - # Required. The content of the text snippet as a string. Up to 250000 - # characters long. - # @!attribute [rw] mime_type - # @return [::String] - # Optional. The format of {::Google::Cloud::AutoML::V1beta1::TextSnippet#content content}. Currently the only two allowed - # values are "text/html" and "text/plain". If left blank, the format is - # automatically determined from the type of the uploaded {::Google::Cloud::AutoML::V1beta1::TextSnippet#content content}. - # @!attribute [rw] content_uri - # @return [::String] - # Output only. HTTP URI where you can download the content. - class TextSnippet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message that describes dimension of a document. - # @!attribute [rw] unit - # @return [::Google::Cloud::AutoML::V1beta1::DocumentDimensions::DocumentDimensionUnit] - # Unit of the dimension. - # @!attribute [rw] width - # @return [::Float] - # Width value of the document, works together with the unit. - # @!attribute [rw] height - # @return [::Float] - # Height value of the document, works together with the unit. - class DocumentDimensions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Unit of the document dimension. - module DocumentDimensionUnit - # Should not be used. - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0 - - # Document dimension is measured in inches. - INCH = 1 - - # Document dimension is measured in centimeters. - CENTIMETER = 2 - - # Document dimension is measured in points. 72 points = 1 inch. - POINT = 3 - end - end - - # A structured text document e.g. a PDF. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::DocumentInputConfig] - # An input config specifying the content of the document. - # @!attribute [rw] document_text - # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] - # The plain text version of this document. - # @!attribute [rw] layout - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Document::Layout>] - # Describes the layout of the document. - # Sorted by [page_number][]. - # @!attribute [rw] document_dimensions - # @return [::Google::Cloud::AutoML::V1beta1::DocumentDimensions] - # The dimensions of the page in the document. - # @!attribute [rw] page_count - # @return [::Integer] - # Number of pages in the document. - class Document - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the layout information of a {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the document. - # @!attribute [rw] text_segment - # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] - # Text Segment that represents a segment in - # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. - # @!attribute [rw] page_number - # @return [::Integer] - # Page number of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the original document, starts - # from 1. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] - # The position of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the page. - # Contains exactly 4 - # - # {::Google::Cloud::AutoML::V1beta1::BoundingPoly#normalized_vertices normalized_vertices} - # and they are connected by edges in the order provided, which will - # represent a rectangle parallel to the frame. The - # {::Google::Cloud::AutoML::V1beta1::NormalizedVertex NormalizedVertex-s} are - # relative to the page. - # Coordinates are based on top-left as point (0,0). - # @!attribute [rw] text_segment_type - # @return [::Google::Cloud::AutoML::V1beta1::Document::Layout::TextSegmentType] - # The type of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in document. - class Layout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of TextSegment in the context of the original document. - module TextSegmentType - # Should not be used. - TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 - - # The text segment is a token. e.g. word. - TOKEN = 1 - - # The text segment is a paragraph. - PARAGRAPH = 2 - - # The text segment is a form field. - FORM_FIELD = 3 - - # The text segment is the name part of a form field. It will be treated - # as child of another FORM_FIELD TextSegment if its span is subspan of - # another TextSegment with type FORM_FIELD. - FORM_FIELD_NAME = 4 - - # The text segment is the text content part of a form field. It will be - # treated as child of another FORM_FIELD TextSegment if its span is - # subspan of another TextSegment with type FORM_FIELD. - FORM_FIELD_CONTENTS = 5 - - # The text segment is a whole table, including headers, and all rows. - TABLE = 6 - - # The text segment is a table's headers. It will be treated as child of - # another TABLE TextSegment if its span is subspan of another TextSegment - # with type TABLE. - TABLE_HEADER = 7 - - # The text segment is a row in table. It will be treated as child of - # another TABLE TextSegment if its span is subspan of another TextSegment - # with type TABLE. - TABLE_ROW = 8 - - # The text segment is a cell in table. It will be treated as child of - # another TABLE_ROW TextSegment if its span is subspan of another - # TextSegment with type TABLE_ROW. - TABLE_CELL = 9 - end - end - end - - # A representation of a row in a relational table. - # @!attribute [rw] column_spec_ids - # @return [::Array<::String>] - # The resource IDs of the column specs describing the columns of the row. - # If set must contain, but possibly in a different order, all input - # feature - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_spec_ids} - # of the Model this row is being passed to. - # Note: The below `values` field must match order of this field, if this - # field is set. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Required. The values of the row cells, given in the same order as the - # column_spec_ids, or, if not set, then in the same order as input - # feature - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_specs} - # of the Model this row is being passed to. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Example data used for training or prediction. - # @!attribute [rw] image - # @return [::Google::Cloud::AutoML::V1beta1::Image] - # Example image. - # - # Note: The following fields are mutually exclusive: `image`, `text_snippet`, `document`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_snippet - # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] - # Example text. - # - # Note: The following fields are mutually exclusive: `text_snippet`, `image`, `document`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] document - # @return [::Google::Cloud::AutoML::V1beta1::Document] - # Example document. - # - # Note: The following fields are mutually exclusive: `document`, `image`, `text_snippet`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] row - # @return [::Google::Cloud::AutoML::V1beta1::Row] - # Example relational table row. - # - # Note: The following fields are mutually exclusive: `row`, `image`, `text_snippet`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExamplePayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb deleted file mode 100644 index 69d1de9e2ebe..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb +++ /dev/null @@ -1,239 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # The data statistics of a series of values that share the same DataType. - # @!attribute [rw] float64_stats - # @return [::Google::Cloud::AutoML::V1beta1::Float64Stats] - # The statistics for FLOAT64 DataType. - # - # Note: The following fields are mutually exclusive: `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_stats - # @return [::Google::Cloud::AutoML::V1beta1::StringStats] - # The statistics for STRING DataType. - # - # Note: The following fields are mutually exclusive: `string_stats`, `float64_stats`, `timestamp_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] timestamp_stats - # @return [::Google::Cloud::AutoML::V1beta1::TimestampStats] - # The statistics for TIMESTAMP DataType. - # - # Note: The following fields are mutually exclusive: `timestamp_stats`, `float64_stats`, `string_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] array_stats - # @return [::Google::Cloud::AutoML::V1beta1::ArrayStats] - # The statistics for ARRAY DataType. - # - # Note: The following fields are mutually exclusive: `array_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_stats - # @return [::Google::Cloud::AutoML::V1beta1::StructStats] - # The statistics for STRUCT DataType. - # - # Note: The following fields are mutually exclusive: `struct_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] category_stats - # @return [::Google::Cloud::AutoML::V1beta1::CategoryStats] - # The statistics for CATEGORY DataType. - # - # Note: The following fields are mutually exclusive: `category_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `struct_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] distinct_value_count - # @return [::Integer] - # The number of distinct values. - # @!attribute [rw] null_value_count - # @return [::Integer] - # The number of values that are null. - # @!attribute [rw] valid_value_count - # @return [::Integer] - # The number of values that are valid. - class DataStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The data statistics of a series of FLOAT64 values. - # @!attribute [rw] mean - # @return [::Float] - # The mean of the series. - # @!attribute [rw] standard_deviation - # @return [::Float] - # The standard deviation of the series. - # @!attribute [rw] quantiles - # @return [::Array<::Float>] - # Ordered from 0 to k k-quantile values of the data series of n values. - # The value at index i is, approximately, the i*n/k-th smallest value in the - # series; for i = 0 and i = k these are, respectively, the min and max - # values. - # @!attribute [rw] histogram_buckets - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Float64Stats::HistogramBucket>] - # Histogram buckets of the data series. Sorted by the min value of the - # bucket, ascendingly, and the number of the buckets is dynamically - # generated. The buckets are non-overlapping and completely cover whole - # FLOAT64 range with min of first bucket being `"-Infinity"`, and max of - # the last one being `"Infinity"`. - class Float64Stats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A bucket of a histogram. - # @!attribute [rw] min - # @return [::Float] - # The minimum value of the bucket, inclusive. - # @!attribute [rw] max - # @return [::Float] - # The maximum value of the bucket, exclusive unless max = `"Infinity"`, in - # which case it's inclusive. - # @!attribute [rw] count - # @return [::Integer] - # The number of data values that are in the bucket, i.e. are between - # min and max values. - class HistogramBucket - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of STRING values. - # @!attribute [rw] top_unigram_stats - # @return [::Array<::Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats>] - # The statistics of the top 20 unigrams, ordered by - # {::Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats#count count}. - class StringStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The statistics of a unigram. - # @!attribute [rw] value - # @return [::String] - # The unigram. - # @!attribute [rw] count - # @return [::Integer] - # The number of occurrences of this unigram in the series. - class UnigramStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of TIMESTAMP values. - # @!attribute [rw] granular_stats - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats}] - # The string key is the pre-defined granularity. Currently supported: - # hour_of_day, day_of_week, month_of_year. - # Granularities finer that the granularity of timestamp data are not - # populated (e.g. if timestamps are at day granularity, then hour_of_day - # is not populated). - class TimestampStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Stats split by a defined in context granularity. - # @!attribute [rw] buckets - # @return [::Google::Protobuf::Map{::Integer => ::Integer}] - # A map from granularity key to example count for that key. - # E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May). - class GranularStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::Integer] - # @!attribute [rw] value - # @return [::Integer] - class BucketsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats] - class GranularStatsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of ARRAY values. - # @!attribute [rw] member_stats - # @return [::Google::Cloud::AutoML::V1beta1::DataStats] - # Stats of all the values of all arrays, as if they were a single long - # series of data. The type depends on the element type of the array. - class ArrayStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The data statistics of a series of STRUCT values. - # @!attribute [rw] field_stats - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::DataStats}] - # Map from a field name of the struct to data stats aggregated over series - # of all data in that field across all the structs. - class StructStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::DataStats] - class FieldStatsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of CATEGORY values. - # @!attribute [rw] top_category_stats - # @return [::Array<::Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats>] - # The statistics of the top 20 CATEGORY values, ordered by - # - # {::Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats#count count}. - class CategoryStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The statistics of a single CATEGORY value. - # @!attribute [rw] value - # @return [::String] - # The CATEGORY value. - # @!attribute [rw] count - # @return [::Integer] - # The number of occurrences of this value in the series. - class SingleCategoryStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A correlation statistics between two series of DataType values. The series - # may have differing DataType-s, but within a single series the DataType must - # be the same. - # @!attribute [rw] cramers_v - # @return [::Float] - # The correlation value using the Cramer's V measure. - class CorrelationStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb deleted file mode 100644 index 487ca044c5e5..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.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 AutoML - module V1beta1 - # Indicated the type of data that can be stored in a structured data entity - # (e.g. a table). - # @!attribute [rw] list_element_type - # @return [::Google::Cloud::AutoML::V1beta1::DataType] - # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::ARRAY ARRAY}, - # then `list_element_type` is the type of the elements. - # - # Note: The following fields are mutually exclusive: `list_element_type`, `struct_type`, `time_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_type - # @return [::Google::Cloud::AutoML::V1beta1::StructType] - # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT}, then `struct_type` - # provides type information for the struct's fields. - # - # Note: The following fields are mutually exclusive: `struct_type`, `list_element_type`, `time_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_format - # @return [::String] - # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::TIMESTAMP TIMESTAMP} - # then `time_format` provides the format in which that time field is - # expressed. The time_format must either be one of: - # * `UNIX_SECONDS` - # * `UNIX_MILLISECONDS` - # * `UNIX_MICROSECONDS` - # * `UNIX_NANOSECONDS` - # (for respectively number of seconds, milliseconds, microseconds and - # nanoseconds since start of the Unix epoch); - # or be written in `strftime` syntax. If time_format is not set, then the - # default format as described on the type_code is used. - # - # Note: The following fields are mutually exclusive: `time_format`, `list_element_type`, `struct_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] type_code - # @return [::Google::Cloud::AutoML::V1beta1::TypeCode] - # Required. The {::Google::Cloud::AutoML::V1beta1::TypeCode TypeCode} for this type. - # @!attribute [rw] nullable - # @return [::Boolean] - # If true, this DataType can also be `NULL`. In .CSV files `NULL` value is - # expressed as an empty string. - class DataType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StructType` defines the DataType-s of a {::Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT} type. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::DataType}] - # Unordered map of struct field names to their data types. - # Fields cannot be added or removed via Update. Their names and - # data types are still mutable. - class StructType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::DataType] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `TypeCode` is used as a part of - # {::Google::Cloud::AutoML::V1beta1::DataType DataType}. - module TypeCode - # Not specified. Should not be used. - TYPE_CODE_UNSPECIFIED = 0 - - # Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or - # `"-Infinity"`. - FLOAT64 = 3 - - # Must be between 0AD and 9999AD. Encoded as `string` according to - # {::Google::Cloud::AutoML::V1beta1::DataType#time_format time_format}, or, if - # that format is not set, then in RFC 3339 `date-time` format, where - # `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z). - TIMESTAMP = 4 - - # Encoded as `string`. - STRING = 6 - - # Encoded as `list`, where the list elements are represented according to - # - # {::Google::Cloud::AutoML::V1beta1::DataType#list_element_type list_element_type}. - ARRAY = 8 - - # Encoded as `struct`, where field values are represented according to - # {::Google::Cloud::AutoML::V1beta1::DataType#struct_type struct_type}. - STRUCT = 9 - - # Values of this type are not further understood by AutoML, - # e.g. AutoML is unable to tell the order of values (as it could with - # FLOAT64), or is unable to say if one value contains another (as it - # could with STRING). - # Encoded as `string` (bytes should be base64-encoded, as described in RFC - # 4648, section 4). - CATEGORY = 10 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb deleted file mode 100644 index 66f98e62fd51..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A workspace for solving a single, particular machine learning (ML) problem. - # A workspace contains examples that may be annotated. - # @!attribute [rw] translation_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TranslationDatasetMetadata] - # Metadata for a dataset used for translation. - # - # Note: The following fields are mutually exclusive: `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationDatasetMetadata] - # Metadata for a dataset used for image classification. - # - # Note: The following fields are mutually exclusive: `image_classification_dataset_metadata`, `translation_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextClassificationDatasetMetadata] - # Metadata for a dataset used for text classification. - # - # Note: The following fields are mutually exclusive: `text_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionDatasetMetadata] - # Metadata for a dataset used for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationDatasetMetadata] - # Metadata for a dataset used for video classification. - # - # Note: The following fields are mutually exclusive: `video_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingDatasetMetadata] - # Metadata for a dataset used for video object tracking. - # - # Note: The following fields are mutually exclusive: `video_object_tracking_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionDatasetMetadata] - # Metadata for a dataset used for text extraction. - # - # Note: The following fields are mutually exclusive: `text_extraction_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentDatasetMetadata] - # Metadata for a dataset used for text sentiment. - # - # Note: The following fields are mutually exclusive: `text_sentiment_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tables_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata] - # Metadata for a dataset used for Tables. - # - # Note: The following fields are mutually exclusive: `tables_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the dataset. - # Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the dataset to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores - # (_), and ASCII digits 0-9. - # @!attribute [rw] description - # @return [::String] - # User-provided description of the dataset. The description can be up to - # 25000 characters long. - # @!attribute [rw] example_count - # @return [::Integer] - # Output only. The number of examples in the dataset. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this dataset was created. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - class Dataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb deleted file mode 100644 index 6f569cb06b5e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Annotation details for image object detection. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] - # Output only. The rectangle representing the object location. - # @!attribute [rw] score - # @return [::Float] - # Output only. The confidence that this annotation is positive for the parent example, - # value in [0, 1], higher means higher positivity confidence. - class ImageObjectDetectionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation details for video object tracking. - # @!attribute [rw] instance_id - # @return [::String] - # Optional. The instance of the object, expressed as a positive integer. Used to tell - # apart objects of the same type (i.e. AnnotationSpec) when multiple are - # present on a single example. - # NOTE: Instance ID prediction quality is not a part of model evaluation and - # is done as best effort. Especially in cases when an entity goes - # off-screen for a longer time (minutes), when it comes back it may be given - # a new instance ID. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Required. A time (frame) of a video to which this annotation pertains. - # Represented as the duration since the video's start. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] - # Required. The rectangle representing the object location on the frame (i.e. - # at the time_offset of the video). - # @!attribute [rw] score - # @return [::Float] - # Output only. The confidence that this annotation is positive for the video at - # the time_offset, value in [0, 1], higher means higher positivity - # confidence. For annotations created by the user the score is 1. When - # user approves an annotation, the original float score is kept (and not - # changed to 1). - class VideoObjectTrackingAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Bounding box matching model metrics for a single intersection-over-union - # threshold and multiple label match confidence thresholds. - # @!attribute [rw] iou_threshold - # @return [::Float] - # Output only. The intersection-over-union threshold value used to compute - # this metrics entry. - # @!attribute [rw] mean_average_precision - # @return [::Float] - # Output only. The mean average precision, most often close to au_prc. - # @!attribute [rw] confidence_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry::ConfidenceMetricsEntry>] - # Output only. Metrics for each label-match confidence_threshold from - # 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is - # derived from them. - class BoundingBoxMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. The confidence threshold value used to compute the metrics. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall under the given confidence threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision under the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Model evaluation metrics for image object detection problems. - # Evaluates prediction quality of labeled bounding boxes. - # @!attribute [rw] evaluated_bounding_box_count - # @return [::Integer] - # Output only. The total number of bounding boxes (i.e. summed over all - # images) the ground truth used to create this evaluation had. - # @!attribute [rw] bounding_box_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry>] - # Output only. The bounding boxes match metrics for each - # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # pair. - # @!attribute [rw] bounding_box_mean_average_precision - # @return [::Float] - # Output only. The single metric for bounding boxes evaluation: - # the mean_average_precision averaged over all bounding_box_metrics_entries. - class ImageObjectDetectionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for video object tracking problems. - # Evaluates prediction quality of both labeled bounding boxes and labeled - # tracks (i.e. series of bounding boxes sharing same label and instance ID). - # @!attribute [rw] evaluated_frame_count - # @return [::Integer] - # Output only. The number of video frames used to create this evaluation. - # @!attribute [rw] evaluated_bounding_box_count - # @return [::Integer] - # Output only. The total number of bounding boxes (i.e. summed over all - # frames) the ground truth used to create this evaluation had. - # @!attribute [rw] bounding_box_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry>] - # Output only. The bounding boxes match metrics for each - # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # pair. - # @!attribute [rw] bounding_box_mean_average_precision - # @return [::Float] - # Output only. The single metric for bounding boxes evaluation: - # the mean_average_precision averaged over all bounding_box_metrics_entries. - class VideoObjectTrackingEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb deleted file mode 100644 index 64cc3c7ae1f9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.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 AutoML - module V1beta1 - # A vertex represents a 2D point in the image. - # The normalized vertex coordinates are between 0 to 1 fractions relative to - # the original plane (image, video). E.g. if the plane (e.g. whole image) would - # have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would - # be at the position (1, 6) on that plane. - # @!attribute [rw] x - # @return [::Float] - # Required. Horizontal coordinate. - # @!attribute [rw] y - # @return [::Float] - # Required. Vertical coordinate. - class NormalizedVertex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A bounding polygon of a detected object on a plane. - # On output both vertices and normalized_vertices are provided. - # The polygon is formed by connecting vertices in the order they are listed. - # @!attribute [rw] normalized_vertices - # @return [::Array<::Google::Cloud::AutoML::V1beta1::NormalizedVertex>] - # Output only . The bounding polygon normalized vertices. - class BoundingPoly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb deleted file mode 100644 index e75d8c471c72..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.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! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Dataset metadata that is specific to image classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] - # Required. Type of the classification problem. - class ImageClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata specific to image object detection. - class ImageObjectDetectionDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata for image classification. - # @!attribute [rw] base_model_id - # @return [::String] - # Optional. The ID of the `base` model. If it is specified, the new model - # will be created based on the `base` model. Otherwise, the new model will be - # created from scratch. The `base` model must be in the same - # `project` and `location` as the new model to create, and have the same - # `model_type`. - # @!attribute [rw] train_budget - # @return [::Integer] - # Required. The train budget of creating this model, expressed in hours. The - # actual `train_cost` will be equal or less than this value. - # @!attribute [rw] train_cost - # @return [::Integer] - # Output only. The actual train cost of creating this model, expressed in - # hours. If this model is created from a `base` model, the train cost used - # to create the `base` model are not included. - # @!attribute [rw] stop_reason - # @return [::String] - # Output only. The reason that this create model operation stopped, - # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - # @!attribute [rw] model_type - # @return [::String] - # Optional. Type of the model. The available values are: - # * `cloud` - Model to be used via prediction calls to AutoML API. - # This is the default value. - # * `mobile-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have low latency, but - # may have lower prediction quality than other models. - # * `mobile-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. - # * `mobile-high-accuracy-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have a higher - # latency, but should also have a higher prediction quality - # than other models. - # * `mobile-core-ml-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core - # ML afterwards. Expected to have low latency, but may have - # lower prediction quality than other models. - # * `mobile-core-ml-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core - # ML afterwards. - # * `mobile-core-ml-high-accuracy-1` - A model that, in addition to - # providing prediction via AutoML API, can also be exported - # (see {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with - # Core ML afterwards. Expected to have a higher latency, but - # should also have a higher prediction quality than other - # models. - # @!attribute [rw] node_qps - # @return [::Float] - # Output only. An approximate number of online prediction QPS that can - # be supported by this model per each node on which it is deployed. - # @!attribute [rw] node_count - # @return [::Integer] - # Output only. The number of nodes this model is deployed on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the node_qps field. - class ImageClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to image object detection. - # @!attribute [rw] model_type - # @return [::String] - # Optional. Type of the model. The available values are: - # * `cloud-high-accuracy-1` - (default) A model to be used via prediction - # calls to AutoML API. Expected to have a higher latency, but - # should also have a higher prediction quality than other - # models. - # * `cloud-low-latency-1` - A model to be used via prediction - # calls to AutoML API. Expected to have low latency, but may - # have lower prediction quality than other models. - # * `mobile-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have low latency, but - # may have lower prediction quality than other models. - # * `mobile-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. - # * `mobile-high-accuracy-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have a higher - # latency, but should also have a higher prediction quality - # than other models. - # @!attribute [rw] node_count - # @return [::Integer] - # Output only. The number of nodes this model is deployed on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the qps_per_node field. - # @!attribute [rw] node_qps - # @return [::Float] - # Output only. An approximate number of online prediction QPS that can - # be supported by this model per each node on which it is deployed. - # @!attribute [rw] stop_reason - # @return [::String] - # Output only. The reason that this create model operation stopped, - # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - # @!attribute [rw] train_budget_milli_node_hours - # @return [::Integer] - # The train budget of creating this model, expressed in milli node - # hours i.e. 1,000 value in this field means 1 node hour. The actual - # `train_cost` will be equal or less than this value. If further model - # training ceases to provide any improvements, it will stop without using - # full budget and the stop_reason will be `MODEL_CONVERGED`. - # Note, node_hour = actual_hour * number_of_nodes_invovled. - # For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, - # the train budget must be between 20,000 and 900,000 milli node hours, - # inclusive. The default value is 216, 000 which represents one day in - # wall time. - # For model type `mobile-low-latency-1`, `mobile-versatile-1`, - # `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, - # `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train - # budget must be between 1,000 and 100,000 milli node hours, inclusive. - # The default value is 24, 000 which represents one day in wall time. - # @!attribute [rw] train_cost_milli_node_hours - # @return [::Integer] - # Output only. The actual train cost of creating this model, expressed in - # milli node hours, i.e. 1,000 value in this field means 1 node hour. - # Guaranteed to not exceed the train budget. - class ImageObjectDetectionModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model deployment metadata specific to Image Classification. - # @!attribute [rw] node_count - # @return [::Integer] - # Input only. The number of nodes to deploy the model on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the model's - # - # {::Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata#node_qps node_qps}. - # Must be between 1 and 100, inclusive on both ends. - class ImageClassificationModelDeploymentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model deployment metadata specific to Image Object Detection. - # @!attribute [rw] node_count - # @return [::Integer] - # Input only. The number of nodes to deploy the model on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the model's - # - # [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node]. - # Must be between 1 and 100, inclusive on both ends. - class ImageObjectDetectionModelDeploymentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb deleted file mode 100644 index bb6c621d86fc..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb +++ /dev/null @@ -1,1214 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Input configuration for ImportData Action. - # - # The format of input depends on dataset_metadata the Dataset into which - # the import is happening has. As input source the - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} - # is expected, unless specified otherwise. Additionally any input .CSV file - # by itself must be 100MB or smaller, unless specified otherwise. - # If an "example" file (that is, image, video etc.) with identical content - # (even if it had different GCS_FILE_PATH) is mentioned multiple times, then - # its label, bounding boxes etc. are appended. The same file should be always - # provided with the same ML_USE and GCS_FILE_PATH, if it is not, then - # these values are nondeterministically selected from the given ones. - # - # The formats are represented in EBNF with commas being literal and with - # non-terminal symbols defined near the end of this comment. The formats are: - # - # * For Image Classification: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH,LABEL,LABEL,... - # GCS_FILE_PATH leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO - # For MULTICLASS classification type, at most one LABEL is allowed - # per image. If an image has not yet been labeled, then it should be - # mentioned just once with no LABEL. - # Some sample rows: - # TRAIN,gs://folder/image1.jpg,daisy - # TEST,gs://folder/image2.jpg,dandelion,tulip,rose - # UNASSIGNED,gs://folder/image3.jpg,daisy - # UNASSIGNED,gs://folder/image4.jpg - # - # * For Image Object Detection: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,) - # GCS_FILE_PATH leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG. - # Each image is assumed to be exhaustively labeled. The minimum - # allowed BOUNDING_BOX edge length is 0.01, and no more than 500 - # BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined - # per line). If an image has not yet been labeled, then it should be - # mentioned just once with no LABEL and the ",,,,,,," in place of the - # BOUNDING_BOX. For images which are known to not contain any - # bounding boxes, they should be labelled explictly as - # "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the - # BOUNDING_BOX. - # Sample rows: - # TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, - # TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, - # UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 - # TEST,gs://folder/im3.png,,,,,,,,, - # TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,, - # - # * For Video Classification: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH - # where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH - # should lead to another .csv file which describes examples that have - # given ML_USE, using the following row format: - # GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) - # Here GCS_FILE_PATH leads to a video of up to 50GB in size and up - # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - # length of the video, and end has to be after the start. Any segment - # of a video which has one or more labels on it, is considered a - # hard negative for all other labels. Any segment with no labels on - # it is considered to be unknown. If a whole video is unknown, then - # it shuold be mentioned just once with ",," in place of LABEL, - # TIME_SEGMENT_START,TIME_SEGMENT_END. - # Sample top level CSV file: - # TRAIN,gs://folder/train_videos.csv - # TEST,gs://folder/test_videos.csv - # UNASSIGNED,gs://folder/other_videos.csv - # Sample rows of a CSV file for a particular ML_USE: - # gs://folder/video1.avi,car,120,180.000021 - # gs://folder/video1.avi,bike,150,180.000021 - # gs://folder/vid2.avi,car,0,60.5 - # gs://folder/vid3.avi,,, - # - # * For Video Object Tracking: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH - # where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH - # should lead to another .csv file which describes examples that have - # given ML_USE, using one of the following row format: - # GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX - # or - # GCS_FILE_PATH,,,,,,,,,, - # Here GCS_FILE_PATH leads to a video of up to 50GB in size and up - # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # Providing INSTANCE_IDs can help to obtain a better model. When - # a specific labeled entity leaves the video frame, and shows up - # afterwards it is not required, albeit preferable, that the same - # INSTANCE_ID is given to it. - # TIMESTAMP must be within the length of the video, the - # BOUNDING_BOX is assumed to be drawn on the closest video's frame - # to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected - # to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per - # frame are allowed. If a whole video is unknown, then it should be - # mentioned just once with ",,,,,,,,,," in place of LABEL, - # [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX. - # Sample top level CSV file: - # TRAIN,gs://folder/train_videos.csv - # TEST,gs://folder/test_videos.csv - # UNASSIGNED,gs://folder/other_videos.csv - # Seven sample rows of a CSV file for a particular ML_USE: - # gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 - # gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 - # gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 - # gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, - # gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, - # gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, - # gs://folder/video2.avi,,,,,,,,,,, - # * For Text Extraction: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH - # GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which - # either imports text in-line or as documents. Any given - # .JSONL file must be 100MB or smaller. - # The in-line .JSONL file contains, per line, a proto that wraps a - # TextSnippet proto (in json representation) followed by one or more - # AnnotationPayload protos (called annotations), which have - # display_name and text_extraction detail populated. The given text - # is expected to be annotated exhaustively, for example, if you look - # for animals and text contains "dolphin" that is not labeled, then - # "dolphin" is assumed to not be an animal. Any given text snippet - # content must be 10KB or smaller, and also be UTF-8 NFC encoded - # (ASCII already is). - # The document .JSONL file contains, per line, a proto that wraps a - # Document proto. The Document proto must have either document_text - # or input_config set. In document_text case, the Document proto may - # also contain the spatial information of the document, including - # layout, document dimension and page number. In input_config case, - # only PDF documents are supported now, and each document may be up - # to 2MB large. Currently, annotations on documents cannot be - # specified at import. - # Three sample CSV rows: - # TRAIN,gs://folder/file1.jsonl - # VALIDATE,gs://folder/file2.jsonl - # TEST,gs://folder/file3.jsonl - # Sample in-line JSON Lines file for entity extraction (presented here - # with artificial line breaks, but the only actual line break is - # denoted by \n).: - # { - # "document": { - # "document_text": \\{"content": "dog cat"} - # "layout": [ - # { - # "text_segment": { - # "start_offset": 0, - # "end_offset": 3, - # }, - # "page_number": 1, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.1, "y": 0.1}, - # \\{"x": 0.1, "y": 0.3}, - # \\{"x": 0.3, "y": 0.3}, - # \\{"x": 0.3, "y": 0.1}, - # ], - # }, - # "text_segment_type": TOKEN, - # }, - # { - # "text_segment": { - # "start_offset": 4, - # "end_offset": 7, - # }, - # "page_number": 1, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.4, "y": 0.1}, - # \\{"x": 0.4, "y": 0.3}, - # \\{"x": 0.8, "y": 0.3}, - # \\{"x": 0.8, "y": 0.1}, - # ], - # }, - # "text_segment_type": TOKEN, - # } - # - # ], - # "document_dimensions": { - # "width": 8.27, - # "height": 11.69, - # "unit": INCH, - # } - # "page_count": 1, - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": {"text_segment": {"start_offset": 0, - # "end_offset": 3}} - # }, - # { - # "display_name": "animal", - # "text_extraction": {"text_segment": {"start_offset": 4, - # "end_offset": 7}} - # } - # ], - # }\n - # { - # "text_snippet": { - # "content": "This dog is good." - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": \\{"start_offset": 5, "end_offset": 8} - # } - # } - # ] - # } - # Sample document JSON Lines file (presented here with artificial line - # breaks, but the only actual line break is denoted by \n).: - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - # } - # } - # } - # }\n - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] - # } - # } - # } - # } - # - # * For Text Classification: - # CSV file(s) with each line in format: - # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... - # TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If - # the column content is a valid gcs file path, i.e. prefixed by - # "gs://", it will be treated as a GCS_FILE_PATH, else if the content - # is enclosed within double quotes (""), it is - # treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path - # must lead to a .txt file with UTF-8 encoding, for example, - # "gs://folder/content.txt", and the content in it is extracted - # as a text snippet. In TEXT_SNIPPET case, the column content - # excluding quotes is treated as to be imported text snippet. In - # both cases, the text snippet/file size must be within 128kB. - # Maximum 100 unique labels are allowed per CSV row. - # Sample rows: - # TRAIN,"They have bad food and very rude",RudeService,BadFood - # TRAIN,gs://folder/content.txt,SlowService - # TEST,"Typically always bad service there.",RudeService - # VALIDATE,"Stomach ache to go.",BadFood - # - # * For Text Sentiment: - # CSV file(s) with each line in format: - # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT - # TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If - # the column content is a valid gcs file path, that is, prefixed by - # "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated - # as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path - # must lead to a .txt file with UTF-8 encoding, for example, - # "gs://folder/content.txt", and the content in it is extracted - # as a text snippet. In TEXT_SNIPPET case, the column content itself - # is treated as to be imported text snippet. In both cases, the - # text snippet must be up to 500 characters long. - # Sample rows: - # TRAIN,"@freewrytin this is way too good for your product",2 - # TRAIN,"I need this product so bad",3 - # TEST,"Thank you for this product.",4 - # VALIDATE,gs://folder/content.txt,2 - # - # * For Tables: - # Either - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} or - # - # {::Google::Cloud::AutoML::V1beta1::InputConfig#bigquery_source bigquery_source} - # can be used. All inputs is concatenated into a single - # - # [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name] - # For gcs_source: - # CSV file(s), where the first row of the first file is the header, - # containing unique column names. If the first row of a subsequent - # file is the same as the header, then it is also treated as a - # header. All other rows contain values for the corresponding - # columns. - # Each .CSV file by itself must be 10GB or smaller, and their total - # size must be 100GB or smaller. - # First three sample rows of a CSV file: - # "Id","First Name","Last Name","Dob","Addresses" - # - # "1","John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" - # - # "2","Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} - # For bigquery_source: - # An URI of a BigQuery table. The user data size of the BigQuery - # table must be 100GB or smaller. - # An imported table must have between 2 and 1,000 columns, inclusive, - # and between 1000 and 100,000,000 rows, inclusive. There are at most 5 - # import data running in parallel. - # Definitions: - # ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED" - # Describes how the given example (file) should be used for model - # training. "UNASSIGNED" can be used when user has no preference. - # GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png". - # LABEL = A display name of an object on an image, video etc., e.g. "dog". - # Must be up to 32 characters long and can consist only of ASCII - # Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. - # For each label an AnnotationSpec is created which display_name - # becomes the label; AnnotationSpecs are given back in predictions. - # INSTANCE_ID = A positive integer that identifies a specific instance of a - # labeled entity on an example. Used e.g. to track two cars on - # a video while being able to tell apart which one is which. - # BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,, - # A rectangle parallel to the frame of the example (image, - # video). If 4 vertices are given they are connected by edges - # in the order provided, if 2 are given they are recognized - # as diagonally opposite vertices of the rectangle. - # VERTEX = COORDINATE,COORDINATE - # First coordinate is horizontal (x), the second is vertical (y). - # COORDINATE = A float in 0 to 1 range, relative to total length of - # image or video in given dimension. For fractions the - # leading non-decimal 0 can be omitted (i.e. 0.3 = .3). - # Point 0,0 is in top left. - # TIME_SEGMENT_START = TIME_OFFSET - # Expresses a beginning, inclusive, of a time segment - # within an example that has a time dimension - # (e.g. video). - # TIME_SEGMENT_END = TIME_OFFSET - # Expresses an end, exclusive, of a time segment within - # an example that has a time dimension (e.g. video). - # TIME_OFFSET = A number of seconds as measured from the start of an - # example (e.g. video). Fractions are allowed, up to a - # microsecond precision. "inf" is allowed, and it means the end - # of the example. - # TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within - # double quotes (""). - # SENTIMENT = An integer between 0 and - # Dataset.text_sentiment_dataset_metadata.sentiment_max - # (inclusive). Describes the ordinal of the sentiment - higher - # value means a more positive sentiment. All the values are - # completely relative, i.e. neither 0 needs to mean a negative or - # neutral sentiment nor sentiment_max needs to mean a positive one - # - it is just required that 0 is the least positive sentiment - # in the data, and sentiment_max is the most positive one. - # The SENTIMENT shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - # All SENTIMENT values between 0 and sentiment_max must be - # represented in the imported data. On prediction the same 0 to - # sentiment_max range will be used. The difference between - # neighboring sentiment values needs not to be uniform, e.g. 1 and - # 2 may be similar whereas the difference between 2 and 3 may be - # huge. - # - # Errors: - # If any of the provided CSV files can't be parsed or if more than certain - # percent of CSV rows cannot be processed then the operation fails and - # nothing is imported. Regardless of overall success or failure the per-row - # failures, up to a certain count cap, is listed in - # Operation.metadata.partial_failures. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] - # The Google Cloud Storage location for the input content. - # In ImportData, the gcs_source points to a csv with structure described in - # the comment. - # - # Note: The following fields are mutually exclusive: `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_source - # @return [::Google::Cloud::AutoML::V1beta1::BigQuerySource] - # The BigQuery location for the input content. - # - # Note: The following fields are mutually exclusive: `bigquery_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters describing the semantic of the - # imported data, any string must be up to 25000 - # characters long. - # - # * For Tables: - # `schema_inference_version` - (integer) Required. The version of the - # algorithm that should be used for the initial inference of the - # schema (columns' DataTypes) of the table the data is being imported - # into. Allowed values: "1". - class InputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Input configuration for BatchPredict Action. - # - # The format of input depends on the ML problem of the model used for - # prediction. As input source the - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} - # is expected, unless specified otherwise. - # - # The formats are represented in EBNF with commas being literal and with - # non-terminal symbols defined near the end of this comment. The formats - # are: - # - # * For Image Classification: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH - # which leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in - # the Batch predict output. - # Three sample rows: - # gs://folder/image1.jpeg - # gs://folder/image2.gif - # gs://folder/image3.png - # - # * For Image Object Detection: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH - # which leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in - # the Batch predict output. - # Three sample rows: - # gs://folder/image1.jpeg - # gs://folder/image2.gif - # gs://folder/image3.png - # * For Video Classification: - # CSV file(s) with each line in format: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - # GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h - # duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - # length of the video, and end has to be after the start. - # Three sample rows: - # gs://folder/video1.mp4,10,40 - # gs://folder/video1.mp4,20,60 - # gs://folder/vid2.mov,0,inf - # - # * For Video Object Tracking: - # CSV file(s) with each line in format: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - # GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h - # duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - # length of the video, and end has to be after the start. - # Three sample rows: - # gs://folder/video1.mp4,10,240 - # gs://folder/video1.mp4,300,360 - # gs://folder/vid2.mov,0,inf - # * For Text Classification: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH | TEXT_SNIPPET - # Any given text file can have size upto 128kB. - # Any given text snippet content must have 60,000 characters or less. - # Three sample rows: - # gs://folder/text1.txt - # "Some text content to predict" - # gs://folder/text3.pdf - # Supported file extensions: .txt, .pdf - # - # * For Text Sentiment: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH | TEXT_SNIPPET - # Any given text file can have size upto 128kB. - # Any given text snippet content must have 500 characters or less. - # Three sample rows: - # gs://folder/text1.txt - # "Some text content to predict" - # gs://folder/text3.pdf - # Supported file extensions: .txt, .pdf - # - # * For Text Extraction - # .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or - # as documents (for a single BatchPredict call only one of the these - # formats may be used). - # The in-line .JSONL file(s) contain per line a proto that - # wraps a temporary user-assigned TextSnippet ID (string up to 2000 - # characters long) called "id", a TextSnippet proto (in - # json representation) and zero or more TextFeature protos. Any given - # text snippet content must have 30,000 characters or less, and also - # be UTF-8 NFC encoded (ASCII already is). The IDs provided should be - # unique. - # The document .JSONL file(s) contain, per line, a proto that wraps a - # Document proto with input_config set. Only PDF documents are - # supported now, and each document must be up to 2MB large. - # Any given .JSONL file must be 100MB or smaller, and no more than 20 - # files may be given. - # Sample in-line JSON Lines file (presented here with artificial line - # breaks, but the only actual line break is denoted by \n): - # { - # "id": "my_first_id", - # "text_snippet": { "content": "dog car cat"}, - # "text_features": [ - # { - # "text_segment": \\{"start_offset": 4, "end_offset": 6}, - # "structural_type": PARAGRAPH, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.1, "y": 0.1}, - # \\{"x": 0.1, "y": 0.3}, - # \\{"x": 0.3, "y": 0.3}, - # \\{"x": 0.3, "y": 0.1}, - # ] - # }, - # } - # ], - # }\n - # { - # "id": "2", - # "text_snippet": { - # "content": "An elaborate content", - # "mime_type": "text/plain" - # } - # } - # Sample document JSON Lines file (presented here with artificial line - # breaks, but the only actual line break is denoted by \n).: - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - # } - # } - # } - # }\n - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] - # } - # } - # } - # } - # - # * For Tables: - # Either - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} or - # - # {::Google::Cloud::AutoML::V1beta1::InputConfig#bigquery_source bigquery_source}. - # GCS case: - # CSV file(s), each by itself 10GB or smaller and total size must be - # 100GB or smaller, where first file must have a header containing - # column names. If the first row of a subsequent file is the same as - # the header, then it is also treated as a header. All other rows - # contain values for the corresponding columns. - # The column names must contain the model's - # - # [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # (order doesn't matter). The columns corresponding to the model's - # input feature column specs must contain values compatible with the - # column spec's data types. Prediction on all the rows, i.e. the CSV - # lines, will be attempted. For FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # all columns having - # - # [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] - # type will be ignored. - # First three sample rows of a CSV file: - # "First Name","Last Name","Dob","Addresses" - # - # "John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" - # - # "Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} - # BigQuery case: - # An URI of a BigQuery table. The user data size of the BigQuery - # table must be 100GB or smaller. - # The column names must contain the model's - # - # [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # (order doesn't matter). The columns corresponding to the model's - # input feature column specs must contain values compatible with the - # column spec's data types. Prediction on all the rows of the table - # will be attempted. For FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # all columns having - # - # [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] - # type will be ignored. - # - # Definitions: - # GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi". - # TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within - # double quotes ("") - # TIME_SEGMENT_START = TIME_OFFSET - # Expresses a beginning, inclusive, of a time segment - # within an - # example that has a time dimension (e.g. video). - # TIME_SEGMENT_END = TIME_OFFSET - # Expresses an end, exclusive, of a time segment within - # an example that has a time dimension (e.g. video). - # TIME_OFFSET = A number of seconds as measured from the start of an - # example (e.g. video). Fractions are allowed, up to a - # microsecond precision. "inf" is allowed and it means the end - # of the example. - # - # Errors: - # If any of the provided CSV files can't be parsed or if more than certain - # percent of CSV rows cannot be processed then the operation fails and - # prediction does not happen. Regardless of overall success or failure the - # per-row failures, up to a certain count cap, will be listed in - # Operation.metadata.partial_failures. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] - # The Google Cloud Storage location for the input content. - # - # Note: The following fields are mutually exclusive: `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_source - # @return [::Google::Cloud::AutoML::V1beta1::BigQuerySource] - # The BigQuery location for the input content. - # - # Note: The following fields are mutually exclusive: `bigquery_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BatchPredictInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input configuration of a {::Google::Cloud::AutoML::V1beta1::Document Document}. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] - # The Google Cloud Storage location of the document file. Only a single path - # should be given. - # Max supported size: 512MB. - # Supported extensions: .PDF. - class DocumentInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # * For Translation: - # CSV file `translation.csv`, with each line in format: - # ML_USE,GCS_FILE_PATH - # GCS_FILE_PATH leads to a .TSV file which describes examples that have - # given ML_USE, using the following row format per line: - # TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target - # language) - # - # * For Tables: - # Output depends on whether the dataset was imported from GCS or - # BigQuery. - # GCS case: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#gcs_destination gcs_destination} - # must be set. Exported are CSV file(s) `tables_1.csv`, - # `tables_2.csv`,...,`tables_N.csv` with each having as header line - # the table's column names, and all other lines contain values for - # the header columns. - # BigQuery case: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # - # `export_data__` - # where will be made - # BigQuery-dataset-name compatible (e.g. most special characters will - # become underscores), and timestamp will be in - # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that - # dataset a new table called `primary_table` will be created, and - # filled with precisely the same data as this obtained on import. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] - # The Google Cloud Storage location where the output is to be written to. - # For Image Object Detection, Text Extraction, Video Classification and - # Tables, in the given directory a new directory will be created with name: - # export_data-- where - # timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export - # output will be written into that directory. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] - # The BigQuery location where the output is to be written to. - # - # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class OutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for BatchPredict Action. - # - # As destination the - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#gcs_destination gcs_destination} - # must be set unless specified otherwise for a domain. If gcs_destination is - # set then in the given directory a new directory is created. Its name - # will be - # "prediction--", - # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents - # of it depends on the ML problem the predictions are made for. - # - # * For Image Classification: - # In the created directory files `image_classification_1.jsonl`, - # `image_classification_2.jsonl`,...,`image_classification_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of the successfully predicted images and annotations. - # A single image will be listed only once with all its annotations, - # and its annotations will never be split across files. - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps image's "ID" : "" followed by a list of - # zero or more AnnotationPayload protos (called annotations), which - # have classification detail populated. - # If prediction for any image failed (partially or completely), then an - # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - # files will be created (N depends on total number of failed - # predictions). These files will have a JSON representation of a proto - # that wraps the same "ID" : "" but here followed by - # exactly one - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`fields. - # - # * For Image Object Detection: - # In the created directory files `image_object_detection_1.jsonl`, - # `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of the successfully predicted images and annotations. - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps image's "ID" : "" followed by a list of - # zero or more AnnotationPayload protos (called annotations), which - # have image_object_detection detail populated. A single image will - # be listed only once with all its annotations, and its annotations - # will never be split across files. - # If prediction for any image failed (partially or completely), then - # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - # files will be created (N depends on total number of failed - # predictions). These files will have a JSON representation of a proto - # that wraps the same "ID" : "" but here followed by - # exactly one - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`fields. - # * For Video Classification: - # In the created directory a video_classification.csv file, and a .JSON - # file per each video classification requested in the input (i.e. each - # line in given CSV(s)), will be created. - # - # The format of video_classification.csv is: - # - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - # where: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - # the prediction input lines (i.e. video_classification.csv has - # precisely the same number of lines as the prediction input had.) - # JSON_FILE_NAME = Name of .JSON file in the output directory, which - # contains prediction responses for the video time segment. - # STATUS = "OK" if prediction completed successfully, or an error code - # with message otherwise. If STATUS is not "OK" then the .JSON file - # for that line may not exist or be empty. - # - # Each .JSON file, assuming STATUS is "OK", will contain a list of - # AnnotationPayload protos in JSON format, which are the predictions - # for the video time segment the file is assigned to in the - # video_classification.csv. All AnnotationPayload protos will have - # video_classification field set, and will be sorted by - # video_classification.type field (note that the returned types are - # governed by `classifaction_types` parameter in - # [PredictService.BatchPredictRequest.params][]). - # - # * For Video Object Tracking: - # In the created directory a video_object_tracking.csv file will be - # created, and multiple files video_object_trackinng_1.json, - # video_object_trackinng_2.json,..., video_object_trackinng_N.json, - # where N is the number of requests in the input (i.e. the number of - # lines in given CSV(s)). - # - # The format of video_object_tracking.csv is: - # - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - # where: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - # the prediction input lines (i.e. video_object_tracking.csv has - # precisely the same number of lines as the prediction input had.) - # JSON_FILE_NAME = Name of .JSON file in the output directory, which - # contains prediction responses for the video time segment. - # STATUS = "OK" if prediction completed successfully, or an error - # code with message otherwise. If STATUS is not "OK" then the .JSON - # file for that line may not exist or be empty. - # - # Each .JSON file, assuming STATUS is "OK", will contain a list of - # AnnotationPayload protos in JSON format, which are the predictions - # for each frame of the video time segment the file is assigned to in - # video_object_tracking.csv. All AnnotationPayload protos will have - # video_object_tracking field set. - # * For Text Classification: - # In the created directory files `text_classification_1.jsonl`, - # `text_classification_2.jsonl`,...,`text_classification_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps input text snippet or input text file and a list of - # zero or more AnnotationPayload protos (called annotations), which - # have classification detail populated. A single text snippet or file - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # - # If prediction for any text snippet or file failed (partially or - # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps input text snippet or input text file followed by - # exactly one - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Text Sentiment: - # In the created directory files `text_sentiment_1.jsonl`, - # `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps input text snippet or input text file and a list of - # zero or more AnnotationPayload protos (called annotations), which - # have text_sentiment detail populated. A single text snippet or file - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # - # If prediction for any text snippet or file failed (partially or - # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps input text snippet or input text file followed by - # exactly one - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Text Extraction: - # In the created directory files `text_extraction_1.jsonl`, - # `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # The contents of these .JSONL file(s) depend on whether the input - # used inline text, or documents. - # If input was inline, then each .JSONL file will contain, per line, - # a JSON representation of a proto that wraps given in request text - # snippet's "id" (if specified), followed by input text snippet, - # and a list of zero or more - # AnnotationPayload protos (called annotations), which have - # text_extraction detail populated. A single text snippet will be - # listed only once with all its annotations, and its annotations will - # never be split across files. - # If input used documents, then each .JSONL file will contain, per - # line, a JSON representation of a proto that wraps given in request - # document proto, followed by its OCR-ed representation in the form - # of a text snippet, finally followed by a list of zero or more - # AnnotationPayload protos (called annotations), which have - # text_extraction detail populated and refer, via their indices, to - # the OCR-ed text snippet. A single document (and its text snippet) - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # If prediction for any text snippet failed (partially or completely), - # then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps either the "id" : "" (in case of inline) - # or the document proto (in case of document) but here followed by - # exactly one - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Tables: - # Output depends on whether - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#gcs_destination gcs_destination} - # or - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#bigquery_destination bigquery_destination} - # is set (either is allowed). - # GCS case: - # In the created directory files `tables_1.csv`, `tables_2.csv`,..., - # `tables_N.csv` will be created, where N may be 1, and depends on - # the total number of the successfully predicted rows. - # For all CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # Each .csv file will contain a header, listing all columns' - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # given on input followed by M target column names in the format of - # - # "<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>__score" where M is the number of distinct target values, - # i.e. number of distinct values in the target column of the table - # used to train the model. Subsequent lines will contain the - # respective values of successfully predicted rows, with the last, - # i.e. the target, columns having the corresponding prediction - # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation#score scores}. - # For REGRESSION and FORECASTING - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # Each .csv file will contain a header, listing all columns' - # [display_name-s][google.cloud.automl.v1beta1.display_name] given - # on input followed by the predicted target column with name in the - # format of - # - # "predicted_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>" - # Subsequent lines will contain the respective values of - # successfully predicted rows, with the last, i.e. the target, - # column having the predicted target value. - # If prediction for any rows failed, then an additional - # `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be - # created (N depends on total number of failed rows). These files - # will have analogous format as `tables_*.csv`, but always with a - # single target column having - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # represented as a JSON string, and containing only `code` and - # `message`. - # BigQuery case: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # `prediction__` - # where will be made - # BigQuery-dataset-name compatible (e.g. most special characters will - # become underscores), and timestamp will be in - # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset - # two tables will be created, `predictions`, and `errors`. - # The `predictions` table's column names will be the input columns' - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # followed by the target column with name in the format of - # - # "predicted_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>" - # The input feature columns will contain the respective values of - # successfully predicted rows, with the target column having an - # ARRAY of - # - # {::Google::Cloud::AutoML::V1beta1::AnnotationPayload AnnotationPayloads}, - # represented as STRUCT-s, containing - # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation TablesAnnotation}. - # The `errors` table contains rows for which the prediction has - # failed, it has analogous input columns while the target column name - # is in the format of - # - # "errors_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>", - # and as a value has - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # represented as a STRUCT, and containing only `code` and `message`. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] - # The Google Cloud Storage location of the directory where the output is to - # be written to. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] - # The BigQuery location where the output is to be written to. - # - # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BatchPredictOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for ModelExport Action. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] - # The Google Cloud Storage location where the model is to be written to. - # This location may only be set for the following model formats: - # "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". - # - # Under the directory given as the destination a new one with name - # "model-export--", - # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, - # will be created. Inside the model and any of its supporting files - # will be written. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `gcr_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcr_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcrDestination] - # The GCR location where model image is to be pushed to. This location - # may only be set for the following model formats: - # "docker". - # - # The model image will be created under the given URI. - # - # Note: The following fields are mutually exclusive: `gcr_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] model_format - # @return [::String] - # The format in which the model must be exported. The available, and default, - # formats depend on the problem and model type (if given problem and type - # combination doesn't have a format listed, it means its models are not - # exportable): - # - # * For Image Classification mobile-low-latency-1, mobile-versatile-1, - # mobile-high-accuracy-1: - # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", - # "docker". - # - # * For Image Classification mobile-core-ml-low-latency-1, - # mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: - # "core_ml" (default). - # - # * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, - # mobile-high-accuracy-1: - # "tflite", "tf_saved_model", "tf_js". - # - # * For Video Classification cloud, - # "tf_saved_model". - # - # * For Video Object Tracking cloud, - # "tf_saved_model". - # - # * For Video Object Tracking mobile-versatile-1: - # "tflite", "edgetpu_tflite", "tf_saved_model", "docker". - # - # * For Video Object Tracking mobile-coral-versatile-1: - # "tflite", "edgetpu_tflite", "docker". - # - # * For Video Object Tracking mobile-coral-low-latency-1: - # "tflite", "edgetpu_tflite", "docker". - # - # * For Video Object Tracking mobile-jetson-versatile-1: - # "tf_saved_model", "docker". - # - # * For Tables: - # "docker". - # - # Formats description: - # - # * tflite - Used for Android mobile devices. - # * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) - # devices. - # * tf_saved_model - A tensorflow model in SavedModel format. - # * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can - # be used in the browser and in Node.js using JavaScript. - # * docker - Used for Docker containers. Use the params field to customize - # the container. The container is verified to work correctly on - # ubuntu 16.04 operating system. See more at - # [containers - # - # quickstart](https: - # //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) - # * core_ml - Used for iOS mobile devices. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional model-type and format specific parameters describing the - # requirements for the to be exported model files, any string must be up to - # 25000 characters long. - # - # * For `docker` format: - # `cpu_architecture` - (string) "x86_64" (default). - # `gpu_architecture` - (string) "none" (default), "nvidia". - class ModelExportOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Output configuration for ExportEvaluatedExamples Action. Note that this call - # is available only for 30 days since the moment the model was evaluated. - # The output depends on the domain, as follows (note that only examples from - # the TEST set are exported): - # - # * For Tables: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # - # `export_evaluated_examples__` - # where will be made BigQuery-dataset-name - # compatible (e.g. most special characters will become underscores), - # and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" - # format. In the dataset an `evaluated_examples` table will be - # created. It will have all the same columns as the - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id primary_table} - # of the - # {::Google::Cloud::AutoML::V1beta1::Model#dataset_id dataset} from which - # the model was created, as they were at the moment of model's - # evaluation (this includes the target column with its ground - # truth), followed by a column called "predicted_". That - # last column will contain the model's prediction result for each - # respective row, given as ARRAY of - # {::Google::Cloud::AutoML::V1beta1::AnnotationPayload AnnotationPayloads}, - # represented as STRUCT-s, containing - # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation TablesAnnotation}. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] - # The BigQuery location where the output is to be written to. - class ExportEvaluatedExamplesOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location for the input content. - # @!attribute [rw] input_uris - # @return [::Array<::String>] - # Required. Google Cloud Storage URIs to input files, up to 2000 characters - # long. Accepted forms: - # * Full object path, e.g. gs://bucket/directory/object.csv - class GcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The BigQuery location for the input content. - # @!attribute [rw] input_uri - # @return [::String] - # Required. BigQuery URI to a table, up to 2000 characters long. - # Accepted forms: - # * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId - class BigQuerySource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location where the output is to be written to. - # @!attribute [rw] output_uri_prefix - # @return [::String] - # Required. Google Cloud Storage URI to output directory, up to 2000 - # characters long. - # Accepted forms: - # * Prefix path: gs://bucket/directory - # The requesting user must have write permission to the bucket. - # The directory is created if it doesn't exist. - class GcsDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The BigQuery location for the output content. - # @!attribute [rw] output_uri - # @return [::String] - # Required. BigQuery URI to a project, up to 2000 characters long. - # Accepted forms: - # * BigQuery path e.g. bq://projectId - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The GCR location where the image must be pushed to. - # @!attribute [rw] output_uri - # @return [::String] - # Required. Google Contained Registry URI of the new image, up to 2000 - # characters long. See - # - # https: - # //cloud.google.com/container-registry/do - # // cs/pushing-and-pulling#pushing_an_image_to_a_registry - # Accepted forms: - # * [HOSTNAME]/[PROJECT-ID]/[IMAGE] - # * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG] - # - # The requesting user must have permission to push images the project. - class GcrDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb deleted file mode 100644 index 6e167f65d37b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.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 AutoML - module V1beta1 - # API proto representing a trained machine learning model. - # @!attribute [rw] translation_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TranslationModelMetadata] - # Metadata for translation models. - # - # Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata] - # Metadata for image classification models. - # - # Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextClassificationModelMetadata] - # Metadata for text classification models. - # - # Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelMetadata] - # Metadata for image object detection models. - # - # Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationModelMetadata] - # Metadata for video classification models. - # - # Note: The following fields are mutually exclusive: `video_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingModelMetadata] - # Metadata for video object tracking models. - # - # Note: The following fields are mutually exclusive: `video_object_tracking_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionModelMetadata] - # Metadata for text extraction models. - # - # Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tables_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TablesModelMetadata] - # Metadata for Tables models. - # - # Note: The following fields are mutually exclusive: `tables_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentModelMetadata] - # Metadata for text sentiment models. - # - # Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the model. - # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the model to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores - # (_), and ASCII digits 0-9. It must start with a letter. - # @!attribute [rw] dataset_id - # @return [::String] - # Required. The resource ID of the dataset used to create the model. The dataset must - # come from the same ancestor project and location. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the model training finished and can be used for prediction. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model was last updated. - # @!attribute [rw] deployment_state - # @return [::Google::Cloud::AutoML::V1beta1::Model::DeploymentState] - # Output only. Deployment state of the model. A model can only serve - # prediction requests after it gets deployed. - class Model - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Deployment state of the model. - module DeploymentState - # Should not be used, an un-set enum has this value by default. - DEPLOYMENT_STATE_UNSPECIFIED = 0 - - # Model is deployed. - DEPLOYED = 1 - - # Model is not deployed. - UNDEPLOYED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb deleted file mode 100644 index 86132556d0f6..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb +++ /dev/null @@ -1,117 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Evaluation results of a model. - # @!attribute [rw] classification_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics] - # Model evaluation metrics for image, text, video and tables - # classification. - # Tables problem is considered a classification when the target column - # is CATEGORY DataType. - # - # Note: The following fields are mutually exclusive: `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regression_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::RegressionEvaluationMetrics] - # Model evaluation metrics for Tables regression. - # Tables problem is considered a regression when the target column - # has FLOAT64 DataType. - # - # Note: The following fields are mutually exclusive: `regression_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] translation_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::TranslationEvaluationMetrics] - # Model evaluation metrics for translation. - # - # Note: The following fields are mutually exclusive: `translation_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionEvaluationMetrics] - # Model evaluation metrics for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingEvaluationMetrics] - # Model evaluation metrics for video object tracking. - # - # Note: The following fields are mutually exclusive: `video_object_tracking_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentEvaluationMetrics] - # Evaluation metrics for text sentiment models. - # - # Note: The following fields are mutually exclusive: `text_sentiment_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics] - # Evaluation metrics for text extraction models. - # - # Note: The following fields are mutually exclusive: `text_extraction_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the model evaluation. - # Format: - # - # `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` - # @!attribute [rw] annotation_spec_id - # @return [::String] - # Output only. The ID of the annotation spec that the model evaluation applies to. The - # The ID is empty for the overall model evaluation. - # For Tables annotation specs in the dataset do not exist and this ID is - # always not set, but for CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - # the - # {::Google::Cloud::AutoML::V1beta1::ModelEvaluation#display_name display_name} - # field is used. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The value of - # {::Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name} at - # the moment when the model was trained. Because this field returns a value - # at model training time, for different models trained from the same dataset, - # the values may differ, since display names could had been changed between - # the two model's trainings. - # For Tables CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - # distinct values of the target column at the moment of the model evaluation - # are populated here. - # The display_name is empty for the overall model evaluation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model evaluation was created. - # @!attribute [rw] evaluated_example_count - # @return [::Integer] - # Output only. The number of examples used for model evaluation, i.e. for - # which ground truth from time of model creation is compared against the - # predicted annotations created by the model. - # For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is - # the total number of all examples used for evaluation. - # Otherwise, this is the count of examples that according to the ground - # truth were annotated by the - # - # {::Google::Cloud::AutoML::V1beta1::ModelEvaluation#annotation_spec_id annotation_spec_id}. - class ModelEvaluation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb deleted file mode 100644 index 6920b67fbe65..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb +++ /dev/null @@ -1,232 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Metadata used across all long running operations returned by AutoML API. - # @!attribute [rw] delete_details - # @return [::Google::Cloud::AutoML::V1beta1::DeleteOperationMetadata] - # Details of a Delete operation. - # - # Note: The following fields are mutually exclusive: `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] deploy_model_details - # @return [::Google::Cloud::AutoML::V1beta1::DeployModelOperationMetadata] - # Details of a DeployModel operation. - # - # Note: The following fields are mutually exclusive: `deploy_model_details`, `delete_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] undeploy_model_details - # @return [::Google::Cloud::AutoML::V1beta1::UndeployModelOperationMetadata] - # Details of an UndeployModel operation. - # - # Note: The following fields are mutually exclusive: `undeploy_model_details`, `delete_details`, `deploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_model_details - # @return [::Google::Cloud::AutoML::V1beta1::CreateModelOperationMetadata] - # Details of CreateModel operation. - # - # Note: The following fields are mutually exclusive: `create_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] import_data_details - # @return [::Google::Cloud::AutoML::V1beta1::ImportDataOperationMetadata] - # Details of ImportData operation. - # - # Note: The following fields are mutually exclusive: `import_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] batch_predict_details - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOperationMetadata] - # Details of BatchPredict operation. - # - # Note: The following fields are mutually exclusive: `batch_predict_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_data_details - # @return [::Google::Cloud::AutoML::V1beta1::ExportDataOperationMetadata] - # Details of ExportData operation. - # - # Note: The following fields are mutually exclusive: `export_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_model_details - # @return [::Google::Cloud::AutoML::V1beta1::ExportModelOperationMetadata] - # Details of ExportModel operation. - # - # Note: The following fields are mutually exclusive: `export_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_evaluated_examples_details - # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOperationMetadata] - # Details of ExportEvaluatedExamples operation. - # - # Note: The following fields are mutually exclusive: `export_evaluated_examples_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] progress_percent - # @return [::Integer] - # Output only. Progress of operation. Range: [0, 100]. - # Not used currently. - # @!attribute [rw] partial_failures - # @return [::Array<::Google::Rpc::Status>] - # Output only. Partial failures encountered. - # E.g. single files that couldn't be read. - # This field should never exceed 20 entries. - # Status details field will contain standard GCP error details. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was updated for the last time. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of operations that perform deletes of any entities. - class DeleteOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of DeployModel operation. - class DeployModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of UndeployModel operation. - class UndeployModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of CreateModel operation. - class CreateModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of ImportData operation. - class ImportDataOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of ExportData operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::ExportDataOperationMetadata::ExportDataOutputInfo] - # Output only. Information further describing this export data's output. - class ExportDataOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes this export data's output. - # Supplements - # {::Google::Cloud::AutoML::V1beta1::OutputConfig OutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the exported data is written. - # - # Note: The following fields are mutually exclusive: `gcs_output_directory`, `bigquery_output_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_output_dataset - # @return [::String] - # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - # format, into which the exported data is written. - # - # Note: The following fields are mutually exclusive: `bigquery_output_dataset`, `gcs_output_directory`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExportDataOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of BatchPredict operation. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig] - # Output only. The input config that was given upon starting this - # batch predict operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOperationMetadata::BatchPredictOutputInfo] - # Output only. Information further describing this batch predict's output. - class BatchPredictOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes this batch predict's output. - # Supplements - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig BatchPredictOutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the prediction output is written. - # - # Note: The following fields are mutually exclusive: `gcs_output_directory`, `bigquery_output_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_output_dataset - # @return [::String] - # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - # format, into which the prediction output is written. - # - # Note: The following fields are mutually exclusive: `bigquery_output_dataset`, `gcs_output_directory`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BatchPredictOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of ExportModel operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::ExportModelOperationMetadata::ExportModelOutputInfo] - # Output only. Information further describing the output of this model - # export. - class ExportModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes the output of model export. - # Supplements - # - # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the model will be exported. - class ExportModelOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of EvaluatedExamples operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOperationMetadata::ExportEvaluatedExamplesOutputInfo] - # Output only. Information further describing the output of this evaluated - # examples export. - class ExportEvaluatedExamplesOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes the output of the evaluated examples export. - # Supplements - # - # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig ExportEvaluatedExamplesOutputConfig}. - # @!attribute [rw] bigquery_output_dataset - # @return [::String] - # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - # format, into which the output of export evaluated examples is written. - class ExportEvaluatedExamplesOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb deleted file mode 100644 index 87c78db799ad..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb +++ /dev/null @@ -1,238 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Request message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict PredictionService.Predict}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the model requested to serve the prediction. - # @!attribute [rw] payload - # @return [::Google::Cloud::AutoML::V1beta1::ExamplePayload] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned in the response. Default is 100, the - # requested value may be limited by server. - # * For Tables: - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotation. - # The default is false. - class PredictRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict PredictionService.Predict}. - # @!attribute [rw] payload - # @return [::Array<::Google::Cloud::AutoML::V1beta1::AnnotationPayload>] - # Prediction result. - # Translation and Text Sentiment will return precisely one payload. - # @!attribute [rw] preprocessed_input - # @return [::Google::Cloud::AutoML::V1beta1::ExamplePayload] - # The preprocessed example that AutoML actually makes prediction on. - # Empty if AutoML does not preprocess the input example. - # * For Text Extraction: - # If the input is a .pdf file, the OCR'ed text will be provided in - # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific prediction response metadata. - # - # * For Image Object Detection: - # `max_bounding_box_count` - (int64) At most that many bounding boxes per - # image could have been returned. - # - # * For Text Sentiment: - # `sentiment_score` - (float, deprecated) A value between -1 and 1, - # -1 maps to least positive sentiment, while 1 maps to the most positive - # one and the higher the score, the more positive the sentiment in the - # document is. Yet these values are relative to the training data, so - # e.g. if all data was positive then -1 will be also positive (though - # the least). - # The sentiment_score shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - class PredictResponse - 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 - - # Request message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the model requested to serve the batch prediction. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig] - # Required. The input configuration for batch prediction. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig] - # Required. The Configuration specifying where output predictions should - # be written. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Required. Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # * For Text Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be produced per image. Default is 100, the - # requested value may be limited by server. - # - # * For Video Classification : - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # `segment_classification` - (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is "true". - # `shot_classification` - (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. The default is "false". - # `1s_interval_classification` - (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. The default is - # "false". - # - # * For Tables: - # - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotations. The - # default is false. - # - # * For Video Object Tracking: - # - # `score_threshold` - (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned per frame. Default is 100, the requested - # value may be limited by server. - # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size will be - # returned. Value in 0 to 1 range. Default is 0. - class BatchPredictRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Result of the Batch Predict. This message is returned in - # {::Google::Longrunning::Operation#response response} of the operation returned - # by the {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific prediction response metadata. - # - # * For Image Object Detection: - # `max_bounding_box_count` - (int64) At most that many bounding boxes per - # image could have been returned. - # - # * For Video Object Tracking: - # `max_bounding_box_count` - (int64) At most that many bounding boxes per - # frame could have been returned. - class BatchPredictResult - 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-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb deleted file mode 100644 index 7fc488386a6c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.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! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A range between two double numbers. - # @!attribute [rw] start - # @return [::Float] - # Start of the range, inclusive. - # @!attribute [rw] end - # @return [::Float] - # End of the range, exclusive. - class DoubleRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb deleted file mode 100644 index 147832f1fabb..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.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 Cloud - module AutoML - module V1beta1 - # Metrics for regression problems. - # @!attribute [rw] root_mean_squared_error - # @return [::Float] - # Output only. Root Mean Squared Error (RMSE). - # @!attribute [rw] mean_absolute_error - # @return [::Float] - # Output only. Mean Absolute Error (MAE). - # @!attribute [rw] mean_absolute_percentage_error - # @return [::Float] - # Output only. Mean absolute percentage error. Only set if all ground truth - # values are are positive. - # @!attribute [rw] r_squared - # @return [::Float] - # Output only. R squared. - # @!attribute [rw] root_mean_squared_log_error - # @return [::Float] - # Output only. Root mean squared log error. - class RegressionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb deleted file mode 100644 index 1c76959322fb..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset AutoMl.CreateDataset}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project to create the dataset for. - # @!attribute [rw] dataset - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # Required. The dataset to create. - class CreateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset AutoMl.GetDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to retrieve. - class GetDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project from which to list datasets. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of - # using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. - class ListDatasetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets}. - # @!attribute [rw] datasets - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Dataset>] - # The datasets read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest#page_token ListDatasetsRequest.page_token} to obtain that page. - class ListDatasetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset AutoMl.UpdateDataset} - # @!attribute [rw] dataset - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # Required. The dataset which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. - class UpdateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset AutoMl.DeleteDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to delete. - class DeleteDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data AutoMl.ImportData}. - # @!attribute [rw] name - # @return [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::InputConfig] - # Required. The desired input location and its domain specific semantics, - # if any. - class ImportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data AutoMl.ExportData}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::OutputConfig] - # Required. The desired output location. - class ExportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec AutoMl.GetAnnotationSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the annotation spec to retrieve. - class GetAnnotationSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec AutoMl.GetTableSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the table spec to retrieve. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - class GetTableSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the dataset to list table specs from. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - # @!attribute [rw] filter - # @return [::String] - # Filter expression, see go/filtering. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call. - class ListTableSpecsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs}. - # @!attribute [rw] table_specs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # The table specs read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest#page_token ListTableSpecsRequest.page_token} to obtain that page. - class ListTableSpecsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec AutoMl.UpdateTableSpec} - # @!attribute [rw] table_spec - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # Required. The table spec which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. - class UpdateTableSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec AutoMl.GetColumnSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the column spec to retrieve. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - class GetColumnSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the table spec to list column specs from. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - # @!attribute [rw] filter - # @return [::String] - # Filter expression, see go/filtering. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call. - class ListColumnSpecsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs}. - # @!attribute [rw] column_specs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # The column specs read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest#page_token ListColumnSpecsRequest.page_token} to obtain that page. - class ListColumnSpecsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec AutoMl.UpdateColumnSpec} - # @!attribute [rw] column_spec - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # Required. The column spec which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. - class UpdateColumnSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model AutoMl.CreateModel}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent project where the model is being created. - # @!attribute [rw] model - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # Required. The model to create. - class CreateModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model AutoMl.GetModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model. - class GetModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project, from which to list the models. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call. - class ListModelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels}. - # @!attribute [rw] model - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Model>] - # List of models in the requested page. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListModelsRequest#page_token ListModelsRequest.page_token} to obtain that page. - class ListModelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model AutoMl.DeleteModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model being deleted. - class DeleteModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model AutoMl.DeployModel}. - # @!attribute [rw] image_object_detection_model_deployment_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_model_deployment_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata] - # Model deployment metadata specific to Image Classification. - # - # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model to deploy. - class DeployModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model AutoMl.UndeployModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model to undeploy. - class UndeployModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}. - # Models need to be enabled for exporting, otherwise an error code will be - # returned. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the model to export. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig] - # Required. The desired output location and configuration. - class ExportModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples AutoMl.ExportEvaluatedExamples}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the model whose evaluated examples are to - # be exported. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig] - # Required. The desired output location and configuration. - class ExportEvaluatedExamplesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation AutoMl.GetModelEvaluation}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the model evaluation. - class GetModelEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - class ListModelEvaluationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. - # @!attribute [rw] model_evaluation - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # List of model evaluations in the requested page. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to the {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest#page_token ListModelEvaluationsRequest.page_token} field of a new - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} request to obtain that page. - class ListModelEvaluationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb deleted file mode 100644 index adc8f6e775c4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A specification of a relational table. - # The table's schema is represented via its child column specs. It is - # pre-populated as part of ImportData by schema inference algorithm, the - # version of which is a required parameter of ImportData InputConfig. - # Note: While working with a table, at times the schema may be - # inconsistent with the data in the table (e.g. string in a FLOAT64 column). - # The consistency validation is done upon creation of a model. - # Used by: - # * Tables - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the table spec. - # Form: - # - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}` - # @!attribute [rw] time_column_spec_id - # @return [::String] - # column_spec_id of the time column. Only used if the parent dataset's - # ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE - # and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and - # those in between to VALIDATE. - # Required type: TIMESTAMP. - # If both this column and ml_use_column are not set, then ML use of all rows - # will be assigned by AutoML. NOTE: Updates of this field will instantly - # affect any other users concurrently working with the dataset. - # @!attribute [rw] row_count - # @return [::Integer] - # Output only. The number of rows (i.e. examples) in the table. - # @!attribute [rw] valid_row_count - # @return [::Integer] - # Output only. The number of valid rows (i.e. without values that don't match - # DataType-s of their columns). - # @!attribute [rw] column_count - # @return [::Integer] - # Output only. The number of columns of the table. That is, the number of - # child ColumnSpec-s. - # @!attribute [rw] input_configs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::InputConfig>] - # Output only. Input configs via which data currently residing in the table - # had been imported. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - class TableSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb deleted file mode 100644 index cb70cab357c4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb +++ /dev/null @@ -1,304 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Metadata for a dataset used for AutoML Tables. - # @!attribute [rw] primary_table_spec_id - # @return [::String] - # Output only. The table_spec_id of the primary table of this dataset. - # @!attribute [rw] target_column_spec_id - # @return [::String] - # column_spec_id of the primary table's column that should be used as the - # training & prediction target. - # This column must be non-nullable and have one of following data types - # (otherwise model creation will error): - # - # * CATEGORY - # - # * FLOAT64 - # - # If the type is CATEGORY , only up to - # 100 unique values may exist in that column across all rows. - # - # NOTE: Updates of this field will instantly affect any other users - # concurrently working with the dataset. - # @!attribute [rw] weight_column_spec_id - # @return [::String] - # column_spec_id of the primary table's column that should be used as the - # weight column, i.e. the higher the value the more important the row will be - # during model training. - # Required type: FLOAT64. - # Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is - # ignored for training. - # If not set all rows are assumed to have equal weight of 1. - # NOTE: Updates of this field will instantly affect any other users - # concurrently working with the dataset. - # @!attribute [rw] ml_use_column_spec_id - # @return [::String] - # column_spec_id of the primary table column which specifies a possible ML - # use of the row, i.e. the column will be used to split the rows into TRAIN, - # VALIDATE and TEST sets. - # Required type: STRING. - # This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST` - # among its values, or only have `TEST`, `UNASSIGNED` values. In the latter - # case the rows with `UNASSIGNED` value will be assigned by AutoML. Note - # that if a given ml use distribution makes it impossible to create a "good" - # model, that call will error describing the issue. - # If both this column_spec_id and primary table's time_column_spec_id are not - # set, then all rows are treated as `UNASSIGNED`. - # NOTE: Updates of this field will instantly affect any other users - # concurrently working with the dataset. - # @!attribute [rw] target_column_correlations - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::CorrelationStats}] - # Output only. Correlations between - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#target_column_spec_id TablesDatasetMetadata.target_column_spec_id}, - # and other columns of the - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id TablesDatasetMetadataprimary_table}. - # Only set if the target column is set. Mapping from other column spec id to - # its CorrelationStats with the target column. - # This field may be stale, see the stats_update_time field for - # for the timestamp at which these stats were last updated. - # @!attribute [rw] stats_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent timestamp when target_column_correlations - # field and all descendant ColumnSpec.data_stats and - # ColumnSpec.top_correlated_columns fields were last (re-)generated. Any - # changes that happened to the dataset afterwards are not reflected in these - # fields values. The regeneration happens in the background on a best effort - # basis. - class TablesDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::CorrelationStats] - class TargetColumnCorrelationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Model metadata specific to AutoML Tables. - # @!attribute [rw] optimization_objective_recall_value - # @return [::Float] - # Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL". - # Must be between 0 and 1, inclusive. - # - # Note: The following fields are mutually exclusive: `optimization_objective_recall_value`, `optimization_objective_precision_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] optimization_objective_precision_value - # @return [::Float] - # Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION". - # Must be between 0 and 1, inclusive. - # - # Note: The following fields are mutually exclusive: `optimization_objective_precision_value`, `optimization_objective_recall_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] target_column_spec - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # Column spec of the dataset's primary table's column the model is - # predicting. Snapshotted when model creation started. - # Only 3 fields are used: - # name - May be set on CreateModel, if it's not then the ColumnSpec - # corresponding to the current target_column_spec_id of the dataset - # the model is trained from is used. - # If neither is set, CreateModel will error. - # display_name - Output only. - # data_type - Output only. - # @!attribute [rw] input_feature_column_specs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # Column specs of the dataset's primary table's columns, on which - # the model is trained and which are used as the input for predictions. - # The - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column} - # as well as, according to dataset's state upon model creation, - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#weight_column_spec_id weight_column}, - # and - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#ml_use_column_spec_id ml_use_column} - # must never be included here. - # - # Only 3 fields are used: - # - # * name - May be set on CreateModel, if set only the columns specified are - # used, otherwise all primary table's columns (except the ones listed - # above) are used for the training and prediction input. - # - # * display_name - Output only. - # - # * data_type - Output only. - # @!attribute [rw] optimization_objective - # @return [::String] - # Objective function the model is optimizing towards. The training process - # creates a model that maximizes/minimizes the value of the objective - # function over the validation set. - # - # The supported optimization objectives depend on the prediction type. - # If the field is not set, a default objective function is used. - # - # CLASSIFICATION_BINARY: - # "MAXIMIZE_AU_ROC" (default) - Maximize the area under the receiver - # operating characteristic (ROC) curve. - # "MINIMIZE_LOG_LOSS" - Minimize log loss. - # "MAXIMIZE_AU_PRC" - Maximize the area under the precision-recall curve. - # "MAXIMIZE_PRECISION_AT_RECALL" - Maximize precision for a specified - # recall value. - # "MAXIMIZE_RECALL_AT_PRECISION" - Maximize recall for a specified - # precision value. - # - # CLASSIFICATION_MULTI_CLASS : - # "MINIMIZE_LOG_LOSS" (default) - Minimize log loss. - # - # - # REGRESSION: - # "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE). - # "MINIMIZE_MAE" - Minimize mean-absolute error (MAE). - # "MINIMIZE_RMSLE" - Minimize root-mean-squared log error (RMSLE). - # @!attribute [rw] tables_model_column_info - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>] - # Output only. Auxiliary information for each of the - # input_feature_column_specs with respect to this particular model. - # @!attribute [rw] train_budget_milli_node_hours - # @return [::Integer] - # Required. The train budget of creating this model, expressed in milli node - # hours i.e. 1,000 value in this field means 1 node hour. - # - # The training cost of the model will not exceed this budget. The final cost - # will be attempted to be close to the budget, though may end up being (even) - # noticeably smaller - at the backend's discretion. This especially may - # happen when further model training ceases to provide any improvements. - # - # If the budget is set to a value known to be insufficient to train a - # model for the given dataset, the training won't be attempted and - # will error. - # - # The train budget must be between 1,000 and 72,000 milli node hours, - # inclusive. - # @!attribute [rw] train_cost_milli_node_hours - # @return [::Integer] - # Output only. The actual training cost of the model, expressed in milli - # node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed - # to not exceed the train budget. - # @!attribute [rw] disable_early_stopping - # @return [::Boolean] - # Use the entire training budget. This disables the early stopping feature. - # By default, the early stopping feature is enabled, which means that AutoML - # Tables might stop training before the entire training budget has been used. - class TablesModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains annotation details specific to Tables. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher - # value means greater confidence in the returned value. - # For - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec} - # of FLOAT64 data type the score is not populated. - # @!attribute [rw] prediction_interval - # @return [::Google::Cloud::AutoML::V1beta1::DoubleRange] - # Output only. Only populated when - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec} - # has FLOAT64 data type. An interval in which the exactly correct target - # value has 95% chance to be in. - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - # The predicted value of the row's - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column}. - # The value depends on the column's DataType: - # - # * CATEGORY - the predicted (with the above confidence `score`) CATEGORY - # value. - # - # * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value. - # @!attribute [rw] tables_model_column_info - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>] - # Output only. Auxiliary information for each of the model's - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs input_feature_column_specs} - # with respect to this particular prediction. - # If no other fields than - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_spec_name column_spec_name} - # and - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_display_name column_display_name} - # would be populated, then this whole field is not. - # @!attribute [rw] baseline_score - # @return [::Float] - # Output only. Stores the prediction score for the baseline example, which - # is defined as the example with all values set to their baseline values. - # This is used as part of the Sampled Shapley explanation of the model's - # prediction. This field is populated only when feature importance is - # requested. For regression models, this holds the baseline prediction for - # the baseline example. For classification models, this holds the baseline - # prediction for the baseline example for the argmax class. - class TablesAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An information specific to given column and Tables Model, in context - # of the Model and the predictions created by it. - # @!attribute [rw] column_spec_name - # @return [::String] - # Output only. The name of the ColumnSpec describing the column. Not - # populated when this proto is outputted to BigQuery. - # @!attribute [rw] column_display_name - # @return [::String] - # Output only. The display name of the column (same as the display_name of - # its ColumnSpec). - # @!attribute [rw] feature_importance - # @return [::Float] - # Output only. When given as part of a Model (always populated): - # Measurement of how much model predictions correctness on the TEST data - # depend on values in this column. A value between 0 and 1, higher means - # higher influence. These values are normalized - for all input feature - # columns of a given model they add to 1. - # - # When given back by Predict (populated iff - # [feature_importance - # param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch - # Predict (populated iff - # {::Google::Cloud::AutoML::V1beta1::PredictRequest#params feature_importance} - # param is set): - # Measurement of how impactful for the prediction returned for the given row - # the value in this column was. Specifically, the feature importance - # specifies the marginal contribution that the feature made to the prediction - # score compared to the baseline score. These values are computed using the - # Sampled Shapley method. - class TablesModelColumnInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb deleted file mode 100644 index 0214a830f15a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.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 AutoML - module V1beta1 - # A time period inside of an example that has a time dimension (e.g. video). - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Start of the time segment (inclusive), represented as the duration since - # the example start. - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # End of the time segment (exclusive), represented as the duration since the - # example start. - class TimeSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb deleted file mode 100644 index 1c3b18d079ef..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.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 AutoML - module V1beta1 - # Dataset metadata for classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] - # Required. Type of the classification problem. - class TextClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] - # Output only. Classification type of the dataset used to train this model. - class TextClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata that is specific to text extraction - class TextExtractionDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text extraction. - # @!attribute [rw] model_hint - # @return [::String] - # Indicates the scope of model use case. - # - # * `default`: Use to train a general text extraction model. Default value. - # - # * `health_care`: Use to train a text extraction model that is tuned for - # healthcare applications. - class TextExtractionModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata for text sentiment. - # @!attribute [rw] sentiment_max - # @return [::Integer] - # Required. A sentiment is expressed as an integer ordinal, where higher value - # means a more positive sentiment. The range of sentiments that will be used - # is between 0 and sentiment_max (inclusive on both ends), and all the values - # in the range must be represented in the dataset before a model can be - # created. - # sentiment_max value must be between 1 and 10 (inclusive). - class TextSentimentDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text sentiment. - class TextSentimentModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb deleted file mode 100644 index ca5b21931f3b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.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 AutoML - module V1beta1 - # Annotation for identifying spans of text. - # @!attribute [rw] text_segment - # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] - # An entity annotation will set this, which is the part of the original - # text to which the annotation pertains. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0. A higher value - # means greater confidence in correctness of the annotation. - class TextExtractionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for text extraction problems. - # @!attribute [rw] au_prc - # @return [::Float] - # Output only. The Area under precision recall curve metric. - # @!attribute [rw] confidence_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics::ConfidenceMetricsEntry>] - # Output only. Metrics that have confidence thresholds. - # Precision-recall curve can be derived from it. - class TextExtractionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. The confidence threshold value used to compute the metrics. - # Only annotations with score of at least this threshold are considered to - # be ones the model would return. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall under the given confidence threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision under the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb deleted file mode 100644 index 0ab880d1d0de..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.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 AutoML - module V1beta1 - # A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. - # @!attribute [rw] content - # @return [::String] - # Output only. The content of the TextSegment. - # @!attribute [rw] start_offset - # @return [::Integer] - # Required. Zero-based character index of the first character of the text - # segment (counting characters from the beginning of the text). - # @!attribute [rw] end_offset - # @return [::Integer] - # Required. Zero-based character index of the first character past the end of - # the text segment (counting character from the beginning of the text). - # The character at the end_offset is NOT included in the text segment. - class TextSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb deleted file mode 100644 index 9b48bef95e98..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.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 AutoML - module V1beta1 - # Contains annotation details specific to text sentiment. - # @!attribute [rw] sentiment - # @return [::Integer] - # Output only. The sentiment with the semantic, as given to the - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data AutoMl.ImportData} when populating the dataset from which the model used - # for the prediction had been trained. - # The sentiment values are between 0 and - # Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), - # with higher value meaning more positive sentiment. They are completely - # relative, i.e. 0 means least positive sentiment and sentiment_max means - # the most positive from the sentiments present in the train data. Therefore - # e.g. if train data had only negative sentiment, then sentiment_max, would - # be still negative (although least negative). - # The sentiment shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - class TextSentimentAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for text sentiment problems. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - # @!attribute [rw] mean_absolute_error - # @return [::Float] - # Output only. Mean absolute error. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] mean_squared_error - # @return [::Float] - # Output only. Mean squared error. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] linear_kappa - # @return [::Float] - # Output only. Linear weighted kappa. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] quadratic_kappa - # @return [::Float] - # Output only. Quadratic weighted kappa. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] confusion_matrix - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix] - # Output only. Confusion matrix of the evaluation. - # Only set for the overall model evaluation, not for evaluation of a single - # annotation spec. - # @!attribute [rw] annotation_spec_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::String>] - # Output only. The annotation spec ids used for this evaluation. - # Deprecated . - class TextSentimentEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb deleted file mode 100644 index 4826f3a2fb6f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.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 AutoML - module V1beta1 - # Dataset metadata that is specific to translation. - # @!attribute [rw] source_language_code - # @return [::String] - # Required. The BCP-47 language code of the source language. - # @!attribute [rw] target_language_code - # @return [::String] - # Required. The BCP-47 language code of the target language. - class TranslationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluation metrics for the dataset. - # @!attribute [rw] bleu_score - # @return [::Float] - # Output only. BLEU score. - # @!attribute [rw] base_bleu_score - # @return [::Float] - # Output only. BLEU score for base model. - class TranslationEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to translation. - # @!attribute [rw] base_model - # @return [::String] - # The resource name of the model to use as a baseline to train the custom - # model. If unset, we use the default base model provided by Google - # Translate. Format: - # `projects/{project_id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] source_language_code - # @return [::String] - # Output only. Inferred from the dataset. - # The source languge (The BCP-47 language code) that is used for training. - # @!attribute [rw] target_language_code - # @return [::String] - # Output only. The target languge (The BCP-47 language code) that is used for - # training. - class TranslationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation details specific to translation. - # @!attribute [rw] translated_content - # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] - # Output only . The translated content. - class TranslationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb deleted file mode 100644 index 8c029ee5303b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.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 AutoML - module V1beta1 - # Dataset metadata specific to video classification. - # All Video Classification datasets are treated as multi label. - class VideoClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata specific to video object tracking. - class VideoObjectTrackingDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to video classification. - class VideoClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to video object tracking. - class VideoObjectTrackingModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile deleted file mode 100644 index 4af8ecce5fb8..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-automl-v1beta1", path: "../" -else - gem "google-cloud-automl-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-automl-v1beta1/snippets/automl/create_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb deleted file mode 100644 index 0a974be0868c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_CreateDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the create_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset. -# -def create_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new - - # Call the create_dataset method. - result = client.create_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - p result -end -# [END automl_v1beta1_generated_AutoML_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb deleted file mode 100644 index 22cb436527e3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.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 automl_v1beta1_generated_AutoML_CreateModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the create_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model. -# -def create_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new - - # Call the create_model method. - result = client.create_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb deleted file mode 100644 index 628da07c0d25..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.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 automl_v1beta1_generated_AutoML_DeleteDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the delete_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset. -# -def delete_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new - - # Call the delete_dataset method. - result = client.delete_dataset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb deleted file mode 100644 index 15ca9acb6cac..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.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 automl_v1beta1_generated_AutoML_DeleteModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the delete_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model. -# -def delete_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new - - # Call the delete_model method. - result = client.delete_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb deleted file mode 100644 index 140df82eb01c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.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 automl_v1beta1_generated_AutoML_DeployModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the deploy_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model. -# -def deploy_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new - - # Call the deploy_model method. - result = client.deploy_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_DeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb deleted file mode 100644 index d2be3e5b1a63..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.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 automl_v1beta1_generated_AutoML_ExportData_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the export_data call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data. -# -def export_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new - - # Call the export_data method. - result = client.export_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ExportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb deleted file mode 100644 index ba25ff7ba592..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.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 automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the export_evaluated_examples call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples. -# -def export_evaluated_examples - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new - - # Call the export_evaluated_examples method. - result = client.export_evaluated_examples request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb deleted file mode 100644 index 7c6e81cc84b0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.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 automl_v1beta1_generated_AutoML_ExportModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the export_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model. -# -def export_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new - - # Call the export_model method. - result = client.export_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ExportModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb deleted file mode 100644 index 9a97355601b2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_annotation_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec. -# -def get_annotation_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new - - # Call the get_annotation_spec method. - result = client.get_annotation_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb deleted file mode 100644 index 2a52e3c32551..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetColumnSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_column_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec. -# -def get_column_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new - - # Call the get_column_spec method. - result = client.get_column_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_GetColumnSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb deleted file mode 100644 index 68d3e53aa211..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset. -# -def get_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new - - # Call the get_dataset method. - result = client.get_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - p result -end -# [END automl_v1beta1_generated_AutoML_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb deleted file mode 100644 index e50cdc32d622..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model. -# -def get_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new - - # Call the get_model method. - result = client.get_model request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. - p result -end -# [END automl_v1beta1_generated_AutoML_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb deleted file mode 100644 index ca4f8591f907..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetModelEvaluation_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_model_evaluation call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation. -# -def get_model_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new - - # Call the get_model_evaluation method. - result = client.get_model_evaluation request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. - p result -end -# [END automl_v1beta1_generated_AutoML_GetModelEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb deleted file mode 100644 index cfe8b2137d84..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetTableSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_table_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec. -# -def get_table_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new - - # Call the get_table_spec method. - result = client.get_table_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_GetTableSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb deleted file mode 100644 index 1cb0abe33861..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.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 automl_v1beta1_generated_AutoML_ImportData_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the import_data call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data. -# -def import_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new - - # Call the import_data method. - result = client.import_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ImportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb deleted file mode 100644 index c74afd3280ca..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.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 automl_v1beta1_generated_AutoML_ListColumnSpecs_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_column_specs call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs. -# -def list_column_specs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new - - # Call the list_column_specs method. - result = client.list_column_specs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListColumnSpecs_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb deleted file mode 100644 index 87378a8792fc..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.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 automl_v1beta1_generated_AutoML_ListDatasets_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_datasets call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets. -# -def list_datasets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new - - # Call the list_datasets method. - result = client.list_datasets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb deleted file mode 100644 index 528ea60d5c5d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.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 automl_v1beta1_generated_AutoML_ListModelEvaluations_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_model_evaluations call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations. -# -def list_model_evaluations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new - - # Call the list_model_evaluations method. - result = client.list_model_evaluations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListModelEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb deleted file mode 100644 index 82eec30e8372..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.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 automl_v1beta1_generated_AutoML_ListModels_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_models call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models. -# -def list_models - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new - - # Call the list_models method. - result = client.list_models request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb deleted file mode 100644 index b3ce41523371..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.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 automl_v1beta1_generated_AutoML_ListTableSpecs_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_table_specs call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs. -# -def list_table_specs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new - - # Call the list_table_specs method. - result = client.list_table_specs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListTableSpecs_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb deleted file mode 100644 index c4dd0d5ccf13..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.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 automl_v1beta1_generated_AutoML_UndeployModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the undeploy_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model. -# -def undeploy_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new - - # Call the undeploy_model method. - result = client.undeploy_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_UndeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb deleted file mode 100644 index e2f0d1af6b69..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the update_column_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec. -# -def update_column_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new - - # Call the update_column_spec method. - result = client.update_column_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb deleted file mode 100644 index a8a8c79b852f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UpdateDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the update_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset. -# -def update_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new - - # Call the update_dataset method. - result = client.update_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - p result -end -# [END automl_v1beta1_generated_AutoML_UpdateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb deleted file mode 100644 index 66268b4bfcd3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UpdateTableSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the update_table_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec. -# -def update_table_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new - - # Call the update_table_spec method. - result = client.update_table_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_UpdateTableSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb deleted file mode 100644 index 181699c503a9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.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 automl_v1beta1_generated_PredictionService_BatchPredict_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the batch_predict call in the PredictionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict. -# -def batch_predict - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new - - # Call the batch_predict method. - result = client.batch_predict request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_PredictionService_BatchPredict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb deleted file mode 100644 index aaba4299f11f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_PredictionService_Predict_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the predict call in the PredictionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict. -# -def predict - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::PredictRequest.new - - # Call the predict method. - result = client.predict request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. - p result -end -# [END automl_v1beta1_generated_PredictionService_Predict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json deleted file mode 100644 index 4b7ca3c8ef40..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json +++ /dev/null @@ -1,1055 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-automl-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.automl.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "automl_v1beta1_generated_PredictionService_Predict_sync", - "title": "Snippet for the predict call in the PredictionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict.", - "file": "prediction_service/predict.rb", - "language": "RUBY", - "client_method": { - "short_name": "predict", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::PredictRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::PredictResponse", - "client": { - "short_name": "PredictionService::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client" - }, - "method": { - "short_name": "Predict", - "full_name": "google.cloud.automl.v1beta1.PredictionService.Predict", - "service": { - "short_name": "PredictionService", - "full_name": "google.cloud.automl.v1beta1.PredictionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_PredictionService_BatchPredict_sync", - "title": "Snippet for the batch_predict call in the PredictionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict.", - "file": "prediction_service/batch_predict.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_predict", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::BatchPredictRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PredictionService::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client" - }, - "method": { - "short_name": "BatchPredict", - "full_name": "google.cloud.automl.v1beta1.PredictionService.BatchPredict", - "service": { - "short_name": "PredictionService", - "full_name": "google.cloud.automl.v1beta1.PredictionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_CreateDataset_sync", - "title": "Snippet for the create_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset.", - "file": "automl/create_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "CreateDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.CreateDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetDataset_sync", - "title": "Snippet for the get_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset.", - "file": "automl/get_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListDatasets_sync", - "title": "Snippet for the list_datasets call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets.", - "file": "automl/list_datasets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_datasets", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListDatasets", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListDatasets", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UpdateDataset_sync", - "title": "Snippet for the update_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset.", - "file": "automl/update_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UpdateDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_DeleteDataset_sync", - "title": "Snippet for the delete_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset.", - "file": "automl/delete_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "DeleteDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.DeleteDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ImportData_sync", - "title": "Snippet for the import_data call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data.", - "file": "automl/import_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_data", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ImportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ImportData", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ImportData", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ExportData_sync", - "title": "Snippet for the export_data call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data.", - "file": "automl/export_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_data", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ExportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ExportData", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportData", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync", - "title": "Snippet for the get_annotation_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec.", - "file": "automl/get_annotation_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_annotation_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::AnnotationSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetAnnotationSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetTableSpec_sync", - "title": "Snippet for the get_table_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec.", - "file": "automl/get_table_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_table_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::TableSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetTableSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetTableSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListTableSpecs_sync", - "title": "Snippet for the list_table_specs call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs.", - "file": "automl/list_table_specs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_table_specs", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListTableSpecs", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListTableSpecs", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UpdateTableSpec_sync", - "title": "Snippet for the update_table_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec.", - "file": "automl/update_table_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_table_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::TableSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UpdateTableSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetColumnSpec_sync", - "title": "Snippet for the get_column_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec.", - "file": "automl/get_column_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_column_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ColumnSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetColumnSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetColumnSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListColumnSpecs_sync", - "title": "Snippet for the list_column_specs call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs.", - "file": "automl/list_column_specs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_column_specs", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListColumnSpecs", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync", - "title": "Snippet for the update_column_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec.", - "file": "automl/update_column_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_column_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ColumnSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UpdateColumnSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_CreateModel_sync", - "title": "Snippet for the create_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model.", - "file": "automl/create_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::CreateModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "CreateModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.CreateModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetModel_sync", - "title": "Snippet for the get_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model.", - "file": "automl/get_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Model", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListModels_sync", - "title": "Snippet for the list_models call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models.", - "file": "automl/list_models.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_models", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListModelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListModelsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListModels", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListModels", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_DeleteModel_sync", - "title": "Snippet for the delete_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model.", - "file": "automl/delete_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::DeleteModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "DeleteModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.DeleteModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_DeployModel_sync", - "title": "Snippet for the deploy_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model.", - "file": "automl/deploy_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "deploy_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::DeployModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "DeployModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.DeployModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UndeployModel_sync", - "title": "Snippet for the undeploy_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model.", - "file": "automl/undeploy_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "undeploy_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UndeployModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UndeployModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UndeployModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ExportModel_sync", - "title": "Snippet for the export_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model.", - "file": "automl/export_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ExportModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ExportModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync", - "title": "Snippet for the export_evaluated_examples call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples.", - "file": "automl/export_evaluated_examples.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_evaluated_examples", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ExportEvaluatedExamples", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetModelEvaluation_sync", - "title": "Snippet for the get_model_evaluation call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation.", - "file": "automl/get_model_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model_evaluation", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ModelEvaluation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetModelEvaluation", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListModelEvaluations_sync", - "title": "Snippet for the list_model_evaluations call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations.", - "file": "automl/list_model_evaluations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_model_evaluations", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListModelEvaluations", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "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-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb deleted file mode 100644 index 75d1640c3c69..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_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/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/service_services_pb" -require "google/cloud/automl/v1beta1/automl" - -class ::Google::Cloud::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb deleted file mode 100644 index 267b97d1fab1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_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/automl/v1beta1/automl" - -class ::Google::Cloud::AutoML::V1beta1::AutoML::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_annotation_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.annotation_spec_path project: "value0", location: "value1", dataset: "value2", annotation_spec: "value3" - assert_equal "projects/value0/locations/value1/datasets/value2/annotationSpecs/value3", path - end - end - - def test_column_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.column_spec_path project: "value0", location: "value1", dataset: "value2", table_spec: "value3", column_spec: "value4" - assert_equal "projects/value0/locations/value1/datasets/value2/tableSpecs/value3/columnSpecs/value4", path - end - end - - def test_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", location: "value1", dataset: "value2" - assert_equal "projects/value0/locations/value1/datasets/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::AutoML::V1beta1::AutoML::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_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end - - def test_model_evaluation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_evaluation_path project: "value0", location: "value1", model: "value2", model_evaluation: "value3" - assert_equal "projects/value0/locations/value1/models/value2/modelEvaluations/value3", path - end - end - - def test_table_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_spec_path project: "value0", location: "value1", dataset: "value2", table_spec: "value3" - assert_equal "projects/value0/locations/value1/datasets/value2/tableSpecs/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb deleted file mode 100644 index 76cbacb1181f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb +++ /dev/null @@ -1,1424 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/automl/rest" - - -class ::Google::Cloud::AutoML::V1beta1::AutoML::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_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset = {} - - create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_dataset parent: parent, dataset: dataset do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_dataset ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_dataset(::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_dataset_client_stub.call_count - end - end - end - - def test_get_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_dataset ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_dataset(::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dataset_client_stub.call_count - end - end - end - - def test_list_datasets - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.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_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_datasets({ 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_datasets 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_datasets ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.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_datasets_client_stub.call_count - end - end - end - - def test_update_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - dataset = {} - update_mask = {} - - update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_dataset({ dataset: dataset, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_dataset dataset: dataset, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_dataset ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_dataset({ dataset: dataset, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_dataset(::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_dataset_client_stub.call_count - end - end - end - - def test_delete_dataset - # Create test objects. - 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_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_dataset ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_dataset(::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_dataset_client_stub.call_count - end - end - end - - def test_import_data - # Create test objects. - 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" - input_config = {} - - import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.import_data({ name: name, input_config: input_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.import_data name: name, input_config: input_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.import_data ::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.import_data({ name: name, input_config: input_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.import_data(::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_data_client_stub.call_count - end - end - end - - def test_export_data - # Create test objects. - 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" - output_config = {} - - export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.export_data({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.export_data name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.export_data ::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.export_data({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.export_data(::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_count - end - end - end - - def test_get_annotation_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_annotation_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_annotation_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_annotation_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_annotation_spec({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_annotation_spec name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_annotation_spec ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_annotation_spec({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_annotation_spec(::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_annotation_spec_client_stub.call_count - end - end - end - - def test_get_table_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::TableSpec.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_table_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_table_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_table_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_table_spec({ name: name, field_mask: field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_table_spec name: name, field_mask: field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_table_spec ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.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_table_spec({ 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_table_spec(::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.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_table_spec_client_stub.call_count - end - end - end - - def test_list_table_specs - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_table_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_table_specs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_table_specs_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_table_specs({ parent: parent, field_mask: field_mask, 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_table_specs parent: parent, field_mask: field_mask, 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_table_specs ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, 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_table_specs({ parent: parent, field_mask: field_mask, 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_table_specs(::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, 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_table_specs_client_stub.call_count - end - end - end - - def test_update_table_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - table_spec = {} - update_mask = {} - - update_table_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_table_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_table_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_table_spec({ table_spec: table_spec, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_table_spec table_spec: table_spec, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_table_spec ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_table_spec({ table_spec: table_spec, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_table_spec(::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_table_spec_client_stub.call_count - end - end - end - - def test_get_column_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.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_column_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_column_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_column_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_column_spec({ name: name, field_mask: field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_column_spec name: name, field_mask: field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_column_spec ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.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_column_spec({ 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_column_spec(::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.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_column_spec_client_stub.call_count - end - end - end - - def test_list_column_specs - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_column_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_column_specs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_column_specs_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_column_specs({ parent: parent, field_mask: field_mask, 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_column_specs parent: parent, field_mask: field_mask, 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_column_specs ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, 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_column_specs({ parent: parent, field_mask: field_mask, 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_column_specs(::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, 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_column_specs_client_stub.call_count - end - end - end - - def test_update_column_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - column_spec = {} - update_mask = {} - - update_column_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_column_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_column_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_column_spec({ column_spec: column_spec, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_column_spec column_spec: column_spec, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_column_spec ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_column_spec({ column_spec: column_spec, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_column_spec(::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_column_spec_client_stub.call_count - end - end - end - - def test_create_model - # Create test objects. - 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" - model = {} - - create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_model({ parent: parent, model: model }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_model parent: parent, model: model do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_model ::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_model({ parent: parent, model: model }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_model(::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_model_client_stub.call_count - end - end - end - - def test_get_model - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Model.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_model ::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_model(::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_client_stub.call_count - end - end - end - - def test_list_models - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.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_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_models_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_models({ 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_models 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_models ::Google::Cloud::AutoML::V1beta1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::AutoML::V1beta1::ListModelsRequest.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_models_client_stub.call_count - end - end - end - - def test_delete_model - # Create test objects. - 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_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_model ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_model(::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_model_client_stub.call_count - end - end - end - - def test_deploy_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - image_object_detection_model_deployment_metadata = {} - name = "hello world" - - deploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_deploy_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, deploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.deploy_model ::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.deploy_model(::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, deploy_model_client_stub.call_count - end - end - end - - def test_undeploy_model - # Create test objects. - 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" - - undeploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_undeploy_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undeploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.undeploy_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.undeploy_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.undeploy_model ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.undeploy_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.undeploy_model(::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undeploy_model_client_stub.call_count - end - end - end - - def test_export_model - # Create test objects. - 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" - output_config = {} - - export_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.export_model({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.export_model name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.export_model ::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.export_model({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.export_model(::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_model_client_stub.call_count - end - end - end - - def test_export_evaluated_examples - # Create test objects. - 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" - output_config = {} - - export_evaluated_examples_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_evaluated_examples_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_evaluated_examples_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.export_evaluated_examples({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.export_evaluated_examples name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.export_evaluated_examples ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.export_evaluated_examples({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.export_evaluated_examples(::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_evaluated_examples_client_stub.call_count - end - end - end - - def test_get_model_evaluation - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_model_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_evaluation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_model_evaluation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_model_evaluation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_model_evaluation ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_model_evaluation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_model_evaluation(::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_evaluation_client_stub.call_count - end - end - end - - def test_list_model_evaluations - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.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_model_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_model_evaluations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_model_evaluations_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_model_evaluations({ 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_model_evaluations 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_model_evaluations ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.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_model_evaluations({ 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_model_evaluations(::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.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_model_evaluations_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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb deleted file mode 100644 index e43526b6361c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb +++ /dev/null @@ -1,1639 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/automl" - -class ::Google::Cloud::AutoML::V1beta1::AutoML::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_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset = {} - - create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Dataset), request["dataset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_dataset({ parent: parent, dataset: dataset }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_dataset parent: parent, dataset: dataset do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_dataset ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_dataset({ parent: parent, dataset: dataset }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_dataset(::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_dataset_client_stub.call_rpc_count - end - end - - def test_get_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_dataset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_dataset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_dataset ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_dataset({ 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_dataset(::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(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_dataset_client_stub.call_rpc_count - end - end - - def test_list_datasets - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_datasets, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, 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_datasets_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_datasets({ 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_datasets 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_datasets ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.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_datasets_client_stub.call_rpc_count - end - end - - def test_update_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - dataset = {} - update_mask = {} - - update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Dataset), request["dataset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_dataset({ dataset: dataset, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_dataset dataset: dataset, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_dataset ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, 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_dataset({ dataset: dataset, 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_dataset(::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, 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_dataset_client_stub.call_rpc_count - end - end - - def test_delete_dataset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_dataset({ 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_dataset 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_dataset ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.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_dataset({ 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_dataset(::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.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_dataset_client_stub.call_rpc_count - end - end - - def test_import_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - - import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_data, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ImportDataRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::InputConfig), request["input_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.import_data({ name: name, input_config: input_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.import_data name: name, input_config: input_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.import_data ::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_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.import_data({ name: name, input_config: input_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.import_data(::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_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, import_data_client_stub.call_rpc_count - end - end - - def test_export_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_data, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportDataRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::OutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.export_data({ name: name, 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.export_data name: name, 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.export_data ::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, 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.export_data({ name: name, 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.export_data(::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_rpc_count - end - end - - def test_get_annotation_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_annotation_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_annotation_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_annotation_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_annotation_spec({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_annotation_spec name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_annotation_spec ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_annotation_spec({ 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_annotation_spec(::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(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_annotation_spec_client_stub.call_rpc_count - end - end - - def test_get_table_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_table_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_table_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, 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_table_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_table_spec({ 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_table_spec 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_table_spec ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.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_table_spec({ 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_table_spec(::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.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_table_spec_client_stub.call_rpc_count - end - end - - def test_list_table_specs - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_table_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_table_specs, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - 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_table_specs_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_table_specs({ parent: parent, field_mask: field_mask, 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_table_specs parent: parent, field_mask: field_mask, 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_table_specs ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, 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_table_specs({ parent: parent, field_mask: field_mask, 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_table_specs(::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, 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_table_specs_client_stub.call_rpc_count - end - end - - def test_update_table_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - table_spec = {} - update_mask = {} - - update_table_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_table_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::TableSpec), request["table_spec"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_table_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_table_spec({ table_spec: table_spec, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_table_spec table_spec: table_spec, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_table_spec ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, 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_table_spec({ table_spec: table_spec, 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_table_spec(::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, 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_table_spec_client_stub.call_rpc_count - end - end - - def test_get_column_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_column_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_column_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, 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_column_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_column_spec({ 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_column_spec 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_column_spec ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.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_column_spec({ 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_column_spec(::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.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_column_spec_client_stub.call_rpc_count - end - end - - def test_list_column_specs - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_column_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_column_specs, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - 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_column_specs_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_column_specs({ parent: parent, field_mask: field_mask, 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_column_specs parent: parent, field_mask: field_mask, 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_column_specs ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, 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_column_specs({ parent: parent, field_mask: field_mask, 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_column_specs(::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, 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_column_specs_client_stub.call_rpc_count - end - end - - def test_update_column_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - column_spec = {} - update_mask = {} - - update_column_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_column_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ColumnSpec), request["column_spec"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_column_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_column_spec({ column_spec: column_spec, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_column_spec column_spec: column_spec, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_column_spec ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, 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_column_spec({ column_spec: column_spec, 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_column_spec(::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, 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_column_spec_client_stub.call_rpc_count - end - end - - def test_create_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - model = {} - - create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::CreateModelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Model), request["model"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_model({ parent: parent, model: model }) do |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_model parent: parent, model: model do |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_model ::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model) do |response, operation| - 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_model({ parent: parent, model: model }, grpc_options) do |response, operation| - 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_model(::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| - assert_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_model_client_stub.call_rpc_count - end - end - - def test_get_model - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Model.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_model({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_model name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_model ::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_model({ 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_model(::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(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_model_client_stub.call_rpc_count - end - end - - def test_list_models - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_models, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListModelsRequest, 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_models_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_models({ 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_models 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_models ::Google::Cloud::AutoML::V1beta1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::AutoML::V1beta1::ListModelsRequest.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_models_client_stub.call_rpc_count - end - end - - def test_delete_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_model({ 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_model 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_model ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.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_model({ 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_model(::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.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_model_client_stub.call_rpc_count - end - end - - def test_deploy_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - image_object_detection_model_deployment_metadata = {} - name = "hello world" - - deploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :deploy_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeployModelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata), request["image_object_detection_model_deployment_metadata"] - assert_equal :image_object_detection_model_deployment_metadata, request.model_deployment_metadata - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, deploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model ::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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.deploy_model(::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, 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, deploy_model_client_stub.call_rpc_count - end - end - - def test_undeploy_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undeploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undeploy_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undeploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.undeploy_model({ 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.undeploy_model 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.undeploy_model ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.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.undeploy_model({ 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.undeploy_model(::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.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, undeploy_model_client_stub.call_rpc_count - end - end - - def test_export_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportModelRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.export_model({ name: name, 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.export_model name: name, 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.export_model ::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, 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.export_model({ name: name, 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.export_model(::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_model_client_stub.call_rpc_count - end - end - - def test_export_evaluated_examples - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_evaluated_examples_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_evaluated_examples, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_evaluated_examples_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.export_evaluated_examples({ name: name, 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.export_evaluated_examples name: name, 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.export_evaluated_examples ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, 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.export_evaluated_examples({ name: name, 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.export_evaluated_examples(::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_evaluated_examples_client_stub.call_rpc_count - end - end - - def test_get_model_evaluation - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model_evaluation, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_evaluation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_model_evaluation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_model_evaluation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_model_evaluation ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_model_evaluation({ 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_model_evaluation(::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(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_model_evaluation_client_stub.call_rpc_count - end - end - - def test_list_model_evaluations - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_model_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_model_evaluations, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, 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_model_evaluations_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_model_evaluations({ 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_model_evaluations 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_model_evaluations ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.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_model_evaluations({ 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_model_evaluations(::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.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_model_evaluations_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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::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::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb deleted file mode 100644 index 63bf5ca8cd95..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_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/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service_services_pb" -require "google/cloud/automl/v1beta1/prediction_service" - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb deleted file mode 100644 index f82674af6532..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_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/automl/v1beta1/prediction_service" - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::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_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb deleted file mode 100644 index 40557dac392a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb +++ /dev/null @@ -1,212 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service/rest" - - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::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_predict - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::PredictResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - params = {} - - predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.stub :transcode_predict_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.predict({ name: name, payload: payload, params: params }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.predict name: name, payload: payload, params: params do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.predict ::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.predict({ name: name, payload: payload, params: params }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.predict(::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, predict_client_stub.call_count - end - end - end - - def test_batch_predict - # Create test objects. - 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" - input_config = {} - output_config = {} - params = {} - - batch_predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.stub :transcode_batch_predict_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_predict ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_predict(::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_predict_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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb deleted file mode 100644 index 9c66c7b2e013..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb +++ /dev/null @@ -1,249 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service" - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::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_predict - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::PredictResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - params = {} - - predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :predict, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ExamplePayload), request["payload"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.predict({ name: name, payload: payload, params: params }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.predict name: name, payload: payload, params: params do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.predict ::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.predict({ name: name, payload: payload, params: params }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.predict(::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, predict_client_stub.call_rpc_count - end - end - - def test_batch_predict - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - output_config = {} - params = {} - - batch_predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_predict, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig), request["input_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig), request["output_config"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |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_predict name: name, input_config: input_config, output_config: output_config, params: params do |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_predict ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |response, operation| - 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_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, grpc_options) do |response, operation| - 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_predict(::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), grpc_options) do |response, operation| - assert_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_predict_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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::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::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-automl-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-backupdr-v1/.gitignore b/owl-bot-staging/google-cloud-backupdr-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json deleted file mode 100644 index 11a24894cf9d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "api_id": "backupdr.googleapis.com", - "api_shortname": "backupdr", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest", - "distribution_name": "google-cloud-backupdr-v1", - "is_cloud": true, - "language": "ruby", - "name": "backupdr", - "name_pretty": "Backup and DR Service V1 API", - "product_documentation": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", - "ruby-cloud-path-override": "backup_dr=backupdr", - "ruby-cloud-namespace-override": "Backupdr=BackupDR", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml b/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml deleted file mode 100644 index cbd65e44ff07..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-backupdr-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-backupdr-v1.rb" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb b/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/.yardopts b/owl-bot-staging/google-cloud-backupdr-v1/.yardopts deleted file mode 100644 index 17df553d8c78..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Backup and DR 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-backupdr-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md deleted file mode 100644 index d053ec6f167e..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-backupdr-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-backupdr-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/backupdr/v1" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/backupdr/v1" - -::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BackupDR::V1::BackupDR::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-backupdr-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/backupdr/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::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-backupdr-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-backupdr-v1/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/LICENSE.md b/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/README.md b/owl-bot-staging/google-cloud-backupdr-v1/README.md deleted file mode 100644 index b0d44836bd67..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Backup and DR Service V1 API - -API Client library for the Backup and DR Service V1 API - -google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Backup and DR Service V1 API. Most users should consider using -the main client gem, -[google-cloud-backupdr](https://rubygems.org/gems/google-cloud-backupdr). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-backupdr-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/backupdr.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/backupdr/v1" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new -request = ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new # (request fields as keyword arguments...) -response = client.list_management_servers request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc) -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/backupdr/v1" -require "logger" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::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-backupdr`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-backupdr-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-backupdr`. -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-backupdr-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-backupdr-v1/Rakefile b/owl-bot-staging/google-cloud-backupdr-v1/Rakefile deleted file mode 100644 index 7990877ac4bf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-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/backupdr/v1/backupdr/credentials" - ::Google::Cloud::BackupDR::V1::BackupDR::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-backupdr-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-backupdr-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-backupdr-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-backupdr-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-backupdr-v1" - header "google-cloud-backupdr-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-backupdr-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-backupdr-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-backupdr-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-backupdr-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-backupdr-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json deleted file mode 100644 index 590f02f148a1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.backupdr.v1", - "libraryPackage": "::Google::Cloud::BackupDR::V1", - "services": { - "BackupDR": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDR::Client", - "rpcs": { - "ListManagementServers": { - "methods": [ - "list_management_servers" - ] - }, - "GetManagementServer": { - "methods": [ - "get_management_server" - ] - }, - "CreateManagementServer": { - "methods": [ - "create_management_server" - ] - }, - "DeleteManagementServer": { - "methods": [ - "delete_management_server" - ] - }, - "CreateBackupVault": { - "methods": [ - "create_backup_vault" - ] - }, - "ListBackupVaults": { - "methods": [ - "list_backup_vaults" - ] - }, - "FetchUsableBackupVaults": { - "methods": [ - "fetch_usable_backup_vaults" - ] - }, - "GetBackupVault": { - "methods": [ - "get_backup_vault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "update_backup_vault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "delete_backup_vault" - ] - }, - "ListDataSources": { - "methods": [ - "list_data_sources" - ] - }, - "GetDataSource": { - "methods": [ - "get_data_source" - ] - }, - "UpdateDataSource": { - "methods": [ - "update_data_source" - ] - }, - "ListBackups": { - "methods": [ - "list_backups" - ] - }, - "FetchBackupsForResourceType": { - "methods": [ - "fetch_backups_for_resource_type" - ] - }, - "GetBackup": { - "methods": [ - "get_backup" - ] - }, - "UpdateBackup": { - "methods": [ - "update_backup" - ] - }, - "DeleteBackup": { - "methods": [ - "delete_backup" - ] - }, - "RestoreBackup": { - "methods": [ - "restore_backup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "create_backup_plan" - ] - }, - "UpdateBackupPlan": { - "methods": [ - "update_backup_plan" - ] - }, - "GetBackupPlan": { - "methods": [ - "get_backup_plan" - ] - }, - "ListBackupPlans": { - "methods": [ - "list_backup_plans" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "delete_backup_plan" - ] - }, - "GetBackupPlanRevision": { - "methods": [ - "get_backup_plan_revision" - ] - }, - "ListBackupPlanRevisions": { - "methods": [ - "list_backup_plan_revisions" - ] - }, - "CreateBackupPlanAssociation": { - "methods": [ - "create_backup_plan_association" - ] - }, - "UpdateBackupPlanAssociation": { - "methods": [ - "update_backup_plan_association" - ] - }, - "GetBackupPlanAssociation": { - "methods": [ - "get_backup_plan_association" - ] - }, - "ListBackupPlanAssociations": { - "methods": [ - "list_backup_plan_associations" - ] - }, - "FetchBackupPlanAssociationsForResourceType": { - "methods": [ - "fetch_backup_plan_associations_for_resource_type" - ] - }, - "DeleteBackupPlanAssociation": { - "methods": [ - "delete_backup_plan_association" - ] - }, - "TriggerBackup": { - "methods": [ - "trigger_backup" - ] - }, - "GetDataSourceReference": { - "methods": [ - "get_data_source_reference" - ] - }, - "ListDataSourceReferences": { - "methods": [ - "list_data_source_references" - ] - }, - "FetchDataSourceReferencesForResourceType": { - "methods": [ - "fetch_data_source_references_for_resource_type" - ] - }, - "InitializeService": { - "methods": [ - "initialize_service" - ] - } - } - } - } - }, - "BackupDrProtectionSummary": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client", - "rpcs": { - "ListResourceBackupConfigs": { - "methods": [ - "list_resource_backup_configs" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec b/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec deleted file mode 100644 index 2b0919a8e70d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/backupdr/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-backupdr-v1" - gem.version = Google::Cloud::BackupDR::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details." - gem.summary = "API Client library for the Backup and DR Service V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.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-backupdr-v1/lib/google-cloud-backupdr-v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb deleted file mode 100644 index 7bea88dbd327..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-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/backupdr/v1" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb deleted file mode 100644 index 978a9a0cc88f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/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/backupdr/v1/backupdr" -require "google/cloud/backupdr/v1/backup_dr_protection_summary" -require "google/cloud/backupdr/v1/version" - -module Google - module Cloud - module BackupDR - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/backupdr/v1" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/backupdr/v1" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/backupdr/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb deleted file mode 100644 index 52b98449e819..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.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/backupdr/v1/version" - -require "google/cloud/backupdr/v1/backup_dr_protection_summary/credentials" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/paths" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/client" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" - -module Google - module Cloud - module BackupDR - module V1 - ## - # The Protection Summary service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/backupdr/v1/backup_dr_protection_summary" - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new - # - module BackupDrProtectionSummary - end - end - end - end -end - -helper_path = ::File.join __dir__, "backup_dr_protection_summary", "helpers.rb" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb deleted file mode 100644 index f5245ab36d7b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb +++ /dev/null @@ -1,532 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/backupdr/v1/protection_summary_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDrProtectionSummary - ## - # Client for the BackupDrProtectionSummary service. - # - # The Protection Summary service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_dr_protection_summary_stub - - ## - # Configure the BackupDrProtectionSummary Client class. - # - # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupDrProtectionSummary clients - # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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", "BackupDR", "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_resource_backup_configs.timeout = 60.0 - default_config.rpcs.list_resource_backup_configs.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 BackupDrProtectionSummary 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::BackupDR::V1::BackupDrProtectionSummary::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 - @backup_dr_protection_summary_stub.universe_domain - end - - ## - # Create a new BackupDrProtectionSummary client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupDrProtectionSummary 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/backupdr/v1/protection_summary_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 - - @backup_dr_protection_summary_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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 - ) - - @backup_dr_protection_summary_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 = @backup_dr_protection_summary_stub.endpoint - config.universe_domain = @backup_dr_protection_summary_stub.universe_domain - config.logger = @backup_dr_protection_summary_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 = @backup_dr_protection_summary_stub.endpoint - config.universe_domain = @backup_dr_protection_summary_stub.universe_domain - config.logger = @backup_dr_protection_summary_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 - - ## - # 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 - @backup_dr_protection_summary_stub.logger - end - - # Service calls - - ## - # Lists ResourceBackupConfigs. - # - # @overload list_resource_backup_configs(request, options = nil) - # Pass arguments to `list_resource_backup_configs` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve resource backup - # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will use 100 as default. Maximum value is - # 500 and values above 500 will be coerced to 500. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new - # - # # Call the list_resource_backup_configs method. - # result = client.list_resource_backup_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::BackupDR::V1::ResourceBackupConfig. - # p item - # end - # - def list_resource_backup_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest - - # Converts hash and nil to an 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_backup_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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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_backup_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_protection_summary_stub.call_rpc :list_resource_backup_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_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 BackupDrProtectionSummary API. - # - # This class represents the configuration for BackupDrProtectionSummary, - # providing control 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::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_resource_backup_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_resource_backup_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_resource_backup_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::BackupDR::V1::BackupDrProtectionSummary::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 = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::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 BackupDrProtectionSummary API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_resource_backup_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_backup_configs - - # @private - def initialize parent_rpcs = nil - list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs - @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_configs_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb deleted file mode 100644 index 94614c32dfd5..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/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 BackupDR - module V1 - module BackupDrProtectionSummary - # Credentials for the BackupDrProtectionSummary 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-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb deleted file mode 100644 index cbaeba7a3956..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/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 BackupDR - module V1 - module BackupDrProtectionSummary - # Path helper methods for the BackupDrProtectionSummary API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb deleted file mode 100644 index 38b3a06e8a03..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/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/backupdr/v1/version" -require "google/cloud/backupdr/v1/bindings_override" - -require "google/cloud/backupdr/v1/backup_dr_protection_summary/credentials" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/paths" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client" - -module Google - module Cloud - module BackupDR - module V1 - ## - # The Protection Summary service. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new - # - module BackupDrProtectionSummary - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb deleted file mode 100644 index 74b1c5ff1835..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb +++ /dev/null @@ -1,491 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/backupdr/v1/protection_summary_pb" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDrProtectionSummary - module Rest - ## - # REST client for the BackupDrProtectionSummary service. - # - # The Protection Summary service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_dr_protection_summary_stub - - ## - # Configure the BackupDrProtectionSummary Client class. - # - # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupDrProtectionSummary clients - # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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", "BackupDR", "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_resource_backup_configs.timeout = 60.0 - default_config.rpcs.list_resource_backup_configs.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 BackupDrProtectionSummary 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::BackupDR::V1::BackupDrProtectionSummary::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 - @backup_dr_protection_summary_stub.universe_domain - end - - ## - # Create a new BackupDrProtectionSummary REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupDrProtectionSummary 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 - - @backup_dr_protection_summary_stub = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @backup_dr_protection_summary_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 = @backup_dr_protection_summary_stub.endpoint - config.universe_domain = @backup_dr_protection_summary_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_dr_protection_summary_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 = @backup_dr_protection_summary_stub.endpoint - config.universe_domain = @backup_dr_protection_summary_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_dr_protection_summary_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 - - ## - # 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 - @backup_dr_protection_summary_stub.logger - end - - # Service calls - - ## - # Lists ResourceBackupConfigs. - # - # @overload list_resource_backup_configs(request, options = nil) - # Pass arguments to `list_resource_backup_configs` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve resource backup - # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will use 100 as default. Maximum value is - # 500 and values above 500 will be coerced to 500. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new - # - # # Call the list_resource_backup_configs method. - # result = client.list_resource_backup_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::BackupDR::V1::ResourceBackupConfig. - # p item - # end - # - def list_resource_backup_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest - - # Converts hash and nil to an options 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_backup_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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_backup_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_protection_summary_stub.list_resource_backup_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_configs, "resource_backup_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 BackupDrProtectionSummary REST API. - # - # This class represents the configuration for BackupDrProtectionSummary 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::BackupDR::V1::BackupDrProtectionSummary::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_resource_backup_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_resource_backup_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_resource_backup_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 = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::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 BackupDrProtectionSummary API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_resource_backup_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_backup_configs - - # @private - def initialize parent_rpcs = nil - list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs - @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_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-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb deleted file mode 100644 index b788e5ec9af1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/backupdr/v1/protection_summary_pb" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDrProtectionSummary - module Rest - ## - # REST service stub for the BackupDrProtectionSummary 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_resource_backup_configs REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse] - # A result object deserialized from the server's reply - def list_resource_backup_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_backup_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_backup_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.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_resource_backup_configs REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest] - # A 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_backup_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/resourceBackupConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb deleted file mode 100644 index 9807b8cc2845..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.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/backupdr/v1/version" - -require "google/cloud/backupdr/v1/backupdr/credentials" -require "google/cloud/backupdr/v1/backupdr/paths" -require "google/cloud/backupdr/v1/backupdr/operations" -require "google/cloud/backupdr/v1/backupdr/client" -require "google/cloud/backupdr/v1/backupdr/rest" - -module Google - module Cloud - module BackupDR - module V1 - ## - # The BackupDR Service - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/backupdr/v1/backupdr" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/backupdr/v1/backupdr/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module BackupDR - end - end - end - end -end - -helper_path = ::File.join __dir__, "backupdr", "helpers.rb" -require "google/cloud/backupdr/v1/backupdr/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb deleted file mode 100644 index 30e7a373b7e0..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb +++ /dev/null @@ -1,4788 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/backupdr/v1/backupdr_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - ## - # Client for the BackupDR service. - # - # The BackupDR Service - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_dr_stub - - ## - # Configure the BackupDR Client class. - # - # See {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupDR clients - # ::Google::Cloud::BackupDR::V1::BackupDR::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", "BackupDR", "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_management_servers.timeout = 60.0 - default_config.rpcs.list_management_servers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_management_server.timeout = 60.0 - default_config.rpcs.get_management_server.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_management_server.timeout = 60.0 - - default_config.rpcs.delete_management_server.timeout = 60.0 - - default_config.rpcs.create_backup_vault.timeout = 60.0 - default_config.rpcs.create_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_backup_vaults.timeout = 60.0 - default_config.rpcs.list_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 - default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_vault.timeout = 60.0 - default_config.rpcs.get_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup_vault.timeout = 60.0 - - default_config.rpcs.delete_backup_vault.timeout = 60.0 - default_config.rpcs.delete_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_sources.timeout = 60.0 - default_config.rpcs.list_data_sources.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_source.timeout = 60.0 - default_config.rpcs.get_data_source.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_source.timeout = 60.0 - - default_config.rpcs.list_backups.timeout = 60.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup.timeout = 60.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup.timeout = 60.0 - - default_config.rpcs.restore_backup.timeout = 60.0 - - default_config.rpcs.initialize_service.timeout = 60.0 - default_config.rpcs.initialize_service.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 BackupDR 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::BackupDR::V1::BackupDR::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 - @backup_dr_stub.universe_domain - end - - ## - # Create a new BackupDR client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupDR 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/backupdr/v1/backupdr_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 - - @backup_dr_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BackupDR::V1::BackupDR::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 - ) - - @backup_dr_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 = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.logger = @backup_dr_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 = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.logger = @backup_dr_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BackupDR::V1::BackupDR::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 - @backup_dr_stub.logger - end - - # Service calls - - ## - # Lists ManagementServers in a given project and location. - # - # @overload list_management_servers(request, options = nil) - # Pass arguments to `list_management_servers` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_management_servers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve management servers - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud BackupDR, locations map to Google Cloud regions, for example - # **us-central1**. To retrieve management servers for all locations, use "-" - # for the - # '\\{location}' value. - # @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. 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::BackupDR::V1::ManagementServer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new - # - # # Call the list_management_servers method. - # result = client.list_management_servers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. - # p item - # end - # - def list_management_servers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_management_servers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_management_servers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_management_servers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_management_servers, request, response, 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 ManagementServer. - # - # @overload get_management_server(request, options = nil) - # Pass arguments to `get_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_management_server(name: nil) - # Pass arguments to `get_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 management server resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::ManagementServer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new - # - # # Call the get_management_server method. - # result = client.get_management_server request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. - # p result - # - def get_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_management_server, request, 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 ManagementServer in a given project and location. - # - # @overload create_management_server(request, options = nil) - # Pass arguments to `create_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) - # Pass arguments to `create_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The management server project and location in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR - # locations map to Google Cloud regions, for example **us-central1**. - # @param management_server_id [::String] - # Required. The name of the management server to create. The name must be - # unique for the specified project and location. - # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] - # Required. A [management server - # resource][google.cloud.backupdr.v1.ManagementServer] - # @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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new - # - # # Call the create_management_server method. - # result = client.create_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest - - # Converts hash and nil to 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_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_management_server.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_management_server, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 ManagementServer. - # - # @overload delete_management_server(request, options = nil) - # Pass arguments to `delete_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_management_server(name: nil, request_id: nil) - # Pass arguments to `delete_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new - # - # # Call the delete_management_server method. - # result = client.delete_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest - - # Converts hash and nil to 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_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_management_server.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_management_server, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new BackupVault in a given project and location. - # - # @overload create_backup_vault(request, options = nil) - # Pass arguments to `create_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 backup_vault_id [::String] - # Required. ID of the requesting object - # If auto-generating ID server-side, remove this field and - # backup_vault_id from the method_signature of Create RPC - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::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). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new - # - # # Call the create_backup_vault method. - # result = client.create_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest - - # Converts hash and nil to 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_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_backup_vault, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 BackupVaults in a given project and location. - # - # @overload list_backup_vaults(request, options = nil) - # Pass arguments to `list_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @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. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new - # - # # Call the list_backup_vaults method. - # result = client.list_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def list_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest - - # Converts hash and nil to an 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_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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_vaults.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_vaults, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchUsableBackupVaults lists usable BackupVaults in a given project and - # location. Usable BackupVault are the ones that user has - # backupdr.backupVaults.get permission. - # - # @overload fetch_usable_backup_vaults(request, options = nil) - # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @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. 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::BackupDR::V1::BackupVault>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new - # - # # Call the fetch_usable_backup_vaults method. - # result = client.fetch_usable_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def fetch_usable_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest - - # Converts hash and nil to 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_usable_backup_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_usable_backup_vaults.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_usable_backup_vaults, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, request, response, 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 BackupVault. - # - # @overload get_backup_vault(request, options = nil) - # Pass arguments to `get_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_vault(name: nil, view: nil) - # Pass arguments to `get_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 backupvault store resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupVault] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new - # - # # Call the get_backup_vault method. - # result = client.get_backup_vault request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. - # p result - # - def get_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest - - # Converts hash and nil to an 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_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_vault, request, 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 settings of a BackupVault. - # - # @overload update_backup_vault(request, options = nil) - # Pass arguments to `update_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) - # Pass arguments to `update_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # BackupVault 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 the request will fail. - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] - # Required. The resource being updated - # @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). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param force [::Boolean] - # Optional. If set to true, will not check plan duration against backup vault - # enforcement duration. - # @param force_update_access_restriction [::Boolean] - # Optional. If set to true, we will force update access restriction even if - # some non compliant data sources are present. The default is 'false'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new - # - # # Call the update_backup_vault method. - # result = client.update_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest - - # Converts hash and nil to 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_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-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_vault&.name - header_params["backup_vault.name"] = request.backup_vault.name - end - - request_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_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup_vault, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 BackupVault. - # - # @overload delete_backup_vault(request, options = nil) - # Pass arguments to `delete_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) - # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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, any data source from this backup vault will also - # be deleted. - # @param etag [::String] - # The current etag of the backup vault. - # If an etag is provided and does not match the current etag of the - # connection, deletion will be blocked. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param allow_missing [::Boolean] - # Optional. If true and the BackupVault is not found, the request will - # succeed but no action will be taken. - # @param ignore_backup_plan_references [::Boolean] - # Optional. If set to true, backupvault deletion will proceed even if there - # are backup plans referencing the backupvault. The default is 'false'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new - # - # # Call the delete_backup_vault method. - # result = client.delete_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest - - # Converts hash and nil to 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_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup_vault, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 DataSources in a given project and location. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve data - # sources information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @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. 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::BackupDR::V1::DataSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_data_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a DataSource. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a DataSource. - # - # @overload update_data_source(request, options = nil) - # Pass arguments to `update_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) - # Pass arguments to `update_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # DataSource 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 the request will fail. - # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] - # Required. The resource being updated - # @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). - # @param allow_missing [::Boolean] - # Optional. Enable upsert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new - # - # # Call the update_data_source method. - # result = client.update_data_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 update_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_source&.name - header_params["data_source.name"] = request.data_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_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_data_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 Backups in a given project and location. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::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, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: 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 project and location for which to retrieve backup - # information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @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. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::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::BackupDR::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::BackupDR::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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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 - - @backup_dr_stub.call_rpc :list_backups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_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 - - ## - # Fetch Backups for a given resource type. - # - # @overload fetch_backups_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Datasources are the parent resource for the backups. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sqladmin.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of Backups to return. The service may - # return fewer than this value. If unspecified, at most 50 - # Backups will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. This parameter is used to specify the view of the backup. - # If not specified, the default view is BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new - # - # # Call the fetch_backups_for_resource_type method. - # result = client.fetch_backups_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - # p item - # end - # - def fetch_backups_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest - - # Converts hash and nil to 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_backups_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_backups_for_resource_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_backups_for_resource_type, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, request, response, 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 Backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::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, view: 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 data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::Backup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::BackupDR::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::BackupDR::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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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 - - @backup_dr_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 the settings of a Backup. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::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(update_mask: nil, backup: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Backup 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 the request will fail. - # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] - # Required. The resource being updated - # @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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_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 update_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::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::BackupDR::V1::VERSION - metadata[:"x-goog-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 - - @backup_dr_stub.call_rpc :update_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 - - ## - # Deletes a Backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::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, request_id: 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 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_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 delete_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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 - - @backup_dr_stub.call_rpc :delete_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 - - ## - # Restore from a Backup - # - # @overload restore_backup(request, options = nil) - # Pass arguments to `restore_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) - # Pass arguments to `restore_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. The resource name of the Backup instance, in the format - # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. - # @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 compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] - # Compute Engine target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. 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 disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] - # Disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. 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 region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] - # Region disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. 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 compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] - # Compute Engine instance properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. 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 disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] - # Disk properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. 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 clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A field mask used to clear server-side default values - # for fields within the `instance_properties` oneof. - # - # When a field in this mask is cleared, the server will not apply its - # default logic (like inheriting a value from the source) for that field. - # - # The most common current use case is clearing default encryption keys. - # - # Examples of field mask paths: - # - Compute Instance Disks: - # `compute_instance_restore_properties.disks.*.disk_encryption_key` - # - Single Disk: `disk_restore_properties.disk_encryption_key` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new - # - # # Call the restore_backup method. - # result = client.restore_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 restore_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest - - # Converts hash and nil to 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_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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restore_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :restore_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 - - ## - # Create a BackupPlan - # - # @overload create_backup_plan(request, options = nil) - # Pass arguments to `create_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) - # Pass arguments to `create_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The `BackupPlan` project and location in the format - # `projects/{project}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @param backup_plan_id [::String] - # Required. The name of the `BackupPlan` to create. The name must be unique - # for the specified project and location.The name must start with a lowercase - # letter followed by up to 62 lowercase letters, numbers, or hyphens. - # Pattern, /[a-z][a-z0-9-]\\{,62}/. - # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The `BackupPlan` resource object to create. - # @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 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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new - # - # # Call the create_backup_plan method. - # result = client.create_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest - - # Converts hash and nil to 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_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_backup_plan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 BackupPlan. - # - # @overload update_backup_plan(request, options = nil) - # Pass arguments to `update_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan(backup_plan: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan` via keyword arguments. Note that at - # least one keyword argument is 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_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlan 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 the request will fail. - # Currently, these fields are supported in update: description, schedules, - # retention period, adding and removing Backup Rules. - # @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 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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new - # - # # Call the update_backup_plan method. - # result = client.update_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest - - # Converts hash and nil to 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_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-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_plan&.name - header_params["backup_plan.name"] = request.backup_plan.name - end - - request_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_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup_plan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlan. - # - # @overload get_backup_plan(request, options = nil) - # Pass arguments to `get_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan(name: nil) - # Pass arguments to `get_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 `BackupPlan` to retrieve. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlan] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new - # - # # Call the get_backup_plan method. - # result = client.get_backup_plan request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. - # p result - # - def get_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest - - # Converts hash and nil to an 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_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_plan, request, 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 BackupPlans in a given project and location. - # - # @overload list_backup_plans(request, options = nil) - # Pass arguments to `list_backup_plans` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_plans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve `BackupPlans` - # information. Format: `projects/{project}/locations/{location}`. In Cloud - # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - # retrieve backup plans for all locations, use "-" for the - # `{location}` value. - # @param page_size [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new - # - # # Call the list_backup_plans method. - # result = client.list_backup_plans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. - # p item - # end - # - def list_backup_plans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest - - # Converts hash and nil to an 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_plans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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_plans.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_plans, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single BackupPlan. - # - # @overload delete_backup_plan(request, options = nil) - # Pass arguments to `delete_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 `BackupPlan` to delete. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new - # - # # Call the delete_backup_plan method. - # result = client.delete_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest - - # Converts hash and nil to 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_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup_plan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlanRevision. - # - # @overload get_backup_plan_revision(request, options = nil) - # Pass arguments to `get_backup_plan_revision` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_revision(name: nil) - # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 `BackupPlanRevision` to retrieve. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new - # - # # Call the get_backup_plan_revision method. - # result = client.get_backup_plan_revision request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p result - # - def get_backup_plan_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest - - # Converts hash and nil to an 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_plan_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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_plan_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_plan_revision, request, 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 BackupPlanRevisions in a given project and location. - # - # @overload list_backup_plan_revisions(request, options = nil) - # Pass arguments to `list_backup_plan_revisions` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_revisions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve - # `BackupPlanRevisions` information. Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In - # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. - # @param page_size [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` 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::BackupDR::V1::BackupPlanRevision>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new - # - # # Call the list_backup_plan_revisions method. - # result = client.list_backup_plan_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p item - # end - # - def list_backup_plan_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest - - # Converts hash and nil to an 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_plan_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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_plan_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_plan_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a BackupPlanAssociation - # - # @overload create_backup_plan_association(request, options = nil) - # Pass arguments to `create_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) - # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The backup plan association project and location in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @param backup_plan_association_id [::String] - # Required. The name of the backup plan association to create. The name must - # be unique for the specified project and location. - # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::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 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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new - # - # # Call the create_backup_plan_association method. - # result = client.create_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest - - # Converts hash and nil to 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_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_backup_plan_association, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 BackupPlanAssociation. - # - # @overload update_backup_plan_association(request, options = nil) - # Pass arguments to `update_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is 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_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlanAssociation 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 the request will fail. - # Currently backup_plan_association.backup_plan is the only supported field. - # @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 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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new - # - # # Call the update_backup_plan_association method. - # result = client.update_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest - - # Converts hash and nil to 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_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-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_plan_association&.name - header_params["backup_plan_association.name"] = request.backup_plan_association.name - end - - request_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_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup_plan_association, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlanAssociation. - # - # @overload get_backup_plan_association(request, options = nil) - # Pass arguments to `get_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_association(name: nil) - # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new - # - # # Call the get_backup_plan_association method. - # result = client.get_backup_plan_association request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p result - # - def get_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest - - # Converts hash and nil to an 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_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_plan_association, request, 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 BackupPlanAssociations in a given project and location. - # - # @overload list_backup_plan_associations(request, options = nil) - # Pass arguments to `list_backup_plan_associations` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backup Plan - # Associations information, in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - # map to GCP regions, for example **us-central1**. To retrieve backup plan - # associations for all locations, use "-" for the - # `{location}` value. - # @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. Filtering results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new - # - # # Call the list_backup_plan_associations method. - # result = client.list_backup_plan_associations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def list_backup_plan_associations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest - - # Converts hash and nil to an 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_plan_associations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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_plan_associations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_plan_associations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List BackupPlanAssociations for a given resource type. - # - # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of BackupPlanAssociations to return. The - # service may return fewer than this value. If unspecified, at most 50 - # BackupPlanAssociations will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupPlanAssociationsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupPlanAssociationsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * resource - # * backup_plan - # * state - # * data_source - # * cloud_sql_instance_backup_plan_association_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new - # - # # Call the fetch_backup_plan_associations_for_resource_type method. - # result = client.fetch_backup_plan_associations_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def fetch_backup_plan_associations_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest - - # Converts hash and nil to 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_backup_plan_associations_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_backup_plan_associations_for_resource_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_backup_plan_associations_for_resource_type, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single BackupPlanAssociation. - # - # @overload delete_backup_plan_association(request, options = nil) - # Pass arguments to `delete_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_association(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new - # - # # Call the delete_backup_plan_association method. - # result = client.delete_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest - - # Converts hash and nil to 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_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup_plan_association, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Triggers a new Backup. - # - # @overload trigger_backup(request, options = nil) - # Pass arguments to `trigger_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) - # Pass arguments to `trigger_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 plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @param rule_id [::String] - # Required. backup rule_id for which a backup needs to be triggered. - # @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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new - # - # # Call the trigger_backup method. - # result = client.trigger_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 trigger_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.trigger_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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.trigger_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :trigger_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 details of a single DataSourceReference. - # - # @overload get_data_source_reference(request, options = nil) - # Pass arguments to `get_data_source_reference` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_source_reference(name: nil) - # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 DataSourceReference to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSourceReference] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new - # - # # Call the get_data_source_reference method. - # result = client.get_data_source_reference request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. - # p result - # - def get_data_source_reference request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_source_reference.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_source_reference.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_data_source_reference, request, 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 DataSourceReferences for a given project and location. - # - # @overload list_data_source_references(request, options = nil) - # Pass arguments to `list_data_source_references` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_source_references` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataSourceReferences` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDataSourceReferences` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. A filter expression that filters the results listed in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. - # - # The following field and operator combinations are supported: - # - # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` - # * data_source_gcp_resource_info.type with `=`, `!=` - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new - # - # # Call the list_data_source_references method. - # result = client.list_data_source_references request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def list_data_source_references request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_source_references.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_source_references.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_data_source_references, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch DataSourceReferences for a given project, location and resource type. - # - # @overload fetch_data_source_references_for_resource_type(request, options = nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchDataSourceReferencesForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchDataSourceReferencesForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_backup_config_state - # * data_source_backup_count - # * data_source_backup_config_info.last_backup_state - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_gcp_resource_info.type - # * data_source_gcp_resource_info.location - # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new - # - # # Call the fetch_data_source_references_for_resource_type method. - # result = client.fetch_data_source_references_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def fetch_data_source_references_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest - - # Converts hash and nil to 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_data_source_references_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_data_source_references_for_resource_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_data_source_references_for_resource_type, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Initializes the service related config for a project. - # - # @overload initialize_service(request, options = nil) - # Pass arguments to `initialize_service` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) - # Pass arguments to `initialize_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 resource name of the serviceConfig used to initialize the - # service. Format: - # `projects/{project_id}/locations/{location}/serviceConfig`. - # @param resource_type [::String] - # Required. The resource type to which the default service config will be - # applied. Examples include, "compute.googleapis.com/Instance" and - # "storage.googleapis.com/Bucket". - # @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 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). - # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] - # Optional. The configuration for initializing a Cloud SQL 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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new - # - # # Call the initialize_service method. - # result = client.initialize_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 initialize_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.initialize_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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.initialize_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :initialize_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 - - ## - # Configuration class for the BackupDR API. - # - # This class represents the configuration for BackupDR, - # providing control 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::BackupDR::V1::BackupDR::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_management_servers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::BackupDR::V1::BackupDR::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 = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::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 BackupDR API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_management_servers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_management_servers - ## - # RPC-specific configuration for `get_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :get_management_server - ## - # RPC-specific configuration for `create_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :create_management_server - ## - # RPC-specific configuration for `delete_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_management_server - ## - # RPC-specific configuration for `create_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_vault - ## - # RPC-specific configuration for `list_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_vaults - ## - # RPC-specific configuration for `fetch_usable_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_usable_backup_vaults - ## - # RPC-specific configuration for `get_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_vault - ## - # RPC-specific configuration for `update_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_vault - ## - # RPC-specific configuration for `delete_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_vault - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `update_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_source - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `fetch_backups_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backups_for_resource_type - ## - # 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 `restore_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_backup - ## - # RPC-specific configuration for `create_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan - ## - # RPC-specific configuration for `update_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan - ## - # RPC-specific configuration for `get_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan - ## - # RPC-specific configuration for `list_backup_plans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plans - ## - # RPC-specific configuration for `delete_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan - ## - # RPC-specific configuration for `get_backup_plan_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_revision - ## - # RPC-specific configuration for `list_backup_plan_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_revisions - ## - # RPC-specific configuration for `create_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan_association - ## - # RPC-specific configuration for `update_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan_association - ## - # RPC-specific configuration for `get_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_association - ## - # RPC-specific configuration for `list_backup_plan_associations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_associations - ## - # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backup_plan_associations_for_resource_type - ## - # RPC-specific configuration for `delete_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan_association - ## - # RPC-specific configuration for `trigger_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_backup - ## - # RPC-specific configuration for `get_data_source_reference` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source_reference - ## - # RPC-specific configuration for `list_data_source_references` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_source_references - ## - # RPC-specific configuration for `fetch_data_source_references_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_data_source_references_for_resource_type - ## - # RPC-specific configuration for `initialize_service` - # @return [::Gapic::Config::Method] - # - attr_reader :initialize_service - - # @private - def initialize parent_rpcs = nil - list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers - @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config - get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server - @get_management_server = ::Gapic::Config::Method.new get_management_server_config - create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server - @create_management_server = ::Gapic::Config::Method.new create_management_server_config - delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server - @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config - create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault - @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config - list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults - @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config - fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults - @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config - get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault - @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config - update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault - @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config - delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault - @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source - @update_data_source = ::Gapic::Config::Method.new update_data_source_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type - @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_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 - restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup - @restore_backup = ::Gapic::Config::Method.new restore_backup_config - create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan - @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config - update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan - @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config - get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan - @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config - list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans - @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config - delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan - @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config - get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision - @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config - list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions - @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config - create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association - @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config - update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association - @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config - get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association - @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config - list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations - @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config - fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type - @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config - delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association - @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config - trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup - @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config - get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference - @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config - list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references - @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config - fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type - @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config - initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service - @initialize_service = ::Gapic::Config::Method.new initialize_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb deleted file mode 100644 index f6fc3fd1ca69..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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 BackupDR - module V1 - module BackupDR - # Credentials for the BackupDR 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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb deleted file mode 100644 index ad52ac7ba1c1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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 BackupDR - module V1 - module BackupDR - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BackupDR 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 BackupDR 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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::BackupDR::V1::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 = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb deleted file mode 100644 index 298a5882fa27..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb +++ /dev/null @@ -1,309 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - # Path helper methods for the BackupDR API. - module Paths - ## - # Create a fully-qualified Backup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}` - # - # @param project [String] - # @param location [String] - # @param backupvault [String] - # @param datasource [String] - # @param backup [String] - # - # @return [::String] - def backup_path project:, location:, backupvault:, datasource:, backup: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" - raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}/backups/#{backup}" - end - - ## - # Create a fully-qualified BackupPlan resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # - # @param project [String] - # @param location [String] - # @param backup_plan [String] - # - # @return [::String] - def backup_plan_path project:, location:, backup_plan: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}" - end - - ## - # Create a fully-qualified BackupPlanAssociation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}` - # - # @param project [String] - # @param location [String] - # @param backup_plan_association [String] - # - # @return [::String] - def backup_plan_association_path project:, location:, backup_plan_association: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlanAssociations/#{backup_plan_association}" - end - - ## - # Create a fully-qualified BackupPlanRevision resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # - # @param project [String] - # @param location [String] - # @param backup_plan [String] - # @param revision [String] - # - # @return [::String] - def backup_plan_revision_path project:, location:, backup_plan:, revision: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/revisions/#{revision}" - end - - ## - # Create a fully-qualified BackupVault resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupVaults/{backupvault}` - # - # @param project [String] - # @param location [String] - # @param backupvault [String] - # - # @return [::String] - def backup_vault_path project:, location:, backupvault: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}" - end - - ## - # Create a fully-qualified Cluster resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/clusters/{cluster}` - # - # @param project [String] - # @param location [String] - # @param cluster [String] - # - # @return [::String] - def cluster_path project:, location:, cluster: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/clusters/#{cluster}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}` - # - # @param project [String] - # @param location [String] - # @param ring [String] - # @param key [String] - # - # @return [::String] - def crypto_key_path project:, location:, ring:, key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "ring cannot contain /" if ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{ring}/cryptoKeys/#{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 DataSource resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}` - # - # @param project [String] - # @param location [String] - # @param backupvault [String] - # @param datasource [String] - # - # @return [::String] - def data_source_path project:, location:, backupvault:, datasource: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}" - end - - ## - # Create a fully-qualified DataSourceReference resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}` - # - # @param project [String] - # @param location [String] - # @param data_source_reference [String] - # - # @return [::String] - def data_source_reference_path project:, location:, data_source_reference: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataSourceReferences/#{data_source_reference}" - 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 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 ManagementServer resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/managementServers/{managementserver}` - # - # @param project [String] - # @param location [String] - # @param managementserver [String] - # - # @return [::String] - def management_server_path project:, location:, managementserver: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/managementServers/#{managementserver}" - end - - ## - # Create a fully-qualified StoragePool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/zones/{zone}/storagePools/{storage_pool}` - # - # @param project [String] - # @param zone [String] - # @param storage_pool [String] - # - # @return [::String] - def storage_pool_path project:, zone:, storage_pool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/zones/#{zone}/storagePools/#{storage_pool}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb deleted file mode 100644 index 5b7fba263be4..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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/backupdr/v1/version" -require "google/cloud/backupdr/v1/bindings_override" - -require "google/cloud/backupdr/v1/backupdr/credentials" -require "google/cloud/backupdr/v1/backupdr/paths" -require "google/cloud/backupdr/v1/backupdr/rest/operations" -require "google/cloud/backupdr/v1/backupdr/rest/client" - -module Google - module Cloud - module BackupDR - module V1 - ## - # The BackupDR Service - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/backupdr/v1/backupdr/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module BackupDR - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/backupdr/v1/backupdr/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb deleted file mode 100644 index b3b3918968ab..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb +++ /dev/null @@ -1,4495 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - module Rest - ## - # REST client for the BackupDR service. - # - # The BackupDR Service - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_dr_stub - - ## - # Configure the BackupDR Client class. - # - # See {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupDR clients - # ::Google::Cloud::BackupDR::V1::BackupDR::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", "BackupDR", "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_management_servers.timeout = 60.0 - default_config.rpcs.list_management_servers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_management_server.timeout = 60.0 - default_config.rpcs.get_management_server.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_management_server.timeout = 60.0 - - default_config.rpcs.delete_management_server.timeout = 60.0 - - default_config.rpcs.create_backup_vault.timeout = 60.0 - default_config.rpcs.create_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_backup_vaults.timeout = 60.0 - default_config.rpcs.list_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 - default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_vault.timeout = 60.0 - default_config.rpcs.get_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup_vault.timeout = 60.0 - - default_config.rpcs.delete_backup_vault.timeout = 60.0 - default_config.rpcs.delete_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_sources.timeout = 60.0 - default_config.rpcs.list_data_sources.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_source.timeout = 60.0 - default_config.rpcs.get_data_source.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_source.timeout = 60.0 - - default_config.rpcs.list_backups.timeout = 60.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup.timeout = 60.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup.timeout = 60.0 - - default_config.rpcs.restore_backup.timeout = 60.0 - - default_config.rpcs.initialize_service.timeout = 60.0 - default_config.rpcs.initialize_service.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 BackupDR 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::BackupDR::V1::BackupDR::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 - @backup_dr_stub.universe_domain - end - - ## - # Create a new BackupDR REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupDR 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::BackupDR::V1::BackupDR::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 - - @backup_dr_stub = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @backup_dr_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 = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_dr_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 = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_dr_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BackupDR::V1::BackupDR::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 - @backup_dr_stub.logger - end - - # Service calls - - ## - # Lists ManagementServers in a given project and location. - # - # @overload list_management_servers(request, options = nil) - # Pass arguments to `list_management_servers` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_management_servers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve management servers - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud BackupDR, locations map to Google Cloud regions, for example - # **us-central1**. To retrieve management servers for all locations, use "-" - # for the - # '\\{location}' value. - # @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. 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::BackupDR::V1::ManagementServer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new - # - # # Call the list_management_servers method. - # result = client.list_management_servers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. - # p item - # end - # - def list_management_servers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_management_servers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_management_servers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_management_servers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_management_servers, "management_servers", request, result, 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 ManagementServer. - # - # @overload get_management_server(request, options = nil) - # Pass arguments to `get_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_management_server(name: nil) - # Pass arguments to `get_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 management server resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new - # - # # Call the get_management_server method. - # result = client.get_management_server request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. - # p result - # - def get_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_management_server request, 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 ManagementServer in a given project and location. - # - # @overload create_management_server(request, options = nil) - # Pass arguments to `create_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) - # Pass arguments to `create_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The management server project and location in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR - # locations map to Google Cloud regions, for example **us-central1**. - # @param management_server_id [::String] - # Required. The name of the management server to create. The name must be - # unique for the specified project and location. - # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] - # Required. A [management server - # resource][google.cloud.backupdr.v1.ManagementServer] - # @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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new - # - # # Call the create_management_server method. - # result = client.create_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest - - # Converts hash and nil to an 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_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_management_server.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_management_server request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 ManagementServer. - # - # @overload delete_management_server(request, options = nil) - # Pass arguments to `delete_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_management_server(name: nil, request_id: nil) - # Pass arguments to `delete_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new - # - # # Call the delete_management_server method. - # result = client.delete_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest - - # Converts hash and nil to an 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_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_management_server.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_management_server request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupVault in a given project and location. - # - # @overload create_backup_vault(request, options = nil) - # Pass arguments to `create_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 backup_vault_id [::String] - # Required. ID of the requesting object - # If auto-generating ID server-side, remove this field and - # backup_vault_id from the method_signature of Create RPC - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::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). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new - # - # # Call the create_backup_vault method. - # result = client.create_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest - - # Converts hash and nil to an 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_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_backup_vault request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupVaults in a given project and location. - # - # @overload list_backup_vaults(request, options = nil) - # Pass arguments to `list_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @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. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new - # - # # Call the list_backup_vaults method. - # result = client.list_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def list_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest - - # Converts hash and nil to an options 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_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_vaults.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_vaults request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, "backup_vaults", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchUsableBackupVaults lists usable BackupVaults in a given project and - # location. Usable BackupVault are the ones that user has - # backupdr.backupVaults.get permission. - # - # @overload fetch_usable_backup_vaults(request, options = nil) - # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @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. 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::BackupDR::V1::BackupVault>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new - # - # # Call the fetch_usable_backup_vaults method. - # result = client.fetch_usable_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def fetch_usable_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest - - # Converts hash and nil to an 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_usable_backup_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_usable_backup_vaults.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_usable_backup_vaults request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, "backup_vaults", request, result, 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 BackupVault. - # - # @overload get_backup_vault(request, options = nil) - # Pass arguments to `get_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_vault(name: nil, view: nil) - # Pass arguments to `get_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 backupvault store resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new - # - # # Call the get_backup_vault method. - # result = client.get_backup_vault request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. - # p result - # - def get_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest - - # Converts hash and nil to an options 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_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_vault request, 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 settings of a BackupVault. - # - # @overload update_backup_vault(request, options = nil) - # Pass arguments to `update_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) - # Pass arguments to `update_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # BackupVault 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 the request will fail. - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] - # Required. The resource being updated - # @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). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param force [::Boolean] - # Optional. If set to true, will not check plan duration against backup vault - # enforcement duration. - # @param force_update_access_restriction [::Boolean] - # Optional. If set to true, we will force update access restriction even if - # some non compliant data sources are present. The default is 'false'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new - # - # # Call the update_backup_vault method. - # result = client.update_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest - - # Converts hash and nil to an 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_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup_vault request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupVault. - # - # @overload delete_backup_vault(request, options = nil) - # Pass arguments to `delete_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) - # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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, any data source from this backup vault will also - # be deleted. - # @param etag [::String] - # The current etag of the backup vault. - # If an etag is provided and does not match the current etag of the - # connection, deletion will be blocked. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param allow_missing [::Boolean] - # Optional. If true and the BackupVault is not found, the request will - # succeed but no action will be taken. - # @param ignore_backup_plan_references [::Boolean] - # Optional. If set to true, backupvault deletion will proceed even if there - # are backup plans referencing the backupvault. The default is 'false'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new - # - # # Call the delete_backup_vault method. - # result = client.delete_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest - - # Converts hash and nil to an 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_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup_vault request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 DataSources in a given project and location. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve data - # sources information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @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. 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::BackupDR::V1::DataSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_data_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_sources, "data_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a DataSource. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a DataSource. - # - # @overload update_data_source(request, options = nil) - # Pass arguments to `update_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) - # Pass arguments to `update_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # DataSource 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 the request will fail. - # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] - # Required. The resource being updated - # @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). - # @param allow_missing [::Boolean] - # Optional. Enable upsert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new - # - # # Call the update_data_source method. - # result = client.update_data_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 update_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_data_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 Backups in a given project and location. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::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, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: 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 project and location for which to retrieve backup - # information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @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. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::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::BackupDR::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::BackupDR::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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @backup_dr_stub.list_backups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_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 - - ## - # Fetch Backups for a given resource type. - # - # @overload fetch_backups_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Datasources are the parent resource for the backups. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sqladmin.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of Backups to return. The service may - # return fewer than this value. If unspecified, at most 50 - # Backups will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. This parameter is used to specify the view of the backup. - # If not specified, the default view is BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new - # - # # Call the fetch_backups_for_resource_type method. - # result = client.fetch_backups_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - # p item - # end - # - def fetch_backups_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest - - # Converts hash and nil to an 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_backups_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backups_for_resource_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_backups_for_resource_type request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, "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 - - ## - # Gets details of a Backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::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, view: 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 data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::BackupDR::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::BackupDR::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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @backup_dr_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 the settings of a Backup. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::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(update_mask: nil, backup: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Backup 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 the request will fail. - # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] - # Required. The resource being updated - # @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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_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 update_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @backup_dr_stub.update_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 - - ## - # Deletes a Backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::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, request_id: 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 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_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 delete_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @backup_dr_stub.delete_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 - - ## - # Restore from a Backup - # - # @overload restore_backup(request, options = nil) - # Pass arguments to `restore_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) - # Pass arguments to `restore_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. The resource name of the Backup instance, in the format - # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. - # @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 compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] - # Compute Engine target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. 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 disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] - # Disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. 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 region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] - # Region disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. 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 compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] - # Compute Engine instance properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. 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 disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] - # Disk properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. 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 clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A field mask used to clear server-side default values - # for fields within the `instance_properties` oneof. - # - # When a field in this mask is cleared, the server will not apply its - # default logic (like inheriting a value from the source) for that field. - # - # The most common current use case is clearing default encryption keys. - # - # Examples of field mask paths: - # - Compute Instance Disks: - # `compute_instance_restore_properties.disks.*.disk_encryption_key` - # - Single Disk: `disk_restore_properties.disk_encryption_key` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new - # - # # Call the restore_backup method. - # result = client.restore_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 restore_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest - - # Converts hash and nil to an 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_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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restore_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.restore_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 - - ## - # Create a BackupPlan - # - # @overload create_backup_plan(request, options = nil) - # Pass arguments to `create_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) - # Pass arguments to `create_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The `BackupPlan` project and location in the format - # `projects/{project}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @param backup_plan_id [::String] - # Required. The name of the `BackupPlan` to create. The name must be unique - # for the specified project and location.The name must start with a lowercase - # letter followed by up to 62 lowercase letters, numbers, or hyphens. - # Pattern, /[a-z][a-z0-9-]\\{,62}/. - # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The `BackupPlan` resource object to create. - # @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 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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new - # - # # Call the create_backup_plan method. - # result = client.create_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest - - # Converts hash and nil to an 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_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_backup_plan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupPlan. - # - # @overload update_backup_plan(request, options = nil) - # Pass arguments to `update_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan(backup_plan: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan` via keyword arguments. Note that at - # least one keyword argument is 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_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlan 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 the request will fail. - # Currently, these fields are supported in update: description, schedules, - # retention period, adding and removing Backup Rules. - # @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 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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new - # - # # Call the update_backup_plan method. - # result = client.update_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest - - # Converts hash and nil to an 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_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup_plan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupPlan. - # - # @overload get_backup_plan(request, options = nil) - # Pass arguments to `get_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan(name: nil) - # Pass arguments to `get_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 `BackupPlan` to retrieve. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new - # - # # Call the get_backup_plan method. - # result = client.get_backup_plan request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. - # p result - # - def get_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest - - # Converts hash and nil to an options 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_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_plan request, 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 BackupPlans in a given project and location. - # - # @overload list_backup_plans(request, options = nil) - # Pass arguments to `list_backup_plans` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_plans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve `BackupPlans` - # information. Format: `projects/{project}/locations/{location}`. In Cloud - # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - # retrieve backup plans for all locations, use "-" for the - # `{location}` value. - # @param page_size [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new - # - # # Call the list_backup_plans method. - # result = client.list_backup_plans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. - # p item - # end - # - def list_backup_plans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest - - # Converts hash and nil to an options 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_plans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_plans.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_plans request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, "backup_plans", request, result, 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 BackupPlan. - # - # @overload delete_backup_plan(request, options = nil) - # Pass arguments to `delete_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 `BackupPlan` to delete. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new - # - # # Call the delete_backup_plan method. - # result = client.delete_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest - - # Converts hash and nil to an 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_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup_plan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupPlanRevision. - # - # @overload get_backup_plan_revision(request, options = nil) - # Pass arguments to `get_backup_plan_revision` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_revision(name: nil) - # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 `BackupPlanRevision` to retrieve. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new - # - # # Call the get_backup_plan_revision method. - # result = client.get_backup_plan_revision request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p result - # - def get_backup_plan_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest - - # Converts hash and nil to an options 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_plan_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_plan_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_plan_revision request, 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 BackupPlanRevisions in a given project and location. - # - # @overload list_backup_plan_revisions(request, options = nil) - # Pass arguments to `list_backup_plan_revisions` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_revisions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve - # `BackupPlanRevisions` information. Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In - # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. - # @param page_size [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` 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::BackupDR::V1::BackupPlanRevision>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new - # - # # Call the list_backup_plan_revisions method. - # result = client.list_backup_plan_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p item - # end - # - def list_backup_plan_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest - - # Converts hash and nil to an options 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_plan_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_plan_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_plan_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, "backup_plan_revisions", request, result, 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 BackupPlanAssociation - # - # @overload create_backup_plan_association(request, options = nil) - # Pass arguments to `create_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) - # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The backup plan association project and location in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @param backup_plan_association_id [::String] - # Required. The name of the backup plan association to create. The name must - # be unique for the specified project and location. - # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::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 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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new - # - # # Call the create_backup_plan_association method. - # result = client.create_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest - - # Converts hash and nil to an 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_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_backup_plan_association request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupPlanAssociation. - # - # @overload update_backup_plan_association(request, options = nil) - # Pass arguments to `update_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is 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_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlanAssociation 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 the request will fail. - # Currently backup_plan_association.backup_plan is the only supported field. - # @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 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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new - # - # # Call the update_backup_plan_association method. - # result = client.update_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest - - # Converts hash and nil to an 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_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup_plan_association request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 BackupPlanAssociation. - # - # @overload get_backup_plan_association(request, options = nil) - # Pass arguments to `get_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_association(name: nil) - # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new - # - # # Call the get_backup_plan_association method. - # result = client.get_backup_plan_association request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p result - # - def get_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest - - # Converts hash and nil to an options 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_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_plan_association request, 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 BackupPlanAssociations in a given project and location. - # - # @overload list_backup_plan_associations(request, options = nil) - # Pass arguments to `list_backup_plan_associations` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backup Plan - # Associations information, in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - # map to GCP regions, for example **us-central1**. To retrieve backup plan - # associations for all locations, use "-" for the - # `{location}` value. - # @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. Filtering results - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new - # - # # Call the list_backup_plan_associations method. - # result = client.list_backup_plan_associations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def list_backup_plan_associations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest - - # Converts hash and nil to an options 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_plan_associations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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_plan_associations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_plan_associations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, "backup_plan_associations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List BackupPlanAssociations for a given resource type. - # - # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of BackupPlanAssociations to return. The - # service may return fewer than this value. If unspecified, at most 50 - # BackupPlanAssociations will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupPlanAssociationsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupPlanAssociationsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * resource - # * backup_plan - # * state - # * data_source - # * cloud_sql_instance_backup_plan_association_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new - # - # # Call the fetch_backup_plan_associations_for_resource_type method. - # result = client.fetch_backup_plan_associations_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def fetch_backup_plan_associations_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest - - # Converts hash and nil to an 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_backup_plan_associations_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_plan_associations_for_resource_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_backup_plan_associations_for_resource_type request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, "backup_plan_associations", request, result, 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 BackupPlanAssociation. - # - # @overload delete_backup_plan_association(request, options = nil) - # Pass arguments to `delete_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, 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_plan_association(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new - # - # # Call the delete_backup_plan_association method. - # result = client.delete_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest - - # Converts hash and nil to an 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_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup_plan_association request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Triggers a new Backup. - # - # @overload trigger_backup(request, options = nil) - # Pass arguments to `trigger_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) - # Pass arguments to `trigger_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 plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @param rule_id [::String] - # Required. backup rule_id for which a backup needs to be triggered. - # @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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new - # - # # Call the trigger_backup method. - # result = client.trigger_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 trigger_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.trigger_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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.trigger_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.trigger_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 details of a single DataSourceReference. - # - # @overload get_data_source_reference(request, options = nil) - # Pass arguments to `get_data_source_reference` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_source_reference(name: nil) - # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 DataSourceReference to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new - # - # # Call the get_data_source_reference method. - # result = client.get_data_source_reference request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. - # p result - # - def get_data_source_reference request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_source_reference.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_source_reference.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_data_source_reference request, 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 DataSourceReferences for a given project and location. - # - # @overload list_data_source_references(request, options = nil) - # Pass arguments to `list_data_source_references` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_source_references` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataSourceReferences` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDataSourceReferences` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. A filter expression that filters the results listed in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. - # - # The following field and operator combinations are supported: - # - # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` - # * data_source_gcp_resource_info.type with `=`, `!=` - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new - # - # # Call the list_data_source_references method. - # result = client.list_data_source_references request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def list_data_source_references request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_source_references.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_source_references.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_data_source_references request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, "data_source_references", request, result, 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 DataSourceReferences for a given project, location and resource type. - # - # @overload fetch_data_source_references_for_resource_type(request, options = nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchDataSourceReferencesForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchDataSourceReferencesForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_backup_config_state - # * data_source_backup_count - # * data_source_backup_config_info.last_backup_state - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_gcp_resource_info.type - # * data_source_gcp_resource_info.location - # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new - # - # # Call the fetch_data_source_references_for_resource_type method. - # result = client.fetch_data_source_references_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def fetch_data_source_references_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest - - # Converts hash and nil to an 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_data_source_references_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_data_source_references_for_resource_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_data_source_references_for_resource_type request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, "data_source_references", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Initializes the service related config for a project. - # - # @overload initialize_service(request, options = nil) - # Pass arguments to `initialize_service` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) - # Pass arguments to `initialize_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 resource name of the serviceConfig used to initialize the - # service. Format: - # `projects/{project_id}/locations/{location}/serviceConfig`. - # @param resource_type [::String] - # Required. The resource type to which the default service config will be - # applied. Examples include, "compute.googleapis.com/Instance" and - # "storage.googleapis.com/Bucket". - # @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 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). - # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] - # Optional. The configuration for initializing a Cloud SQL 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/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new - # - # # Call the initialize_service method. - # result = client.initialize_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 initialize_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.initialize_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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.initialize_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.initialize_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 - - ## - # Configuration class for the BackupDR REST API. - # - # This class represents the configuration for BackupDR 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::BackupDR::V1::BackupDR::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_management_servers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::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 BackupDR API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_management_servers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_management_servers - ## - # RPC-specific configuration for `get_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :get_management_server - ## - # RPC-specific configuration for `create_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :create_management_server - ## - # RPC-specific configuration for `delete_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_management_server - ## - # RPC-specific configuration for `create_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_vault - ## - # RPC-specific configuration for `list_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_vaults - ## - # RPC-specific configuration for `fetch_usable_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_usable_backup_vaults - ## - # RPC-specific configuration for `get_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_vault - ## - # RPC-specific configuration for `update_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_vault - ## - # RPC-specific configuration for `delete_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_vault - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `update_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_source - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `fetch_backups_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backups_for_resource_type - ## - # 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 `restore_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_backup - ## - # RPC-specific configuration for `create_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan - ## - # RPC-specific configuration for `update_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan - ## - # RPC-specific configuration for `get_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan - ## - # RPC-specific configuration for `list_backup_plans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plans - ## - # RPC-specific configuration for `delete_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan - ## - # RPC-specific configuration for `get_backup_plan_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_revision - ## - # RPC-specific configuration for `list_backup_plan_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_revisions - ## - # RPC-specific configuration for `create_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan_association - ## - # RPC-specific configuration for `update_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan_association - ## - # RPC-specific configuration for `get_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_association - ## - # RPC-specific configuration for `list_backup_plan_associations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_associations - ## - # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backup_plan_associations_for_resource_type - ## - # RPC-specific configuration for `delete_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan_association - ## - # RPC-specific configuration for `trigger_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_backup - ## - # RPC-specific configuration for `get_data_source_reference` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source_reference - ## - # RPC-specific configuration for `list_data_source_references` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_source_references - ## - # RPC-specific configuration for `fetch_data_source_references_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_data_source_references_for_resource_type - ## - # RPC-specific configuration for `initialize_service` - # @return [::Gapic::Config::Method] - # - attr_reader :initialize_service - - # @private - def initialize parent_rpcs = nil - list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers - @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config - get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server - @get_management_server = ::Gapic::Config::Method.new get_management_server_config - create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server - @create_management_server = ::Gapic::Config::Method.new create_management_server_config - delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server - @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config - create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault - @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config - list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults - @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config - fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults - @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config - get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault - @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config - update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault - @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config - delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault - @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source - @update_data_source = ::Gapic::Config::Method.new update_data_source_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type - @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_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 - restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup - @restore_backup = ::Gapic::Config::Method.new restore_backup_config - create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan - @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config - update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan - @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config - get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan - @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config - list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans - @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config - delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan - @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config - get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision - @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config - list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions - @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config - create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association - @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config - update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association - @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config - get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association - @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config - list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations - @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config - fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type - @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config - delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association - @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config - trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup - @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config - get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference - @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config - list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references - @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config - fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type - @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config - initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service - @initialize_service = ::Gapic::Config::Method.new initialize_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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb deleted file mode 100644 index 571ade73a8ae..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/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 BackupDR - module V1 - module BackupDR - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BackupDR 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 BackupDR 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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::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-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb deleted file mode 100644 index c6ef2555cab9..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb +++ /dev/null @@ -1,2350 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/backupdr/v1/backupdr_pb" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - module Rest - ## - # REST service stub for the BackupDR 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_management_servers REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] - # A result object deserialized from the server's reply - def list_management_servers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_management_servers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_management_servers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # A result object deserialized from the server's reply - def get_management_server request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_management_server_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_management_server", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ManagementServer.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_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_management_server request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_management_server_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_management_server", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_management_server request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_management_server_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_management_server", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] - # A result object deserialized from the server's reply - def list_backup_vaults request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_vaults_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_vaults", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.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_usable_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] - # A result object deserialized from the server's reply - def fetch_usable_backup_vaults request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_usable_backup_vaults_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_usable_backup_vaults", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.decode_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_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # A result object deserialized from the server's reply - def get_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupVault.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_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_data_sources REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] - # A result object deserialized from the server's reply - def list_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # A result object deserialized from the server's reply - def get_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::DataSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_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_backups REST call - # - # @param request_pb [::Google::Cloud::BackupDR::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::BackupDR::V1::ListBackupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::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::BackupDR::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 fetch_backups_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] - # A result object deserialized from the server's reply - def fetch_backups_for_resource_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backups_for_resource_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backups_for_resource_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.decode_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::BackupDR::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::BackupDR::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::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::BackupDR::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::BackupDR::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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # 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::Longrunning::Operation.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::BackupDR::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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # 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::Longrunning::Operation.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_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restore_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: "restore_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 create_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_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_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # A result object deserialized from the server's reply - def get_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupPlan.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_plans REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] - # A result object deserialized from the server's reply - def list_backup_plans request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plans_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_plans", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.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_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_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_plan_revision REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # A result object deserialized from the server's reply - def get_backup_plan_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_plan_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.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_plan_revisions REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] - # A result object deserialized from the server's reply - def list_backup_plan_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_revisions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_plan_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.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_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_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_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # A result object deserialized from the server's reply - def get_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.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_plan_associations REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] - # A result object deserialized from the server's reply - def list_backup_plan_associations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_associations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |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_plan_associations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.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_backup_plan_associations_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] - # A result object deserialized from the server's reply - def fetch_backup_plan_associations_for_resource_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_plan_associations_for_resource_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.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_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the trigger_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def trigger_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_trigger_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: "trigger_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_data_source_reference REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] - # A result object deserialized from the server's reply - def get_data_source_reference request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_reference_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_source_reference", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::DataSourceReference.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_data_source_references REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] - # A result object deserialized from the server's reply - def list_data_source_references request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_source_references_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_source_references", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.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_data_source_references_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] - # A result object deserialized from the server's reply - def fetch_data_source_references_for_resource_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_references_for_resource_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_data_source_references_for_resource_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the initialize_service REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def initialize_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_initialize_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: "initialize_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 - - ## - # @private - # - # GRPC transcoding helper method for the list_management_servers REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_management_servers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/managementServers", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_management_server_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] - # 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_management_server_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/managementServers", - body: "management_server", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] - # 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_management_server_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] - # 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_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupVaults", - body: "backup_vault", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] - # A 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_vaults_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupVaults", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_usable_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] - # 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_usable_backup_vaults_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupVaults:fetchUsable", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] - # A 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_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] - # 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_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_vault.name}", - body: "backup_vault", - matches: [ - ["backup_vault.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] - # 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_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_sources REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSources", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_source.name}", - body: "data_source", - matches: [ - ["data_source.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backups REST call - # - # @param request_pb [::Google::Cloud::BackupDR::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/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_backups_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] - # 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_backups_for_resource_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backups:fetchForResourceType", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::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/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::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/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::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/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restore_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:restore", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] - # 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_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupPlans", - body: "backup_plan", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] - # 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_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_plan.name}", - body: "backup_plan", - matches: [ - ["backup_plan.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] - # A 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_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plans REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] - # A 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_plans_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlans", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] - # 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_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan_revision REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] - # A 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_plan_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/revisions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plan_revisions REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] - # A 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_plan_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/revisions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] - # 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_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupPlanAssociations", - body: "backup_plan_association", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] - # 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_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_plan_association.name}", - body: "backup_plan_association", - matches: [ - ["backup_plan_association.name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] - # A 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_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plan_associations REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] - # A 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_plan_associations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlanAssociations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_backup_plan_associations_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] - # 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_backup_plan_associations_for_resource_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlanAssociations:fetchForResourceType", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] - # 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_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the trigger_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_trigger_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:triggerBackup", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_source_reference REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_source_reference_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataSourceReferences/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_source_references REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_source_references_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSourceReferences", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_data_source_references_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] - # 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_data_source_references_for_resource_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSourceReferences:fetchForResourceType", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the initialize_service REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_initialize_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:initialize", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceConfig/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb deleted file mode 100644 index f53e679c2cb7..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupdr.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/backupdr/v1/backupplan_pb' -require 'google/cloud/backupdr/v1/backupplanassociation_pb' -require 'google/cloud/backupdr/v1/backupvault_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/cloud/backupdr/v1/datasourcereference_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n\'google/cloud/backupdr/v1/backupdr.proto\x12\x18google.cloud.backupdr.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)google/cloud/backupdr/v1/backupplan.proto\x1a\x34google/cloud/backupdr/v1/backupplanassociation.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x32google/cloud/backupdr/v1/datasourcereference.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbe\x01\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0cpeering_mode\x18\x02 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.NetworkConfig.PeeringModeB\x03\xe0\x41\x01\"G\n\x0bPeeringMode\x12\x1c\n\x18PEERING_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x01\"6\n\rManagementURI\x12\x13\n\x06web_ui\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\"w\n#WorkforceIdentityBasedManagementURI\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"|\n$WorkforceIdentityBasedOAuth2ClientID\x12)\n\x1c\x66irst_party_oauth2_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1cthird_party_oauth2_client_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xd1\n\n\x10ManagementServer\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.ManagementServer.LabelsEntryB\x03\xe0\x41\x01\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\x12J\n\x04type\x18\x0e \x01(\x0e\x32\x37.google.cloud.backupdr.v1.ManagementServer.InstanceTypeB\x03\xe0\x41\x01\x12\x44\n\x0emanagement_uri\x18\x0b \x01(\x0b\x32\'.google.cloud.backupdr.v1.ManagementURIB\x03\xe0\x41\x03\x12s\n\'workforce_identity_based_management_uri\x18\x10 \x01(\x0b\x32=.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURIB\x03\xe0\x41\x03\x12L\n\x05state\x18\x07 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.ManagementServer.InstanceStateB\x03\xe0\x41\x03\x12>\n\x08networks\x18\x08 \x03(\x0b\x32\'.google.cloud.backupdr.v1.NetworkConfigB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10oauth2_client_id\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12v\n)workforce_identity_based_oauth2_client_id\x18\x11 \x01(\x0b\x32>.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientIDB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61_proxy_uri\x18\x12 \x03(\tB\x03\xe0\x41\x03\x12\x36\n\rsatisfies_pzs\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\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\"A\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41\x43KUP_RESTORE\x10\x01\"\x8f\x01\n\rInstanceState\x12\x1e\n\x1aINSTANCE_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0f\n\x0bMAINTENANCE\x10\x06\x12\t\n\x05\x45RROR\x10\x07:\xa1\x01\xea\x41\x9d\x01\n(backupdr.googleapis.com/ManagementServer\x12Lprojects/{project}/locations/{location}/managementServers/{managementserver}*\x11managementServers2\x10managementServer\"\xdf\x01\n\x1cListManagementServersRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\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\x18\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_filterB\x0b\n\t_order_by\"\x95\x01\n\x1dListManagementServersResponse\x12\x46\n\x12management_servers\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.ManagementServer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\\\n\x1aGetManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\"\xe9\x01\n\x1d\x43reateManagementServerRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12!\n\x14management_server_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x11management_server\x18\x03 \x01(\x0b\x32*.google.cloud.backupdr.v1.ManagementServerB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"x\n\x1d\x44\x65leteManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xfc\x01\n\x18InitializeServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\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\x12w\n(cloud_sql_instance_initialization_config\x18\x04 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfigB\x03\xe0\x41\x01H\x00\x42\x17\n\x15initialization_config\"P\n\x19InitializeServiceResponse\x12\x19\n\x11\x62\x61\x63kup_vault_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_plan_name\x18\x02 \x01(\t\"\x96\x03\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\x12]\n\x0f\x61\x64\x64itional_info\x18\x08 \x03(\x0b\x32?.google.cloud.backupdr.v1.OperationMetadata.AdditionalInfoEntryB\x03\xe0\x41\x03\x1a\x35\n\x13\x41\x64\x64itionalInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xd4\x43\n\x08\x42\x61\x63kupDR\x12\xd0\x01\n\x15ListManagementServers\x12\x36.google.cloud.backupdr.v1.ListManagementServersRequest\x1a\x37.google.cloud.backupdr.v1.ListManagementServersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/managementServers\x12\xbd\x01\n\x13GetManagementServer\x12\x34.google.cloud.backupdr.v1.GetManagementServerRequest\x1a*.google.cloud.backupdr.v1.ManagementServer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/managementServers/*}\x12\x9b\x02\n\x16\x43reateManagementServer\x12\x37.google.cloud.backupdr.v1.CreateManagementServerRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10ManagementServer\x12\x11OperationMetadata\xda\x41-parent,management_server,management_server_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/managementServers:\x11management_server\x12\xe3\x01\n\x16\x44\x65leteManagementServer\x12\x37.google.cloud.backupdr.v1.DeleteManagementServerRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/managementServers/*}\x12\xf8\x01\n\x11\x43reateBackupVault\x12\x32.google.cloud.backupdr.v1.CreateBackupVaultRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0b\x42\x61\x63kupVault\x12\x11OperationMetadata\xda\x41#parent,backup_vault,backup_vault_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/backupVaults:\x0c\x62\x61\x63kup_vault\x12\xbc\x01\n\x10ListBackupVaults\x12\x31.google.cloud.backupdr.v1.ListBackupVaultsRequest\x1a\x32.google.cloud.backupdr.v1.ListBackupVaultsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/backupVaults\x12\xdd\x01\n\x17\x46\x65tchUsableBackupVaults\x12\x38.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest\x1a\x39.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources\x12\xb4\x01\n\rGetDataSource\x12..google.cloud.backupdr.v1.GetDataSourceRequest\x1a$.google.cloud.backupdr.v1.DataSource\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}\x12\x82\x02\n\x10UpdateDataSource\x12\x31.google.cloud.backupdr.v1.UpdateDataSourceRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nDataSource\x12\x11OperationMetadata\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xc5\x01\n\x0bListBackups\x12,.google.cloud.backupdr.v1.ListBackupsRequest\x1a-.google.cloud.backupdr.v1.ListBackupsResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups\x12\x98\x02\n\x1b\x46\x65tchBackupsForResourceType\x12<.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest\x1a=.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse\"|\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02_\x12]/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType\x12\xb2\x01\n\tGetBackup\x12*.google.cloud.backupdr.v1.GetBackupRequest\x1a .google.cloud.backupdr.v1.Backup\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf1\x01\n\x0cUpdateBackup\x12-.google.cloud.backupdr.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02Y2O/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:\x06\x62\x61\x63kup\x12\xd3\x01\n\x0c\x44\x65leteBackup\x12-.google.cloud.backupdr.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf0\x01\n\rRestoreBackup\x12..google.cloud.backupdr.v1.RestoreBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15RestoreBackupResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02U\"P/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore:\x01*\x12\xf1\x01\n\x10\x43reateBackupPlan\x12\x31.google.cloud.backupdr.v1.CreateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41!parent,backup_plan,backup_plan_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/backupPlans:\x0b\x62\x61\x63kup_plan\x12\xf3\x01\n\x10UpdateBackupPlan\x12\x31.google.cloud.backupdr.v1.UpdateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41\x17\x62\x61\x63kup_plan,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}:\x0b\x62\x61\x63kup_plan\x12\xa5\x01\n\rGetBackupPlan\x12..google.cloud.backupdr.v1.GetBackupPlanRequest\x1a$.google.cloud.backupdr.v1.BackupPlan\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xb8\x01\n\x0fListBackupPlans\x12\x30.google.cloud.backupdr.v1.ListBackupPlansRequest\x1a\x31.google.cloud.backupdr.v1.ListBackupPlansResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/backupPlans\x12\xd1\x01\n\x10\x44\x65leteBackupPlan\x12\x31.google.cloud.backupdr.v1.DeleteBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xc9\x01\n\x15GetBackupPlanRevision\x12\x36.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest\x1a,.google.cloud.backupdr.v1.BackupPlanRevision\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/backupPlans/*/revisions/*}\x12\xdc\x01\n\x17ListBackupPlanRevisions\x12\x38.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest\x1a\x39.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/backupPlans/*}/revisions\x12\xc1\x02\n\x1b\x43reateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x39parent,backup_plan_association,backup_plan_association_id\x82\xd3\xe4\x93\x02U\":/v1/{parent=projects/*/locations/*}/backupPlanAssociations:\x17\x62\x61\x63kup_plan_association\x12\xc3\x02\n\x1bUpdateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc6\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41#backup_plan_association,update_mask\x82\xd3\xe4\x93\x02m2R/v1/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}:\x17\x62\x61\x63kup_plan_association\x12\xd1\x01\n\x18GetBackupPlanAssociation\x12\x39.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest\x1a/.google.cloud.backupdr.v1.BackupPlanAssociation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xe4\x01\n\x1aListBackupPlanAssociations\x12;.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest\x1a<.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/backupPlanAssociations\x12\xb7\x02\n*FetchBackupPlanAssociationsForResourceType\x12K.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest\x1aL.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse\"n\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02Q\x12O/v1/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType\x12\xf2\x01\n\x1b\x44\x65leteBackupPlanAssociation\x12<.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xf0\x01\n\rTriggerBackup\x12..google.cloud.backupdr.v1.TriggerBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x0cname,rule_id\x82\xd3\xe4\x93\x02M\"H/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup:\x01*\x12\xc9\x01\n\x16GetDataSourceReference\x12\x37.google.cloud.backupdr.v1.GetDataSourceReferenceRequest\x1a-.google.cloud.backupdr.v1.DataSourceReference\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/dataSourceReferences/*}\x12\xdc\x01\n\x18ListDataSourceReferences\x12\x39.google.cloud.backupdr.v1.ListDataSourceReferencesRequest\x1a:.google.cloud.backupdr.v1.ListDataSourceReferencesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/dataSourceReferences\x12\xaf\x02\n(FetchDataSourceReferencesForResourceType\x12I.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest\x1aJ.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse\"l\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02O\x12M/v1/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType\x12\xde\x01\n\x11InitializeService\x12\x32.google.cloud.backupdr.v1.InitializeServiceRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41.\n\x19InitializeServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/serviceConfig}:initialize:\x01*\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbd\x01\n\x1c\x63om.google.cloud.backupdr.v1B\rBackupDRProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig").msgclass - NetworkConfig::PeeringMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig.PeeringMode").enummodule - ManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementURI").msgclass - WorkforceIdentityBasedManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI").msgclass - WorkforceIdentityBasedOAuth2ClientID = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID").msgclass - ManagementServer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer").msgclass - ManagementServer::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceType").enummodule - ManagementServer::InstanceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceState").enummodule - ListManagementServersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersRequest").msgclass - ListManagementServersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersResponse").msgclass - GetManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetManagementServerRequest").msgclass - CreateManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateManagementServerRequest").msgclass - DeleteManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteManagementServerRequest").msgclass - InitializeServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceRequest").msgclass - InitializeServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceResponse").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb deleted file mode 100644 index 91bbec9bb35d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb +++ /dev/null @@ -1,119 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/backupdr/v1/backupdr.proto for package 'Google.Cloud.BackupDR.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/backupdr/v1/backupdr_pb' - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - # The BackupDR Service - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.backupdr.v1.BackupDR' - - # Lists ManagementServers in a given project and location. - rpc :ListManagementServers, ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Google::Cloud::BackupDR::V1::ListManagementServersResponse - # Gets details of a single ManagementServer. - rpc :GetManagementServer, ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Google::Cloud::BackupDR::V1::ManagementServer - # Creates a new ManagementServer in a given project and location. - rpc :CreateManagementServer, ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Google::Longrunning::Operation - # Deletes a single ManagementServer. - rpc :DeleteManagementServer, ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Google::Longrunning::Operation - # Creates a new BackupVault in a given project and location. - rpc :CreateBackupVault, ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Google::Longrunning::Operation - # Lists BackupVaults in a given project and location. - rpc :ListBackupVaults, ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse - # FetchUsableBackupVaults lists usable BackupVaults in a given project and - # location. Usable BackupVault are the ones that user has - # backupdr.backupVaults.get permission. - rpc :FetchUsableBackupVaults, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse - # Gets details of a BackupVault. - rpc :GetBackupVault, ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Google::Cloud::BackupDR::V1::BackupVault - # Updates the settings of a BackupVault. - rpc :UpdateBackupVault, ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Google::Longrunning::Operation - # Deletes a BackupVault. - rpc :DeleteBackupVault, ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Google::Longrunning::Operation - # Lists DataSources in a given project and location. - rpc :ListDataSources, ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse - # Gets details of a DataSource. - rpc :GetDataSource, ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Google::Cloud::BackupDR::V1::DataSource - # Updates the settings of a DataSource. - rpc :UpdateDataSource, ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Google::Longrunning::Operation - # Lists Backups in a given project and location. - rpc :ListBackups, ::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Google::Cloud::BackupDR::V1::ListBackupsResponse - # Fetch Backups for a given resource type. - rpc :FetchBackupsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse - # Gets details of a Backup. - rpc :GetBackup, ::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Google::Cloud::BackupDR::V1::Backup - # Updates the settings of a Backup. - rpc :UpdateBackup, ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Google::Longrunning::Operation - # Deletes a Backup. - rpc :DeleteBackup, ::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Google::Longrunning::Operation - # Restore from a Backup - rpc :RestoreBackup, ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Google::Longrunning::Operation - # Create a BackupPlan - rpc :CreateBackupPlan, ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Google::Longrunning::Operation - # Update a BackupPlan. - rpc :UpdateBackupPlan, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Google::Longrunning::Operation - # Gets details of a single BackupPlan. - rpc :GetBackupPlan, ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Google::Cloud::BackupDR::V1::BackupPlan - # Lists BackupPlans in a given project and location. - rpc :ListBackupPlans, ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse - # Deletes a single BackupPlan. - rpc :DeleteBackupPlan, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Google::Longrunning::Operation - # Gets details of a single BackupPlanRevision. - rpc :GetBackupPlanRevision, ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Google::Cloud::BackupDR::V1::BackupPlanRevision - # Lists BackupPlanRevisions in a given project and location. - rpc :ListBackupPlanRevisions, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse - # Create a BackupPlanAssociation - rpc :CreateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Google::Longrunning::Operation - # Update a BackupPlanAssociation. - rpc :UpdateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Google::Longrunning::Operation - # Gets details of a single BackupPlanAssociation. - rpc :GetBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Google::Cloud::BackupDR::V1::BackupPlanAssociation - # Lists BackupPlanAssociations in a given project and location. - rpc :ListBackupPlanAssociations, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse - # List BackupPlanAssociations for a given resource type. - rpc :FetchBackupPlanAssociationsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse - # Deletes a single BackupPlanAssociation. - rpc :DeleteBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Google::Longrunning::Operation - # Triggers a new Backup. - rpc :TriggerBackup, ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Google::Longrunning::Operation - # Gets details of a single DataSourceReference. - rpc :GetDataSourceReference, ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Google::Cloud::BackupDR::V1::DataSourceReference - # Lists DataSourceReferences for a given project and location. - rpc :ListDataSourceReferences, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse - # Fetch DataSourceReferences for a given project, location and resource type. - rpc :FetchDataSourceReferencesForResourceType, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse - # Initializes the service related config for a project. - rpc :InitializeService, ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb deleted file mode 100644 index a17a1db88525..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupplan.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/dayofweek_pb' -require 'google/type/month_pb' - - -descriptor_data = "\n)google/cloud/backupdr/v1/backupplan.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x17google/type/month.proto\"\xa5\x07\n\nBackupPlan\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.BackupPlan.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?\n\x0c\x62\x61\x63kup_rules\x18\x06 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupRuleB\x03\xe0\x41\x02\x12>\n\x05state\x18\x07 \x01(\x0e\x32*.google.cloud.backupdr.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x1a\n\rresource_type\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62\x61\x63kup_vault\x18\n \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12)\n\x1c\x62\x61\x63kup_vault_service_account\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12log_retention_days\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18supported_resource_types\x18\r \x03(\tB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rrevision_name\x18\x0f \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\"b\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\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x84\x01\xea\x41\x80\x01\n\"backupdr.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}*\x0b\x62\x61\x63kupPlans2\nbackupPlan\"\xb0\x01\n\nBackupRule\x12\x17\n\x07rule_id\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\"\n\x15\x62\x61\x63kup_retention_days\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12L\n\x11standard_schedule\x18\x05 \x01(\x0b\x32*.google.cloud.backupdr.v1.StandardScheduleB\x03\xe0\x41\x01H\x00\x42\x17\n\x15\x62\x61\x63kup_schedule_oneof\"\x97\x04\n\x10StandardSchedule\x12W\n\x0frecurrence_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.backupdr.v1.StandardSchedule.RecurrenceTypeB\x03\xe0\x41\x02\x12\x1d\n\x10hourly_frequency\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x31\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x1a\n\rdays_of_month\x18\x04 \x03(\x05\x42\x03\xe0\x41\x01\x12H\n\x11week_day_of_month\x18\x05 \x01(\x0b\x32(.google.cloud.backupdr.v1.WeekDayOfMonthB\x03\xe0\x41\x01\x12\'\n\x06months\x18\x06 \x03(\x0e\x32\x12.google.type.MonthB\x03\xe0\x41\x01\x12\x42\n\rbackup_window\x18\x07 \x01(\x0b\x32&.google.cloud.backupdr.v1.BackupWindowB\x03\xe0\x41\x02\x12\x16\n\ttime_zone\x18\x08 \x01(\tB\x03\xe0\x41\x02\"m\n\x0eRecurrenceType\x12\x1f\n\x1bRECURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0b\n\x07MONTHLY\x10\x04\x12\n\n\x06YEARLY\x10\x05\"L\n\x0c\x42\x61\x63kupWindow\x12\x1e\n\x11start_hour_of_day\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x65nd_hour_of_day\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xfa\x01\n\x0eWeekDayOfMonth\x12P\n\rweek_of_month\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonthB\x03\xe0\x41\x02\x12\x30\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x02\"d\n\x0bWeekOfMonth\x12\x1d\n\x19WEEK_OF_MONTH_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IRST\x10\x01\x12\n\n\x06SECOND\x10\x02\x12\t\n\x05THIRD\x10\x03\x12\n\n\x06\x46OURTH\x10\x04\x12\x08\n\x04LAST\x10\x05\"\xd3\x01\n\x17\x43reateBackupPlanRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x0e\x62\x61\x63kup_plan_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x62\x61\x63kup_plan\x18\x03 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\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\"\xb1\x01\n\x16ListBackupPlansRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\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\"\x83\x01\n\x17ListBackupPlansResponse\x12:\n\x0c\x62\x61\x63kup_plans\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\"t\n\x17\x44\x65leteBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n\x17UpdateBackupPlanRequest\x12>\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\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\"\x90\x04\n\x12\x42\x61\x63kupPlanRevision\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x05state\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupPlanRevision.StateB\x03\xe0\x41\x03\x12\x42\n\x14\x62\x61\x63kup_plan_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"T\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\x0c\n\x08INACTIVE\x10\x04:\xb1\x01\xea\x41\xad\x01\n*backupdr.googleapis.com/BackupPlanRevision\x12Vprojects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}*\x13\x62\x61\x63kupPlanRevisions2\x12\x62\x61\x63kupPlanRevision\"`\n\x1cGetBackupPlanRevisionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*backupdr.googleapis.com/BackupPlanRevision\"\x95\x01\n\x1eListBackupPlanRevisionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*backupdr.googleapis.com/BackupPlanRevision\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\"\x9c\x01\n\x1fListBackupPlanRevisionsResponse\x12K\n\x15\x62\x61\x63kup_plan_revisions\x18\x01 \x03(\x0b\x32,.google.cloud.backupdr.v1.BackupPlanRevision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xbf\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - BackupPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan").msgclass - BackupPlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan.State").enummodule - BackupRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupRule").msgclass - StandardSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule").msgclass - StandardSchedule::RecurrenceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule.RecurrenceType").enummodule - BackupWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupWindow").msgclass - WeekDayOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth").msgclass - WeekDayOfMonth::WeekOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth").enummodule - CreateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanRequest").msgclass - ListBackupPlansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansRequest").msgclass - ListBackupPlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansResponse").msgclass - GetBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRequest").msgclass - DeleteBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanRequest").msgclass - UpdateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanRequest").msgclass - BackupPlanRevision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision").msgclass - BackupPlanRevision::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision.State").enummodule - GetBackupPlanRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRevisionRequest").msgclass - ListBackupPlanRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest").msgclass - ListBackupPlanRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb deleted file mode 100644 index 377b868210a5..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupplanassociation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_alloydb_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n4google/cloud/backupdr/v1/backupplanassociation.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/backupdr/v1/backupvault_alloydb.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xe9\x08\n\x15\x42\x61\x63kupPlanAssociation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x1d\n\rresource_type\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x08resource\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12?\n\x0b\x62\x61\x63kup_plan\x18\x04 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\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\x12I\n\x05state\x18\x07 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.BackupPlanAssociation.StateB\x03\xe0\x41\x03\x12H\n\x11rules_config_info\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.RuleConfigInfoB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x8f\x01\n5cloud_sql_instance_backup_plan_association_properties\x18\n \x01(\x0b\x32I.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12\x8a\x01\n2alloydb_cluster_backup_plan_association_properties\x18\x0f \x01(\x0b\x32G.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12$\n\x17\x62\x61\x63kup_plan_revision_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x62\x61\x63kup_plan_revision_name\x18\x0c \x01(\tB\x03\xe0\x41\x03\"b\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\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\xbc\x01\xea\x41\xb8\x01\n-backupdr.googleapis.com/BackupPlanAssociation\x12Xprojects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}*\x16\x62\x61\x63kupPlanAssociations2\x15\x62\x61\x63kupPlanAssociationB\x15\n\x13resource_properties\"\x89\x03\n\x0eRuleConfigInfo\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12X\n\x11last_backup_state\x18\x03 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"\x8c\x02\n\"CreateBackupPlanAssociationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\'\n\x1a\x62\x61\x63kup_plan_association_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\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\"\xb0\x01\n!ListBackupPlanAssociationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\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\"\xa5\x01\n\"ListBackupPlanAssociationsResponse\x12Q\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xf3\x01\n1FetchBackupPlanAssociationsForResourceTypeRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n2FetchBackupPlanAssociationsForResourceTypeResponse\x12V\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"f\n\x1fGetBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\"\x8a\x01\n\"DeleteBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd2\x01\n\"UpdateBackupPlanAssociationRequest\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x01 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\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\"\x92\x01\n\x14TriggerBackupRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x14\n\x07rule_id\x18\x02 \x01(\tB\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\x42\xca\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x1a\x42\x61\x63kupPlanAssociationProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - BackupPlanAssociation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation").msgclass - BackupPlanAssociation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation.State").enummodule - RuleConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo").msgclass - RuleConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState").enummodule - CreateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest").msgclass - ListBackupPlanAssociationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest").msgclass - ListBackupPlanAssociationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse").msgclass - FetchBackupPlanAssociationsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest").msgclass - FetchBackupPlanAssociationsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse").msgclass - GetBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanAssociationRequest").msgclass - DeleteBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest").msgclass - UpdateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest").msgclass - TriggerBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TriggerBackupRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb deleted file mode 100644 index 779033cb68ba..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_alloydb.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n2google/cloud/backupdr/v1/backupvault_alloydb.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\"Z\n\"AlloyDBClusterDataSourceProperties\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x61lloydb.googleapis.com/Cluster\"\x9b\x01\n\x1e\x41lloyDbClusterBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cstored_bytes\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08\x63hain_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x64\x61tabase_version\x18\x04 \x01(\tB\x03\xe0\x41\x03\x42\x0e\n\x0c_description\"Q\n-AlloyDBClusterBackupPlanAssociationProperties\x12 \n\x0b\x63luster_uid\x18\x01 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xa6\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x17\x42\x61\x63kupvaultAlloyDBProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\\\n\x1e\x61lloydb.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - AlloyDBClusterDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties").msgclass - AlloyDbClusterBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDbClusterBackupProperties").msgclass - AlloyDBClusterBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb deleted file mode 100644 index 54c592031980..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_ba.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/backupdr/v1/backupvault_ba.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xed\x02\n\x1f\x42\x61\x63kupApplianceBackupProperties\x12\x1f\n\rgeneration_id\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12;\n\rfinalize_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12G\n\x19recovery_range_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x45\n\x17recovery_range_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x10\n\x0e_generation_idB\x10\n\x0e_finalize_timeB\x1c\n\x1a_recovery_range_start_timeB\x1a\n\x18_recovery_range_end_timeB\xc2\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x12\x42\x61\x63kupvaultBaProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - BackupApplianceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb deleted file mode 100644 index 74bfb355222d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_cloudsql.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/backupdr/v1/backupvault_cloudsql.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\x01\n$CloudSqlInstanceDataSourceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xc3\x02\n CloudSqlInstanceBackupProperties\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x66inal_backup\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x41\n\x0fsource_instance\x18\x04 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12=\n\x14instance_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_delete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xeb\x01\n-CloudSqlInstanceDataSourceReferenceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n$CloudSqlInstanceInitializationConfig\x12\\\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x46.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.EditionB\x03\xe0\x41\x02\"G\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x02\"p\n/CloudSqlInstanceBackupPlanAssociationProperties\x12=\n\x14instance_create_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x96\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x42\x61\x63kupvaultCloudSqlProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41K\n sqladmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - CloudSqlInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties").msgclass - CloudSqlInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties").msgclass - CloudSqlInstanceDataSourceReferenceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties").msgclass - CloudSqlInstanceInitializationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig").msgclass - CloudSqlInstanceInitializationConfig::Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition").enummodule - CloudSqlInstanceBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb deleted file mode 100644 index 22dcc5473054..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_disk.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_gce_pb' - - -descriptor_data = "\n/google/cloud/backupdr/v1/backupvault_disk.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\"@\n\x15\x44iskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"d\n\x1bRegionDiskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rreplica_zones\x18\x03 \x03(\tB\x03\xe0\x41\x02\"\xa5\x0b\n\x15\x44iskRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x19\n\x07size_gb\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x15\n\x08licenses\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12G\n\x10guest_os_feature\x18\x05 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x06 \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12+\n\x19physical_block_size_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\"\n\x10provisioned_iops\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16provisioned_throughput\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12-\n\x1b\x65nable_confidential_compute\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x45\n\x0cstorage_pool\x18\x0b \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"compute.googleapis.com/StoragePoolH\x08\x88\x01\x01\x12Y\n\x0b\x61\x63\x63\x65ss_mode\x18\x0c \x01(\x0e\x32:.google.cloud.backupdr.v1.DiskRestoreProperties.AccessModeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\\\n\x0c\x61rchitecture\x18\x0e \x01(\x0e\x32<.google.cloud.backupdr.v1.DiskRestoreProperties.ArchitectureB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1c\n\x0fresource_policy\x18\x0f \x03(\tB\x03\xe0\x41\x01\x12\x16\n\x04type\x18\x10 \x01(\tB\x03\xe0\x41\x02H\x0b\x88\x01\x01\x12P\n\x06labels\x18\x11 \x03(\x0b\x32;.google.cloud.backupdr.v1.DiskRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12l\n\x15resource_manager_tags\x18\x12 \x03(\x0b\x32H.google.cloud.backupdr.v1.DiskRestoreProperties.ResourceManagerTagsEntryB\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:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"L\n\nAccessMode\x12\x15\n\x11READ_WRITE_SINGLE\x10\x00\x12\x13\n\x0fREAD_WRITE_MANY\x10\x01\x12\x12\n\x0eREAD_ONLY_MANY\x10\x02\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\n\n\x08_size_gbB\x16\n\x14_disk_encryption_keyB\x1c\n\x1a_physical_block_size_bytesB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\x1e\n\x1c_enable_confidential_computeB\x0f\n\r_storage_poolB\x0e\n\x0c_access_modeB\x0f\n\r_architectureB\x07\n\x05_type\"\xff\x03\n\x14\x44iskBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08licenses\x18\x02 \x03(\t\x12\x42\n\x10guest_os_feature\x18\x03 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeature\x12V\n\x0c\x61rchitecture\x18\x04 \x01(\x0e\x32;.google.cloud.backupdr.v1.DiskBackupProperties.ArchitectureH\x01\x88\x01\x01\x12\x11\n\x04type\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07size_gb\x18\x06 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06region\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x11\n\x04zone\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x15\n\rreplica_zones\x18\t \x03(\t\x12\x18\n\x0bsource_disk\x18\n \x01(\tH\x06\x88\x01\x01\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x0e\n\x0c_descriptionB\x0f\n\r_architectureB\x07\n\x05_typeB\n\n\x08_size_gbB\t\n\x07_regionB\x07\n\x05_zoneB\x0e\n\x0c_source_disk\"\\\n\x18\x44iskDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x0f\n\x07size_gb\x18\x04 \x01(\x03\x42\xa8\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x14\x42\x61\x63kupvaultDiskProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\x61\n\"compute.googleapis.com/StoragePool\x12;projects/{project}/zones/{zone}/storagePools/{storage_pool}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - DiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskTargetEnvironment").msgclass - RegionDiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RegionDiskTargetEnvironment").msgclass - DiskRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties").msgclass - DiskRestoreProperties::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode").enummodule - DiskRestoreProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.Architecture").enummodule - DiskBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties").msgclass - DiskBackupProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties.Architecture").enummodule - DiskDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskDataSourceProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb deleted file mode 100644 index 06a571c45721..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_gce.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' - - -descriptor_data = "\n.google/cloud/backupdr/v1/backupvault_gce.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xe8\x07\n\x1f\x43omputeInstanceBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x04tags\x18\x02 \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsH\x01\x88\x01\x01\x12\x19\n\x0cmachine_type\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0e\x63\x61n_ip_forward\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x45\n\x11network_interface\x18\x05 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterface\x12\x34\n\x04\x64isk\x18\x06 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDisk\x12\x39\n\x08metadata\x18\x07 \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataH\x04\x88\x01\x01\x12\x41\n\x0fservice_account\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccount\x12=\n\nscheduling\x18\t \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingH\x05\x88\x01\x01\x12\x46\n\x11guest_accelerator\x18\n \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfig\x12\x1d\n\x10min_cpu_platform\x18\x0b \x01(\tH\x06\x88\x01\x01\x12Z\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeH\x07\x88\x01\x01\x12\x1c\n\x0fsource_instance\x18\r \x01(\tH\x08\x88\x01\x01\x12U\n\x06labels\x18\x0e \x03(\x0b\x32\x45.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_descriptionB\x07\n\x05_tagsB\x0f\n\r_machine_typeB\x11\n\x0f_can_ip_forwardB\x0b\n\t_metadataB\r\n\x0b_schedulingB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_key_revocation_action_typeB\x12\n\x10_source_instance\"\xc7\x12\n ComputeInstanceRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12^\n\x19\x61\x64vanced_machine_features\x18\x02 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.AdvancedMachineFeaturesB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0e\x63\x61n_ip_forward\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x64\n\x1c\x63onfidential_instance_config\x18\x04 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.ConfidentialInstanceConfigB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12%\n\x13\x64\x65letion_protection\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12:\n\x05\x64isks\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDiskB\x03\xe0\x41\x01\x12I\n\x0e\x64isplay_device\x18\x08 \x01(\x0b\x32\'.google.cloud.backupdr.v1.DisplayDeviceB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12L\n\x12guest_accelerators\x18\t \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfigB\x03\xe0\x41\x01\x12\x1a\n\x08hostname\x18\n \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12Z\n\x17instance_encryption_key\x18\x0b \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12_\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12[\n\x06labels\x18\r \x03(\x0b\x32\x46.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x0cmachine_type\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x08metadata\x18\x0f \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\x10min_cpu_platform\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12K\n\x12network_interfaces\x18\x11 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterfaceB\x03\xe0\x41\x01\x12`\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.NetworkPerformanceConfigB\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x42\n\x06params\x18\x13 \x01(\x0b\x32(.google.cloud.backupdr.v1.InstanceParamsB\x03\xe0\x41\x04H\x0e\x88\x01\x01\x12\x88\x01\n\x1aprivate_ipv6_google_access\x18\x14 \x01(\x0e\x32Z.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccessB\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12h\n\x13\x61llocation_affinity\x18\x15 \x01(\x0b\x32,.google.cloud.backupdr.v1.AllocationAffinityB\x03\xe0\x41\x01H\x10R\x13reservationAffinity\x88\x01\x01\x12\x1e\n\x11resource_policies\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x42\n\nscheduling\x18\x17 \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingB\x03\xe0\x41\x01H\x11\x88\x01\x01\x12G\n\x10service_accounts\x18\x18 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccountB\x03\xe0\x41\x01\x12\x36\n\x04tags\x18\x1a \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsB\x03\xe0\x41\x01H\x12\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc7\x01\n\x1fInstancePrivateIpv6GoogleAccess\x12\x33\n/INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_FROM_SUBNETWORK\x10\x01\x12\'\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\x02\x12)\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\x03\x42\x07\n\x05_nameB\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x11\n\x0f_display_deviceB\x0b\n\t_hostnameB\x1a\n\x18_instance_encryption_keyB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_network_performance_configB\t\n\x07_paramsB\x1d\n\x1b_private_ipv6_google_accessB\x16\n\x14_allocation_affinityB\r\n\x0b_schedulingB\x07\n\x05_tags\"K\n ComputeInstanceTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n#ComputeInstanceDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cmachine_type\x18\x03 \x01(\t\x12\x18\n\x10total_disk_count\x18\x04 \x01(\x03\x12\x1a\n\x12total_disk_size_gb\x18\x05 \x01(\x03\"\xa5\x02\n\x17\x41\x64vancedMachineFeatures\x12.\n\x1c\x65nable_nested_virtualization\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\"\n\x10threads_per_core\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x12visible_core_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12(\n\x16\x65nable_uefi_networking\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualizationB\x13\n\x11_threads_per_coreB\x15\n\x13_visible_core_countB\x19\n\x17_enable_uefi_networking\"k\n\x1a\x43onfidentialInstanceConfig\x12-\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1e\n\x1c_enable_confidential_compute\"D\n\rDisplayDevice\x12 \n\x0e\x65nable_display\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_enable_display\"\x87\x01\n\x11\x41\x63\x63\x65leratorConfig\x12\"\n\x10\x61\x63\x63\x65lerator_type\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61\x63\x63\x65lerator_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_accelerator_typeB\x14\n\x12_accelerator_count\"\xbc\x01\n\x15\x43ustomerEncryptionKey\x12\x16\n\x07raw_key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12 \n\x11rsa_encrypted_key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0ckms_key_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12)\n\x17kms_key_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x05\n\x03keyB\x1a\n\x18_kms_key_service_account\"I\n\x05\x45ntry\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"?\n\x08Metadata\x12\x33\n\x05items\x18\x01 \x03(\x0b\x32\x1f.google.cloud.backupdr.v1.EntryB\x03\xe0\x41\x01\"\x96\t\n\x10NetworkInterface\x12\x19\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12/\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x02H\x02R\tnetworkIP\x88\x01\x01\x12&\n\x0cipv6_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x03H\x03\x88\x01\x01\x12-\n\x1binternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x43\n\x0e\x61\x63\x63\x65ss_configs\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12H\n\x13ipv6_access_configs\x18\x08 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12\x44\n\x0f\x61lias_ip_ranges\x18\t \x03(\x0b\x32&.google.cloud.backupdr.v1.AliasIpRangeB\x03\xe0\x41\x01\x12M\n\nstack_type\x18\n \x01(\x0e\x32\x34.google.cloud.backupdr.v1.NetworkInterface.StackTypeH\x06\x88\x01\x01\x12]\n\x10ipv6_access_type\x18\x0b \x01(\x0e\x32\x39.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessTypeB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0bqueue_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12N\n\x08nic_type\x18\r \x01(\x0e\x32\x32.google.cloud.backupdr.v1.NetworkInterface.NicTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12$\n\x12network_attachment\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\"E\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIPV4_ONLY\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIpv6AccessType\x12 \n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\">\n\x07NicType\x12\x18\n\x14NIC_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nVIRTIO_NET\x10\x01\x12\t\n\x05GVNIC\x10\x02\x42\n\n\x08_networkB\r\n\x0b_subnetworkB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x1e\n\x1c_internal_ipv6_prefix_lengthB\x07\n\x05_nameB\r\n\x0b_stack_typeB\x13\n\x11_ipv6_access_typeB\x0e\n\x0c_queue_countB\x0b\n\t_nic_typeB\x15\n\x13_network_attachment\"\xd9\x01\n\x18NetworkPerformanceConfig\x12\x66\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.NetworkPerformanceConfig.TierB\x03\xe0\x41\x01H\x00\x88\x01\x01\"5\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06TIER_1\x10\x02\x42\x1e\n\x1c_total_egress_bandwidth_tier\"\xb2\x05\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AccessConfig.AccessTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x0b\x65xternal_ip\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02R\x05natIP\x88\x01\x01\x12\x1f\n\rexternal_ipv6\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x65xternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12 \n\x0eset_public_ptr\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16public_ptr_domain_name\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12R\n\x0cnetwork_tier\x18\x08 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.AccessConfig.NetworkTierB\x03\xe0\x41\x01H\x07\x88\x01\x01\"N\n\nAccessType\x12\x1b\n\x17\x41\x43\x43\x45SS_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eONE_TO_ONE_NAT\x10\x01\x12\x0f\n\x0b\x44IRECT_IPV6\x10\x02\"F\n\x0bNetworkTier\x12\x1c\n\x18NETWORK_TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREMIUM\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x42\x07\n\x05_typeB\x07\n\x05_nameB\x0e\n\x0c_external_ipB\x10\n\x0e_external_ipv6B\x1e\n\x1c_external_ipv6_prefix_lengthB\x11\n\x0f_set_public_ptrB\x19\n\x17_public_ptr_domain_nameB\x0f\n\r_network_tier\"\x84\x01\n\x0c\x41liasIpRange\x12\x1f\n\rip_cidr_range\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15subnetwork_range_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\x18\n\x16_subnetwork_range_name\"\xb3\x01\n\x0eInstanceParams\x12\x65\n\x15resource_manager_tags\x18\x01 \x03(\x0b\x32\x41.google.cloud.backupdr.v1.InstanceParams.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbb\x02\n\x12\x41llocationAffinity\x12t\n\x17\x63onsume_allocation_type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AllocationAffinity.TypeB\x03\xe0\x41\x01H\x00R\x16\x63onsumeReservationType\x88\x01\x01\x12\x15\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x42\x1a\n\x18_consume_allocation_typeB\x06\n\x04_key\"\xdc\t\n\nScheduling\x12]\n\x13on_host_maintenance\x18\x01 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.OnHostMaintenanceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61utomatic_restart\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bpreemptible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12O\n\x0fnode_affinities\x18\x04 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.Scheduling.NodeAffinityB\x03\xe0\x41\x01\x12\x1f\n\rmin_node_cpus\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x12provisioning_model\x18\x06 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.ProvisioningModelB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12m\n\x1binstance_termination_action\x18\x07 \x01(\x0e\x32>.google.cloud.backupdr.v1.Scheduling.InstanceTerminationActionB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12Z\n\x1alocal_ssd_recovery_timeout\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.SchedulingDurationB\x03\xe0\x41\x01H\x06\x88\x01\x01\x1a\xe1\x01\n\x0cNodeAffinity\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x08operator\x18\x02 \x01(\x0e\x32:.google.cloud.backupdr.v1.Scheduling.NodeAffinity.OperatorB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\x42\x06\n\x04_keyB\x0b\n\t_operator\"U\n\x11OnHostMaintenance\x12#\n\x1fON_HOST_MAINTENANCE_UNSPECIFIED\x10\x00\x12\r\n\tTERMINATE\x10\x01\x12\x0c\n\x07MIGRATE\x10\xe8\x07\"O\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\"^\n\x19InstanceTerminationAction\x12+\n\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\x16\n\x14_on_host_maintenanceB\x14\n\x12_automatic_restartB\x0e\n\x0c_preemptibleB\x10\n\x0e_min_node_cpusB\x15\n\x13_provisioning_modelB\x1e\n\x1c_instance_termination_actionB\x1d\n\x1b_local_ssd_recovery_timeout\"^\n\x12SchedulingDuration\x12\x19\n\x07seconds\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05nanos\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\n\n\x08_secondsB\x08\n\x06_nanos\"H\n\x0eServiceAccount\x12\x17\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x08\n\x06_email\"\x1a\n\x04Tags\x12\x12\n\x05items\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x91\x0c\n\x0c\x41ttachedDisk\x12\\\n\x11initialize_params\x18\x01 \x01(\x0b\x32\x37.google.cloud.backupdr.v1.AttachedDisk.InitializeParamsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65vice_name\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x16\n\x04kind\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14\x64isk_type_deprecated\x18\x06 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x02\x18\x01H\x03\x88\x01\x01\x12G\n\x04mode\x18\x07 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskModeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x18\n\x06source\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x17\n\x05index\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x16\n\x04\x62oot\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0b\x61uto_delete\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x14\n\x07license\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12V\n\x0e\x64isk_interface\x18\r \x01(\x0e\x32\x34.google.cloud.backupdr.v1.AttachedDisk.DiskInterfaceB\x03\xe0\x41\x01H\t\x88\x01\x01\x12G\n\x10guest_os_feature\x18\x0e \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x0f \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0c\x64isk_size_gb\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12W\n\x0bsaved_state\x18\x11 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.AttachedDisk.DiskSavedStateB\x06\xe0\x41\x01\xe0\x41\x03H\x0c\x88\x01\x01\x12\x1e\n\tdisk_type\x18\x12 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\r\x88\x01\x01\x12G\n\x04type\x18\x13 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x1aY\n\x10InitializeParams\x12\x1b\n\tdisk_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\rreplica_zones\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x0c\n\n_disk_name\"B\n\x08\x44iskType\x12\x19\n\x15\x44ISK_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SCRATCH\x10\x01\x12\x0e\n\nPERSISTENT\x10\x02\"P\n\x08\x44iskMode\x12\x19\n\x15\x44ISK_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\n\n\x06LOCKED\x10\x03\"Z\n\rDiskInterface\x12\x1e\n\x1a\x44ISK_INTERFACE_UNSPECIFIED\x10\x00\x12\x08\n\x04SCSI\x10\x01\x12\x08\n\x04NVME\x10\x02\x12\n\n\x06NVDIMM\x10\x03\x12\t\n\x05ISCSI\x10\x04\"A\n\x0e\x44iskSavedState\x12 \n\x1c\x44ISK_SAVED_STATE_UNSPECIFIED\x10\x00\x12\r\n\tPRESERVED\x10\x01\x42\x14\n\x12_initialize_paramsB\x0e\n\x0c_device_nameB\x07\n\x05_kindB\x17\n\x15_disk_type_deprecatedB\x07\n\x05_modeB\t\n\x07_sourceB\x08\n\x06_indexB\x07\n\x05_bootB\x0e\n\x0c_auto_deleteB\x11\n\x0f_disk_interfaceB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0e\n\x0c_saved_stateB\x0c\n\n_disk_typeB\x07\n\x05_type\"\xb5\x03\n\x0eGuestOsFeature\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.GuestOsFeature.FeatureTypeH\x00\x88\x01\x01\"\xd0\x02\n\x0b\x46\x65\x61tureType\x12\x1c\n\x18\x46\x45\x41TURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VIRTIO_SCSI_MULTIQUEUE\x10\x01\x12\x0b\n\x07WINDOWS\x10\x02\x12\x13\n\x0fMULTI_IP_SUBNET\x10\x03\x12\x13\n\x0fUEFI_COMPATIBLE\x10\x04\x12\x0f\n\x0bSECURE_BOOT\x10\x05\x12\t\n\x05GVNIC\x10\x06\x12\x0f\n\x0bSEV_CAPABLE\x10\x07\x12\x1f\n\x1b\x42\x41RE_METAL_LINUX_COMPATIBLE\x10\x08\x12\x1d\n\x19SUSPEND_RESUME_COMPATIBLE\x10\t\x12\x17\n\x13SEV_LIVE_MIGRATABLE\x10\n\x12\x13\n\x0fSEV_SNP_CAPABLE\x10\x0b\x12\x0f\n\x0bTDX_CAPABLE\x10\x0c\x12\x08\n\x04IDPF\x10\r\x12\x1a\n\x16SEV_LIVE_MIGRATABLE_V2\x10\x0e\x42\x07\n\x05_type*Y\n\x17KeyRevocationActionType\x12*\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\xc3\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x13\x42\x61\x63kupvaultGceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - ComputeInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceBackupProperties").msgclass - ComputeInstanceRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties").msgclass - ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess").enummodule - ComputeInstanceTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment").msgclass - ComputeInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties").msgclass - AdvancedMachineFeatures = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AdvancedMachineFeatures").msgclass - ConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ConfidentialInstanceConfig").msgclass - DisplayDevice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DisplayDevice").msgclass - AcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AcceleratorConfig").msgclass - CustomerEncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CustomerEncryptionKey").msgclass - Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Entry").msgclass - Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Metadata").msgclass - NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface").msgclass - NetworkInterface::StackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.StackType").enummodule - NetworkInterface::Ipv6AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType").enummodule - NetworkInterface::NicType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.NicType").enummodule - NetworkPerformanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig").msgclass - NetworkPerformanceConfig::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier").enummodule - AccessConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig").msgclass - AccessConfig::AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.AccessType").enummodule - AccessConfig::NetworkTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.NetworkTier").enummodule - AliasIpRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AliasIpRange").msgclass - InstanceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InstanceParams").msgclass - AllocationAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity").msgclass - AllocationAffinity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity.Type").enummodule - Scheduling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling").msgclass - Scheduling::NodeAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity").msgclass - Scheduling::NodeAffinity::Operator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator").enummodule - Scheduling::OnHostMaintenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.OnHostMaintenance").enummodule - Scheduling::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.ProvisioningModel").enummodule - Scheduling::InstanceTerminationAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction").enummodule - SchedulingDuration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.SchedulingDuration").msgclass - ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceAccount").msgclass - Tags = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Tags").msgclass - AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk").msgclass - AttachedDisk::InitializeParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.InitializeParams").msgclass - AttachedDisk::DiskType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskType").enummodule - AttachedDisk::DiskMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskMode").enummodule - AttachedDisk::DiskInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskInterface").enummodule - AttachedDisk::DiskSavedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskSavedState").enummodule - GuestOsFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature").msgclass - GuestOsFeature::FeatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature.FeatureType").enummodule - KeyRevocationActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.KeyRevocationActionType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb deleted file mode 100644 index 75f9ea85ef49..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_alloydb_pb' -require 'google/cloud/backupdr/v1/backupvault_ba_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/cloud/backupdr/v1/backupvault_disk_pb' -require 'google/cloud/backupdr/v1/backupvault_gce_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n*google/cloud/backupdr/v1/backupvault.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/backupdr/v1/backupvault_alloydb.proto\x1a-google/cloud/backupdr/v1/backupvault_ba.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a/google/cloud/backupdr/v1/backupvault_disk.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9f\x0f\n\x0b\x42\x61\x63kupVault\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x46\n\x06labels\x18\x03 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.BackupVault.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12W\n*backup_minimum_enforced_retention_duration\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1b \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\tdeletable\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x16\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupVault.StateB\x03\xe0\x41\x03\x12<\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12total_stored_bytes\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x15 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12P\n\x0b\x61nnotations\x18\x16 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.AnnotationsEntryB\x03\xe0\x41\x01\x12X\n\x12\x61\x63\x63\x65ss_restriction\x18\x18 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.BackupVault.AccessRestrictionB\x03\xe0\x41\x01\x12[\n\x11\x65ncryption_config\x18\x1d \x01(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.EncryptionConfigB\x03\xe0\x41\x01H\x08\x88\x01\x01\x1ai\n\x10\x45ncryptionConfig\x12\x44\n\x0ckms_key_name\x18\x01 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x00\x88\x01\x01\x42\x0f\n\r_kms_key_name\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\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\"\x85\x01\n\x1a\x42\x61\x63kupRetentionInheritance\x12,\n(BACKUP_RETENTION_INHERITANCE_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_VAULT_RETENTION\x10\x01\x12\x1c\n\x18MATCH_BACKUP_EXPIRE_TIME\x10\x02\"_\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\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\"\x9e\x01\n\x11\x41\x63\x63\x65ssRestriction\x12\"\n\x1e\x41\x43\x43\x45SS_RESTRICTION_UNSPECIFIED\x10\x00\x12\x12\n\x0eWITHIN_PROJECT\x10\x01\x12\x17\n\x13WITHIN_ORGANIZATION\x10\x02\x12\x10\n\x0cUNRESTRICTED\x10\x03\x12&\n\"WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA\x10\x04:\x88\x01\xea\x41\x84\x01\n#backupdr.googleapis.com/BackupVault\x12\x42projects/{project}/locations/{location}/backupVaults/{backupvault}*\x0c\x62\x61\x63kupVaults2\x0b\x62\x61\x63kupVaultB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB-\n+_backup_minimum_enforced_retention_durationB\x1f\n\x1d_backup_retention_inheritanceB\x0c\n\n_deletableB\x07\n\x05_etagB\x11\n\x0f_effective_timeB\x14\n\x12_encryption_config\"\x8c\t\n\nDataSource\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05state\x18\x15 \x01(\x0e\x32*.google.cloud.backupdr.v1.DataSource.StateB\x03\xe0\x41\x03\x12\x45\n\x06labels\x18\x04 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.DataSource.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x07 \x01(\x03H\x03\x88\x01\x01\x12\x11\n\x04\x65tag\x18\x0e \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x12total_stored_bytes\x18\x17 \x01(\x03H\x05\x88\x01\x01\x12\x46\n\x0c\x63onfig_state\x18\x18 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12K\n\x12\x62\x61\x63kup_config_info\x18\x19 \x01(\x0b\x32*.google.cloud.backupdr.v1.BackupConfigInfoB\x03\xe0\x41\x03\x12S\n\x18\x64\x61ta_source_gcp_resource\x18\x1a \x01(\x0b\x32/.google.cloud.backupdr.v1.DataSourceGcpResourceH\x00\x12r\n(data_source_backup_appliance_application\x18\x1b \x01(\x0b\x32>.google.cloud.backupdr.v1.DataSourceBackupApplianceApplicationH\x00\x12\x37\n*backup_blocked_by_vault_access_restriction\x18\x1c \x01(\x08\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\"Q\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\t\n\x05\x45RROR\x10\x04:\x9e\x01\xea\x41\x9a\x01\n\"backupdr.googleapis.com/DataSource\x12[projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x11\n\x0fsource_resourceB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x0f\n\r_backup_countB\x07\n\x05_etagB\x15\n\x13_total_stored_bytes\"\xb1\x04\n\x10\x42\x61\x63kupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x46\n\x11gcp_backup_config\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.GcpBackupConfigH\x00\x12_\n\x1e\x62\x61\x63kup_appliance_backup_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.BackupApplianceBackupConfigH\x00\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\x0f\n\rbackup_config\"\xa4\x02\n\x0fGcpBackupConfig\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\x17\x62\x61\x63kup_plan_description\x18\x02 \x01(\t\x12S\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\tB2\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x19\n\x11\x62\x61\x63kup_plan_rules\x18\x04 \x03(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x05 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x06 \x01(\t\"\xba\x01\n\x1b\x42\x61\x63kupApplianceBackupConfig\x12\x1d\n\x15\x62\x61\x63kup_appliance_name\x18\x01 \x01(\t\x12\x1b\n\x13\x62\x61\x63kup_appliance_id\x18\x02 \x01(\x03\x12\x0e\n\x06sla_id\x18\x03 \x01(\x03\x12\x18\n\x10\x61pplication_name\x18\x04 \x01(\t\x12\x11\n\thost_name\x18\x05 \x01(\t\x12\x10\n\x08slt_name\x18\x06 \x01(\t\x12\x10\n\x08slp_name\x18\x07 \x01(\t\"\xaa\x04\n\x15\x44\x61taSourceGcpResource\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12o\n&compute_instance_datasource_properties\x18\x04 \x01(\x0b\x32=.google.cloud.backupdr.v1.ComputeInstanceDataSourcePropertiesH\x00\x12w\n(cloud_sql_instance_datasource_properties\x18\x05 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12s\n&alloy_db_cluster_datasource_properties\x18\x06 \x01(\x0b\x32<.google.cloud.backupdr.v1.AlloyDBClusterDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12X\n\x1a\x64isk_datasource_properties\x18\x07 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.DiskDataSourcePropertiesH\x00\x42\x19\n\x17gcp_resource_properties\"\xb9\x01\n$DataSourceBackupApplianceApplication\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_appliance\x18\x02 \x01(\t\x12\x14\n\x0c\x61ppliance_id\x18\x03 \x01(\x03\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x16\n\x0e\x61pplication_id\x18\x08 \x01(\x03\x12\x10\n\x08hostname\x18\x06 \x01(\t\x12\x0f\n\x07host_id\x18\x07 \x01(\x03\")\n\x0fServiceLockInfo\x12\x16\n\toperation\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x17\x42\x61\x63kupApplianceLockInfo\x12 \n\x13\x62\x61\x63kup_appliance_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\"\n\x15\x62\x61\x63kup_appliance_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0block_reason\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x08job_name\x18\x06 \x01(\tH\x00\x12\x16\n\x0c\x62\x61\x63kup_image\x18\x07 \x01(\tH\x00\x12\x10\n\x06sla_id\x18\x08 \x01(\x03H\x00\x42\r\n\x0block_source\"\xfe\x01\n\nBackupLock\x12\x38\n\x0flock_until_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12W\n\x1a\x62\x61\x63kup_appliance_lock_info\x18\x03 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.BackupApplianceLockInfoH\x00\x12K\n\x11service_lock_info\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.ServiceLockInfoB\x03\xe0\x41\x03H\x00\x42\x10\n\x0e\x43lientLockInfo\"\x80\x14\n\x06\x42\x61\x63kup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x39\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x41\n\x06labels\x18\x05 \x03(\x0b\x32,.google.cloud.backupdr.v1.Backup.LabelsEntryB\x03\xe0\x41\x01\x12I\n\x1b\x65nforced_retention_end_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1e \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x39\n\x0b\x65xpire_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12>\n\x10\x63onsistency_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\t\x88\x01\x01\x12\x16\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12:\n\x05state\x18\x0f \x01(\x0e\x32&.google.cloud.backupdr.v1.Backup.StateB\x03\xe0\x41\x03\x12@\n\rservice_locks\x18\x11 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x03\x12I\n\x16\x62\x61\x63kup_appliance_locks\x18\x12 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x01\x12l\n\"compute_instance_backup_properties\x18\x13 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.ComputeInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12o\n$cloud_sql_instance_backup_properties\x18\x1a \x01(\x0b\x32:.google.cloud.backupdr.v1.CloudSqlInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12l\n\"backup_appliance_backup_properties\x18\x15 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.BackupApplianceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x63\n\x1a\x61lloy_db_backup_properties\x18\x1b \x01(\x0b\x32\x38.google.cloud.backupdr.v1.AlloyDbClusterBackupPropertiesB\x03\xe0\x41\x03H\x00\x12U\n\x16\x64isk_backup_properties\x18\x1c \x01(\x0b\x32..google.cloud.backupdr.v1.DiskBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x45\n\x0b\x62\x61\x63kup_type\x18\x14 \x01(\x0e\x32+.google.cloud.backupdr.v1.Backup.BackupTypeB\x03\xe0\x41\x03\x12W\n\x14gcp_backup_plan_info\x18\x16 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfoB\x03\xe0\x41\x03H\x01\x12 \n\x13resource_size_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\"\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x19 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12H\n\x0cgcp_resource\x18\x1f \x01(\x0b\x32+.google.cloud.backupdr.v1.BackupGcpResourceB\x03\xe0\x41\x03H\x02\x12J\n\x10kms_key_versions\x18! \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a\xb2\x01\n\x11GCPBackupPlanInfo\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x13\x62\x61\x63kup_plan_rule_id\x18\x02 \x01(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x03 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x04 \x01(\t\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\t\n\x05\x45RROR\x10\x04\x12\r\n\tUPLOADING\x10\x05\"b\n\nBackupType\x12\x1b\n\x17\x42\x41\x43KUP_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\r\n\tON_DEMAND\x10\x02\x12\x19\n\x15ON_DEMAND_OPERATIONAL\x10\x03:\xa3\x01\xea\x41\x9f\x01\n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12lprojects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupB\x13\n\x11\x62\x61\x63kup_propertiesB\x0b\n\tplan_infoB\x11\n\x0fsource_resourceB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x1e\n\x1c_enforced_retention_end_timeB\x1f\n\x1d_backup_retention_inheritanceB\x0e\n\x0c_expire_timeB\x13\n\x11_consistency_timeB\x07\n\x05_etagB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xf4\x01\n\x18\x43reateBackupVaultRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x1c\n\x0f\x62\x61\x63kup_vault_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x03 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\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\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xf1\x01\n\x17ListBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12<\n\x04view\x18\x06 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x86\x01\n\x18ListBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x1e\x46\x65tchUsableBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\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\"\x8d\x01\n\x1f\x46\x65tchUsableBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8e\x02\n\"FetchBackupsForResourceTypeRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x07 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"q\n#FetchBackupsForResourceTypeResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x90\x01\n\x15GetBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12<\n\x04view\x18\x02 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x91\x02\n\x18UpdateBackupVaultRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x02 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\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\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x66orce_update_access_restriction\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xfc\x01\n\x18\x44\x65leteBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\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\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1dignore_backup_plan_references\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x16ListDataSourcesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/DataSource\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\"\x83\x01\n\x17ListDataSourcesResponse\x12:\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetDataSourceRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/DataSource\"\xcc\x01\n\x17UpdateDataSourceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12>\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32$.google.cloud.backupdr.v1.DataSourceB\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\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe2\x01\n\x12ListBackupsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x06 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"v\n\x13ListBackupsResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10GetBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x37\n\x04view\x18\x02 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"\xa3\x01\n\x13UpdateBackupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x06\x62\x61\x63kup\x18\x02 \x01(\x0b\x32 .google.cloud.backupdr.v1.BackupB\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\"l\n\x13\x44\x65leteBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xe2\x05\n\x14RestoreBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12i\n#compute_instance_target_environment\x18\x03 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironmentH\x00\x12R\n\x17\x64isk_target_environment\x18\x05 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskTargetEnvironmentH\x00\x12_\n\x1eregion_disk_target_environment\x18\x06 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.RegionDiskTargetEnvironmentH\x00\x12i\n#compute_instance_restore_properties\x18\x04 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceRestorePropertiesH\x01\x12R\n\x17\x64isk_restore_properties\x18\x07 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskRestorePropertiesH\x01\x12H\n\x1a\x63lear_overrides_field_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x14\n\x12target_environmentB\x15\n\x13instance_propertiesB\x1d\n\x1b_clear_overrides_field_mask\"Z\n\x15RestoreBackupResponse\x12\x41\n\x0ftarget_resource\x18\x01 \x01(\x0b\x32(.google.cloud.backupdr.v1.TargetResource\"g\n\x0eTargetResource\x12=\n\x0cgcp_resource\x18\x01 \x01(\x0b\x32%.google.cloud.backupdr.v1.GcpResourceH\x00\x42\x16\n\x14target_resource_info\"G\n\x0bGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"M\n\x11\x42\x61\x63kupGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t*Q\n\x11\x42\x61\x63kupConfigState\x12#\n\x1f\x42\x41\x43KUP_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07PASSIVE\x10\x02*V\n\nBackupView\x12\x1b\n\x17\x42\x41\x43KUP_VIEW_UNSPECIFIED\x10\x00\x12\x15\n\x11\x42\x41\x43KUP_VIEW_BASIC\x10\x01\x12\x14\n\x10\x42\x41\x43KUP_VIEW_FULL\x10\x02*m\n\x0f\x42\x61\x63kupVaultView\x12!\n\x1d\x42\x41\x43KUP_VAULT_VIEW_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42\x41\x43KUP_VAULT_VIEW_BASIC\x10\x01\x12\x1a\n\x16\x42\x41\x43KUP_VAULT_VIEW_FULL\x10\x02\x42\xda\x03\n\x1c\x63om.google.cloud.backupdr.v1B\x10\x42\x61\x63kupVaultProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41m\n!cloudkms.googleapis.com/CryptoKey\x12Hprojects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{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 BackupDR - module V1 - BackupVault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault").msgclass - BackupVault::EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.EncryptionConfig").msgclass - BackupVault::BackupRetentionInheritance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance").enummodule - BackupVault::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.State").enummodule - BackupVault::AccessRestriction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.AccessRestriction").enummodule - DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource").msgclass - DataSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource.State").enummodule - BackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo").msgclass - BackupConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState").enummodule - GcpBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpBackupConfig").msgclass - BackupApplianceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupConfig").msgclass - DataSourceGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResource").msgclass - DataSourceBackupApplianceApplication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupApplianceApplication").msgclass - ServiceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceLockInfo").msgclass - BackupApplianceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceLockInfo").msgclass - BackupLock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLock").msgclass - Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup").msgclass - Backup::GCPBackupPlanInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo").msgclass - Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.State").enummodule - Backup::BackupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.BackupType").enummodule - CreateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupVaultRequest").msgclass - ListBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsRequest").msgclass - ListBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsResponse").msgclass - FetchUsableBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest").msgclass - FetchUsableBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse").msgclass - FetchBackupsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest").msgclass - FetchBackupsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse").msgclass - GetBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupVaultRequest").msgclass - UpdateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupVaultRequest").msgclass - DeleteBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupVaultRequest").msgclass - ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesRequest").msgclass - ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesResponse").msgclass - GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceRequest").msgclass - UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateDataSourceRequest").msgclass - ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsRequest").msgclass - ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsResponse").msgclass - GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupRequest").msgclass - UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupRequest").msgclass - DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupRequest").msgclass - RestoreBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupRequest").msgclass - RestoreBackupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupResponse").msgclass - TargetResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TargetResource").msgclass - GcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpResource").msgclass - BackupGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupGcpResource").msgclass - BackupConfigState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigState").enummodule - BackupView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupView").enummodule - BackupVaultView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVaultView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb deleted file mode 100644 index ecfc1771ff13..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/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 BackupDR - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/backupdr/v1/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BackupDR"] - 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/[^/]+/managementServers/[^/]+/?$}, 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/[^/]+/managementServers/[^/]+/?$}, 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/[^/]+/managementServers/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb deleted file mode 100644 index 9186933eef02..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/datasourcereference.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/backupdr/v1/datasourcereference.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd7\x05\n\x13\x44\x61taSourceReference\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12?\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"backupdr.googleapis.com/DataSource\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x1f\x64\x61ta_source_backup_config_state\x18\x04 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12%\n\x18\x64\x61ta_source_backup_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x61\n\x1e\x64\x61ta_source_backup_config_info\x18\x06 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.DataSourceBackupConfigInfoB\x03\xe0\x41\x03\x12_\n\x1d\x64\x61ta_source_gcp_resource_info\x18\x07 \x01(\x0b\x32\x33.google.cloud.backupdr.v1.DataSourceGcpResourceInfoB\x03\xe0\x41\x03\x12$\n\x12total_stored_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01:\xb2\x01\xea\x41\xae\x01\n+backupdr.googleapis.com/DataSourceReference\x12Tprojects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}*\x14\x64\x61taSourceReferences2\x13\x64\x61taSourceReferenceB\x15\n\x13_total_stored_bytes\"\xca\x01\n\x1a\x44\x61taSourceBackupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xf2\x01\n\x19\x44\x61taSourceGcpResourceInfo\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12u\n\x1d\x63loud_sql_instance_properties\x18\x04 \x01(\x0b\x32G.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferencePropertiesB\x03\xe0\x41\x03H\x00\x42\x15\n\x13resource_properties\"b\n\x1dGetDataSourceReferenceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+backupdr.googleapis.com/DataSourceReference\"\xc3\x01\n\x1fListDataSourceReferencesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\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\"\x9f\x01\n ListDataSourceReferencesResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xef\x01\n/FetchDataSourceReferencesForResourceTypeRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n0FetchDataSourceReferencesForResourceTypeResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xc8\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x44\x61taSourceReferenceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceReference").msgclass - DataSourceBackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupConfigInfo").msgclass - DataSourceGcpResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResourceInfo").msgclass - GetDataSourceReferenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceReferenceRequest").msgclass - ListDataSourceReferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesRequest").msgclass - ListDataSourceReferencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesResponse").msgclass - FetchDataSourceReferencesForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest").msgclass - FetchDataSourceReferencesForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb deleted file mode 100644 index 373529d726c8..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/protection_summary.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/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/cloud/backupdr/v1/protection_summary.proto\x12\x18google.cloud.backupdr.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\x1fgoogle/protobuf/timestamp.proto\"\xba\x01\n ListResourceBackupConfigsRequest\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\"\x8d\x01\n!ListResourceBackupConfigsResponse\x12O\n\x17resource_backup_configs\x18\x01 \x03(\x0b\x32..google.cloud.backupdr.v1.ResourceBackupConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xec\x06\n\x14ResourceBackupConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1c\n\x0ftarget_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1ctarget_resource_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x14target_resource_type\x18\x05 \x01(\x0e\x32;.google.cloud.backupdr.v1.ResourceBackupConfig.ResourceTypeB\x03\xe0\x41\x03\x12h\n\x16target_resource_labels\x18\x06 \x03(\x0b\x32H.google.cloud.backupdr.v1.ResourceBackupConfig.TargetResourceLabelsEntry\x12M\n\x16\x62\x61\x63kup_configs_details\x18\x07 \x03(\x0b\x32-.google.cloud.backupdr.v1.BackupConfigDetails\x12\x1e\n\x11\x62\x61\x63kup_configured\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x07vaulted\x18\t \x01(\x08\x42\x03\xe0\x41\x03\x1a;\n\x19TargetResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x97\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LOUD_SQL_INSTANCE\x10\x01\x12\x15\n\x11\x43OMPUTE_ENGINE_VM\x10\x02\x12\x17\n\x13\x43OMPUTE_ENGINE_DISK\x10\x03\x12 \n\x1c\x43OMPUTE_ENGINE_REGIONAL_DISK\x10\x04:\xb7\x01\xea\x41\xb3\x01\n,backupdr.googleapis.com/ResourceBackupConfig\x12Vprojects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}*\x15resourceBackupConfigs2\x14resourceBackupConfig\"\xa2\x07\n\x13\x42\x61\x63kupConfigDetails\x12!\n\x14\x62\x61\x63kup_config_source\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12.\n!backup_config_source_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x04type\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupConfigDetails.TypeB\x03\xe0\x41\x03\x12G\n\x05state\x18\x04 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.BackupConfigDetails.StateB\x03\xe0\x41\x03\x12\x42\n\rpitr_settings\x18\x05 \x01(\x0b\x32&.google.cloud.backupdr.v1.PitrSettingsB\x03\xe0\x41\x03\x12\x46\n\x1dlatest_successful_backup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12 \n\x13\x61pplicable_resource\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61\x63kup_vault\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x10\x62\x61\x63kup_locations\x18\x0c \x03(\x0b\x32(.google.cloud.backupdr.v1.BackupLocation\x12M\n\x15\x62\x61\x63kup_dr_plan_config\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.BackupDrPlanConfigH\x00\x12U\n\x19\x62\x61\x63kup_dr_template_config\x18\x0b \x01(\x0b\x32\x30.google.cloud.backupdr.v1.BackupDrTemplateConfigH\x00\"\x97\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12$\n CLOUD_SQL_INSTANCE_BACKUP_CONFIG\x10\x01\x12\"\n\x1e\x43OMPUTE_ENGINE_RESOURCE_POLICY\x10\x02\x12\x18\n\x14\x42\x41\x43KUPDR_BACKUP_PLAN\x10\x03\x12\x15\n\x11\x42\x41\x43KUPDR_TEMPLATE\x10\x04\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\x16\n\x14plan_specific_config\"+\n\x0cPitrSettings\x12\x1b\n\x0eretention_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\"j\n\x16\x42\x61\x63kupDrTemplateConfig\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"^\n\x12\x42\x61\x63kupDrPlanConfig\x12H\n\x14\x62\x61\x63kup_dr_plan_rules\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.BackupDrPlanRule\"n\n\x10\x42\x61\x63kupDrPlanRule\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x1blast_successful_backup_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xb7\x01\n\x0e\x42\x61\x63kupLocation\x12@\n\x04type\x18\x01 \x01(\x0e\x32-.google.cloud.backupdr.v1.BackupLocation.TypeB\x03\xe0\x41\x03\x12\x18\n\x0blocation_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"I\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02\x12\x12\n\x0eMULTI_REGIONAL\x10\x03\x32\xcb\x02\n\x19\x42\x61\x63kupDrProtectionSummary\x12\xe0\x01\n\x19ListResourceBackupConfigs\x12:.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest\x1a;.google.cloud.backupdr.v1.ListResourceBackupConfigsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/resourceBackupConfigs\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x16ProtectionSummaryProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - ListResourceBackupConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListResourceBackupConfigsRequest").msgclass - ListResourceBackupConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListResourceBackupConfigsResponse").msgclass - ResourceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ResourceBackupConfig").msgclass - ResourceBackupConfig::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ResourceBackupConfig.ResourceType").enummodule - BackupConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails").msgclass - BackupConfigDetails::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails.Type").enummodule - BackupConfigDetails::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails.State").enummodule - PitrSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.PitrSettings").msgclass - BackupDrTemplateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrTemplateConfig").msgclass - BackupDrPlanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrPlanConfig").msgclass - BackupDrPlanRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrPlanRule").msgclass - BackupLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLocation").msgclass - BackupLocation::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLocation.Type").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb deleted file mode 100644 index 6bad6df6a175..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/backupdr/v1/protection_summary.proto for package 'Google.Cloud.BackupDR.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/backupdr/v1/protection_summary_pb' - -module Google - module Cloud - module BackupDR - module V1 - module BackupDrProtectionSummary - # The Protection Summary service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.backupdr.v1.BackupDrProtectionSummary' - - # Lists ResourceBackupConfigs. - rpc :ListResourceBackupConfigs, ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb deleted file mode 100644 index 9cc488ca2ae8..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/backupdr/v1/backupdr/rest" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" -require "google/cloud/backupdr/v1/bindings_override" -require "google/cloud/backupdr/v1/version" - -module Google - module Cloud - module BackupDR - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/backupdr/v1/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb deleted file mode 100644 index e74b73cd9c04..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/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 BackupDR - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md deleted file mode 100644 index c891244acc73..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Backup and DR 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-backupdr-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb deleted file mode 100644 index de97c93454cf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb +++ /dev/null @@ -1,415 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # Network configuration for ManagementServer instance. - # @!attribute [rw] network - # @return [::String] - # Optional. The resource name of the Google Compute Engine VPC network to - # which the ManagementServer instance is connected. - # @!attribute [rw] peering_mode - # @return [::Google::Cloud::BackupDR::V1::NetworkConfig::PeeringMode] - # Optional. The network connect mode of the ManagementServer instance. For - # this version, only PRIVATE_SERVICE_ACCESS is supported. - class NetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VPC peering modes supported by Cloud BackupDR. - module PeeringMode - # Peering mode not set. - PEERING_MODE_UNSPECIFIED = 0 - - # Connect using Private Service Access to the Management Server. Private - # services access provides an IP address range for multiple Google Cloud - # services, including Cloud BackupDR. - PRIVATE_SERVICE_ACCESS = 1 - end - end - - # ManagementURI for the Management Server resource. - # @!attribute [r] web_ui - # @return [::String] - # Output only. The ManagementServer AGM/RD WebUI URL. - # @!attribute [r] api - # @return [::String] - # Output only. The ManagementServer AGM/RD API URL. - class ManagementURI - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. - # @!attribute [r] first_party_management_uri - # @return [::String] - # Output only. First party Management URI for Google Identities. - # @!attribute [r] third_party_management_uri - # @return [::String] - # Output only. Third party Management URI for External Identity Providers. - class WorkforceIdentityBasedManagementURI - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, - # @!attribute [r] first_party_oauth2_client_id - # @return [::String] - # Output only. First party OAuth Client ID for Google Identities. - # @!attribute [r] third_party_oauth2_client_id - # @return [::String] - # Output only. Third party OAuth Client ID for External Identity Providers. - class WorkforceIdentityBasedOAuth2ClientID - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ManagementServer describes a single BackupDR ManagementServer instance. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the ManagementServer instance (2048 characters - # or less). - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # Labels currently defined: - # 1. migrate_from_go= - # If set to true, the MS is created in migration ready mode. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceType] - # Optional. The type of the ManagementServer resource. - # @!attribute [r] management_uri - # @return [::Google::Cloud::BackupDR::V1::ManagementURI] - # Output only. The hostname or ip address of the exposed AGM endpoints, used - # by clients to connect to AGM/RD graphical user interface and APIs. - # @!attribute [r] workforce_identity_based_management_uri - # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedManagementURI] - # Output only. The hostnames of the exposed AGM endpoints for both types of - # user i.e. 1p and 3p, used to connect AGM/RM UI. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceState] - # Output only. The ManagementServer state. - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkConfig>] - # Optional. VPC networks to which the ManagementServer instance is connected. - # For this version, only a single network is supported. This field is - # optional if MS is created without PSA - # @!attribute [rw] etag - # @return [::String] - # Optional. Server specified ETag for the ManagementServer resource to - # prevent simultaneous updates from overwiting each other. - # @!attribute [r] oauth2_client_id - # @return [::String] - # Output only. The OAuth 2.0 client id is required to make API calls to the - # BackupDR instance API of this ManagementServer. This is the value that - # should be provided in the 'aud' field of the OIDC ID Token (see openid - # specification - # https://openid.net/specs/openid-connect-core-1_0.html#IDToken). - # @!attribute [r] workforce_identity_based_oauth2_client_id - # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedOAuth2ClientID] - # Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. - # @!attribute [r] ba_proxy_uri - # @return [::Array<::String>] - # Output only. The hostname or ip address of the exposed AGM endpoints, used - # by BAs to connect to BA proxy. - # @!attribute [r] satisfies_pzs - # @return [::Google::Protobuf::BoolValue] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - class ManagementServer - 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 - - # Type of backup service resource. - module InstanceType - # Instance type is not mentioned. - INSTANCE_TYPE_UNSPECIFIED = 0 - - # Instance for backup and restore management (i.e., AGM). - BACKUP_RESTORE = 1 - end - - # State of Management server instance. - module InstanceState - # State not set. - INSTANCE_STATE_UNSPECIFIED = 0 - - # The instance is being created. - CREATING = 1 - - # The instance has been created and is fully usable. - READY = 2 - - # The instance configuration is being updated. Certain kinds of updates - # may cause the instance to become unusable while the update is in - # progress. - UPDATING = 3 - - # The instance is being deleted. - DELETING = 4 - - # The instance is being repaired and may be unstable. - REPAIRING = 5 - - # Maintenance is being performed on this instance. - MAINTENANCE = 6 - - # The instance is experiencing an issue and might be unusable. You can get - # further details from the statusMessage field of Instance resource. - ERROR = 7 - end - end - - # Request message for listing management servers. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve management servers - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud BackupDR, locations map to Google Cloud regions, for example - # **us-central1**. To retrieve management servers for all locations, use "-" - # for the - # '\\{location}' value. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListManagementServersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing management servers. - # @!attribute [rw] management_servers - # @return [::Array<::Google::Cloud::BackupDR::V1::ManagementServer>] - # The list of ManagementServer instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return management servers in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!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 ListManagementServersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a management server instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the management server resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' - class GetManagementServerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a management server instance. - # @!attribute [rw] parent - # @return [::String] - # Required. The management server project and location in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR - # locations map to Google Cloud regions, for example **us-central1**. - # @!attribute [rw] management_server_id - # @return [::String] - # Required. The name of the management server to create. The name must be - # unique for the specified project and location. - # @!attribute [rw] management_server - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # Required. A [management server - # resource][google.cloud.backupdr.v1.ManagementServer] - # @!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 CreateManagementServerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a management server 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). - class DeleteManagementServerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for initializing the service. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the serviceConfig used to initialize the - # service. Format: - # `projects/{project_id}/locations/{location}/serviceConfig`. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The resource type to which the default service config will be - # applied. Examples include, "compute.googleapis.com/Instance" and - # "storage.googleapis.com/Bucket". - # @!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 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). - # @!attribute [rw] cloud_sql_instance_initialization_config - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig] - # Optional. The configuration for initializing a Cloud SQL instance. - class InitializeServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for initializing the service. - # @!attribute [rw] backup_vault_name - # @return [::String] - # The resource name of the default `BackupVault` created. - # Format: - # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - # @!attribute [rw] backup_plan_name - # @return [::String] - # The resource name of the default `BackupPlan` created. - # Format: - # `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`. - class InitializeServiceResponse - 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. - # @!attribute [r] additional_info - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. AdditionalInfo contains additional Info related to backup plan - # association resource. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AdditionalInfoEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb deleted file mode 100644 index f7ce82fba389..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb +++ /dev/null @@ -1,588 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # A `BackupPlan` specifies some common fields, such as `description` as well - # as one or more `BackupRule` messages. Each `BackupRule` has a retention - # policy and defines a schedule by which the system is to perform backup - # workloads. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of the `BackupPlan`. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the `BackupPlan` resource. - # - # The description allows for additional details about `BackupPlan` and its - # use cases to be provided. An example description is the following: "This - # is a backup plan that performs a daily backup at 6pm and retains data for 3 - # months". The description must be at most 2048 characters. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. This collection of key/value pairs allows for custom labels to be - # supplied by the user. Example, \\{"tag": "Weekly"}. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the `BackupPlan` was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the `BackupPlan` was last updated. - # @!attribute [rw] backup_rules - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupRule>] - # Required. The backup rules for this `BackupPlan`. There must be at least - # one `BackupRule` message. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupPlan::State] - # Output only. The `State` for the `BackupPlan`. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The resource type to which the `BackupPlan` will be applied. - # Examples include, "compute.googleapis.com/Instance", - # "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", - # "compute.googleapis.com/Disk". - # @!attribute [rw] etag - # @return [::String] - # Optional. `etag` is returned from the service in the response. As a user of - # the service, you may provide an etag value in this field to prevent stale - # resources. - # @!attribute [rw] backup_vault - # @return [::String] - # Required. Resource name of backup vault which will be used as storage - # location for backups. Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault} - # @!attribute [r] backup_vault_service_account - # @return [::String] - # Output only. The Google Cloud Platform Service Account to be used by the - # BackupVault for taking backups. Specify the email address of the Backup - # Vault Service Account. - # @!attribute [rw] log_retention_days - # @return [::Integer] - # Optional. Applicable only for CloudSQL and AlloyDB resource_type. - # - # Configures how long logs will be stored. It is defined in “days”. This - # value should be greater than or equal to minimum enforced log retention - # duration of the backup vault. - # @!attribute [r] supported_resource_types - # @return [::Array<::String>] - # Output only. All resource types to which backupPlan can be applied. - # @!attribute [r] revision_id - # @return [::String] - # Output only. The user friendly revision ID of the `BackupPlanRevision`. - # - # Example: v0, v1, v2, etc. - # @!attribute [r] revision_name - # @return [::String] - # Output only. The resource id of the `BackupPlanRevision`. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` - class BackupPlan - 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 - - # `State` enumerates the possible states for a `BackupPlan`. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The resource is being created. - CREATING = 1 - - # The resource has been created and is fully usable. - ACTIVE = 2 - - # The resource is being deleted. - DELETING = 3 - - # The resource has been created but is not usable. - INACTIVE = 4 - - # The resource is being updated. - UPDATING = 5 - end - end - - # `BackupRule` binds the backup schedule to a retention policy. - # @!attribute [rw] rule_id - # @return [::String] - # Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is - # unique per `BackupPlan`.The `rule_id` must start with a lowercase letter - # followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, - # /[a-z][a-z0-9-]\\{,62}/. - # @!attribute [rw] backup_retention_days - # @return [::Integer] - # Required. Configures the duration for which backup data will be kept. It is - # defined in “days”. The value should be greater than or equal to minimum - # enforced retention of the backup vault. - # - # Minimum value is 1 and maximum value is 36159 for custom retention - # on-demand backup. - # Minimum and maximum values are workload specific for all other rules. - # @!attribute [rw] standard_schedule - # @return [::Google::Cloud::BackupDR::V1::StandardSchedule] - # Optional. Defines a schedule that runs within the confines of a defined - # window of time. - class BackupRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StandardSchedule` defines a schedule that run within the confines of a - # defined window of days. We can define recurrence type for schedule as - # HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. - # @!attribute [rw] recurrence_type - # @return [::Google::Cloud::BackupDR::V1::StandardSchedule::RecurrenceType] - # Required. Specifies the `RecurrenceType` for the schedule. - # @!attribute [rw] hourly_frequency - # @return [::Integer] - # Optional. Specifies frequency for hourly backups. A hourly frequency of 2 - # means jobs will run every 2 hours from start time till end time defined. - # - # This is required for `recurrence_type`, `HOURLY` and is not applicable - # otherwise. A validation error will occur if a value is supplied and - # `recurrence_type` is not `HOURLY`. - # - # Value of hourly frequency should be between 4 and 23. - # - # Reason for limit : We found that there is bandwidth limitation of 3GB/S for - # GMI while taking a backup and 5GB/S while doing a restore. Given the amount - # of parallel backups and restore we are targeting, this will potentially - # take the backup time to mins and hours (in worst case scenario). - # @!attribute [rw] days_of_week - # @return [::Array<::Google::Type::DayOfWeek>] - # Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs - # will run. - # - # This is required for `recurrence_type`, `WEEKLY` and is not applicable - # otherwise. A validation error will occur if a value is supplied and - # `recurrence_type` is not `WEEKLY`. - # @!attribute [rw] days_of_month - # @return [::Array<::Integer>] - # Optional. Specifies days of months like 1, 5, or 14 on which jobs will run. - # - # Values for `days_of_month` are only applicable for `recurrence_type`, - # `MONTHLY` and `YEARLY`. A validation error will occur if other values are - # supplied. - # @!attribute [rw] week_day_of_month - # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth] - # Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST - # MONDAY, on which jobs will run. This will be specified by two fields in - # `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, - # e.g. `LAST`. - # - # This field is only applicable for `recurrence_type`, `MONTHLY` and - # `YEARLY`. A validation error will occur if other values are supplied. - # @!attribute [rw] months - # @return [::Array<::Google::Type::Month>] - # Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on - # which jobs will run. - # - # This field is only applicable when `recurrence_type` is `YEARLY`. A - # validation error will occur if other values are supplied. - # @!attribute [rw] backup_window - # @return [::Google::Cloud::BackupDR::V1::BackupWindow] - # Required. A BackupWindow defines the window of day during which backup jobs - # will run. Jobs are queued at the beginning of the window and will be marked - # as `NOT_RUN` if they do not start by the end of the window. - # - # Note: running jobs will not be cancelled at the end of the window. - # @!attribute [rw] time_zone - # @return [::String] - # Required. The time zone to be used when interpreting the schedule. - # The value of this field must be a time zone name from the IANA tz database. - # See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the - # list of valid timezone names. For e.g., Europe/Paris. - class StandardSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `RecurrenceTypes` enumerates the applicable periodicity for the schedule. - module RecurrenceType - # recurrence type not set - RECURRENCE_TYPE_UNSPECIFIED = 0 - - # The `BackupRule` is to be applied hourly. - HOURLY = 1 - - # The `BackupRule` is to be applied daily. - DAILY = 2 - - # The `BackupRule` is to be applied weekly. - WEEKLY = 3 - - # The `BackupRule` is to be applied monthly. - MONTHLY = 4 - - # The `BackupRule` is to be applied yearly. - YEARLY = 5 - end - end - - # `BackupWindow` defines a window of the day during which backup jobs will run. - # @!attribute [rw] start_hour_of_day - # @return [::Integer] - # Required. The hour of day (0-23) when the window starts for e.g. if value - # of start hour of day is 6 that mean backup window start at 6:00. - # @!attribute [rw] end_hour_of_day - # @return [::Integer] - # Required. The hour of day (1-24) when the window end for e.g. if value of - # end hour of day is 10 that mean backup window end time is 10:00. - # - # End hour of day should be greater than start hour of day. - # 0 <= start_hour_of_day < end_hour_of_day <= 24 - # - # End hour of day is not include in backup window that mean if - # end_hour_of_day= 10 jobs should start before 10:00. - class BackupWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `WeekDayOfMonth` defines the week day of the month on which the backups will - # run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values - # like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. - # @!attribute [rw] week_of_month - # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth::WeekOfMonth] - # Required. Specifies the week of the month. - # @!attribute [rw] day_of_week - # @return [::Google::Type::DayOfWeek] - # Required. Specifies the day of the week. - class WeekDayOfMonth - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, - # third, or last week of the month. - module WeekOfMonth - # The zero value. Do not use. - WEEK_OF_MONTH_UNSPECIFIED = 0 - - # The first week of the month. - FIRST = 1 - - # The second week of the month. - SECOND = 2 - - # The third week of the month. - THIRD = 3 - - # The fourth week of the month. - FOURTH = 4 - - # The last week of the month. - LAST = 5 - end - end - - # The request message for creating a `BackupPlan`. - # @!attribute [rw] parent - # @return [::String] - # Required. The `BackupPlan` project and location in the format - # `projects/{project}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @!attribute [rw] backup_plan_id - # @return [::String] - # Required. The name of the `BackupPlan` to create. The name must be unique - # for the specified project and location.The name must start with a lowercase - # letter followed by up to 62 lowercase letters, numbers, or hyphens. - # Pattern, /[a-z][a-z0-9-]\\{,62}/. - # @!attribute [rw] backup_plan - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # Required. The `BackupPlan` resource object to create. - # @!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 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 CreateBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for getting a list `BackupPlan`. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve `BackupPlans` - # information. Format: `projects/{project}/locations/{location}`. In Cloud - # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - # retrieve backup plans for all locations, use "-" for the - # `{location}` value. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListBackupPlansRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for getting a list of `BackupPlan`. - # @!attribute [rw] backup_plans - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlan>] - # The list of `BackupPlans` in the project for the specified - # location. - # - # If the `{location}` value in the request is "-", the response contains a - # list of resources from all locations. In case any location is unreachable, - # the response will only return backup plans in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # BackupPlan - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest#page_token page_token} in - # a subsequent `ListBackupPlans` call to retrieve the next page of results. - # If this field is omitted or empty, then there are no more results to - # return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupPlansResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for getting a `BackupPlan`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the `BackupPlan` to retrieve. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - class GetBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for deleting a `BackupPlan`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the `BackupPlan` to delete. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @!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). - class DeleteBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a backup plan. - # @!attribute [rw] backup_plan - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # Required. The resource being updated - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlan 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 the request will fail. - # Currently, these fields are supported in update: description, schedules, - # retention period, adding and removing Backup Rules. - # @!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 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 UpdateBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in - # time. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of the `BackupPlanRevision`. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # @!attribute [r] revision_id - # @return [::String] - # Output only. The user friendly revision ID of the `BackupPlanRevision`. - # - # Example: v0, v1, v2, etc. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision::State] - # Output only. Resource State - # @!attribute [rw] backup_plan_snapshot - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # The Backup Plan being encompassed by this revision. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp that the revision was created. - class BackupPlanRevision - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the `BackupPlanRevision`. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The resource is being created. - CREATING = 1 - - # The resource has been created and is fully usable. - ACTIVE = 2 - - # The resource is being deleted. - DELETING = 3 - - # The resource has been created but is not usable. - INACTIVE = 4 - end - end - - # The request message for getting a `BackupPlanRevision`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the `BackupPlanRevision` to retrieve. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - class GetBackupPlanRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for getting a list of `BackupPlanRevision`. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve - # `BackupPlanRevisions` information. Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In - # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - class ListBackupPlanRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for getting a list of `BackupPlanRevision`. - # @!attribute [rw] backup_plan_revisions - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # The list of `BackupPlanRevisions` in the project for the specified - # location. - # - # If the `{location}` value in the request is "-", the response contains a - # list of resources from all locations. In case any location is unreachable, - # the response will only return backup plans in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest#page_token page_token} - # in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupPlanRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb deleted file mode 100644 index b6e38383477c..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb +++ /dev/null @@ -1,388 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # A BackupPlanAssociation represents a single BackupPlanAssociation which - # contains details like workload, backup plan etc - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of BackupPlanAssociation in - # below format Format : - # projects/\\{project}/locations/\\{location}/backupPlanAssociations/\\{backupPlanAssociationId} - # @!attribute [rw] resource_type - # @return [::String] - # Required. Immutable. Resource type of workload on which backupplan is - # applied - # @!attribute [rw] resource - # @return [::String] - # Required. Immutable. Resource name of workload on which the backup plan is - # applied. - # - # The format can either be the resource name (e.g., - # "projects/my-project/zones/us-central1-a/instances/my-instance") or the - # full resource URI (e.g., - # "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance"). - # @!attribute [rw] backup_plan - # @return [::String] - # Required. Resource name of backup plan which needs to be applied on - # workload. Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation::State] - # Output only. The BackupPlanAssociation resource state. - # @!attribute [r] rules_config_info - # @return [::Array<::Google::Cloud::BackupDR::V1::RuleConfigInfo>] - # Output only. The config info related to backup rules. - # @!attribute [r] data_source - # @return [::String] - # Output only. Resource name of data source which will be used as storage - # location for backups taken. Format : - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault}/dataSources/\\{datasource} - # @!attribute [r] cloud_sql_instance_backup_plan_association_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupPlanAssociationProperties] - # Output only. Cloud SQL instance's backup plan association properties. - # - # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_plan_association_properties`, `alloydb_cluster_backup_plan_association_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] alloydb_cluster_backup_plan_association_properties - # @return [::Google::Cloud::BackupDR::V1::AlloyDBClusterBackupPlanAssociationProperties] - # Output only. AlloyDB cluster's backup plan association properties. - # - # Note: The following fields are mutually exclusive: `alloydb_cluster_backup_plan_association_properties`, `cloud_sql_instance_backup_plan_association_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_plan_revision_id - # @return [::String] - # Output only. The user friendly revision ID of the `BackupPlanRevision`. - # - # Example: v0, v1, v2, etc. - # @!attribute [r] backup_plan_revision_name - # @return [::String] - # Output only. The resource id of the `BackupPlanRevision`. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` - class BackupPlanAssociation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for State of BackupPlan Association - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The resource is being created. - CREATING = 1 - - # The resource has been created and is fully usable. - ACTIVE = 2 - - # The resource is being deleted. - DELETING = 3 - - # The resource has been created but is not usable. - INACTIVE = 4 - - # The resource is being updated. - UPDATING = 5 - end - end - - # Message for rules config info. - # @!attribute [r] rule_id - # @return [::String] - # Output only. Backup Rule id fetched from backup plan. - # @!attribute [r] last_backup_state - # @return [::Google::Cloud::BackupDR::V1::RuleConfigInfo::LastBackupState] - # Output only. The last backup state for rule. - # @!attribute [r] last_backup_error - # @return [::Google::Rpc::Status] - # Output only. google.rpc.Status object to store the last backup error. - # @!attribute [r] last_successful_backup_consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The point in time when the last successful backup was captured - # from the source. - class RuleConfigInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for LastBackupState - module LastBackupState - # State not set. - LAST_BACKUP_STATE_UNSPECIFIED = 0 - - # The first backup is pending. - FIRST_BACKUP_PENDING = 1 - - # The most recent backup could not be run/failed because of the lack of - # permissions. - PERMISSION_DENIED = 2 - - # The last backup operation succeeded. - SUCCEEDED = 3 - - # The last backup operation failed. - FAILED = 4 - end - end - - # Request message for creating a backup plan. - # @!attribute [rw] parent - # @return [::String] - # Required. The backup plan association project and location in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @!attribute [rw] backup_plan_association_id - # @return [::String] - # Required. The name of the backup plan association to create. The name must - # be unique for the specified project and location. - # @!attribute [rw] backup_plan_association - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # 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 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 CreateBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for List BackupPlanAssociation - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve backup Plan - # Associations information, in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - # map to GCP regions, for example **us-central1**. To retrieve backup plan - # associations for all locations, use "-" for the - # `{location}` value. - # @!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. Filtering results - class ListBackupPlanAssociationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for List BackupPlanAssociation - # @!attribute [rw] backup_plan_associations - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # The list of Backup Plan Associations in the project for the specified - # location. - # - # If the `{location}` value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return backup plan associations in reachable - # locations and the 'unreachable' field will be populated with a list of - # unreachable locations. - # @!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 ListBackupPlanAssociationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the FetchBackupPlanAssociationsForResourceType method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of BackupPlanAssociations to return. The - # service may return fewer than this value. If unspecified, at most 50 - # BackupPlanAssociations will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupPlanAssociationsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupPlanAssociationsForResourceType` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * resource - # * backup_plan - # * state - # * data_source - # * cloud_sql_instance_backup_plan_association_properties.instance_create_time - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - class FetchBackupPlanAssociationsForResourceTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the FetchBackupPlanAssociationsForResourceType method. - # @!attribute [r] backup_plan_associations - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # Output only. The BackupPlanAssociations from the specified parent. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. 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 FetchBackupPlanAssociationsForResourceTypeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a BackupPlanAssociation resource. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - class GetBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a backup plan association. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @!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). - class DeleteBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a backup plan association. - # @!attribute [rw] backup_plan_association - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # Required. The resource being updated - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlanAssociation 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 the request will fail. - # Currently backup_plan_association.backup_plan is the only supported field. - # @!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 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 UpdateBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for triggering a backup. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @!attribute [rw] rule_id - # @return [::String] - # Required. backup rule_id for which a backup needs to be triggered. - # @!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). - class TriggerBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb deleted file mode 100644 index 02c9559e5abc..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb +++ /dev/null @@ -1,1364 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # Message describing a BackupVault object. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Name of the backup vault to create. It must have - # the - # format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. - # `{backupvault}` cannot be changed after creation. It must be between 3-63 - # characters long and must be unique within the project and location. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the BackupVault instance (2048 characters or - # less). - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # No labels currently defined: - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] backup_minimum_enforced_retention_duration - # @return [::Google::Protobuf::Duration] - # Required. The default and minimum enforced retention for each backup within - # the backup vault. The enforced retention for each backup can be extended. - # @!attribute [rw] backup_retention_inheritance - # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] - # Optional. Setting for how a backup's enforced retention end time is - # inherited. - # @!attribute [r] deletable - # @return [::Boolean] - # Output only. Set to true when there are no backups nested under this - # resource. - # @!attribute [rw] etag - # @return [::String] - # Optional. Server specified ETag for the backup vault resource to - # prevent simultaneous updates from overwiting each other. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupVault::State] - # Output only. The BackupVault resource instance state. - # @!attribute [rw] effective_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Time after which the BackupVault resource is locked. - # @!attribute [r] backup_count - # @return [::Integer] - # Output only. The number of backups in this backup vault. - # @!attribute [r] service_account - # @return [::String] - # Output only. Service account used by the BackupVault Service for this - # BackupVault. The user should grant this account permissions in their - # workload project to enable the service to run backups and restores there. - # @!attribute [r] total_stored_bytes - # @return [::Integer] - # Output only. Total size of the storage used by all backup resources. - # @!attribute [r] uid - # @return [::String] - # Output only. Immutable after resource creation until resource deletion. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User annotations. See https://google.aip.dev/128#annotations - # Stores small amounts of arbitrary data. - # @!attribute [rw] access_restriction - # @return [::Google::Cloud::BackupDR::V1::BackupVault::AccessRestriction] - # Optional. Restricts access to certain sources and destinations for data - # being sent into, or restored from, the backup vault. - # Defaults to WITHIN_ORGANIZATION if not provided during creation. - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::BackupDR::V1::BackupVault::EncryptionConfig] - # Optional. The encryption config of the backup vault. - class BackupVault - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message describing the EncryptionConfig of backup vault. - # This determines how data within the vault is encrypted at rest. - # @!attribute [rw] kms_key_name - # @return [::String] - # Optional. The Cloud KMS key name to encrypt backups in this backup vault. - # Must be in the same region as the vault. Some workload backups like - # compute disk backups may use their inherited source key instead. Format: - # projects/\\{project}/locations/\\{location}/keyRings/\\{ring}/cryptoKeys/\\{key} - class EncryptionConfig - 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # How a backup's enforced retention end time is inherited. - module BackupRetentionInheritance - # Inheritance behavior not set. This will default to - # `INHERIT_VAULT_RETENTION`. - BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0 - - # The enforced retention end time of a backup will be inherited from the - # backup vault's `backup_minimum_enforced_retention_duration` field. - # - # This is the default behavior. - INHERIT_VAULT_RETENTION = 1 - - # The enforced retention end time of a backup will always match the expire - # time of the backup. - # - # If this is set, the backup's enforced retention end time will be set to - # match the expire time during creation of the backup. When updating, the - # ERET and expire time must be updated together and have the same value. - # Invalid update requests will be rejected by the server. - MATCH_BACKUP_EXPIRE_TIME = 2 - end - - # Holds the state of the backup vault resource. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The backup vault is being created. - CREATING = 1 - - # The backup vault has been created and is fully usable. - ACTIVE = 2 - - # The backup vault is being deleted. - DELETING = 3 - - # The backup vault is experiencing an issue and might be unusable. - ERROR = 4 - - # The backup vault is being updated. - UPDATING = 5 - end - - # Holds the access restriction for the backup vault. - module AccessRestriction - # Access restriction not set. If user does not provide any value or pass - # this value, it will be changed to WITHIN_ORGANIZATION. - ACCESS_RESTRICTION_UNSPECIFIED = 0 - - # Access to or from resources outside your current project will be denied. - WITHIN_PROJECT = 1 - - # Access to or from resources outside your current organization will be - # denied. - WITHIN_ORGANIZATION = 2 - - # No access restriction. - UNRESTRICTED = 3 - - # Access to or from resources outside your current organization will be - # denied except for backup appliance. - WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4 - end - end - - # Message describing a DataSource object. - # Datasource object used to represent Datasource details for both admin and - # basic view. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Name of the datasource to create. - # It must have the - # format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. - # `{datasource}` cannot be changed after creation. It must be between 3-63 - # characters long and must be unique within the backup vault. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::DataSource::State] - # Output only. The DataSource resource instance state. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # No labels currently defined: - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] backup_count - # @return [::Integer] - # Number of backups in the data source. - # @!attribute [rw] etag - # @return [::String] - # Server specified ETag for the ManagementServer resource to prevent - # simultaneous updates from overwiting each other. - # @!attribute [rw] total_stored_bytes - # @return [::Integer] - # The number of bytes (metadata and data) stored in this datasource. - # @!attribute [r] config_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] - # Output only. The backup configuration state. - # @!attribute [r] backup_config_info - # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo] - # Output only. Details of how the resource is configured for backup. - # @!attribute [rw] data_source_gcp_resource - # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResource] - # The backed up resource is a Google Cloud resource. - # The word 'DataSource' was included in the names to indicate that this is - # the representation of the Google Cloud resource used within the - # DataSource object. - # - # Note: The following fields are mutually exclusive: `data_source_gcp_resource`, `data_source_backup_appliance_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_source_backup_appliance_application - # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupApplianceApplication] - # The backed up resource is a backup appliance application. - # - # Note: The following fields are mutually exclusive: `data_source_backup_appliance_application`, `data_source_gcp_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_blocked_by_vault_access_restriction - # @return [::Boolean] - # Output only. This field is set to true if the backup is blocked by vault - # access restriction. - class DataSource - 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 - - # Holds the state of the data source resource. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The data source is being created. - CREATING = 1 - - # The data source has been created and is fully usable. - ACTIVE = 2 - - # The data source is being deleted. - DELETING = 3 - - # The data source is experiencing an issue and might be unusable. - ERROR = 4 - end - end - - # BackupConfigInfo has information about how the resource is configured - # for Backup and about the most recent backup to this vault. - # @!attribute [r] last_backup_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] - # Output only. The status of the last backup to this BackupVault - # @!attribute [r] last_successful_backup_consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. If the last backup were successful, this field has the - # consistency date. - # @!attribute [r] last_backup_error - # @return [::Google::Rpc::Status] - # Output only. If the last backup failed, this field has the error message. - # @!attribute [rw] gcp_backup_config - # @return [::Google::Cloud::BackupDR::V1::GcpBackupConfig] - # Configuration for a Google Cloud resource. - # - # Note: The following fields are mutually exclusive: `gcp_backup_config`, `backup_appliance_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] backup_appliance_backup_config - # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupConfig] - # Configuration for an application backed up by a Backup Appliance. - # - # Note: The following fields are mutually exclusive: `backup_appliance_backup_config`, `gcp_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupConfigInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # LastBackupstate tracks whether the last backup was not yet started, - # successful, failed, or could not be run because of the lack of permissions. - module LastBackupState - # Status not set. - LAST_BACKUP_STATE_UNSPECIFIED = 0 - - # The first backup has not yet completed - FIRST_BACKUP_PENDING = 1 - - # The most recent backup was successful - SUCCEEDED = 2 - - # The most recent backup failed - FAILED = 3 - - # The most recent backup could not be run/failed because of the lack of - # permissions - PERMISSION_DENIED = 4 - end - end - - # GcpBackupConfig captures the Backup configuration details for Google Cloud - # resources. All Google Cloud resources regardless of type are protected with - # backup plan associations. - # @!attribute [rw] backup_plan - # @return [::String] - # The name of the backup plan. - # @!attribute [rw] backup_plan_description - # @return [::String] - # The description of the backup plan. - # @!attribute [rw] backup_plan_association - # @return [::String] - # The name of the backup plan association. - # @!attribute [rw] backup_plan_rules - # @return [::Array<::String>] - # The names of the backup plan rules which point to this backupvault - # @!attribute [rw] backup_plan_revision_name - # @return [::String] - # The name of the backup plan revision. - # @!attribute [rw] backup_plan_revision_id - # @return [::String] - # The user friendly id of the backup plan revision. - # E.g. v0, v1 etc. - class GcpBackupConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupApplianceBackupConfig captures the backup configuration for - # applications that are protected by Backup Appliances. - # @!attribute [rw] backup_appliance_name - # @return [::String] - # The name of the backup appliance. - # @!attribute [rw] backup_appliance_id - # @return [::Integer] - # The ID of the backup appliance. - # @!attribute [rw] sla_id - # @return [::Integer] - # The ID of the SLA of this application. - # @!attribute [rw] application_name - # @return [::String] - # The name of the application. - # @!attribute [rw] host_name - # @return [::String] - # The name of the host where the application is running. - # @!attribute [rw] slt_name - # @return [::String] - # The name of the SLT associated with the application. - # @!attribute [rw] slp_name - # @return [::String] - # The name of the SLP associated with the application. - class BackupApplianceBackupConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataSourceGcpResource is used for protected resources that are Google Cloud - # Resources. This name is easeier to understand than GcpResourceDataSource or - # GcpDataSourceResource - # @!attribute [r] gcp_resourcename - # @return [::String] - # Output only. Full resource pathname URL of the source Google Cloud - # resource. - # @!attribute [rw] location - # @return [::String] - # Location of the resource: //"global"/"unspecified". - # @!attribute [rw] type - # @return [::String] - # The type of the Google Cloud resource. Use the Unified Resource Type, - # eg. compute.googleapis.com/Instance. - # @!attribute [rw] compute_instance_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceDataSourceProperties] - # ComputeInstanceDataSourceProperties has a subset of Compute Instance - # properties that are useful at the Datasource level. - # - # Note: The following fields are mutually exclusive: `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] cloud_sql_instance_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceProperties] - # Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud - # SQL Instance properties that are useful at the Datasource level. - # - # Note: The following fields are mutually exclusive: `cloud_sql_instance_datasource_properties`, `compute_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] alloy_db_cluster_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::AlloyDBClusterDataSourceProperties] - # Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB - # cluster properties that are useful at the Datasource level. - # - # Note: The following fields are mutually exclusive: `alloy_db_cluster_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disk_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::DiskDataSourceProperties] - # DiskDataSourceProperties has a subset of Disk properties that are useful - # at the Datasource level. - # - # Note: The following fields are mutually exclusive: `disk_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataSourceGcpResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupApplianceApplication describes a Source Resource when it is an - # application backed up by a BackupAppliance. - # @!attribute [rw] application_name - # @return [::String] - # The name of the Application as known to the Backup Appliance. - # @!attribute [rw] backup_appliance - # @return [::String] - # Appliance name. - # @!attribute [rw] appliance_id - # @return [::Integer] - # Appliance Id of the Backup Appliance. - # @!attribute [rw] type - # @return [::String] - # The type of the application. e.g. VMBackup - # @!attribute [rw] application_id - # @return [::Integer] - # The appid field of the application within the Backup Appliance. - # @!attribute [rw] hostname - # @return [::String] - # Hostname of the host where the application is running. - # @!attribute [rw] host_id - # @return [::Integer] - # Hostid of the application host. - class DataSourceBackupApplianceApplication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ServiceLockInfo represents the details of a lock taken by the service on a - # Backup resource. - # @!attribute [r] operation - # @return [::String] - # Output only. The name of the operation that created this lock. - # The lock will automatically be released when the operation completes. - class ServiceLockInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupApplianceLockInfo contains metadata about the backupappliance that - # created the lock. - # @!attribute [rw] backup_appliance_id - # @return [::Integer] - # Required. The ID of the backup/recovery appliance that created this lock. - # @!attribute [rw] backup_appliance_name - # @return [::String] - # Required. The name of the backup/recovery appliance that created this lock. - # @!attribute [rw] lock_reason - # @return [::String] - # Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The - # value of this string is only meaningful to the client and it is not - # interpreted by the BackupVault service. - # @!attribute [rw] job_name - # @return [::String] - # The job name on the backup/recovery appliance that created this lock. - # - # Note: The following fields are mutually exclusive: `job_name`, `backup_image`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] backup_image - # @return [::String] - # The image name that depends on this Backup. - # - # Note: The following fields are mutually exclusive: `backup_image`, `job_name`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sla_id - # @return [::Integer] - # The SLA on the backup/recovery appliance that owns the lock. - # - # Note: The following fields are mutually exclusive: `sla_id`, `job_name`, `backup_image`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupApplianceLockInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupLock represents a single lock on a Backup resource. An unexpired - # lock on a Backup prevents the Backup from being deleted. - # @!attribute [rw] lock_until_time - # @return [::Google::Protobuf::Timestamp] - # Required. The time after which this lock is not considered valid and will - # no longer protect the Backup from deletion. - # @!attribute [rw] backup_appliance_lock_info - # @return [::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo] - # If the client is a backup and recovery appliance, this - # contains metadata about why the lock exists. - # - # Note: The following fields are mutually exclusive: `backup_appliance_lock_info`, `service_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] service_lock_info - # @return [::Google::Cloud::BackupDR::V1::ServiceLockInfo] - # Output only. Contains metadata about the lock exist for Google Cloud - # native backups. - # - # Note: The following fields are mutually exclusive: `service_lock_info`, `backup_appliance_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupLock - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message describing a Backup object. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Name of the backup to create. It must have the - # format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. - # `{backup}` cannot be changed after creation. It must be between 3-63 - # characters long and must be unique within the datasource. - # @!attribute [r] description - # @return [::String] - # Output only. The description of the Backup instance (2048 characters or - # less). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # No labels currently defined. - # @!attribute [rw] enforced_retention_end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The backup can not be deleted before this time. - # @!attribute [r] backup_retention_inheritance - # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] - # Output only. Setting for how the enforced retention end time is inherited. - # This value is copied from this backup's BackupVault. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Optional. When this backup is automatically expired. - # @!attribute [r] consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The point in time when this backup was captured from the - # source. - # @!attribute [rw] etag - # @return [::String] - # Optional. Server specified ETag to prevent updates from overwriting each - # other. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::Backup::State] - # Output only. The Backup resource instance state. - # @!attribute [r] service_locks - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] - # Output only. The list of BackupLocks taken by the service to prevent the - # deletion of the backup. - # @!attribute [rw] backup_appliance_locks - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] - # Optional. The list of BackupLocks taken by the accessor Backup Appliance. - # @!attribute [r] compute_instance_backup_properties - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceBackupProperties] - # Output only. Compute Engine specific backup properties. - # - # Note: The following fields are mutually exclusive: `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] cloud_sql_instance_backup_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupProperties] - # Output only. Cloud SQL specific backup properties. - # - # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_properties`, `compute_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_appliance_backup_properties - # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupProperties] - # Output only. Backup Appliance specific backup properties. - # - # Note: The following fields are mutually exclusive: `backup_appliance_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] alloy_db_backup_properties - # @return [::Google::Cloud::BackupDR::V1::AlloyDbClusterBackupProperties] - # Output only. AlloyDB specific backup properties. - # - # Note: The following fields are mutually exclusive: `alloy_db_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] disk_backup_properties - # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties] - # Output only. Disk specific backup properties. - # - # Note: The following fields are mutually exclusive: `disk_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_type - # @return [::Google::Cloud::BackupDR::V1::Backup::BackupType] - # Output only. Type of the backup, unspecified, scheduled or ondemand. - # @!attribute [r] gcp_backup_plan_info - # @return [::Google::Cloud::BackupDR::V1::Backup::GCPBackupPlanInfo] - # Output only. Configuration for a Google Cloud resource. - # @!attribute [r] resource_size_bytes - # @return [::Integer] - # Output only. source resource size in bytes at the time of the backup. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Optional. Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Optional. Output only. Reserved for future use. - # @!attribute [r] gcp_resource - # @return [::Google::Cloud::BackupDR::V1::BackupGcpResource] - # Output only. Unique identifier of the GCP resource that is being backed - # up. - # @!attribute [r] kms_key_versions - # @return [::Array<::String>] - # Optional. Output only. The list of KMS key versions used to encrypt the - # backup. - class Backup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # GCPBackupPlanInfo captures the plan configuration details of Google Cloud - # resources at the time of backup. - # @!attribute [rw] backup_plan - # @return [::String] - # Resource name of backup plan by which workload is protected at the time - # of the backup. - # Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} - # @!attribute [rw] backup_plan_rule_id - # @return [::String] - # The rule id of the backup plan which triggered this backup in case of - # scheduled backup or used for - # @!attribute [rw] backup_plan_revision_name - # @return [::String] - # Resource name of the backup plan revision which triggered this backup in - # case of scheduled backup or used for on demand backup. - # Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId}/revisions/\\{revisionId} - # @!attribute [rw] backup_plan_revision_id - # @return [::String] - # The user friendly id of the backup plan revision which triggered this - # backup in case of scheduled backup or used for on demand backup. - class GCPBackupPlanInfo - 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 - - # Holds the state of the backup resource. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The backup is being created. - CREATING = 1 - - # The backup has been created and is fully usable. - ACTIVE = 2 - - # The backup is being deleted. - DELETING = 3 - - # The backup is experiencing an issue and might be unusable. - ERROR = 4 - - # The backup is being uploaded. - UPLOADING = 5 - end - - # Type of the backup, scheduled or ondemand. - module BackupType - # Backup type is unspecified. - BACKUP_TYPE_UNSPECIFIED = 0 - - # Scheduled backup. - SCHEDULED = 1 - - # On demand backup. - ON_DEMAND = 2 - - # Operational backup. - ON_DEMAND_OPERATIONAL = 3 - end - end - - # Message for creating a BackupVault. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] backup_vault_id - # @return [::String] - # Required. ID of the requesting object - # If auto-generating ID server-side, remove this field and - # backup_vault_id from the method_signature of Create RPC - # @!attribute [rw] backup_vault - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - class CreateBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing backupvault stores. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault. - class ListBackupVaultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing BackupVaults. - # @!attribute [rw] backup_vaults - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] - # The list of BackupVault instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return backup vaults in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!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 ListBackupVaultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for fetching usable BackupVaults. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class FetchUsableBackupVaultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for fetching usable BackupVaults. - # @!attribute [rw] backup_vaults - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] - # The list of BackupVault instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return backup vaults in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!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 FetchUsableBackupVaultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the FetchBackupsForResourceType method. - # @!attribute [rw] parent - # @return [::String] - # Required. Datasources are the parent resource for the backups. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the GCP resource. - # Ex: sqladmin.googleapis.com/Instance - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of Backups to return. The service may - # return fewer than this value. If unspecified, at most 50 - # Backups will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupsForResourceType` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. This parameter is used to specify the view of the backup. - # If not specified, the default view is BASIC. - class FetchBackupsForResourceTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the FetchBackupsForResourceType method. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] - # The Backups 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 FetchBackupsForResourceTypeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a BackupVault. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backupvault store resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault - class GetBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a BackupVault. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # BackupVault 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 the request will fail. - # @!attribute [rw] backup_vault - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # Required. The resource being updated - # @!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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, will not check plan duration against backup vault - # enforcement duration. - # @!attribute [rw] force_update_access_restriction - # @return [::Boolean] - # Optional. If set to true, we will force update access restriction even if - # some non compliant data sources are present. The default is 'false'. - class UpdateBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a BackupVault. - # @!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, any data source from this backup vault will also - # be deleted. - # @!attribute [rw] etag - # @return [::String] - # The current etag of the backup vault. - # If an etag is provided and does not match the current etag of the - # connection, deletion will be blocked. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If true and the BackupVault is not found, the request will - # succeed but no action will be taken. - # @!attribute [rw] ignore_backup_plan_references - # @return [::Boolean] - # Optional. If set to true, backupvault deletion will proceed even if there - # are backup plans referencing the backupvault. The default is 'false'. - class DeleteBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing DataSources. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve data - # sources information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing DataSources. - # @!attribute [rw] data_sources - # @return [::Array<::Google::Cloud::BackupDR::V1::DataSource>] - # The list of DataSource instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return data sources in reachable locations - # and the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!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 ListDataSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a DataSource instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' - class GetDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a data source instance. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # DataSource 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 the request will fail. - # @!attribute [rw] data_source - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # Required. The resource being updated - # @!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). - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. Enable upsert. - class UpdateDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing Backups. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve backup - # information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - class ListBackupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing Backups. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] - # The list of Backup instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return data sources in reachable locations - # and the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!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 ListBackupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a Backup. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - class GetBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a Backup. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Backup 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 the request will fail. - # @!attribute [rw] backup - # @return [::Google::Cloud::BackupDR::V1::Backup] - # Required. The resource being updated - # @!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 UpdateBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a Backup. - # @!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). - class DeleteBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for restoring from a Backup. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Backup instance, in the format - # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. - # @!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] compute_instance_target_environment - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment] - # Compute Engine target environment to be used during restore. - # - # Note: The following fields are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disk_target_environment - # @return [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment] - # Disk target environment to be used during restore. - # - # Note: The following fields are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] region_disk_target_environment - # @return [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment] - # Region disk target environment to be used during restore. - # - # Note: The following fields are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] compute_instance_restore_properties - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties] - # Compute Engine instance properties to be overridden during restore. - # - # Note: The following fields are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disk_restore_properties - # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties] - # Disk properties to be overridden during restore. - # - # Note: The following fields are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] clear_overrides_field_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. A field mask used to clear server-side default values - # for fields within the `instance_properties` oneof. - # - # When a field in this mask is cleared, the server will not apply its - # default logic (like inheriting a value from the source) for that field. - # - # The most common current use case is clearing default encryption keys. - # - # Examples of field mask paths: - # - Compute Instance Disks: - # `compute_instance_restore_properties.disks.*.disk_encryption_key` - # - Single Disk: `disk_restore_properties.disk_encryption_key` - class RestoreBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for restoring from a Backup. - # @!attribute [rw] target_resource - # @return [::Google::Cloud::BackupDR::V1::TargetResource] - # Details of the target resource created/modified as part of restore. - class RestoreBackupResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of the target resource created/modified as part of restore. - # @!attribute [rw] gcp_resource - # @return [::Google::Cloud::BackupDR::V1::GcpResource] - # Details of the native Google Cloud resource created as part of restore. - class TargetResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Minimum details to identify a Google Cloud resource - # @!attribute [rw] gcp_resourcename - # @return [::String] - # Name of the Google Cloud resource. - # @!attribute [rw] location - # @return [::String] - # Location of the resource: //"global"/"unspecified". - # @!attribute [rw] type - # @return [::String] - # Type of the resource. Use the Unified Resource Type, - # eg. compute.googleapis.com/Instance. - class GcpResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Minimum details to identify a Google Cloud resource for a backup. - # @!attribute [rw] gcp_resourcename - # @return [::String] - # Name of the Google Cloud resource. - # @!attribute [rw] location - # @return [::String] - # Location of the resource: //"global"/"unspecified". - # @!attribute [rw] type - # @return [::String] - # Type of the resource. Use the Unified Resource Type, - # eg. compute.googleapis.com/Instance. - class BackupGcpResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Backup configuration state. Is the resource configured for backup? - module BackupConfigState - # The possible states of backup configuration. - # Status not set. - BACKUP_CONFIG_STATE_UNSPECIFIED = 0 - - # The data source is actively protected (i.e. there is a - # BackupPlanAssociation or Appliance SLA pointing to it) - ACTIVE = 1 - - # The data source is no longer protected (but may have backups under it) - PASSIVE = 2 - end - - # BackupView contains enum options for Partial and Full view. - module BackupView - # If the value is not set, the default 'FULL' view is used. - BACKUP_VIEW_UNSPECIFIED = 0 - - # Includes basic data about the Backup, but not the full contents. - BACKUP_VIEW_BASIC = 1 - - # Includes all data about the Backup. - # This is the default value (for both ListBackups and GetBackup). - BACKUP_VIEW_FULL = 2 - end - - # BackupVaultView contains enum options for Partial and Full view. - module BackupVaultView - # If the value is not set, the default 'FULL' view is used. - BACKUP_VAULT_VIEW_UNSPECIFIED = 0 - - # Includes basic data about the Backup Vault, but not the full contents. - BACKUP_VAULT_VIEW_BASIC = 1 - - # Includes all data about the Backup Vault. - # This is the default value (for both ListBackupVaults and GetBackupVault). - BACKUP_VAULT_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb deleted file mode 100644 index 1498cae8a4ff..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.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 BackupDR - module V1 - # AlloyDBClusterDataSourceProperties represents the properties of a - # AlloyDB cluster resource that are stored in the DataSource. - # . - # @!attribute [r] name - # @return [::String] - # Output only. Name of the AlloyDB cluster backed up by the datasource. - class AlloyDBClusterDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AlloyDbClusterBackupProperties represents AlloyDB cluster - # backup properties. - # . - # @!attribute [rw] description - # @return [::String] - # An optional text description for the backup. - # @!attribute [r] stored_bytes - # @return [::Integer] - # Output only. Storage usage of this particular backup - # @!attribute [r] chain_id - # @return [::String] - # Output only. The chain id of this backup. Backups belonging to the same - # chain are sharing the same chain id. This property is calculated and - # maintained by BackupDR. - # @!attribute [r] database_version - # @return [::String] - # Output only. The PostgreSQL major version of the AlloyDB cluster when the - # backup was taken. - class AlloyDbClusterBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties for an AlloyDB cluster backup plan association. - # @!attribute [r] cluster_uid - # @return [::String] - # Output only. The cluster UID of the AlloyDB cluster. - class AlloyDBClusterBackupPlanAssociationProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb deleted file mode 100644 index 787b36f74c08..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # BackupApplianceBackupProperties represents BackupDR backup appliance's - # properties. - # @!attribute [r] generation_id - # @return [::Integer] - # Output only. The numeric generation ID of the backup (monotonically - # increasing). - # @!attribute [r] finalize_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when this backup object was finalized (if none, - # backup is not finalized). - # @!attribute [rw] recovery_range_start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The earliest timestamp of data available in this Backup. - # @!attribute [rw] recovery_range_end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The latest timestamp of data available in this Backup. - class BackupApplianceBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb deleted file mode 100644 index c11daec87a93..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # CloudSqlInstanceDataSourceProperties represents the properties of a - # Cloud SQL resource that are stored in the DataSource. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the Cloud SQL instance backed up by the datasource. - # Format: - # projects/\\{project}/instances/\\{instance} - # @!attribute [r] database_installed_version - # @return [::String] - # Output only. The installed database version of the Cloud SQL instance. - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance creation timestamp. - # @!attribute [r] instance_tier - # @return [::String] - # Output only. The tier (or machine type) for this instance. Example: - # `db-custom-1-3840` - class CloudSqlInstanceDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CloudSqlInstanceBackupProperties represents Cloud SQL Instance - # Backup properties. - # @!attribute [r] database_installed_version - # @return [::String] - # Output only. The installed database version of the Cloud SQL instance - # when the backup was taken. - # @!attribute [r] final_backup - # @return [::Boolean] - # Output only. Whether the backup is a final backup. - # @!attribute [r] source_instance - # @return [::String] - # Output only. The source instance of the backup. - # Format: - # projects/\\{project}/instances/\\{instance} - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance creation timestamp. - # @!attribute [r] instance_tier - # @return [::String] - # Output only. The tier (or machine type) for this instance. Example: - # `db-custom-1-3840` - # @!attribute [r] instance_delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance delete timestamp. - class CloudSqlInstanceBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CloudSqlInstanceDataSourceReferenceProperties represents the properties of a - # Cloud SQL resource that are stored in the DataSourceReference. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the Cloud SQL instance backed up by the datasource. - # Format: - # projects/\\{project}/instances/\\{instance} - # @!attribute [r] database_installed_version - # @return [::String] - # Output only. The installed database version of the Cloud SQL instance. - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance creation timestamp. - # @!attribute [r] instance_tier - # @return [::String] - # Output only. The tier (or machine type) for this instance. Example: - # `db-custom-1-3840` - class CloudSqlInstanceDataSourceReferenceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CloudSqlInstanceInitializationConfig contains the configuration for - # initializing a Cloud SQL instance. - # @!attribute [rw] edition - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig::Edition] - # Required. The edition of the Cloud SQL instance. - class CloudSqlInstanceInitializationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The edition of the Cloud SQL instance. For details, see - # https://cloud.google.com/sql/docs/editions-intro. - module Edition - # Unspecified edition. - EDITION_UNSPECIFIED = 0 - - # Enterprise edition. - ENTERPRISE = 1 - - # Enterprise Plus edition. - ENTERPRISE_PLUS = 2 - end - end - - # Cloud SQL instance's BPA properties. - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - class CloudSqlInstanceBackupPlanAssociationProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb deleted file mode 100644 index d5590a9a587f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.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 BackupDR - module V1 - # DiskTargetEnvironment represents the target environment for the disk. - # @!attribute [rw] project - # @return [::String] - # Required. Target project for the disk. - # @!attribute [rw] zone - # @return [::String] - # Required. Target zone for the disk. - class DiskTargetEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RegionDiskTargetEnvironment represents the target environment for the disk. - # @!attribute [rw] project - # @return [::String] - # Required. Target project for the disk. - # @!attribute [rw] region - # @return [::String] - # Required. Target region for the disk. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # Required. Target URLs of the replica zones for the disk. - class RegionDiskTargetEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DiskRestoreProperties represents the properties of a Disk restore. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the disk. - # @!attribute [rw] description - # @return [::String] - # Optional. An optional description of this resource. Provide this property - # when you create the resource. - # @!attribute [rw] size_gb - # @return [::Integer] - # Required. The size of the disk in GB. - # @!attribute [rw] licenses - # @return [::Array<::String>] - # Optional. A list of publicly available licenses that are applicable to this - # backup. This is applicable if the original image had licenses attached, - # e.g. Windows image - # @!attribute [rw] guest_os_feature - # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] - # Optional. A list of features to enable in the guest operating system. This - # is applicable only for bootable images. - # @!attribute [rw] disk_encryption_key - # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] - # Optional. Encrypts the disk using a - # customer-supplied encryption key or a customer-managed encryption key. - # @!attribute [rw] physical_block_size_bytes - # @return [::Integer] - # Optional. Physical block size of the persistent disk, in bytes. - # If not present in a request, a default value is used. - # Currently, the supported size is 4096. - # @!attribute [rw] provisioned_iops - # @return [::Integer] - # Optional. Indicates how many IOPS to provision for the disk. This sets the - # number of I/O operations per second that the disk can handle. - # @!attribute [rw] provisioned_throughput - # @return [::Integer] - # Optional. Indicates how much throughput to provision for the disk. This - # sets the number of throughput MB per second that the disk can handle. - # @!attribute [rw] enable_confidential_compute - # @return [::Boolean] - # Optional. Indicates whether this disk is using confidential compute mode. - # Encryption with a Cloud KMS key is required to enable this option. - # @!attribute [rw] storage_pool - # @return [::String] - # Optional. The storage pool in which the new disk is created. You can - # provide this as a partial or full URL to the resource. - # @!attribute [rw] access_mode - # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::AccessMode] - # Optional. The access mode of the disk. - # @!attribute [rw] architecture - # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::Architecture] - # Optional. The architecture of the source disk. Valid values are - # ARM64 or X86_64. - # @!attribute [rw] resource_policy - # @return [::Array<::String>] - # Optional. Resource policies applied to this disk. - # @!attribute [rw] type - # @return [::String] - # Required. URL of the disk type resource describing which disk type to use - # to create the disk. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels to apply to this disk. These can be modified later using - # setLabels method. Label values can be empty. - # @!attribute [rw] resource_manager_tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource manager tags to be bound to the disk. - class DiskRestoreProperties - 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 ResourceManagerTagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The supported access modes of the disk. - module AccessMode - # The default AccessMode, means the disk can be attached to single instance - # in RW mode. - READ_WRITE_SINGLE = 0 - - # The AccessMode means the disk can be attached to multiple instances in RW - # mode. - READ_WRITE_MANY = 1 - - # The AccessMode means the disk can be attached to multiple instances in RO - # mode. - READ_ONLY_MANY = 2 - end - - # Architecture of the source disk. - module Architecture - # Default value. This value is unused. - ARCHITECTURE_UNSPECIFIED = 0 - - # Disks with architecture X86_64 - X86_64 = 1 - - # Disks with architecture ARM64 - ARM64 = 2 - end - end - - # DiskBackupProperties represents the properties of a Disk backup. - # @!attribute [rw] description - # @return [::String] - # A description of the source disk. - # @!attribute [rw] licenses - # @return [::Array<::String>] - # A list of publicly available licenses that are applicable to this backup. - # This is applicable if the original image had licenses attached, e.g. - # Windows image. - # @!attribute [rw] guest_os_feature - # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] - # A list of guest OS features that are applicable to this backup. - # @!attribute [rw] architecture - # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties::Architecture] - # The architecture of the source disk. Valid values are - # ARM64 or X86_64. - # @!attribute [rw] type - # @return [::String] - # The URL of the type of the disk. - # @!attribute [rw] size_gb - # @return [::Integer] - # Size(in GB) of the source disk. - # @!attribute [rw] region - # @return [::String] - # Region and zone are mutually exclusive fields. - # The URL of the region of the source disk. - # @!attribute [rw] zone - # @return [::String] - # The URL of the Zone where the source disk. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # The URL of the Zones where the source disk should be replicated. - # @!attribute [rw] source_disk - # @return [::String] - # The source disk used to create this backup. - class DiskBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Architecture of the source disk. - module Architecture - # Default value. This value is unused. - ARCHITECTURE_UNSPECIFIED = 0 - - # Disks with architecture X86_64 - X86_64 = 1 - - # Disks with architecture ARM64 - ARM64 = 2 - end - end - - # DiskDataSourceProperties represents the properties of a - # Disk resource that are stored in the DataSource. - # . - # @!attribute [rw] name - # @return [::String] - # Name of the disk backed up by the datasource. - # @!attribute [rw] description - # @return [::String] - # The description of the disk. - # @!attribute [rw] type - # @return [::String] - # The type of the disk. - # @!attribute [rw] size_gb - # @return [::Integer] - # The size of the disk in GB. - class DiskDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb deleted file mode 100644 index bc9fe21300c3..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.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 BackupDR - module V1 - # ComputeInstanceBackupProperties represents Compute Engine instance backup - # properties. - # @!attribute [rw] description - # @return [::String] - # An optional text description for the instances that are created from these - # properties. - # @!attribute [rw] tags - # @return [::Google::Cloud::BackupDR::V1::Tags] - # A list of tags to apply to the instances that are created from these - # properties. The tags identify valid sources or targets for network - # firewalls. The setTags method can modify this list of tags. Each tag within - # the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt). - # @!attribute [rw] machine_type - # @return [::String] - # The machine type to use for instances that are created from these - # properties. - # @!attribute [rw] can_ip_forward - # @return [::Boolean] - # Enables instances created based on these properties to send packets with - # source IP addresses other than their own and receive packets with - # destination IP addresses other than their own. If these instances will be - # used as an IP gateway or it will be set as the next-hop in a Route - # resource, specify `true`. If unsure, leave this set to `false`. See the - # https://cloud.google.com/vpc/docs/using-routes#canipforward - # documentation for more information. - # @!attribute [rw] network_interface - # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] - # An array of network access configurations for this interface. - # @!attribute [rw] disk - # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] - # An array of disks that are associated with the instances that are created - # from these properties. - # @!attribute [rw] metadata - # @return [::Google::Cloud::BackupDR::V1::Metadata] - # The metadata key/value pairs to assign to instances that are created from - # these properties. These pairs can consist of custom metadata or predefined - # keys. See https://cloud.google.com/compute/docs/metadata/overview for more - # information. - # @!attribute [rw] service_account - # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] - # A list of service accounts with specified scopes. Access tokens for these - # service accounts are available to the instances that are created from - # these properties. Use metadata queries to obtain the access tokens for - # these instances. - # @!attribute [rw] scheduling - # @return [::Google::Cloud::BackupDR::V1::Scheduling] - # Specifies the scheduling options for the instances that are created from - # these properties. - # @!attribute [rw] guest_accelerator - # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] - # A list of guest accelerator cards' type and count to use for instances - # created from these properties. - # @!attribute [rw] min_cpu_platform - # @return [::String] - # Minimum cpu/platform to be used by instances. The instance may be - # scheduled on the specified or newer cpu/platform. Applicable values are the - # friendly names of CPU platforms, such as - # `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`. - # For more information, read - # https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - # @!attribute [rw] key_revocation_action_type - # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] - # KeyRevocationActionType of the instance. Supported options are "STOP" and - # "NONE". The default value is "NONE" if it is not specified. - # @!attribute [rw] source_instance - # @return [::String] - # The source instance used to create this backup. This can be a partial or - # full URL to the resource. For example, the following are valid values: - # -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - # -projects/project/zones/zone/instances/instance - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels to apply to instances that are created from these properties. - class ComputeInstanceBackupProperties - 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 - - # ComputeInstanceRestoreProperties represents Compute Engine instance - # properties to be overridden during restore. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the compute instance. - # @!attribute [rw] advanced_machine_features - # @return [::Google::Cloud::BackupDR::V1::AdvancedMachineFeatures] - # Optional. Controls for advanced machine-related behavior features. - # @!attribute [rw] can_ip_forward - # @return [::Boolean] - # Optional. Allows this instance to send and receive packets with - # non-matching destination or source IPs. - # @!attribute [rw] confidential_instance_config - # @return [::Google::Cloud::BackupDR::V1::ConfidentialInstanceConfig] - # Optional. Controls Confidential compute options on the instance - # @!attribute [rw] deletion_protection - # @return [::Boolean] - # Optional. Whether the resource should be protected against deletion. - # @!attribute [rw] description - # @return [::String] - # Optional. An optional description of this resource. Provide this property - # when you create the resource. - # @!attribute [rw] disks - # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] - # Optional. Array of disks associated with this instance. Persistent disks - # must be created before you can assign them. Source regional persistent - # disks will be restored with default replica zones if not specified. - # @!attribute [rw] display_device - # @return [::Google::Cloud::BackupDR::V1::DisplayDevice] - # Optional. Enables display device for the instance. - # @!attribute [rw] guest_accelerators - # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] - # Optional. A list of the type and count of accelerator cards attached to the - # instance. - # @!attribute [rw] hostname - # @return [::String] - # Optional. Specifies the hostname of the instance. The specified hostname - # must be RFC1035 compliant. If hostname is not specified, the default - # hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global - # DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal - # DNS. - # @!attribute [rw] instance_encryption_key - # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] - # Optional. Encrypts suspended data for an instance with a - # customer-managed encryption key. - # @!attribute [rw] key_revocation_action_type - # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] - # Optional. KeyRevocationActionType of the instance. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels to apply to this instance. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. Full or partial URL of the machine type resource to use for this - # instance. - # @!attribute [rw] metadata - # @return [::Google::Cloud::BackupDR::V1::Metadata] - # Optional. This includes custom metadata and predefined keys. - # @!attribute [rw] min_cpu_platform - # @return [::String] - # Optional. Minimum CPU platform to use for this instance. - # @!attribute [rw] network_interfaces - # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] - # Optional. An array of network configurations for this instance. These - # specify how interfaces are configured to interact with other network - # services, such as connecting to the internet. Multiple interfaces are - # supported per instance. Required to restore in different project or region. - # @!attribute [rw] network_performance_config - # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig] - # Optional. Configure network performance such as egress bandwidth tier. - # @!attribute [rw] params - # @return [::Google::Cloud::BackupDR::V1::InstanceParams] - # Input only. Additional params passed with the request, but not persisted - # as part of resource payload. - # @!attribute [rw] private_ipv6_google_access - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess] - # Optional. The private IPv6 google access type for the VM. - # If not specified, use INHERIT_FROM_SUBNETWORK as default. - # @!attribute [rw] allocation_affinity - # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity] - # Optional. Specifies the reservations that this instance can consume from. - # @!attribute [rw] resource_policies - # @return [::Array<::String>] - # Optional. Resource policies applied to this instance. - # By default, no resource policies will be applied. - # @!attribute [rw] scheduling - # @return [::Google::Cloud::BackupDR::V1::Scheduling] - # Optional. Sets the scheduling options for this instance. - # @!attribute [rw] service_accounts - # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] - # Optional. A list of service accounts, with their specified scopes, - # authorized for this instance. Only one service account per VM instance is - # supported. - # @!attribute [rw] tags - # @return [::Google::Cloud::BackupDR::V1::Tags] - # Optional. Tags to apply to this instance. Tags are used to identify valid - # sources or targets for network firewalls and are specified by the client - # during instance creation. - class ComputeInstanceRestoreProperties - 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 private IPv6 google access type for the VMs. - module InstancePrivateIpv6GoogleAccess - # Default value. This value is unused. - INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0 - - # Each network interface inherits PrivateIpv6GoogleAccess from its - # subnetwork. - INHERIT_FROM_SUBNETWORK = 1 - - # Outbound private IPv6 access from VMs in this subnet to Google services. - # If specified, the subnetwork who is attached to the instance's default - # network interface will be assigned an internal IPv6 prefix if it doesn't - # have before. - ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2 - - # Bidirectional private IPv6 access to/from Google services. If - # specified, the subnetwork who is attached to the instance's default - # network interface will be assigned an internal IPv6 prefix if it doesn't - # have before. - ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 - end - end - - # ComputeInstanceTargetEnvironment represents Compute Engine target - # environment to be used during restore. - # @!attribute [rw] project - # @return [::String] - # Required. Target project for the Compute Engine instance. - # @!attribute [rw] zone - # @return [::String] - # Required. The zone of the Compute Engine instance. - class ComputeInstanceTargetEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ComputeInstanceDataSourceProperties represents the properties of a - # ComputeEngine resource that are stored in the DataSource. - # @!attribute [rw] name - # @return [::String] - # Name of the compute instance backed up by the datasource. - # @!attribute [rw] description - # @return [::String] - # The description of the Compute Engine instance. - # @!attribute [rw] machine_type - # @return [::String] - # The machine type of the instance. - # @!attribute [rw] total_disk_count - # @return [::Integer] - # The total number of disks attached to the Instance. - # @!attribute [rw] total_disk_size_gb - # @return [::Integer] - # The sum of all the disk sizes. - class ComputeInstanceDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies options for controlling advanced machine features. - # @!attribute [rw] enable_nested_virtualization - # @return [::Boolean] - # Optional. Whether to enable nested virtualization or not (default is - # false). - # @!attribute [rw] threads_per_core - # @return [::Integer] - # Optional. The number of threads per physical core. To disable simultaneous - # multithreading (SMT) set this to 1. If unset, the maximum number - # of threads supported per core by the underlying processor is - # assumed. - # @!attribute [rw] visible_core_count - # @return [::Integer] - # Optional. The number of physical cores to expose to an instance. Multiply - # by the number of threads per core to compute the total number of virtual - # CPUs to expose to the instance. If unset, the number of cores is - # inferred from the instance's nominal CPU count and the underlying - # platform's SMT width. - # @!attribute [rw] enable_uefi_networking - # @return [::Boolean] - # Optional. Whether to enable UEFI networking for instance creation. - class AdvancedMachineFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of Confidential Instance options. - # @!attribute [rw] enable_confidential_compute - # @return [::Boolean] - # Optional. Defines whether the instance should have confidential compute - # enabled. - class ConfidentialInstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of Display Device options - # @!attribute [rw] enable_display - # @return [::Boolean] - # Optional. Enables display for the Compute Engine VM - class DisplayDevice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A specification of the type and number of accelerator cards attached to the - # instance. - # @!attribute [rw] accelerator_type - # @return [::String] - # Optional. Full or partial URL of the accelerator type resource to attach to - # this instance. - # @!attribute [rw] accelerator_count - # @return [::Integer] - # Optional. The number of the guest accelerator cards exposed to this - # instance. - class AcceleratorConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A customer-supplied encryption key. - # @!attribute [rw] raw_key - # @return [::String] - # Optional. Specifies a 256-bit customer-supplied - # encryption key. - # - # Note: The following fields are mutually exclusive: `raw_key`, `rsa_encrypted_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] rsa_encrypted_key - # @return [::String] - # Optional. RSA-wrapped 2048-bit - # customer-supplied encryption key to either encrypt or decrypt this - # resource. - # - # Note: The following fields are mutually exclusive: `rsa_encrypted_key`, `raw_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] kms_key_name - # @return [::String] - # Optional. The name of the encryption key that is stored in Google Cloud - # KMS. - # - # Note: The following fields are mutually exclusive: `kms_key_name`, `raw_key`, `rsa_encrypted_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] kms_key_service_account - # @return [::String] - # Optional. The service account being used for the encryption request for the - # given KMS key. If absent, the Compute Engine default service account is - # used. - class CustomerEncryptionKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A key/value pair to be used for storing metadata. - # @!attribute [rw] key - # @return [::String] - # Optional. Key for the metadata entry. - # @!attribute [rw] value - # @return [::String] - # Optional. Value for the metadata entry. These are free-form strings, and - # only have meaning as interpreted by the image running in the instance. The - # only restriction placed on values is that their size must be less than - # or equal to 262144 bytes (256 KiB). - class Entry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A metadata key/value entry. - # @!attribute [rw] items - # @return [::Array<::Google::Cloud::BackupDR::V1::Entry>] - # Optional. Array of key/value pairs. The total size of all keys and values - # must be less than 512 KB. - class Metadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A network interface resource attached to an instance. - # s - # @!attribute [rw] network - # @return [::String] - # Optional. URL of the VPC network resource for this instance. - # @!attribute [rw] subnetwork - # @return [::String] - # Optional. The URL of the Subnetwork resource for this instance. - # @!attribute [rw] ip_address - # @return [::String] - # Optional. An IPv4 internal IP address to assign to the instance for this - # network interface. If not specified by the user, an unused internal IP is - # assigned by the system. - # @!attribute [rw] ipv6_address - # @return [::String] - # Optional. An IPv6 internal network address for this network interface. To - # use a static internal IP address, it must be unused and in the same region - # as the instance's zone. If not specified, Google Cloud will automatically - # assign an internal IPv6 address from the instance's subnetwork. - # @!attribute [rw] internal_ipv6_prefix_length - # @return [::Integer] - # Optional. The prefix length of the primary internal IPv6 range. - # @!attribute [r] name - # @return [::String] - # Output only. [Output Only] The name of the network interface, which is - # generated by the server. - # @!attribute [rw] access_configs - # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] - # Optional. An array of configurations for this interface. Currently, only - # one access config,ONE_TO_ONE_NAT is supported. If there are no - # accessConfigs specified, then this instance will have - # no external internet access. - # @!attribute [rw] ipv6_access_configs - # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] - # Optional. An array of IPv6 access configurations for this interface. - # Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there - # is no ipv6AccessConfig specified, then this instance will - # have no external IPv6 Internet access. - # @!attribute [rw] alias_ip_ranges - # @return [::Array<::Google::Cloud::BackupDR::V1::AliasIpRange>] - # Optional. An array of alias IP ranges for this network interface. - # You can only specify this field for network interfaces in VPC networks. - # @!attribute [rw] stack_type - # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::StackType] - # The stack type for this network interface. - # @!attribute [rw] ipv6_access_type - # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::Ipv6AccessType] - # Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the - # IP can be accessed from the Internet. This field is always inherited from - # its subnetwork. - # @!attribute [rw] queue_count - # @return [::Integer] - # Optional. The networking queue count that's specified by users for the - # network interface. Both Rx and Tx queues will be set to this number. It'll - # be empty if not specified by the users. - # @!attribute [rw] nic_type - # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::NicType] - # Optional. The type of vNIC to be used on this interface. This may be gVNIC - # or VirtioNet. - # @!attribute [rw] network_attachment - # @return [::String] - # Optional. The URL of the network attachment that this interface should - # connect to in the following format: - # projects/\\{project_number}/regions/\\{region_name}/networkAttachments/\\{network_attachment_name}. - class NetworkInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Stack type for this network interface. - module StackType - # Default should be STACK_TYPE_UNSPECIFIED. - STACK_TYPE_UNSPECIFIED = 0 - - # The network interface will be assigned IPv4 address. - IPV4_ONLY = 1 - - # The network interface can have both IPv4 and IPv6 addresses. - IPV4_IPV6 = 2 - end - - # IPv6 access type for this network interface. - module Ipv6AccessType - # IPv6 access type not set. Means this network interface hasn't been - # turned on IPv6 yet. - UNSPECIFIED_IPV6_ACCESS_TYPE = 0 - - # This network interface can have internal IPv6. - INTERNAL = 1 - - # This network interface can have external IPv6. - EXTERNAL = 2 - end - - # Nic type for this network interface. - module NicType - # Default should be NIC_TYPE_UNSPECIFIED. - NIC_TYPE_UNSPECIFIED = 0 - - # VIRTIO - VIRTIO_NET = 1 - - # GVNIC - GVNIC = 2 - end - end - - # Network performance configuration. - # @!attribute [rw] total_egress_bandwidth_tier - # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig::Tier] - # Optional. The tier of the total egress bandwidth. - class NetworkPerformanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Network performance tier. - module Tier - # This value is unused. - TIER_UNSPECIFIED = 0 - - # Default network performance config. - DEFAULT = 1 - - # Tier 1 network performance config. - TIER_1 = 2 - end - end - - # An access configuration attached to an instance's network interface. - # Only one access config per instance is supported. - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::AccessConfig::AccessType] - # Optional. In accessConfigs (IPv4), the - # default and only option is ONE_TO_ONE_NAT. In - # ipv6AccessConfigs, the default and only option is - # DIRECT_IPV6. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of this access configuration. - # @!attribute [rw] external_ip - # @return [::String] - # Optional. The external IP address of this access configuration. - # @!attribute [rw] external_ipv6 - # @return [::String] - # Optional. The external IPv6 address of this access configuration. - # @!attribute [rw] external_ipv6_prefix_length - # @return [::Integer] - # Optional. The prefix length of the external IPv6 range. - # @!attribute [rw] set_public_ptr - # @return [::Boolean] - # Optional. Specifies whether a public DNS 'PTR' record should be created to - # map the external IP address of the instance to a DNS domain name. - # @!attribute [rw] public_ptr_domain_name - # @return [::String] - # Optional. The DNS domain name for the public PTR record. - # @!attribute [rw] network_tier - # @return [::Google::Cloud::BackupDR::V1::AccessConfig::NetworkTier] - # Optional. This signifies the networking tier used for configuring this - # access - class AccessConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of configuration. - module AccessType - # Default value. This value is unused. - ACCESS_TYPE_UNSPECIFIED = 0 - - # ONE_TO_ONE_NAT - ONE_TO_ONE_NAT = 1 - - # Direct IPv6 access. - DIRECT_IPV6 = 2 - end - - # Network tier property used by addresses, instances and forwarding rules. - module NetworkTier - # Default value. This value is unused. - NETWORK_TIER_UNSPECIFIED = 0 - - # High quality, Google-grade network tier, support for all networking - # products. - PREMIUM = 1 - - # Public internet quality, only limited support for other networking - # products. - STANDARD = 2 - end - end - - # An alias IP range attached to an instance's network interface. - # @!attribute [rw] ip_cidr_range - # @return [::String] - # Optional. The IP alias ranges to allocate for this interface. - # @!attribute [rw] subnetwork_range_name - # @return [::String] - # Optional. The name of a subnetwork secondary IP range from which to - # allocate an IP alias range. If not specified, the primary range of the - # subnetwork is used. - class AliasIpRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional instance params. - # @!attribute [rw] resource_manager_tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource manager tags to be bound to the instance. - class InstanceParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ResourceManagerTagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Specifies the reservations that this instance can consume from. - # @!attribute [rw] consume_allocation_type - # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity::Type] - # Optional. Specifies the type of reservation from which this instance can - # consume - # @!attribute [rw] key - # @return [::String] - # Optional. Corresponds to the label key of a reservation resource. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Corresponds to the label values of a reservation resource. - class AllocationAffinity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates whether to consume from a reservation or not. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # Do not consume from any allocated capacity. - NO_RESERVATION = 1 - - # Consume any allocation available. - ANY_RESERVATION = 2 - - # Must consume from a specific reservation. Must specify key value fields - # for specifying the reservations. - SPECIFIC_RESERVATION = 3 - end - end - - # Sets the scheduling options for an Instance. - # @!attribute [rw] on_host_maintenance - # @return [::Google::Cloud::BackupDR::V1::Scheduling::OnHostMaintenance] - # Optional. Defines the maintenance behavior for this instance. - # @!attribute [rw] automatic_restart - # @return [::Boolean] - # Optional. Specifies whether the instance should be automatically restarted - # if it is terminated by Compute Engine (not terminated by a user). - # @!attribute [rw] preemptible - # @return [::Boolean] - # Optional. Defines whether the instance is preemptible. - # @!attribute [rw] node_affinities - # @return [::Array<::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity>] - # Optional. A set of node affinity and anti-affinity configurations. - # Overrides reservationAffinity. - # @!attribute [rw] min_node_cpus - # @return [::Integer] - # Optional. The minimum number of virtual CPUs this instance will consume - # when running on a sole-tenant node. - # @!attribute [rw] provisioning_model - # @return [::Google::Cloud::BackupDR::V1::Scheduling::ProvisioningModel] - # Optional. Specifies the provisioning model of the instance. - # @!attribute [rw] instance_termination_action - # @return [::Google::Cloud::BackupDR::V1::Scheduling::InstanceTerminationAction] - # Optional. Specifies the termination action for the instance. - # @!attribute [rw] local_ssd_recovery_timeout - # @return [::Google::Cloud::BackupDR::V1::SchedulingDuration] - # Optional. Specifies the maximum amount of time a Local Ssd Vm should wait - # while recovery of the Local Ssd state is attempted. Its value should be in - # between 0 and 168 hours with hour granularity and the default value being 1 - # hour. - class Scheduling - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Node Affinity: the configuration of desired nodes onto which this Instance - # could be scheduled. - # @!attribute [rw] key - # @return [::String] - # Optional. Corresponds to the label key of Node resource. - # @!attribute [rw] operator - # @return [::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity::Operator] - # Optional. Defines the operation of node selection. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Corresponds to the label values of Node resource. - class NodeAffinity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the type of node selections. - module Operator - # Default value. This value is unused. - OPERATOR_UNSPECIFIED = 0 - - # Requires Compute Engine to seek for matched nodes. - IN = 1 - - # Requires Compute Engine to avoid certain nodes. - NOT_IN = 2 - end - end - - # Defines the maintenance behavior for this instance= - module OnHostMaintenance - # Default value. This value is unused. - ON_HOST_MAINTENANCE_UNSPECIFIED = 0 - - # Tells Compute Engine to terminate and (optionally) restart the instance - # away from the maintenance activity. - TERMINATE = 1 - - # Default, Allows Compute Engine to automatically migrate instances - # out of the way of maintenance events. - MIGRATE = 1000 - end - - # Defines the provisioning model for an instance. - module ProvisioningModel - # Default value. This value is not used. - PROVISIONING_MODEL_UNSPECIFIED = 0 - - # Standard provisioning with user controlled runtime, no discounts. - STANDARD = 1 - - # Heavily discounted, no guaranteed runtime. - SPOT = 2 - end - - # Defines the supported termination actions for an instance. - module InstanceTerminationAction - # Default value. This value is unused. - INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0 - - # Delete the VM. - DELETE = 1 - - # Stop the VM without storing in-memory content. default action. - STOP = 2 - end - end - - # A SchedulingDuration represents a 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". Range is approximately 10,000 years. - # @!attribute [rw] seconds - # @return [::Integer] - # Optional. Span of time at a resolution of a second. - # @!attribute [rw] nanos - # @return [::Integer] - # Optional. Span of time that's a fraction of a second at nanosecond - # resolution. - class SchedulingDuration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A service account. - # @!attribute [rw] email - # @return [::String] - # Optional. Email address of the service account. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # Optional. The list of scopes to be made available for this service account. - class ServiceAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of instance tags. - # @!attribute [rw] items - # @return [::Array<::String>] - # Optional. An array of tags. Each tag must be 1-63 characters long, and - # comply with RFC1035. - class Tags - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An instance-attached disk resource. - # @!attribute [rw] initialize_params - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::InitializeParams] - # Optional. Specifies the parameters to initialize this disk. - # @!attribute [rw] device_name - # @return [::String] - # Optional. This is used as an identifier for the disks. This is the unique - # name has to provided to modify disk parameters like disk_name and - # replica_zones (in case of RePDs) - # @!attribute [rw] kind - # @return [::String] - # Optional. Type of the resource. - # @!attribute [rw] disk_type_deprecated - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] - # Specifies the type of the disk. - # @!attribute [rw] mode - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskMode] - # Optional. The mode in which to attach this disk. - # @!attribute [rw] source - # @return [::String] - # Optional. Specifies a valid partial or full URL to an existing Persistent - # Disk resource. - # @!attribute [rw] index - # @return [::Integer] - # Optional. A zero-based index to this disk, where 0 is reserved for the - # boot disk. - # @!attribute [rw] boot - # @return [::Boolean] - # Optional. Indicates that this is a boot disk. The virtual machine will use - # the first partition of the disk for its root filesystem. - # @!attribute [rw] auto_delete - # @return [::Boolean] - # Optional. Specifies whether the disk will be auto-deleted when the instance - # is deleted (but not when the disk is detached from the instance). - # @!attribute [rw] license - # @return [::Array<::String>] - # Optional. Any valid publicly visible licenses. - # @!attribute [rw] disk_interface - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskInterface] - # Optional. Specifies the disk interface to use for attaching this disk. - # @!attribute [rw] guest_os_feature - # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] - # Optional. A list of features to enable on the guest operating system. - # Applicable only for bootable images. - # @!attribute [rw] disk_encryption_key - # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] - # Optional. Encrypts or decrypts a disk using a customer-supplied - # encryption key. - # @!attribute [rw] disk_size_gb - # @return [::Integer] - # Optional. The size of the disk in GB. - # @!attribute [r] saved_state - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskSavedState] - # Optional. Output only. The state of the disk. - # @!attribute [r] disk_type - # @return [::String] - # Optional. Output only. The URI of the disk type resource. For example: - # projects/project/zones/zone/diskTypes/pd-standard or pd-ssd - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] - # Optional. Specifies the type of the disk. - class AttachedDisk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the parameters to initialize this disk. - # @!attribute [rw] disk_name - # @return [::String] - # Optional. Specifies the disk name. If not specified, the default is to - # use the name of the instance. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # Optional. URL of the zone where the disk should be created. - # Required for each regional disk associated with the instance. - class InitializeParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of the Disk Types. - module DiskType - # Default value, which is unused. - DISK_TYPE_UNSPECIFIED = 0 - - # A scratch disk type. - SCRATCH = 1 - - # A persistent disk type. - PERSISTENT = 2 - end - - # List of the Disk Modes. - module DiskMode - # Default value, which is unused. - DISK_MODE_UNSPECIFIED = 0 - - # Attaches this disk in read-write mode. Only one - # virtual machine at a time can be attached to a disk in read-write mode. - READ_WRITE = 1 - - # Attaches this disk in read-only mode. Multiple virtual machines can use - # a disk in read-only mode at a time. - READ_ONLY = 2 - - # The disk is locked for administrative reasons. Nobody else - # can use the disk. This mode is used (for example) when taking - # a snapshot of a disk to prevent mounting the disk while it is - # being snapshotted. - LOCKED = 3 - end - - # List of the Disk Interfaces. - module DiskInterface - # Default value, which is unused. - DISK_INTERFACE_UNSPECIFIED = 0 - - # SCSI Disk Interface. - SCSI = 1 - - # NVME Disk Interface. - NVME = 2 - - # NVDIMM Disk Interface. - NVDIMM = 3 - - # ISCSI Disk Interface. - ISCSI = 4 - end - - # List of the states of the Disk. - module DiskSavedState - # Default Disk state has not been preserved. - DISK_SAVED_STATE_UNSPECIFIED = 0 - - # Disk state has been preserved. - PRESERVED = 1 - end - end - - # Feature type of the Guest OS. - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::GuestOsFeature::FeatureType] - # The ID of a supported feature. - class GuestOsFeature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # List of the Feature Types. - module FeatureType - # Default value, which is unused. - FEATURE_TYPE_UNSPECIFIED = 0 - - # VIRTIO_SCSI_MULTIQUEUE feature type. - VIRTIO_SCSI_MULTIQUEUE = 1 - - # WINDOWS feature type. - WINDOWS = 2 - - # MULTI_IP_SUBNET feature type. - MULTI_IP_SUBNET = 3 - - # UEFI_COMPATIBLE feature type. - UEFI_COMPATIBLE = 4 - - # SECURE_BOOT feature type. - SECURE_BOOT = 5 - - # GVNIC feature type. - GVNIC = 6 - - # SEV_CAPABLE feature type. - SEV_CAPABLE = 7 - - # BARE_METAL_LINUX_COMPATIBLE feature type. - BARE_METAL_LINUX_COMPATIBLE = 8 - - # SUSPEND_RESUME_COMPATIBLE feature type. - SUSPEND_RESUME_COMPATIBLE = 9 - - # SEV_LIVE_MIGRATABLE feature type. - SEV_LIVE_MIGRATABLE = 10 - - # SEV_SNP_CAPABLE feature type. - SEV_SNP_CAPABLE = 11 - - # TDX_CAPABLE feature type. - TDX_CAPABLE = 12 - - # IDPF feature type. - IDPF = 13 - - # SEV_LIVE_MIGRATABLE_V2 feature type. - SEV_LIVE_MIGRATABLE_V2 = 14 - end - end - - # Specifies whether the virtual machine instance will be shut down on key - # revocation. It is currently used in instance, instance properties and GMI - # protos - module KeyRevocationActionType - # Default value. This value is unused. - KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0 - - # Indicates user chose no operation. - NONE = 1 - - # Indicates user chose to opt for VM shutdown on key revocation. - STOP = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb deleted file mode 100644 index d6e8a8da44c0..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.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! - - -module Google - module Cloud - module BackupDR - module V1 - # DataSourceReference is a reference to a DataSource resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the DataSourceReference. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - # @!attribute [r] data_source - # @return [::String] - # Output only. The resource name of the DataSource. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{dataSource} - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataSourceReference was created. - # @!attribute [r] data_source_backup_config_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] - # Output only. The backup configuration state of the DataSource. - # @!attribute [r] data_source_backup_count - # @return [::Integer] - # Output only. Number of backups in the DataSource. - # @!attribute [r] data_source_backup_config_info - # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupConfigInfo] - # Output only. Information of backup configuration on the DataSource. - # @!attribute [r] data_source_gcp_resource_info - # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResourceInfo] - # Output only. The GCP resource that the DataSource is associated with. - # @!attribute [r] total_stored_bytes - # @return [::Integer] - # Output only. Total size of the storage used by all backup resources for the - # referenced datasource. - class DataSourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information of backup configuration on the DataSource. - # @!attribute [r] last_backup_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] - # Output only. The status of the last backup in this DataSource - # @!attribute [r] last_successful_backup_consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the last successful backup to this DataSource. - class DataSourceBackupConfigInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The GCP resource that the DataSource is associated with. - # @!attribute [r] gcp_resourcename - # @return [::String] - # Output only. The resource name of the GCP resource. - # Ex: projects/\\{project}/zones/\\{zone}/instances/\\{instance} - # @!attribute [r] type - # @return [::String] - # Output only. The type of the GCP resource. - # Ex: compute.googleapis.com/Instance - # @!attribute [r] location - # @return [::String] - # Output only. The location of the GCP resource. - # Ex: //"global"/"unspecified" - # @!attribute [r] cloud_sql_instance_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceReferenceProperties] - # Output only. The properties of the Cloud SQL instance. - class DataSourceGcpResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the GetDataSourceReference method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the DataSourceReference to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - class GetDataSourceReferenceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the ListDataSourceReferences method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDataSourceReferences` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDataSourceReferences` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results listed in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. - # - # The following field and operator combinations are supported: - # - # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` - # * data_source_gcp_resource_info.type with `=`, `!=` - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - class ListDataSourceReferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the ListDataSourceReferences method. - # @!attribute [rw] data_source_references - # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # The DataSourceReferences 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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataSourceReferencesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the FetchDataSourceReferencesForResourceType method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous call of - # `FetchDataSourceReferencesForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchDataSourceReferencesForResourceType` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_backup_config_state - # * data_source_backup_count - # * data_source_backup_config_info.last_backup_state - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_gcp_resource_info.type - # * data_source_gcp_resource_info.location - # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - class FetchDataSourceReferencesForResourceTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the FetchDataSourceReferencesForResourceType method. - # @!attribute [rw] data_source_references - # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # The DataSourceReferences 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 FetchDataSourceReferencesForResourceTypeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb deleted file mode 100644 index 79acc54ee206..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb +++ /dev/null @@ -1,309 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # Request for ListResourceBackupConfigs. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve resource backup - # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will use 100 as default. Maximum value is - # 500 and values above 500 will be coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListResourceBackupConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListResourceBackupConfigs. - # @!attribute [rw] resource_backup_configs - # @return [::Array<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] - # The list of ResourceBackupConfigs for the specified scope. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListResourceBackupConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ResourceBackupConfig represents a resource along with its backup - # configurations. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the ResourceBackupConfig. - # Format: - # projects/\\{project}/locations/\\{location}/resourceBackupConfigs/\\{uid} - # @!attribute [r] uid - # @return [::String] - # Output only. The unique identifier of the resource backup config. - # @!attribute [r] target_resource - # @return [::String] - # Output only. The [full resource - # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the cloud resource that this configuration applies to. Supported - # resource types are - # {::Google::Cloud::BackupDR::V1::ResourceBackupConfig::ResourceType ResourceBackupConfig.ResourceType}. - # @!attribute [r] target_resource_display_name - # @return [::String] - # Output only. The human friendly name of the target resource. - # @!attribute [r] target_resource_type - # @return [::Google::Cloud::BackupDR::V1::ResourceBackupConfig::ResourceType] - # Output only. The type of the target resource. - # @!attribute [rw] target_resource_labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels associated with the target resource. - # @!attribute [rw] backup_configs_details - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupConfigDetails>] - # Backup configurations applying to the target resource, including those - # targeting its related/child resources. For example, backup configuration - # applicable to Compute Engine disks will be populated in this field for a - # Compute Engine VM which has the disk associated. - # @!attribute [r] backup_configured - # @return [::Boolean] - # Output only. Whether the target resource is configured for backup. This is - # true if the backup_configs_details is not empty. - # @!attribute [r] vaulted - # @return [::Boolean] - # Output only. Whether the target resource is protected by a backup vault. - # This is true if the backup_configs_details is not empty and any of the - # {::Google::Cloud::BackupDR::V1::ResourceBackupConfig#backup_configs_details ResourceBackupConfig.backup_configs_details} - # has a backup configuration with - # {::Google::Cloud::BackupDR::V1::BackupConfigDetails#backup_vault BackupConfigDetails.backup_vault} - # set. set. - class ResourceBackupConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TargetResourceLabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of the cloud resource. - module ResourceType - # Resource type not set. - RESOURCE_TYPE_UNSPECIFIED = 0 - - # Cloud SQL instance. - CLOUD_SQL_INSTANCE = 1 - - # Compute Engine VM. - COMPUTE_ENGINE_VM = 2 - - # Compute Engine Disk. - COMPUTE_ENGINE_DISK = 3 - - # Compute Engine Regional Disk. - COMPUTE_ENGINE_REGIONAL_DISK = 4 - end - end - - # BackupConfigDetails has information about how the resource is configured - # for backups and about the most recent backup taken for this configuration. - # @!attribute [r] backup_config_source - # @return [::String] - # Output only. The full resource name of the backup config source resource. - # For example, - # "//backupdr.googleapis.com/v1/projects/\\{project}/locations/\\{region}/backupPlans/\\{backupplanId}" - # or - # "//compute.googleapis.com/projects/\\{project}/locations/\\{region}/resourcePolicies/\\{resourcePolicyId}". - # @!attribute [r] backup_config_source_display_name - # @return [::String] - # Output only. The display name of the backup config source resource. - # @!attribute [r] type - # @return [::Google::Cloud::BackupDR::V1::BackupConfigDetails::Type] - # Output only. The type of the backup config resource. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigDetails::State] - # Output only. The state of the backup config resource. - # @!attribute [r] pitr_settings - # @return [::Google::Cloud::BackupDR::V1::PitrSettings] - # Output only. Point in time recovery settings of the backup configuration - # resource. - # @!attribute [r] latest_successful_backup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the latest successful backup created via this - # backup configuration. - # @!attribute [r] applicable_resource - # @return [::String] - # Output only. The [full resource - # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the resource that is applicable for the backup configuration. Example: - # "//compute.googleapis.com/projects/\\{project}/zones/\\{zone}/instances/\\{instance}" - # @!attribute [r] backup_vault - # @return [::String] - # Output only. The [full resource - # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the backup vault that will store the backups generated through this - # backup configuration. Example: - # "//backupdr.googleapis.com/v1/projects/\\{project}/locations/\\{region}/backupVaults/\\{backupvaultId}" - # @!attribute [rw] backup_locations - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLocation>] - # The locations where the backups are to be stored. - # @!attribute [rw] backup_dr_plan_config - # @return [::Google::Cloud::BackupDR::V1::BackupDrPlanConfig] - # Google Cloud Backup and DR's Backup Plan specific data. - # - # Note: The following fields are mutually exclusive: `backup_dr_plan_config`, `backup_dr_template_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] backup_dr_template_config - # @return [::Google::Cloud::BackupDR::V1::BackupDrTemplateConfig] - # Google Cloud Backup and DR's Template specific data. - # - # Note: The following fields are mutually exclusive: `backup_dr_template_config`, `backup_dr_plan_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupConfigDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of the backup configuration. - # This enum may receive new values in the future. - module Type - # Backup config type is unspecified. - TYPE_UNSPECIFIED = 0 - - # Backup config is Cloud SQL instance's automated backup config. - CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1 - - # Backup config is Compute Engine Resource Policy. - COMPUTE_ENGINE_RESOURCE_POLICY = 2 - - # Backup config is Google Cloud Backup and DR's Backup Plan. - BACKUPDR_BACKUP_PLAN = 3 - - # Backup config is Google Cloud Backup and DR's Template. - BACKUPDR_TEMPLATE = 4 - end - - # The state tells whether the backup config is active or not. - module State - # Backup config state not set. - STATE_UNSPECIFIED = 0 - - # The config is in an active state protecting the resource - ACTIVE = 1 - - # The config is currently not protecting the resource. Either because it is - # disabled or the owning project has been deleted without cleanup of the - # actual resource. - INACTIVE = 2 - - # The config still exists but because of some error state it is not - # protecting the resource. Like the source project is deleted. For eg. - # PlanAssociation, BackupPlan is deleted. - ERROR = 3 - end - end - - # Point in time recovery settings of the backup configuration resource. - # @!attribute [r] retention_days - # @return [::Integer] - # Output only. Number of days to retain the backup. - class PitrSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides additional information about Google Cloud Backup - # and DR's Template backup configuration. - # @!attribute [r] first_party_management_uri - # @return [::String] - # Output only. The URI of the BackupDr template resource for the first party - # identity users. - # @!attribute [r] third_party_management_uri - # @return [::String] - # Output only. The URI of the BackupDr template resource for the third party - # identity users. - class BackupDrTemplateConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupDrPlanConfig has additional information about Google Cloud Backup and - # DR's Plan backup configuration. - # @!attribute [rw] backup_dr_plan_rules - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupDrPlanRule>] - # Backup rules of the backup plan resource. - class BackupDrPlanConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupDrPlanRule has rule specific information of the backup plan resource. - # @!attribute [r] rule_id - # @return [::String] - # Output only. Unique Id of the backup rule. - # @!attribute [r] last_successful_backup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the latest successful backup created via this - # backup rule. - class BackupDrPlanRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupLocation represents a cloud location where a backup can be stored. - # @!attribute [r] type - # @return [::Google::Cloud::BackupDR::V1::BackupLocation::Type] - # Output only. The type of the location. - # @!attribute [r] location_id - # @return [::String] - # Output only. The id of the cloud location. Example: "us-central1" - class BackupLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the location. - module Type - # Location type is unspecified. - TYPE_UNSPECIFIED = 0 - - # Location type is zonal. - ZONAL = 1 - - # Location type is regional. - REGIONAL = 2 - - # Location type is multi regional. - MULTI_REGIONAL = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb deleted file mode 100644 index 973211b9ffe7..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.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 Type - # Represents a day of the week. - module DayOfWeek - # The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0 - - # Monday - MONDAY = 1 - - # Tuesday - TUESDAY = 2 - - # Wednesday - WEDNESDAY = 3 - - # Thursday - THURSDAY = 4 - - # Friday - FRIDAY = 5 - - # Saturday - SATURDAY = 6 - - # Sunday - SUNDAY = 7 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1/proto_docs/google/type/month.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb deleted file mode 100644 index 3e27c902551d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.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 Type - # Represents a month in the Gregorian calendar. - module Month - # The unspecified month. - MONTH_UNSPECIFIED = 0 - - # The month of January. - JANUARY = 1 - - # The month of February. - FEBRUARY = 2 - - # The month of March. - MARCH = 3 - - # The month of April. - APRIL = 4 - - # The month of May. - MAY = 5 - - # The month of June. - JUNE = 6 - - # The month of July. - JULY = 7 - - # The month of August. - AUGUST = 8 - - # The month of September. - SEPTEMBER = 9 - - # The month of October. - OCTOBER = 10 - - # The month of November. - NOVEMBER = 11 - - # The month of December. - DECEMBER = 12 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile deleted file mode 100644 index 4febd3ff4e67..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-backupdr-v1", path: "../" -else - gem "google-cloud-backupdr-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-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb deleted file mode 100644 index 2b79d9a8674f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_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 backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs. -# -def list_resource_backup_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new - - # Call the list_resource_backup_configs method. - result = client.list_resource_backup_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::BackupDR::V1::ResourceBackupConfig. - p item - end -end -# [END backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb deleted file mode 100644 index e5b889a4dfa1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.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 backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan. -# -def create_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new - - # Call the create_backup_plan method. - result = client.create_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb deleted file mode 100644 index 628c925da9e2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.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 backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association. -# -def create_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new - - # Call the create_backup_plan_association method. - result = client.create_backup_plan_association request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb deleted file mode 100644 index 30f7bcaa3098..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.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 backupdr_v1_generated_BackupDR_CreateBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault. -# -def create_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new - - # Call the create_backup_vault method. - result = client.create_backup_vault request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb deleted file mode 100644 index 8eb6c732f376..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.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 backupdr_v1_generated_BackupDR_CreateManagementServer_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_management_server call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server. -# -def create_management_server - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new - - # Call the create_management_server method. - result = client.create_management_server request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb deleted file mode 100644 index d920bccbb83b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_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 backupdr_v1_generated_BackupDR_DeleteBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup. -# -def delete_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new - - # Call the delete_backup method. - result = client.delete_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 backupdr_v1_generated_BackupDR_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb deleted file mode 100644 index a1585e7a803b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.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 backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan. -# -def delete_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new - - # Call the delete_backup_plan method. - result = client.delete_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb deleted file mode 100644 index 68037dc3c1c4..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.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 backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association. -# -def delete_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new - - # Call the delete_backup_plan_association method. - result = client.delete_backup_plan_association request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb deleted file mode 100644 index bfc3d415812f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.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 backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault. -# -def delete_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new - - # Call the delete_backup_vault method. - result = client.delete_backup_vault request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb deleted file mode 100644 index 6e0a6c8cea65..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.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 backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_management_server call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server. -# -def delete_management_server - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new - - # Call the delete_management_server method. - result = client.delete_management_server request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb deleted file mode 100644 index 0caa4cac2125..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.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 backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type. -# -def fetch_backup_plan_associations_for_resource_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new - - # Call the fetch_backup_plan_associations_for_resource_type method. - result = client.fetch_backup_plan_associations_for_resource_type request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb deleted file mode 100644 index 8cd5de148567..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.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 backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_backups_for_resource_type call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type. -# -def fetch_backups_for_resource_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new - - # Call the fetch_backups_for_resource_type method. - result = client.fetch_backups_for_resource_type request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb deleted file mode 100644 index dfcab2575125..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.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 backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type. -# -def fetch_data_source_references_for_resource_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new - - # Call the fetch_data_source_references_for_resource_type method. - result = client.fetch_data_source_references_for_resource_type request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb deleted file mode 100644 index a69bc309bc34..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.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 backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_usable_backup_vaults call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults. -# -def fetch_usable_backup_vaults - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new - - # Call the fetch_usable_backup_vaults method. - result = client.fetch_usable_backup_vaults request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb deleted file mode 100644 index 657958fff3c2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/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 backupdr_v1_generated_BackupDR_GetBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup. -# -def get_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupRequest.new - - # Call the get_backup method. - result = client.get_backup request - - # The returned object is of type Google::Cloud::BackupDR::V1::Backup. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb deleted file mode 100644 index 7f12d19c6466..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan. -# -def get_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new - - # Call the get_backup_plan method. - result = client.get_backup_plan request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb deleted file mode 100644 index 95a3715c6d53..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association. -# -def get_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new - - # Call the get_backup_plan_association method. - result = client.get_backup_plan_association request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb deleted file mode 100644 index d9bdfc3ff576..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_plan_revision call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision. -# -def get_backup_plan_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new - - # Call the get_backup_plan_revision method. - result = client.get_backup_plan_revision request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb deleted file mode 100644 index b42028f7c351..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault. -# -def get_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new - - # Call the get_backup_vault method. - result = client.get_backup_vault request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb deleted file mode 100644 index d86a885d8a7f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetDataSource_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_data_source call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source. -# -def get_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new - - # Call the get_data_source method. - result = client.get_data_source request - - # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. - p result -end -# [END backupdr_v1_generated_BackupDR_GetDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb deleted file mode 100644 index 789a665be9b7..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_data_source_reference call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference. -# -def get_data_source_reference - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new - - # Call the get_data_source_reference method. - result = client.get_data_source_reference request - - # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. - p result -end -# [END backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb deleted file mode 100644 index 0ab70b155c06..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetManagementServer_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_management_server call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server. -# -def get_management_server - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new - - # Call the get_management_server method. - result = client.get_management_server request - - # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. - p result -end -# [END backupdr_v1_generated_BackupDR_GetManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb deleted file mode 100644 index 1a6248e10433..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_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 backupdr_v1_generated_BackupDR_InitializeService_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the initialize_service call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service. -# -def initialize_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new - - # Call the initialize_service method. - result = client.initialize_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 backupdr_v1_generated_BackupDR_InitializeService_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb deleted file mode 100644 index 1be14c9502b1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.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 backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_plan_associations call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations. -# -def list_backup_plan_associations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new - - # Call the list_backup_plan_associations method. - result = client.list_backup_plan_associations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb deleted file mode 100644 index 523bdada0405..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_plan_revisions call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions. -# -def list_backup_plan_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new - - # Call the list_backup_plan_revisions method. - result = client.list_backup_plan_revisions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb deleted file mode 100644 index 68a2931714bf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.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 backupdr_v1_generated_BackupDR_ListBackupPlans_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_plans call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans. -# -def list_backup_plans - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new - - # Call the list_backup_plans method. - result = client.list_backup_plans request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupPlans_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb deleted file mode 100644 index bd68d0f95f72..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.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 backupdr_v1_generated_BackupDR_ListBackupVaults_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_vaults call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults. -# -def list_backup_vaults - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new - - # Call the list_backup_vaults method. - result = client.list_backup_vaults request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb deleted file mode 100644 index 865ebe38ae19..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/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 backupdr_v1_generated_BackupDR_ListBackups_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backups call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups. -# -def list_backups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::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::BackupDR::V1::Backup. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb deleted file mode 100644 index c0cbb790e2d0..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.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 backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_data_source_references call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references. -# -def list_data_source_references - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new - - # Call the list_data_source_references method. - result = client.list_data_source_references request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb deleted file mode 100644 index 5607c9beb443..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListDataSources_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_data_sources call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources. -# -def list_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new - - # Call the list_data_sources method. - result = client.list_data_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListDataSources_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb deleted file mode 100644 index c026e846fb03..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.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 backupdr_v1_generated_BackupDR_ListManagementServers_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_management_servers call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers. -# -def list_management_servers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new - - # Call the list_management_servers method. - result = client.list_management_servers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListManagementServers_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb deleted file mode 100644 index 0f57a119d916..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_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 backupdr_v1_generated_BackupDR_RestoreBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the restore_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup. -# -def restore_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new - - # Call the restore_backup method. - result = client.restore_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 backupdr_v1_generated_BackupDR_RestoreBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb deleted file mode 100644 index d5b2a0664bef..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_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 backupdr_v1_generated_BackupDR_TriggerBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the trigger_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup. -# -def trigger_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new - - # Call the trigger_backup method. - result = client.trigger_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 backupdr_v1_generated_BackupDR_TriggerBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb deleted file mode 100644 index 90ba04ae397e..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_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 backupdr_v1_generated_BackupDR_UpdateBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup. -# -def update_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new - - # Call the update_backup method. - result = client.update_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 backupdr_v1_generated_BackupDR_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb deleted file mode 100644 index f2bdd1d70e64..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.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 backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan. -# -def update_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new - - # Call the update_backup_plan method. - result = client.update_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb deleted file mode 100644 index eaf3f010e273..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.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 backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association. -# -def update_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new - - # Call the update_backup_plan_association method. - result = client.update_backup_plan_association request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb deleted file mode 100644 index 5b0d5a057c05..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.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 backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault. -# -def update_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new - - # Call the update_backup_vault method. - result = client.update_backup_vault request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb deleted file mode 100644 index 1167757bc2d9..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_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 backupdr_v1_generated_BackupDR_UpdateDataSource_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_data_source call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source. -# -def update_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new - - # Call the update_data_source method. - result = client.update_data_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 backupdr_v1_generated_BackupDR_UpdateDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json deleted file mode 100644 index fa4385c64a8c..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json +++ /dev/null @@ -1,1535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-backupdr-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.backupdr.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "backupdr_v1_generated_BackupDR_ListManagementServers_sync", - "title": "Snippet for the list_management_servers call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers.", - "file": "backupdr/list_management_servers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_management_servers", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListManagementServersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListManagementServersResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListManagementServers", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetManagementServer_sync", - "title": "Snippet for the get_management_server call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server.", - "file": "backupdr/get_management_server.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_management_server", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetManagementServerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ManagementServer", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetManagementServer", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateManagementServer_sync", - "title": "Snippet for the create_management_server call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server.", - "file": "backupdr/create_management_server.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_management_server", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateManagementServerRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateManagementServer", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_sync", - "title": "Snippet for the delete_management_server call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server.", - "file": "backupdr/delete_management_server.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_management_server", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteManagementServer", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupVault_sync", - "title": "Snippet for the create_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault.", - "file": "backupdr/create_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupVaults_sync", - "title": "Snippet for the list_backup_vaults call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults.", - "file": "backupdr/list_backup_vaults.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_vaults", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupVaults", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync", - "title": "Snippet for the fetch_usable_backup_vaults call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults.", - "file": "backupdr/fetch_usable_backup_vaults.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_usable_backup_vaults", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchUsableBackupVaults", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupVault_sync", - "title": "Snippet for the get_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault.", - "file": "backupdr/get_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupVault", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_sync", - "title": "Snippet for the update_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault.", - "file": "backupdr/update_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_sync", - "title": "Snippet for the delete_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault.", - "file": "backupdr/delete_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListDataSources_sync", - "title": "Snippet for the list_data_sources call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources.", - "file": "backupdr/list_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_sources", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourcesResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListDataSources", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSources", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetDataSource_sync", - "title": "Snippet for the get_data_source call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source.", - "file": "backupdr/get_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_source", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::DataSource", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetDataSource", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSource", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateDataSource_sync", - "title": "Snippet for the update_data_source call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source.", - "file": "backupdr/update_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_source", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateDataSource", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackups_sync", - "title": "Snippet for the list_backups call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups.", - "file": "backupdr/list_backups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backups", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackups", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackups", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync", - "title": "Snippet for the fetch_backups_for_resource_type call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type.", - "file": "backupdr/fetch_backups_for_resource_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_backups_for_resource_type", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchBackupsForResourceType", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupsForResourceType", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackup_sync", - "title": "Snippet for the get_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup.", - "file": "backupdr/get_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::Backup", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackup_sync", - "title": "Snippet for the update_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup.", - "file": "backupdr/update_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackup_sync", - "title": "Snippet for the delete_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup.", - "file": "backupdr/delete_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_RestoreBackup_sync", - "title": "Snippet for the restore_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup.", - "file": "backupdr/restore_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "restore_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::RestoreBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "RestoreBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_sync", - "title": "Snippet for the create_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan.", - "file": "backupdr/create_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync", - "title": "Snippet for the update_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan.", - "file": "backupdr/update_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlan_sync", - "title": "Snippet for the get_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan.", - "file": "backupdr/get_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupPlan", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlans_sync", - "title": "Snippet for the list_backup_plans call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans.", - "file": "backupdr/list_backup_plans.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plans", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupPlansRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlansResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupPlans", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync", - "title": "Snippet for the delete_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan.", - "file": "backupdr/delete_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync", - "title": "Snippet for the get_backup_plan_revision call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision.", - "file": "backupdr/get_backup_plan_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan_revision", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanRevision", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupPlanRevision", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanRevision", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync", - "title": "Snippet for the list_backup_plan_revisions call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions.", - "file": "backupdr/list_backup_plan_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plan_revisions", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupPlanRevisions", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanRevisions", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync", - "title": "Snippet for the create_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association.", - "file": "backupdr/create_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync", - "title": "Snippet for the update_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association.", - "file": "backupdr/update_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync", - "title": "Snippet for the get_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association.", - "file": "backupdr/get_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanAssociation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync", - "title": "Snippet for the list_backup_plan_associations call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations.", - "file": "backupdr/list_backup_plan_associations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plan_associations", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupPlanAssociations", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync", - "title": "Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type.", - "file": "backupdr/fetch_backup_plan_associations_for_resource_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_backup_plan_associations_for_resource_type", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchBackupPlanAssociationsForResourceType", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupPlanAssociationsForResourceType", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync", - "title": "Snippet for the delete_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association.", - "file": "backupdr/delete_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_TriggerBackup_sync", - "title": "Snippet for the trigger_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup.", - "file": "backupdr/trigger_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "trigger_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::TriggerBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "TriggerBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetDataSourceReference_sync", - "title": "Snippet for the get_data_source_reference call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference.", - "file": "backupdr/get_data_source_reference.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_source_reference", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::DataSourceReference", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetDataSourceReference", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSourceReference", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync", - "title": "Snippet for the list_data_source_references call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references.", - "file": "backupdr/list_data_source_references.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_source_references", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListDataSourceReferences", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSourceReferences", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync", - "title": "Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type.", - "file": "backupdr/fetch_data_source_references_for_resource_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_data_source_references_for_resource_type", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchDataSourceReferencesForResourceType", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchDataSourceReferencesForResourceType", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_InitializeService_sync", - "title": "Snippet for the initialize_service call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service.", - "file": "backupdr/initialize_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "initialize_service", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::InitializeServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "InitializeService", - "full_name": "google.cloud.backupdr.v1.BackupDR.InitializeService", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync", - "title": "Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs.", - "file": "backup_dr_protection_summary/list_resource_backup_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_resource_backup_configs", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse", - "client": { - "short_name": "BackupDrProtectionSummary::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client" - }, - "method": { - "short_name": "ListResourceBackupConfigs", - "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary.ListResourceBackupConfigs", - "service": { - "short_name": "BackupDrProtectionSummary", - "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary" - } - } - }, - "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-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb deleted file mode 100644 index 9d979a3cfce6..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_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/backupdr/v1/backup_dr_protection_summary" - -class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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::BackupDR::V1::BackupDrProtectionSummary::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-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb deleted file mode 100644 index 8ec42b655e04..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/backupdr/v1/protection_summary_pb" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" - - -class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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_resource_backup_configs - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.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_resource_backup_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::BackupDR::V1::BackupDrProtectionSummary::Rest::ServiceStub.stub :transcode_list_resource_backup_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_resource_backup_configs_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_resource_backup_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_resource_backup_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_resource_backup_configs ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.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_resource_backup_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_resource_backup_configs(::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.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_resource_backup_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::BackupDR::V1::BackupDrProtectionSummary::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::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb deleted file mode 100644 index 4558e7043ce9..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb +++ /dev/null @@ -1,175 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/backupdr/v1/protection_summary_pb" -require "google/cloud/backupdr/v1/backup_dr_protection_summary" - -class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::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_resource_backup_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_resource_backup_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_resource_backup_configs, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, 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_resource_backup_configs_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_resource_backup_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_resource_backup_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_resource_backup_configs ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.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_resource_backup_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_resource_backup_configs(::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.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_resource_backup_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::BackupDR::V1::BackupDrProtectionSummary::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::BackupDR::V1::BackupDrProtectionSummary::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::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb deleted file mode 100644 index afa3cdaab7ae..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_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/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr_services_pb" -require "google/cloud/backupdr/v1/backupdr" - -class ::Google::Cloud::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb deleted file mode 100644 index 5c155040928d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_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/backupdr/v1/backupdr" - -class ::Google::Cloud::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3", backup: "value4" - assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3/backups/value4", path - end - end - - def test_backup_plan_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_path project: "value0", location: "value1", backup_plan: "value2" - assert_equal "projects/value0/locations/value1/backupPlans/value2", path - end - end - - def test_backup_plan_association_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_association_path project: "value0", location: "value1", backup_plan_association: "value2" - assert_equal "projects/value0/locations/value1/backupPlanAssociations/value2", path - end - end - - def test_backup_plan_revision_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_revision_path project: "value0", location: "value1", backup_plan: "value2", revision: "value3" - assert_equal "projects/value0/locations/value1/backupPlans/value2/revisions/value3", path - end - end - - def test_backup_vault_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_vault_path project: "value0", location: "value1", backupvault: "value2" - assert_equal "projects/value0/locations/value1/backupVaults/value2", path - end - end - - def test_cluster_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.cluster_path project: "value0", location: "value1", cluster: "value2" - assert_equal "projects/value0/locations/value1/clusters/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::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", ring: "value2", 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::BackupDR::V1::BackupDR::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_data_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_source_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3" - assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3", path - end - end - - def test_data_source_reference_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_source_reference_path project: "value0", location: "value1", data_source_reference: "value2" - assert_equal "projects/value0/locations/value1/dataSourceReferences/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::BackupDR::V1::BackupDR::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_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::BackupDR::V1::BackupDR::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_management_server_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.management_server_path project: "value0", location: "value1", managementserver: "value2" - assert_equal "projects/value0/locations/value1/managementServers/value2", path - end - end - - def test_storage_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::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.storage_pool_path project: "value0", zone: "value1", storage_pool: "value2" - assert_equal "projects/value0/zones/value1/storagePools/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb deleted file mode 100644 index 24065daa0da5..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb +++ /dev/null @@ -1,2196 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr/rest" - - -class ::Google::Cloud::BackupDR::V1::BackupDR::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_management_servers - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.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_management_servers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_management_servers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_management_servers_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_management_servers({ 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_management_servers 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_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.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_management_servers({ 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_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.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_management_servers_client_stub.call_count - end - end - end - - def test_get_management_server - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ManagementServer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_management_server_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_management_server_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_management_server({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_management_server name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_management_server({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_management_server_client_stub.call_count - end - end - end - - def test_create_management_server - # Create test objects. - 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" - management_server_id = "hello world" - management_server = {} - request_id = "hello world" - - create_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_management_server_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_management_server_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_management_server_client_stub.call_count - end - end - end - - def test_delete_management_server - # Create test objects. - 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_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_management_server_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_management_server_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_management_server({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_management_server name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.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_management_server({ 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_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.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_management_server_client_stub.call_count - end - end - end - - def test_create_backup_vault - # Create test objects. - 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_vault_id = "hello world" - backup_vault = {} - request_id = "hello world" - validate_only = true - - create_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_vault_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_vault_client_stub.call_count - end - end - end - - def test_list_backup_vaults - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.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" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - list_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_vaults_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_vaults_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_vaults_client_stub.call_count - end - end - end - - def test_fetch_usable_backup_vaults - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.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" - - fetch_usable_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_usable_backup_vaults_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_usable_backup_vaults_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_usable_backup_vaults({ 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.fetch_usable_backup_vaults 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.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.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.fetch_usable_backup_vaults({ 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.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.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, fetch_usable_backup_vaults_client_stub.call_count - end - end - end - - def test_get_backup_vault - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupVault.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - get_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_vault_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_backup_vault({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_backup_vault name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_backup_vault({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_vault_client_stub.call_count - end - end - end - - def test_update_backup_vault - # Create test objects. - 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 = {} - backup_vault = {} - request_id = "hello world" - validate_only = true - force = true - force_update_access_restriction = true - - update_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_vault_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_vault_client_stub.call_count - end - end - end - - def test_delete_backup_vault - # Create test objects. - 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 - etag = "hello world" - validate_only = true - allow_missing = true - ignore_backup_plan_references = true - - delete_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_vault_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_vault_client_stub.call_count - end - end - end - - def test_list_data_sources - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_data_sources({ 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_data_sources 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_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_count - end - end - end - - def test_get_data_source - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_count - end - end - end - - def test_update_data_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. - update_mask = {} - data_source = {} - request_id = "hello world" - allow_missing = true - - update_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_source_client_stub.call_count - end - end - end - - def test_list_backups - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.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" - view = :BACKUP_VIEW_UNSPECIFIED - - 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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), 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_fetch_backups_for_resource_type - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - fetch_backups_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backups_for_resource_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_backups_for_resource_type_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_backups_for_resource_type_client_stub.call_count - end - end - end - - def test_get_backup - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::Backup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - 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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_backup({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_backup name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_backup({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_count - end - end - end - - def test_update_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. - update_mask = {} - backup = {} - request_id = "hello world" - - 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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_backup update_mask: update_mask, backup: backup, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id), 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::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_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_backup({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_backup name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.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_backup({ 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_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.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_backup_client_stub.call_count - end - end - end - - def test_restore_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. - name = "hello world" - request_id = "hello world" - compute_instance_target_environment = {} - compute_instance_restore_properties = {} - clear_overrides_field_mask = {} - - restore_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_restore_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restore_backup_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restore_backup_client_stub.call_count - end - end - end - - def test_create_backup_plan - # Create test objects. - 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_plan_id = "hello world" - backup_plan = {} - request_id = "hello world" - - create_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_plan_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_plan_client_stub.call_count - end - end - end - - def test_update_backup_plan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - backup_plan = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_plan_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan({ backup_plan: backup_plan, 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_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan_client_stub.call_count - end - end - end - - def test_get_backup_plan - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupPlan.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_backup_plan({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_backup_plan name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_backup_plan({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_backup_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_client_stub.call_count - end - end - end - - def test_list_backup_plans - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.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_backup_plans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plans_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plans_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_backup_plans({ 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_backup_plans 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_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.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_backup_plans({ 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_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.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_backup_plans_client_stub.call_count - end - end - end - - def test_delete_backup_plan - # Create test objects. - 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_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_plan_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_backup_plan({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_backup_plan name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.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_backup_plan({ 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_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.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_backup_plan_client_stub.call_count - end - end - end - - def test_get_backup_plan_revision - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_revision_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_backup_plan_revision({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_backup_plan_revision name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_backup_plan_revision({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_revision_client_stub.call_count - end - end - end - - def test_list_backup_plan_revisions - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.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_plan_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plan_revisions_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_backup_plan_revisions({ 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_plan_revisions 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_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.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_plan_revisions({ 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_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.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_plan_revisions_client_stub.call_count - end - end - end - - def test_create_backup_plan_association - # Create test objects. - 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_plan_association_id = "hello world" - backup_plan_association = {} - request_id = "hello world" - - create_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_plan_association_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_plan_association_client_stub.call_count - end - end - end - - def test_update_backup_plan_association - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - backup_plan_association = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_plan_association_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, 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_backup_plan_association({ backup_plan_association: backup_plan_association, 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_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, 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_backup_plan_association_client_stub.call_count - end - end - end - - def test_get_backup_plan_association - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_association_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_backup_plan_association({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_backup_plan_association name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_backup_plan_association({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_backup_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_association_client_stub.call_count - end - end - end - - def test_list_backup_plan_associations - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.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_backup_plan_associations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_associations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plan_associations_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_backup_plan_associations({ 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_backup_plan_associations 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_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.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_backup_plan_associations({ 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_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.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_backup_plan_associations_client_stub.call_count - end - end - end - - def test_fetch_backup_plan_associations_for_resource_type - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backup_plan_associations_for_resource_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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, fetch_backup_plan_associations_for_resource_type_client_stub.call_count - end - end - end - - def test_delete_backup_plan_association - # Create test objects. - 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_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_plan_association_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_backup_plan_association({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_backup_plan_association name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.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_backup_plan_association({ 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_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.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_backup_plan_association_client_stub.call_count - end - end - end - - def test_trigger_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. - name = "hello world" - rule_id = "hello world" - request_id = "hello world" - - trigger_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_trigger_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, trigger_backup_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.trigger_backup name: name, rule_id: rule_id, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, trigger_backup_client_stub.call_count - end - end - end - - def test_get_data_source_reference - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::DataSourceReference.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_reference_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_reference_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_source_reference_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_data_source_reference({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_data_source_reference name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_data_source_reference({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_source_reference_client_stub.call_count - end - end - end - - def test_list_data_source_references - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.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_data_source_references_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_source_references_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_source_references_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_data_source_references({ 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_data_source_references 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_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.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_data_source_references({ 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_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.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_data_source_references_client_stub.call_count - end - end - end - - def test_fetch_data_source_references_for_resource_type - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_data_source_references_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_data_source_references_for_resource_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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, fetch_data_source_references_for_resource_type_client_stub.call_count - end - end - end - - def test_initialize_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" - resource_type = "hello world" - request_id = "hello world" - cloud_sql_instance_initialization_config = {} - - initialize_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_initialize_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, initialize_service_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, initialize_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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb deleted file mode 100644 index 15150c279ece..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb +++ /dev/null @@ -1,2613 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr" - -class ::Google::Cloud::BackupDR::V1::BackupDR::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_management_servers - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_management_servers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_management_servers, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, 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 request.has_filter? - assert_equal "hello world", request["order_by"] - assert request.has_order_by? - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_management_servers_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_management_servers({ 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_management_servers 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_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.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_management_servers({ 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_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.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_management_servers_client_stub.call_rpc_count - end - end - - def test_get_management_server - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ManagementServer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_management_server, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_management_server_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_management_server({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_management_server name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_management_server({ 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_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(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_management_server_client_stub.call_rpc_count - end - end - - def test_create_management_server - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - management_server_id = "hello world" - management_server = {} - request_id = "hello world" - - create_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_management_server, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["management_server_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ManagementServer), request["management_server"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_management_server_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, 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_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, 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_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, 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_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, 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_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, 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_management_server_client_stub.call_rpc_count - end - end - - def test_delete_management_server - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_management_server, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_management_server_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_management_server({ 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_management_server 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_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.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_management_server({ 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_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.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_management_server_client_stub.call_rpc_count - end - end - - def test_create_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_vault_id = "hello world" - backup_vault = {} - request_id = "hello world" - validate_only = true - - create_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_vault_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_vault_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_backup_vault_client_stub.call_rpc_count - end - end - - def test_list_backup_vaults - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - list_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_vaults, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_vaults_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backup_vaults_client_stub.call_rpc_count - end - end - - def test_fetch_usable_backup_vaults - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - fetch_usable_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_usable_backup_vaults, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, 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, fetch_usable_backup_vaults_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_usable_backup_vaults({ 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.fetch_usable_backup_vaults 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.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.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.fetch_usable_backup_vaults({ 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.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.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, fetch_usable_backup_vaults_client_stub.call_rpc_count - end - end - - def test_get_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupVault.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - get_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, request - assert_equal "hello world", request["name"] - assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_vault_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_backup_vault({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_backup_vault name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_backup_vault({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_vault_client_stub.call_rpc_count - end - end - - def test_update_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - backup_vault = {} - request_id = "hello world" - validate_only = true - force = true - force_update_access_restriction = true - - update_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - assert_equal true, request["force_update_access_restriction"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_vault_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |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_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |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_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |response, operation| - 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_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, grpc_options) do |response, operation| - 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_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), grpc_options) do |response, operation| - assert_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_backup_vault_client_stub.call_rpc_count - end - end - - def test_delete_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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 - etag = "hello world" - validate_only = true - allow_missing = true - ignore_backup_plan_references = true - - delete_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["force"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - assert_equal true, request["ignore_backup_plan_references"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_vault_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |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_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |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_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |response, operation| - 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_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, grpc_options) do |response, operation| - 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_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), grpc_options) do |response, operation| - assert_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_backup_vault_client_stub.call_rpc_count - end - end - - def test_list_data_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_sources, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, 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_data_sources_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_data_sources({ 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_data_sources 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_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_rpc_count - end - end - - def test_get_data_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::DataSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_source, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_source_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_data_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_rpc_count - end - end - - def test_update_data_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. - update_mask = {} - data_source = {} - request_id = "hello world" - allow_missing = true - - update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_source, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::DataSource), request["data_source"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_source_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, 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.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, 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.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, 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.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, 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.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, 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, update_data_source_client_stub.call_rpc_count - end - end - - def test_list_backups - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backups, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backups_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups_client_stub.call_rpc_count - end - end - - def test_fetch_backups_for_resource_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - fetch_backups_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_backups_for_resource_type, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["resource_type"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_backups_for_resource_type_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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, fetch_backups_for_resource_type_client_stub.call_rpc_count - end - end - - def test_get_backup - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::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" - view = :BACKUP_VIEW_UNSPECIFIED - - get_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_backup({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_backup name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_backup({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_rpc_count - end - end - - def test_update_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. - update_mask = {} - backup = {} - request_id = "hello world" - - update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::Backup), request["backup"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_backup({ update_mask: update_mask, backup: backup, 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_backup update_mask: update_mask, backup: backup, 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_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, 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_backup({ update_mask: update_mask, backup: backup, 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_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, 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_backup_client_stub.call_rpc_count - end - end - - def test_delete_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. - name = "hello world" - request_id = "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::BackupDR::V1::DeleteBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_backup({ 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_backup 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_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.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_backup({ 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_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.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_backup_client_stub.call_rpc_count - end - end - - def test_restore_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. - name = "hello world" - request_id = "hello world" - compute_instance_target_environment = {} - compute_instance_restore_properties = {} - clear_overrides_field_mask = {} - - restore_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restore_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment), request["compute_instance_target_environment"] - assert_equal :compute_instance_target_environment, request.target_environment - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties), request["compute_instance_restore_properties"] - assert_equal :compute_instance_restore_properties, request.instance_properties - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["clear_overrides_field_mask"] - assert request.has_clear_overrides_field_mask? - refute_nil options - end - - Gapic::ServiceStub.stub :new, restore_backup_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_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.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_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.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_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.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_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.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_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, restore_backup_client_stub.call_rpc_count - end - end - - def test_create_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_plan_id = "hello world" - backup_plan = {} - request_id = "hello world" - - create_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_plan_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_plan_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, 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_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, 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_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, 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_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, 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_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, 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_backup_plan_client_stub.call_rpc_count - end - end - - def test_update_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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_plan = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] - 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_backup_plan_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_backup_plan({ backup_plan: backup_plan, 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_backup_plan backup_plan: backup_plan, 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_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan({ backup_plan: backup_plan, 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_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan_client_stub.call_rpc_count - end - end - - def test_get_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlan.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_backup_plan({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_backup_plan name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.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_plan({ 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_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(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_plan_client_stub.call_rpc_count - end - end - - def test_list_backup_plans - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_plans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plans, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, 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_backup_plans_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_backup_plans({ 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_backup_plans 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_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.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_backup_plans({ 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_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.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_backup_plans_client_stub.call_rpc_count - end - end - - def test_delete_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_plan_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_backup_plan({ 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_backup_plan 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_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.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_backup_plan({ 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_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.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_backup_plan_client_stub.call_rpc_count - end - end - - def test_get_backup_plan_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_plan_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan_revision, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_revision_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_backup_plan_revision({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_backup_plan_revision name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.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_plan_revision({ 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_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(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_plan_revision_client_stub.call_rpc_count - end - end - - def test_list_backup_plan_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_plan_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plan_revisions, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, 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_plan_revisions_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: 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_plan_revisions parent: parent, page_size: page_size, page_token: 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_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.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_plan_revisions({ 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_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.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_plan_revisions_client_stub.call_rpc_count - end - end - - def test_create_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_plan_association_id = "hello world" - backup_plan_association = {} - request_id = "hello world" - - create_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_plan_association_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_plan_association_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, 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_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, 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_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, 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_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, 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_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, 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_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_update_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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_plan_association = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] - 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_backup_plan_association_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_backup_plan_association({ backup_plan_association: backup_plan_association, 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_backup_plan_association backup_plan_association: backup_plan_association, 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_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, 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_backup_plan_association({ backup_plan_association: backup_plan_association, 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_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, 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_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_get_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_association_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_backup_plan_association({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_backup_plan_association name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.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_plan_association({ 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_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(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_plan_association_client_stub.call_rpc_count - end - end - - def test_list_backup_plan_associations - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_plan_associations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plan_associations, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, 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_backup_plan_associations_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_backup_plan_associations({ 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_backup_plan_associations 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_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.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_backup_plan_associations({ 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_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.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_backup_plan_associations_client_stub.call_rpc_count - end - end - - def test_fetch_backup_plan_associations_for_resource_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_backup_plan_associations_for_resource_type, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["resource_type"] - 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, fetch_backup_plan_associations_for_resource_type_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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, fetch_backup_plan_associations_for_resource_type_client_stub.call_rpc_count - end - end - - def test_delete_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_plan_association_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_backup_plan_association({ 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_backup_plan_association 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_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.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_backup_plan_association({ 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_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.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_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_trigger_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. - name = "hello world" - rule_id = "hello world" - request_id = "hello world" - - trigger_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :trigger_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["rule_id"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, trigger_backup_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.trigger_backup({ name: name, rule_id: rule_id, 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.trigger_backup name: name, rule_id: rule_id, 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.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, 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.trigger_backup({ name: name, rule_id: rule_id, 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.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, 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, trigger_backup_client_stub.call_rpc_count - end - end - - def test_get_data_source_reference - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::DataSourceReference.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_reference_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_source_reference, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_source_reference_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_data_source_reference({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_data_source_reference name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_data_source_reference({ 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_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_source_reference_client_stub.call_rpc_count - end - end - - def test_list_data_source_references - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_data_source_references_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_source_references, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, 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_data_source_references_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_data_source_references({ 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_data_source_references 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_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.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_data_source_references({ 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_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.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_data_source_references_client_stub.call_rpc_count - end - end - - def test_fetch_data_source_references_for_resource_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_data_source_references_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_data_source_references_for_resource_type, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["resource_type"] - 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, fetch_data_source_references_for_resource_type_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, 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.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, 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, fetch_data_source_references_for_resource_type_client_stub.call_rpc_count - end - end - - def test_initialize_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" - resource_type = "hello world" - request_id = "hello world" - cloud_sql_instance_initialization_config = {} - - initialize_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :initialize_service, name - assert_kind_of ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["resource_type"] - assert_equal "hello world", request["request_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig), request["cloud_sql_instance_initialization_config"] - assert_equal :cloud_sql_instance_initialization_config, request.initialization_config - refute_nil options - end - - Gapic::ServiceStub.stub :new, initialize_service_client_stub do - # Create client - c = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_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.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_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.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_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.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_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.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_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, initialize_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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::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::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-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-bare_metal_solution-v2/.gitignore b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json deleted file mode 100644 index 484136c8a856..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "baremetalsolution.googleapis.com", - "api_shortname": "baremetalsolution", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bare_metal_solution-v2/latest", - "distribution_name": "google-cloud-bare_metal_solution-v2", - "is_cloud": true, - "language": "ruby", - "name": "baremetalsolution", - "name_pretty": "Bare Metal Solution V2 API", - "product_documentation": "https://cloud.google.com/bare-metal/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. Note that google-cloud-bare_metal_solution-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bare_metal_solution instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/bare-metal/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml deleted file mode 100644 index 1d57d709ce5b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bare_metal_solution-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-bare_metal_solution-v2.rb" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/.yardopts b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts deleted file mode 100644 index 54f5b5f1015c..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Bare Metal Solution 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-bare_metal_solution-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md deleted file mode 100644 index ae79d1ebde45..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bare_metal_solution-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-bare_metal_solution-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/bare_metal_solution/v2" - -client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bare_metal_solution/v2" - -::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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-bare_metal_solution-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/bare_metal_solution/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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-bare_metal_solution-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/LICENSE.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/README.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md deleted file mode 100644 index fa9b1e1fa20c..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Bare Metal Solution V2 API - -Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center. - -Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Bare Metal Solution V2 API. Most users should consider using -the main client gem, -[google-cloud-bare_metal_solution](https://rubygems.org/gems/google-cloud-bare_metal_solution). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bare_metal_solution-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/baremetalsolution.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bare_metal_solution/v2" - -client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new -request = ::Google::Cloud::BareMetalSolution::V2::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-bare_metal_solution-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bare-metal/) -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/bare_metal_solution/v2" -require "logger" - -client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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-bare_metal_solution`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bare_metal_solution-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-bare_metal_solution`. -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-bare_metal_solution-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-bare_metal_solution-v2/Rakefile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile deleted file mode 100644 index c38c913d0c54..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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-bare_metal_solution-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-bare_metal_solution-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-bare_metal_solution-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-bare_metal_solution-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bare_metal_solution-v2" - header "google-cloud-bare_metal_solution-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bare_metal_solution-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bare_metal_solution-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-bare_metal_solution-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-bare_metal_solution-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-bare_metal_solution-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json deleted file mode 100644 index 7c860b1ff908..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json +++ /dev/null @@ -1,238 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.baremetalsolution.v2", - "libraryPackage": "::Google::Cloud::BareMetalSolution::V2", - "services": { - "BareMetalSolution": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client", - "rpcs": { - "ListInstances": { - "methods": [ - "list_instances" - ] - }, - "GetInstance": { - "methods": [ - "get_instance" - ] - }, - "UpdateInstance": { - "methods": [ - "update_instance" - ] - }, - "RenameInstance": { - "methods": [ - "rename_instance" - ] - }, - "ResetInstance": { - "methods": [ - "reset_instance" - ] - }, - "StartInstance": { - "methods": [ - "start_instance" - ] - }, - "StopInstance": { - "methods": [ - "stop_instance" - ] - }, - "EnableInteractiveSerialConsole": { - "methods": [ - "enable_interactive_serial_console" - ] - }, - "DisableInteractiveSerialConsole": { - "methods": [ - "disable_interactive_serial_console" - ] - }, - "DetachLun": { - "methods": [ - "detach_lun" - ] - }, - "ListSSHKeys": { - "methods": [ - "list_ssh_keys" - ] - }, - "CreateSSHKey": { - "methods": [ - "create_ssh_key" - ] - }, - "DeleteSSHKey": { - "methods": [ - "delete_ssh_key" - ] - }, - "ListVolumes": { - "methods": [ - "list_volumes" - ] - }, - "GetVolume": { - "methods": [ - "get_volume" - ] - }, - "UpdateVolume": { - "methods": [ - "update_volume" - ] - }, - "RenameVolume": { - "methods": [ - "rename_volume" - ] - }, - "EvictVolume": { - "methods": [ - "evict_volume" - ] - }, - "ResizeVolume": { - "methods": [ - "resize_volume" - ] - }, - "ListNetworks": { - "methods": [ - "list_networks" - ] - }, - "ListNetworkUsage": { - "methods": [ - "list_network_usage" - ] - }, - "GetNetwork": { - "methods": [ - "get_network" - ] - }, - "UpdateNetwork": { - "methods": [ - "update_network" - ] - }, - "CreateVolumeSnapshot": { - "methods": [ - "create_volume_snapshot" - ] - }, - "RestoreVolumeSnapshot": { - "methods": [ - "restore_volume_snapshot" - ] - }, - "DeleteVolumeSnapshot": { - "methods": [ - "delete_volume_snapshot" - ] - }, - "GetVolumeSnapshot": { - "methods": [ - "get_volume_snapshot" - ] - }, - "ListVolumeSnapshots": { - "methods": [ - "list_volume_snapshots" - ] - }, - "GetLun": { - "methods": [ - "get_lun" - ] - }, - "ListLuns": { - "methods": [ - "list_luns" - ] - }, - "EvictLun": { - "methods": [ - "evict_lun" - ] - }, - "GetNfsShare": { - "methods": [ - "get_nfs_share" - ] - }, - "ListNfsShares": { - "methods": [ - "list_nfs_shares" - ] - }, - "UpdateNfsShare": { - "methods": [ - "update_nfs_share" - ] - }, - "CreateNfsShare": { - "methods": [ - "create_nfs_share" - ] - }, - "RenameNfsShare": { - "methods": [ - "rename_nfs_share" - ] - }, - "DeleteNfsShare": { - "methods": [ - "delete_nfs_share" - ] - }, - "ListProvisioningQuotas": { - "methods": [ - "list_provisioning_quotas" - ] - }, - "SubmitProvisioningConfig": { - "methods": [ - "submit_provisioning_config" - ] - }, - "GetProvisioningConfig": { - "methods": [ - "get_provisioning_config" - ] - }, - "CreateProvisioningConfig": { - "methods": [ - "create_provisioning_config" - ] - }, - "UpdateProvisioningConfig": { - "methods": [ - "update_provisioning_config" - ] - }, - "RenameNetwork": { - "methods": [ - "rename_network" - ] - }, - "ListOSImages": { - "methods": [ - "list_os_images" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec b/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec deleted file mode 100644 index 33c47faab427..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bare_metal_solution/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bare_metal_solution-v2" - gem.version = Google::Cloud::BareMetalSolution::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. Note that google-cloud-bare_metal_solution-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bare_metal_solution instead. See the readme for more details." - gem.summary = "Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data 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 "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb deleted file mode 100644 index e3cbed72515b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-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/bare_metal_solution/v2" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb deleted file mode 100644 index 4decd222cabc..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/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/bare_metal_solution/v2/bare_metal_solution" -require "google/cloud/bare_metal_solution/v2/version" - -module Google - module Cloud - module BareMetalSolution - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bare_metal_solution/v2" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bare_metal_solution/v2" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - module V2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/bare_metal_solution/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb deleted file mode 100644 index 0ef9b283c295..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bare_metal_solution/v2/version" - -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/paths" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/operations" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/client" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" - -module Google - module Cloud - module BareMetalSolution - module V2 - ## - # Performs management operations on Bare Metal Solution servers. - # - # The `baremetalsolution.googleapis.com` service provides management - # capabilities for Bare Metal Solution servers. To access the API methods, you - # must assign Bare Metal Solution IAM roles containing the desired permissions - # to your staff in your Google Cloud project. You must also enable the Bare - # Metal Solution API. Once enabled, the methods act - # upon specific servers in your Bare Metal Solution environment. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bare_metal_solution/v2/bare_metal_solution" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - module BareMetalSolution - end - end - end - end -end - -helper_path = ::File.join __dir__, "bare_metal_solution", "helpers.rb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb deleted file mode 100644 index e8a36e013d7a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb +++ /dev/null @@ -1,4838 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - ## - # Client for the BareMetalSolution service. - # - # Performs management operations on Bare Metal Solution servers. - # - # The `baremetalsolution.googleapis.com` service provides management - # capabilities for Bare Metal Solution servers. To access the API methods, you - # must assign Bare Metal Solution IAM roles containing the desired permissions - # to your staff in your Google Cloud project. You must also enable the Bare - # Metal Solution API. Once enabled, the methods act - # upon specific servers in your Bare Metal Solution environment. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :bare_metal_solution_stub - - ## - # Configure the BareMetalSolution Client class. - # - # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BareMetalSolution clients - # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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", "BareMetalSolution", "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.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BareMetalSolution 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::BareMetalSolution::V2::BareMetalSolution::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 - @bare_metal_solution_stub.universe_domain - end - - ## - # Create a new BareMetalSolution client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BareMetalSolution 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/baremetalsolution/v2/baremetalsolution_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 - - @bare_metal_solution_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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 - ) - - @bare_metal_solution_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 = @bare_metal_solution_stub.endpoint - config.universe_domain = @bare_metal_solution_stub.universe_domain - config.logger = @bare_metal_solution_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 = @bare_metal_solution_stub.endpoint - config.universe_domain = @bare_metal_solution_stub.universe_domain - config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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 - @bare_metal_solution_stub.logger - end - - # Service calls - - ## - # List servers 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::BareMetalSolution::V2::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::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) - # 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] - # Requested page size. Server may return fewer items than requested. - # If unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::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_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 - - @bare_metal_solution_stub.call_rpc :list_instances, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_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 - - ## - # Get details about a single server. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::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_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 - - @bare_metal_solution_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 - - ## - # Update details of a single server. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::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, update_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::BareMetalSolution::V2::Instance, ::Hash] - # Required. The server to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The currently supported fields are: - # `labels` - # `hyperthreading_enabled` - # `os_image` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.instance&.name - 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 - - @bare_metal_solution_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 - - ## - # RenameInstance sets a new name for an instance. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_instance(request, options = nil) - # Pass arguments to `rename_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rename_instance(name: nil, new_instance_id: nil) - # Pass arguments to `rename_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` field is used to identify the instance. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param new_instance_id [::String] - # Required. The new `id` of the instance. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new - # - # # Call the rename_instance method. - # result = client.rename_instance request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. - # p result - # - def rename_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rename_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::BareMetalSolution::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.rename_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rename_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :rename_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 - - ## - # Perform an ungraceful, hard reset on a server. Equivalent to shutting the - # power off and then turning it back on. - # - # @overload reset_instance(request, options = nil) - # Pass arguments to `reset_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload reset_instance(name: nil) - # Pass arguments to `reset_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 [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new - # - # # Call the reset_instance method. - # result = client.reset_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 reset_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.reset_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::BareMetalSolution::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.reset_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.reset_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :reset_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 - - ## - # Starts a server that was shutdown. - # - # @overload start_instance(request, options = nil) - # Pass arguments to `start_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(name: nil) - # Pass arguments to `start_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 [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new - # - # # Call the start_instance method. - # result = client.start_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 start_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest - - # Converts hash and nil to 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_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::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.start_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :start_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 - - ## - # Stop a running server. - # - # @overload stop_instance(request, options = nil) - # Pass arguments to `stop_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload stop_instance(name: nil) - # Pass arguments to `stop_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 [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new - # - # # Call the stop_instance method. - # result = client.stop_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 stop_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.stop_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::BareMetalSolution::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.stop_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.stop_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :stop_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 - - ## - # Enable the interactive serial console feature on an instance. - # - # @overload enable_interactive_serial_console(request, options = nil) - # Pass arguments to `enable_interactive_serial_console` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_interactive_serial_console(name: nil) - # Pass arguments to `enable_interactive_serial_console` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new - # - # # Call the enable_interactive_serial_console method. - # result = client.enable_interactive_serial_console request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_interactive_serial_console request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest - - # Converts hash and nil to 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_interactive_serial_console.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.enable_interactive_serial_console.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_interactive_serial_console.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :enable_interactive_serial_console, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 the interactive serial console feature on an instance. - # - # @overload disable_interactive_serial_console(request, options = nil) - # Pass arguments to `disable_interactive_serial_console` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_interactive_serial_console(name: nil) - # Pass arguments to `disable_interactive_serial_console` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new - # - # # Call the disable_interactive_serial_console method. - # result = client.disable_interactive_serial_console request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_interactive_serial_console request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest - - # Converts hash and nil to 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_interactive_serial_console.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.disable_interactive_serial_console.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_interactive_serial_console.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :disable_interactive_serial_console, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Detach LUN from Instance. - # - # @overload detach_lun(request, options = nil) - # Pass arguments to `detach_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload detach_lun(instance: nil, lun: nil, skip_reboot: nil) - # Pass arguments to `detach_lun` via keyword arguments. Note that at - # least one keyword argument is 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 [::String] - # Required. Name of the instance. - # @param lun [::String] - # Required. Name of the Lun to detach. - # @param skip_reboot [::Boolean] - # If true, performs lun unmapping without instance reboot. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new - # - # # Call the detach_lun method. - # result = client.detach_lun request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def detach_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.detach_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.instance - header_params["instance"] = request.instance - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.detach_lun.timeout, - metadata: metadata, - retry_policy: @config.rpcs.detach_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :detach_lun, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 public SSH keys registered for the specified project. - # These SSH keys are used only for the interactive serial console feature. - # - # @overload list_ssh_keys(request, options = nil) - # Pass arguments to `list_ssh_keys` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_ssh_keys(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_ssh_keys` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent containing the SSH keys. - # Currently, the only valid value for the location is "global". - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new - # - # # Call the list_ssh_keys method. - # result = client.list_ssh_keys request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. - # p item - # end - # - def list_ssh_keys request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_ssh_keys.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_ssh_keys.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_ssh_keys.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_ssh_keys, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_ssh_keys, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Register a public SSH key in the specified project for use with the - # interactive serial console feature. - # - # @overload create_ssh_key(request, options = nil) - # Pass arguments to `create_ssh_key` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil) - # Pass arguments to `create_ssh_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 parent [::String] - # Required. The parent containing the SSH keys. - # @param ssh_key [::Google::Cloud::BareMetalSolution::V2::SSHKey, ::Hash] - # Required. The SSH key to register. - # @param ssh_key_id [::String] - # Required. The ID to use for the key, which will become the final component - # of the key's resource name. - # - # This value must match the regex: - # [a-zA-Z0-9@.\-_]\\{1,64} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new - # - # # Call the create_ssh_key method. - # result = client.create_ssh_key request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. - # p result - # - def create_ssh_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest - - # Converts hash and nil to 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_ssh_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::BareMetalSolution::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_ssh_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_ssh_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :create_ssh_key, request, 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 public SSH key registered in the specified project. - # - # @overload delete_ssh_key(request, options = nil) - # Pass arguments to `delete_ssh_key` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_ssh_key(name: nil) - # Pass arguments to `delete_ssh_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 name [::String] - # Required. The name of the SSH key to delete. - # Currently, the only valid value for the location is "global". - # - # @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/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new - # - # # Call the delete_ssh_key method. - # result = client.delete_ssh_key request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_ssh_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest - - # Converts hash and nil to 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_ssh_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::BareMetalSolution::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_ssh_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_ssh_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :delete_ssh_key, request, 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 storage volumes in a given project and location. - # - # @overload list_volumes(request, options = nil) - # Pass arguments to `list_volumes` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_volumes` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListVolumesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new - # - # # Call the list_volumes method. - # result = client.list_volumes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. - # p item - # end - # - def list_volumes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_volumes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volumes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_volumes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_volumes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single storage volume. - # - # @overload get_volume(request, options = nil) - # Pass arguments to `get_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_volume(name: nil) - # Pass arguments to `get_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Volume] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new - # - # # Call the get_volume method. - # result = client.get_volume request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - # p result - # - def get_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_volume, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single storage volume. - # - # @overload update_volume(request, options = nil) - # Pass arguments to `update_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_volume(volume: nil, update_mask: nil) - # Pass arguments to `update_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash] - # Required. The volume to update. - # - # The `name` field is used to identify the volume to update. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # 'labels' - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new - # - # # Call the update_volume method. - # result = client.update_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest - - # Converts hash and nil to 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_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.volume&.name - header_params["volume.name"] = request.volume.name - end - - request_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_volume.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :update_volume, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameVolume sets a new name for a volume. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_volume(request, options = nil) - # Pass arguments to `rename_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rename_volume(name: nil, new_volume_id: nil) - # Pass arguments to `rename_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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` field is used to identify the volume. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @param new_volume_id [::String] - # Required. The new `id` of the volume. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Volume] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new - # - # # Call the rename_volume method. - # result = client.rename_volume request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - # p result - # - def rename_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rename_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_volume.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rename_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :rename_volume, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Skips volume's cooloff and deletes it now. - # Volume must be in cooloff state. - # - # @overload evict_volume(request, options = nil) - # Pass arguments to `evict_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload evict_volume(name: nil) - # Pass arguments to `evict_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Volume. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new - # - # # Call the evict_volume method. - # result = client.evict_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def evict_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.evict_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.evict_volume.timeout, - metadata: metadata, - retry_policy: @config.rpcs.evict_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :evict_volume, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Emergency Volume resize. - # - # @overload resize_volume(request, options = nil) - # Pass arguments to `resize_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload resize_volume(volume: nil, size_gib: nil) - # Pass arguments to `resize_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume [::String] - # Required. Volume to resize. - # @param size_gib [::Integer] - # New Volume size, in GiB. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new - # - # # Call the resize_volume method. - # result = client.resize_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def resize_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.resize_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.volume - header_params["volume"] = request.volume - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.resize_volume.timeout, - metadata: metadata, - retry_policy: @config.rpcs.resize_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :resize_volume, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List network in a given project and location. - # - # @overload list_networks(request, options = nil) - # Pass arguments to `list_networks` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_networks` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListNetworksRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new - # - # # Call the list_networks method. - # result = client.list_networks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. - # p item - # end - # - def list_networks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_networks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_networks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_networks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_networks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all Networks (and used IPs for each Network) in the vendor account - # associated with the specified project. - # - # @overload list_network_usage(request, options = nil) - # Pass arguments to `list_network_usage` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_network_usage(location: nil) - # Pass arguments to `list_network_usage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param location [::String] - # Required. Parent value (project and location). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new - # - # # Call the list_network_usage method. - # result = client.list_network_usage request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. - # p result - # - def list_network_usage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_network_usage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.location - header_params["location"] = request.location - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_network_usage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_network_usage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_network_usage, request, 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 details of a single network. - # - # @overload get_network(request, options = nil) - # Pass arguments to `get_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_network(name: nil) - # Pass arguments to `get_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Network] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new - # - # # Call the get_network method. - # result = client.get_network request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - # p result - # - def get_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_network.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_network, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single network. - # - # @overload update_network(request, options = nil) - # Pass arguments to `update_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_network(network: nil, update_mask: nil) - # Pass arguments to `update_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash] - # Required. The network to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # `labels`, `reservations`, `vrf.vlan_attachments` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new - # - # # Call the update_network method. - # result = client.update_network request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest - - # Converts hash and nil to 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_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.network&.name - header_params["network.name"] = request.network.name - end - - request_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_network.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :update_network, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Takes a snapshot of a boot volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload create_volume_snapshot(request, options = nil) - # Pass arguments to `create_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_volume_snapshot(parent: nil, volume_snapshot: nil) - # Pass arguments to `create_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The volume to snapshot. - # @param volume_snapshot [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot, ::Hash] - # Required. The snapshot to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new - # - # # Call the create_volume_snapshot method. - # result = client.create_volume_snapshot request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p result - # - def create_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest - - # Converts hash and nil to 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_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :create_volume_snapshot, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Uses the specified snapshot to restore its parent volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload restore_volume_snapshot(request, options = nil) - # Pass arguments to `restore_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_volume_snapshot(volume_snapshot: nil) - # Pass arguments to `restore_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume_snapshot [::String] - # Required. Name of the snapshot which will be used to restore its parent - # volume. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new - # - # # Call the restore_volume_snapshot method. - # result = client.restore_volume_snapshot request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest - - # Converts hash and nil to 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_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.volume_snapshot - header_params["volume_snapshot"] = request.volume_snapshot - end - - request_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_volume_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restore_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :restore_volume_snapshot, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 volume snapshot. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload delete_volume_snapshot(request, options = nil) - # Pass arguments to `delete_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_volume_snapshot(name: nil) - # Pass arguments to `delete_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 snapshot 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/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new - # - # # Call the delete_volume_snapshot method. - # result = client.delete_volume_snapshot request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest - - # Converts hash and nil to 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_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :delete_volume_snapshot, request, 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 specified snapshot resource. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload get_volume_snapshot(request, options = nil) - # Pass arguments to `get_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_volume_snapshot(name: nil) - # Pass arguments to `get_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 snapshot. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new - # - # # Call the get_volume_snapshot method. - # result = client.get_volume_snapshot request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p result - # - def get_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_volume_snapshot, request, 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 the list of snapshots for the specified volume. - # Returns a response with an empty list of snapshots if called - # for a non-boot volume. - # - # @overload list_volume_snapshots(request, options = nil) - # Pass arguments to `list_volume_snapshots` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_volume_snapshots` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListVolumesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new - # - # # Call the list_volume_snapshots method. - # result = client.list_volume_snapshots request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p item - # end - # - def list_volume_snapshots request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_volume_snapshots.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshots.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_volume_snapshots.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_volume_snapshots, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volume_snapshots, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single storage logical unit number(LUN). - # - # @overload get_lun(request, options = nil) - # Pass arguments to `get_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_lun(name: nil) - # Pass arguments to `get_lun` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Lun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Lun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new - # - # # Call the get_lun method. - # result = client.get_lun request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. - # p result - # - def get_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_lun.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_lun, request, 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 storage volume luns for given storage volume. - # - # @overload list_luns(request, options = nil) - # Pass arguments to `list_luns` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_luns(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_luns` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListLunsRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new - # - # # Call the list_luns method. - # result = client.list_luns request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. - # p item - # end - # - def list_luns request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_luns.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_luns.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_luns.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_luns, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Skips lun's cooloff and deletes it now. - # Lun must be in cooloff state. - # - # @overload evict_lun(request, options = nil) - # Pass arguments to `evict_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EvictLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload evict_lun(name: nil) - # Pass arguments to `evict_lun` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 lun. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new - # - # # Call the evict_lun method. - # result = client.evict_lun request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def evict_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.evict_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.evict_lun.timeout, - metadata: metadata, - retry_policy: @config.rpcs.evict_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :evict_lun, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 details of a single NFS share. - # - # @overload get_nfs_share(request, options = nil) - # Pass arguments to `get_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_nfs_share(name: nil) - # Pass arguments to `get_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new - # - # # Call the get_nfs_share method. - # result = client.get_nfs_share request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - # p result - # - def get_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_nfs_share, request, 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 NFS shares. - # - # @overload list_nfs_shares(request, options = nil) - # Pass arguments to `list_nfs_shares` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_nfs_shares` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListNfsSharesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new - # - # # Call the list_nfs_shares method. - # result = client.list_nfs_shares request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. - # p item - # end - # - def list_nfs_shares request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_nfs_shares.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_shares.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_nfs_shares.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_nfs_shares, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, request, response, 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 details of a single NFS share. - # - # @overload update_nfs_share(request, options = nil) - # Pass arguments to `update_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_nfs_share(nfs_share: nil, update_mask: nil) - # Pass arguments to `update_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] - # Required. The NFS share to update. - # - # The `name` field is used to identify the NFS share to update. - # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # `labels` - # `allowed_clients` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new - # - # # Call the update_nfs_share method. - # result = client.update_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest - - # Converts hash and nil to 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_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.nfs_share&.name - header_params["nfs_share.name"] = request.nfs_share.name - end - - request_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_nfs_share.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :update_nfs_share, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 an NFS share. - # - # @overload create_nfs_share(request, options = nil) - # Pass arguments to `create_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_nfs_share(parent: nil, nfs_share: nil) - # Pass arguments to `create_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location. - # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] - # Required. The NfsShare 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/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new - # - # # Call the create_nfs_share method. - # result = client.create_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest - - # Converts hash and nil to 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_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :create_nfs_share, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameNfsShare sets a new name for an nfsshare. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_nfs_share(request, options = nil) - # Pass arguments to `rename_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rename_nfs_share(name: nil, new_nfsshare_id: nil) - # Pass arguments to `rename_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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` field is used to identify the nfsshare. - # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} - # @param new_nfsshare_id [::String] - # Required. The new `id` of the nfsshare. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new - # - # # Call the rename_nfs_share method. - # result = client.rename_nfs_share request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - # p result - # - def rename_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rename_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_nfs_share.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rename_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :rename_nfs_share, request, 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 an NFS share. The underlying volume is automatically deleted. - # - # @overload delete_nfs_share(request, options = nil) - # Pass arguments to `delete_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_nfs_share(name: nil) - # Pass arguments to `delete_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 NFS share to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new - # - # # Call the delete_nfs_share method. - # result = client.delete_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest - - # Converts hash and nil to 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_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :delete_nfs_share, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List the budget details to provision resources on a given project. - # - # @overload list_provisioning_quotas(request, options = nil) - # Pass arguments to `list_provisioning_quotas` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_provisioning_quotas` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListProvisioningQuotasRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @param page_token [::String] - # A token identifying a page of results from the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new - # - # # Call the list_provisioning_quotas method. - # result = client.list_provisioning_quotas request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. - # p item - # end - # - def list_provisioning_quotas request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_provisioning_quotas.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_provisioning_quotas.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_provisioning_quotas.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_provisioning_quotas, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_provisioning_quotas, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Submit a provisiong configuration for a given project. - # - # @overload submit_provisioning_config(request, options = nil) - # Pass arguments to `submit_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_provisioning_config(parent: nil, provisioning_config: nil, email: nil) - # Pass arguments to `submit_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to create. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new - # - # # Call the submit_provisioning_config method. - # result = client.submit_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. - # p result - # - def submit_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest - - # Converts hash and nil to 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_provisioning_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::BareMetalSolution::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.submit_provisioning_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.submit_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :submit_provisioning_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 - - ## - # Get ProvisioningConfig by name. - # - # @overload get_provisioning_config(request, options = nil) - # Pass arguments to `get_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_provisioning_config(name: nil) - # Pass arguments to `get_provisioning_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 ProvisioningConfig. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new - # - # # Call the get_provisioning_config method. - # result = client.get_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def get_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_provisioning_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::BareMetalSolution::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_provisioning_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_provisioning_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 - - ## - # Create new ProvisioningConfig. - # - # @overload create_provisioning_config(request, options = nil) - # Pass arguments to `create_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) - # Pass arguments to `create_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to create. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new - # - # # Call the create_provisioning_config method. - # result = client.create_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def create_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest - - # Converts hash and nil to 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_provisioning_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::BareMetalSolution::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_provisioning_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :create_provisioning_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 - - ## - # Update existing ProvisioningConfig. - # - # @overload update_provisioning_config(request, options = nil) - # Pass arguments to `update_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) - # Pass arguments to `update_provisioning_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 provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new - # - # # Call the update_provisioning_config method. - # result = client.update_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def update_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest - - # Converts hash and nil to 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_provisioning_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::BareMetalSolution::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.provisioning_config&.name - header_params["provisioning_config.name"] = request.provisioning_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_provisioning_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :update_provisioning_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 - - ## - # RenameNetwork sets a new name for a network. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_network(request, options = nil) - # Pass arguments to `rename_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rename_network(name: nil, new_network_id: nil) - # Pass arguments to `rename_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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` field is used to identify the network. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @param new_network_id [::String] - # Required. The new `id` of the network. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Network] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new - # - # # Call the rename_network method. - # result = client.rename_network request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - # p result - # - def rename_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rename_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_network.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rename_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :rename_network, request, 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 the list of OS images which are currently approved. - # - # @overload list_os_images(request, options = nil) - # Pass arguments to `list_os_images` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_os_images(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_os_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListProvisioningQuotasRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @param page_token [::String] - # A token identifying a page of results from the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new - # - # # Call the list_os_images method. - # result = client.list_os_images request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. - # p item - # end - # - def list_os_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_os_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_os_images.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_os_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_os_images, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_os_images, request, response, 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 BareMetalSolution API. - # - # This class represents the configuration for BareMetalSolution, - # providing control 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::BareMetalSolution::V2::BareMetalSolution::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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 = "baremetalsolution.googleapis.com" - - config_attr :endpoint, nil, ::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 BareMetalSolution API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `rename_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_instance - ## - # RPC-specific configuration for `reset_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :reset_instance - ## - # RPC-specific configuration for `start_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :start_instance - ## - # RPC-specific configuration for `stop_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_instance - ## - # RPC-specific configuration for `enable_interactive_serial_console` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_interactive_serial_console - ## - # RPC-specific configuration for `disable_interactive_serial_console` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_interactive_serial_console - ## - # RPC-specific configuration for `detach_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :detach_lun - ## - # RPC-specific configuration for `list_ssh_keys` - # @return [::Gapic::Config::Method] - # - attr_reader :list_ssh_keys - ## - # RPC-specific configuration for `create_ssh_key` - # @return [::Gapic::Config::Method] - # - attr_reader :create_ssh_key - ## - # RPC-specific configuration for `delete_ssh_key` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_ssh_key - ## - # RPC-specific configuration for `list_volumes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volumes - ## - # RPC-specific configuration for `get_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume - ## - # RPC-specific configuration for `update_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :update_volume - ## - # RPC-specific configuration for `rename_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_volume - ## - # RPC-specific configuration for `evict_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :evict_volume - ## - # RPC-specific configuration for `resize_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :resize_volume - ## - # RPC-specific configuration for `list_networks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_networks - ## - # RPC-specific configuration for `list_network_usage` - # @return [::Gapic::Config::Method] - # - attr_reader :list_network_usage - ## - # RPC-specific configuration for `get_network` - # @return [::Gapic::Config::Method] - # - attr_reader :get_network - ## - # RPC-specific configuration for `update_network` - # @return [::Gapic::Config::Method] - # - attr_reader :update_network - ## - # RPC-specific configuration for `create_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :create_volume_snapshot - ## - # RPC-specific configuration for `restore_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_volume_snapshot - ## - # RPC-specific configuration for `delete_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_volume_snapshot - ## - # RPC-specific configuration for `get_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume_snapshot - ## - # RPC-specific configuration for `list_volume_snapshots` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volume_snapshots - ## - # RPC-specific configuration for `get_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lun - ## - # RPC-specific configuration for `list_luns` - # @return [::Gapic::Config::Method] - # - attr_reader :list_luns - ## - # RPC-specific configuration for `evict_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :evict_lun - ## - # RPC-specific configuration for `get_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :get_nfs_share - ## - # RPC-specific configuration for `list_nfs_shares` - # @return [::Gapic::Config::Method] - # - attr_reader :list_nfs_shares - ## - # RPC-specific configuration for `update_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :update_nfs_share - ## - # RPC-specific configuration for `create_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :create_nfs_share - ## - # RPC-specific configuration for `rename_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_nfs_share - ## - # RPC-specific configuration for `delete_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_nfs_share - ## - # RPC-specific configuration for `list_provisioning_quotas` - # @return [::Gapic::Config::Method] - # - attr_reader :list_provisioning_quotas - ## - # RPC-specific configuration for `submit_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_provisioning_config - ## - # RPC-specific configuration for `get_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_provisioning_config - ## - # RPC-specific configuration for `create_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_provisioning_config - ## - # RPC-specific configuration for `update_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_provisioning_config - ## - # RPC-specific configuration for `rename_network` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_network - ## - # RPC-specific configuration for `list_os_images` - # @return [::Gapic::Config::Method] - # - attr_reader :list_os_images - - # @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 - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_instance_config - rename_instance_config = parent_rpcs.rename_instance if parent_rpcs.respond_to? :rename_instance - @rename_instance = ::Gapic::Config::Method.new rename_instance_config - reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance - @reset_instance = ::Gapic::Config::Method.new reset_instance_config - start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance - @start_instance = ::Gapic::Config::Method.new start_instance_config - stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance - @stop_instance = ::Gapic::Config::Method.new stop_instance_config - enable_interactive_serial_console_config = parent_rpcs.enable_interactive_serial_console if parent_rpcs.respond_to? :enable_interactive_serial_console - @enable_interactive_serial_console = ::Gapic::Config::Method.new enable_interactive_serial_console_config - disable_interactive_serial_console_config = parent_rpcs.disable_interactive_serial_console if parent_rpcs.respond_to? :disable_interactive_serial_console - @disable_interactive_serial_console = ::Gapic::Config::Method.new disable_interactive_serial_console_config - detach_lun_config = parent_rpcs.detach_lun if parent_rpcs.respond_to? :detach_lun - @detach_lun = ::Gapic::Config::Method.new detach_lun_config - list_ssh_keys_config = parent_rpcs.list_ssh_keys if parent_rpcs.respond_to? :list_ssh_keys - @list_ssh_keys = ::Gapic::Config::Method.new list_ssh_keys_config - create_ssh_key_config = parent_rpcs.create_ssh_key if parent_rpcs.respond_to? :create_ssh_key - @create_ssh_key = ::Gapic::Config::Method.new create_ssh_key_config - delete_ssh_key_config = parent_rpcs.delete_ssh_key if parent_rpcs.respond_to? :delete_ssh_key - @delete_ssh_key = ::Gapic::Config::Method.new delete_ssh_key_config - list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes - @list_volumes = ::Gapic::Config::Method.new list_volumes_config - get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume - @get_volume = ::Gapic::Config::Method.new get_volume_config - update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume - @update_volume = ::Gapic::Config::Method.new update_volume_config - rename_volume_config = parent_rpcs.rename_volume if parent_rpcs.respond_to? :rename_volume - @rename_volume = ::Gapic::Config::Method.new rename_volume_config - evict_volume_config = parent_rpcs.evict_volume if parent_rpcs.respond_to? :evict_volume - @evict_volume = ::Gapic::Config::Method.new evict_volume_config - resize_volume_config = parent_rpcs.resize_volume if parent_rpcs.respond_to? :resize_volume - @resize_volume = ::Gapic::Config::Method.new resize_volume_config - list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks - @list_networks = ::Gapic::Config::Method.new list_networks_config - list_network_usage_config = parent_rpcs.list_network_usage if parent_rpcs.respond_to? :list_network_usage - @list_network_usage = ::Gapic::Config::Method.new list_network_usage_config - get_network_config = parent_rpcs.get_network if parent_rpcs.respond_to? :get_network - @get_network = ::Gapic::Config::Method.new get_network_config - update_network_config = parent_rpcs.update_network if parent_rpcs.respond_to? :update_network - @update_network = ::Gapic::Config::Method.new update_network_config - create_volume_snapshot_config = parent_rpcs.create_volume_snapshot if parent_rpcs.respond_to? :create_volume_snapshot - @create_volume_snapshot = ::Gapic::Config::Method.new create_volume_snapshot_config - restore_volume_snapshot_config = parent_rpcs.restore_volume_snapshot if parent_rpcs.respond_to? :restore_volume_snapshot - @restore_volume_snapshot = ::Gapic::Config::Method.new restore_volume_snapshot_config - delete_volume_snapshot_config = parent_rpcs.delete_volume_snapshot if parent_rpcs.respond_to? :delete_volume_snapshot - @delete_volume_snapshot = ::Gapic::Config::Method.new delete_volume_snapshot_config - get_volume_snapshot_config = parent_rpcs.get_volume_snapshot if parent_rpcs.respond_to? :get_volume_snapshot - @get_volume_snapshot = ::Gapic::Config::Method.new get_volume_snapshot_config - list_volume_snapshots_config = parent_rpcs.list_volume_snapshots if parent_rpcs.respond_to? :list_volume_snapshots - @list_volume_snapshots = ::Gapic::Config::Method.new list_volume_snapshots_config - get_lun_config = parent_rpcs.get_lun if parent_rpcs.respond_to? :get_lun - @get_lun = ::Gapic::Config::Method.new get_lun_config - list_luns_config = parent_rpcs.list_luns if parent_rpcs.respond_to? :list_luns - @list_luns = ::Gapic::Config::Method.new list_luns_config - evict_lun_config = parent_rpcs.evict_lun if parent_rpcs.respond_to? :evict_lun - @evict_lun = ::Gapic::Config::Method.new evict_lun_config - get_nfs_share_config = parent_rpcs.get_nfs_share if parent_rpcs.respond_to? :get_nfs_share - @get_nfs_share = ::Gapic::Config::Method.new get_nfs_share_config - list_nfs_shares_config = parent_rpcs.list_nfs_shares if parent_rpcs.respond_to? :list_nfs_shares - @list_nfs_shares = ::Gapic::Config::Method.new list_nfs_shares_config - update_nfs_share_config = parent_rpcs.update_nfs_share if parent_rpcs.respond_to? :update_nfs_share - @update_nfs_share = ::Gapic::Config::Method.new update_nfs_share_config - create_nfs_share_config = parent_rpcs.create_nfs_share if parent_rpcs.respond_to? :create_nfs_share - @create_nfs_share = ::Gapic::Config::Method.new create_nfs_share_config - rename_nfs_share_config = parent_rpcs.rename_nfs_share if parent_rpcs.respond_to? :rename_nfs_share - @rename_nfs_share = ::Gapic::Config::Method.new rename_nfs_share_config - delete_nfs_share_config = parent_rpcs.delete_nfs_share if parent_rpcs.respond_to? :delete_nfs_share - @delete_nfs_share = ::Gapic::Config::Method.new delete_nfs_share_config - list_provisioning_quotas_config = parent_rpcs.list_provisioning_quotas if parent_rpcs.respond_to? :list_provisioning_quotas - @list_provisioning_quotas = ::Gapic::Config::Method.new list_provisioning_quotas_config - submit_provisioning_config_config = parent_rpcs.submit_provisioning_config if parent_rpcs.respond_to? :submit_provisioning_config - @submit_provisioning_config = ::Gapic::Config::Method.new submit_provisioning_config_config - get_provisioning_config_config = parent_rpcs.get_provisioning_config if parent_rpcs.respond_to? :get_provisioning_config - @get_provisioning_config = ::Gapic::Config::Method.new get_provisioning_config_config - create_provisioning_config_config = parent_rpcs.create_provisioning_config if parent_rpcs.respond_to? :create_provisioning_config - @create_provisioning_config = ::Gapic::Config::Method.new create_provisioning_config_config - update_provisioning_config_config = parent_rpcs.update_provisioning_config if parent_rpcs.respond_to? :update_provisioning_config - @update_provisioning_config = ::Gapic::Config::Method.new update_provisioning_config_config - rename_network_config = parent_rpcs.rename_network if parent_rpcs.respond_to? :rename_network - @rename_network = ::Gapic::Config::Method.new rename_network_config - list_os_images_config = parent_rpcs.list_os_images if parent_rpcs.respond_to? :list_os_images - @list_os_images = ::Gapic::Config::Method.new list_os_images_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb deleted file mode 100644 index ca17fd2fa097..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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 BareMetalSolution - module V2 - module BareMetalSolution - # Credentials for the BareMetalSolution 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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb deleted file mode 100644 index 7057baa137f4..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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 BareMetalSolution - module V2 - module BareMetalSolution - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BareMetalSolution 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 BareMetalSolution 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::BareMetalSolution::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::BareMetalSolution::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::BareMetalSolution::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::BareMetalSolution::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::BareMetalSolution::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 = "baremetalsolution.googleapis.com" - - config_attr :endpoint, nil, ::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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb deleted file mode 100644 index ed6067ff8440..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb +++ /dev/null @@ -1,301 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - # Path helper methods for the BareMetalSolution API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified InstanceConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instanceConfigs/{instance_config}` - # - # @param project [String] - # @param location [String] - # @param instance_config [String] - # - # @return [::String] - def instance_config_path project:, location:, instance_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}/instanceConfigs/#{instance_config}" - end - - ## - # Create a fully-qualified InterconnectAttachment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}` - # - # @param project [String] - # @param region [String] - # @param interconnect_attachment [String] - # - # @return [::String] - def interconnect_attachment_path project:, region:, interconnect_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}/interconnectAttachments/#{interconnect_attachment}" - 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 Lun resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}` - # - # @param project [String] - # @param location [String] - # @param volume [String] - # @param lun [String] - # - # @return [::String] - def lun_path project:, location:, volume:, lun: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "volume cannot contain /" if volume.to_s.include? "/" - - "projects/#{project}/locations/#{location}/volumes/#{volume}/luns/#{lun}" - end - - ## - # Create a fully-qualified NFSShare resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/nfsShares/{nfs_share}` - # - # @param project [String] - # @param location [String] - # @param nfs_share [String] - # - # @return [::String] - def nfs_share_path project:, location:, nfs_share: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/nfsShares/#{nfs_share}" - end - - ## - # Create a fully-qualified Network resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/networks/{network}` - # - # @param project [String] - # @param location [String] - # @param network [String] - # - # @return [::String] - def network_path project:, location:, network: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/networks/#{network}" - end - - ## - # Create a fully-qualified NetworkConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/networkConfigs/{network_config}` - # - # @param project [String] - # @param location [String] - # @param network_config [String] - # - # @return [::String] - def network_config_path project:, location:, network_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}/networkConfigs/#{network_config}" - end - - ## - # Create a fully-qualified ProvisioningConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/provisioningConfigs/{provisioning_config}` - # - # @param project [String] - # @param location [String] - # @param provisioning_config [String] - # - # @return [::String] - def provisioning_config_path project:, location:, provisioning_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}/provisioningConfigs/#{provisioning_config}" - end - - ## - # Create a fully-qualified ServerNetworkTemplate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` - # - # @param project [String] - # @param location [String] - # @param server_network_template [String] - # - # @return [::String] - def server_network_template_path project:, location:, server_network_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}/serverNetworkTemplate/#{server_network_template}" - end - - ## - # Create a fully-qualified SshKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/sshKeys/{ssh_key}` - # - # @param project [String] - # @param location [String] - # @param ssh_key [String] - # - # @return [::String] - def ssh_key_path project:, location:, ssh_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/sshKeys/#{ssh_key}" - end - - ## - # Create a fully-qualified Volume resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/volumes/{volume}` - # - # @param project [String] - # @param location [String] - # @param volume [String] - # - # @return [::String] - def volume_path project:, location:, volume: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/volumes/#{volume}" - end - - ## - # Create a fully-qualified VolumeConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/volumeConfigs/{volume_config}` - # - # @param project [String] - # @param location [String] - # @param volume_config [String] - # - # @return [::String] - def volume_config_path project:, location:, volume_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}/volumeConfigs/#{volume_config}" - end - - ## - # Create a fully-qualified VolumeSnapshot resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}` - # - # @param project [String] - # @param location [String] - # @param volume [String] - # @param snapshot [String] - # - # @return [::String] - def volume_snapshot_path project:, location:, volume:, snapshot: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "volume cannot contain /" if volume.to_s.include? "/" - - "projects/#{project}/locations/#{location}/volumes/#{volume}/snapshots/#{snapshot}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb deleted file mode 100644 index 7f95f0aebf5e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bare_metal_solution/v2/version" -require "google/cloud/bare_metal_solution/v2/bindings_override" - -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/paths" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client" - -module Google - module Cloud - module BareMetalSolution - module V2 - ## - # Performs management operations on Bare Metal Solution servers. - # - # The `baremetalsolution.googleapis.com` service provides management - # capabilities for Bare Metal Solution servers. To access the API methods, you - # must assign Bare Metal Solution IAM roles containing the desired permissions - # to your staff in your Google Cloud project. You must also enable the Bare - # Metal Solution API. Once enabled, the methods act - # upon specific servers in your Bare Metal Solution environment. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - module BareMetalSolution - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb deleted file mode 100644 index e4e2ec63cc78..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb +++ /dev/null @@ -1,4495 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - module Rest - ## - # REST client for the BareMetalSolution service. - # - # Performs management operations on Bare Metal Solution servers. - # - # The `baremetalsolution.googleapis.com` service provides management - # capabilities for Bare Metal Solution servers. To access the API methods, you - # must assign Bare Metal Solution IAM roles containing the desired permissions - # to your staff in your Google Cloud project. You must also enable the Bare - # Metal Solution API. Once enabled, the methods act - # upon specific servers in your Bare Metal Solution environment. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :bare_metal_solution_stub - - ## - # Configure the BareMetalSolution Client class. - # - # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BareMetalSolution clients - # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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", "BareMetalSolution", "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.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BareMetalSolution 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::BareMetalSolution::V2::BareMetalSolution::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 - @bare_metal_solution_stub.universe_domain - end - - ## - # Create a new BareMetalSolution REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BareMetalSolution 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::BareMetalSolution::V2::BareMetalSolution::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 - - @bare_metal_solution_stub = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @bare_metal_solution_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 = @bare_metal_solution_stub.endpoint - config.universe_domain = @bare_metal_solution_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @bare_metal_solution_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 = @bare_metal_solution_stub.endpoint - config.universe_domain = @bare_metal_solution_stub.universe_domain - config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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 - @bare_metal_solution_stub.logger - end - - # Service calls - - ## - # List servers 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::BareMetalSolution::V2::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::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) - # 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] - # Requested page size. Server may return fewer items than requested. - # If unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::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_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 - - @bare_metal_solution_stub.list_instances request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_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 - - ## - # Get details about a single server. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::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_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 - - @bare_metal_solution_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 - - ## - # Update details of a single server. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::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, update_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::BareMetalSolution::V2::Instance, ::Hash] - # Required. The server to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The currently supported fields are: - # `labels` - # `hyperthreading_enabled` - # `os_image` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::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_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 - - @bare_metal_solution_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 - - ## - # RenameInstance sets a new name for an instance. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_instance(request, options = nil) - # Pass arguments to `rename_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rename_instance(name: nil, new_instance_id: nil) - # Pass arguments to `rename_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` field is used to identify the instance. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param new_instance_id [::String] - # Required. The new `id` of the instance. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new - # - # # Call the rename_instance method. - # result = client.rename_instance request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. - # p result - # - def rename_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rename_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::BareMetalSolution::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.rename_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rename_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.rename_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 - - ## - # Perform an ungraceful, hard reset on a server. Equivalent to shutting the - # power off and then turning it back on. - # - # @overload reset_instance(request, options = nil) - # Pass arguments to `reset_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload reset_instance(name: nil) - # Pass arguments to `reset_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 [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new - # - # # Call the reset_instance method. - # result = client.reset_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 reset_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.reset_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::BareMetalSolution::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.reset_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.reset_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.reset_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 - - ## - # Starts a server that was shutdown. - # - # @overload start_instance(request, options = nil) - # Pass arguments to `start_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(name: nil) - # Pass arguments to `start_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 [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new - # - # # Call the start_instance method. - # result = client.start_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 start_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest - - # Converts hash and nil to an 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_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::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.start_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.start_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 - - ## - # Stop a running server. - # - # @overload stop_instance(request, options = nil) - # Pass arguments to `stop_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload stop_instance(name: nil) - # Pass arguments to `stop_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 [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new - # - # # Call the stop_instance method. - # result = client.stop_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 stop_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.stop_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::BareMetalSolution::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.stop_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.stop_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.stop_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 - - ## - # Enable the interactive serial console feature on an instance. - # - # @overload enable_interactive_serial_console(request, options = nil) - # Pass arguments to `enable_interactive_serial_console` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_interactive_serial_console(name: nil) - # Pass arguments to `enable_interactive_serial_console` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new - # - # # Call the enable_interactive_serial_console method. - # result = client.enable_interactive_serial_console request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_interactive_serial_console request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest - - # Converts hash and nil to an 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_interactive_serial_console.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.enable_interactive_serial_console.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_interactive_serial_console.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.enable_interactive_serial_console request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 the interactive serial console feature on an instance. - # - # @overload disable_interactive_serial_console(request, options = nil) - # Pass arguments to `disable_interactive_serial_console` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_interactive_serial_console(name: nil) - # Pass arguments to `disable_interactive_serial_console` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new - # - # # Call the disable_interactive_serial_console method. - # result = client.disable_interactive_serial_console request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_interactive_serial_console request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest - - # Converts hash and nil to an 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_interactive_serial_console.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.disable_interactive_serial_console.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_interactive_serial_console.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.disable_interactive_serial_console request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Detach LUN from Instance. - # - # @overload detach_lun(request, options = nil) - # Pass arguments to `detach_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload detach_lun(instance: nil, lun: nil, skip_reboot: nil) - # Pass arguments to `detach_lun` via keyword arguments. Note that at - # least one keyword argument is 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 [::String] - # Required. Name of the instance. - # @param lun [::String] - # Required. Name of the Lun to detach. - # @param skip_reboot [::Boolean] - # If true, performs lun unmapping without instance reboot. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new - # - # # Call the detach_lun method. - # result = client.detach_lun request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def detach_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.detach_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.detach_lun.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.detach_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.detach_lun request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 public SSH keys registered for the specified project. - # These SSH keys are used only for the interactive serial console feature. - # - # @overload list_ssh_keys(request, options = nil) - # Pass arguments to `list_ssh_keys` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_ssh_keys(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_ssh_keys` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent containing the SSH keys. - # Currently, the only valid value for the location is "global". - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new - # - # # Call the list_ssh_keys method. - # result = client.list_ssh_keys request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. - # p item - # end - # - def list_ssh_keys request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_ssh_keys.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_ssh_keys.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_ssh_keys.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_ssh_keys request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_ssh_keys, "ssh_keys", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Register a public SSH key in the specified project for use with the - # interactive serial console feature. - # - # @overload create_ssh_key(request, options = nil) - # Pass arguments to `create_ssh_key` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil) - # Pass arguments to `create_ssh_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 parent [::String] - # Required. The parent containing the SSH keys. - # @param ssh_key [::Google::Cloud::BareMetalSolution::V2::SSHKey, ::Hash] - # Required. The SSH key to register. - # @param ssh_key_id [::String] - # Required. The ID to use for the key, which will become the final component - # of the key's resource name. - # - # This value must match the regex: - # [a-zA-Z0-9@.\-_]\\{1,64} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new - # - # # Call the create_ssh_key method. - # result = client.create_ssh_key request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. - # p result - # - def create_ssh_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest - - # Converts hash and nil to an 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_ssh_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::BareMetalSolution::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_ssh_key.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_ssh_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.create_ssh_key request, 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 public SSH key registered in the specified project. - # - # @overload delete_ssh_key(request, options = nil) - # Pass arguments to `delete_ssh_key` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_ssh_key(name: nil) - # Pass arguments to `delete_ssh_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 name [::String] - # Required. The name of the SSH key to delete. - # Currently, the only valid value for the location is "global". - # @yield [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/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new - # - # # Call the delete_ssh_key method. - # result = client.delete_ssh_key request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_ssh_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest - - # Converts hash and nil to an 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_ssh_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::BareMetalSolution::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_ssh_key.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_ssh_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.delete_ssh_key request, 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 storage volumes in a given project and location. - # - # @overload list_volumes(request, options = nil) - # Pass arguments to `list_volumes` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_volumes` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListVolumesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new - # - # # Call the list_volumes method. - # result = client.list_volumes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. - # p item - # end - # - def list_volumes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_volumes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volumes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_volumes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_volumes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, "volumes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single storage volume. - # - # @overload get_volume(request, options = nil) - # Pass arguments to `get_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_volume(name: nil) - # Pass arguments to `get_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Volume] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new - # - # # Call the get_volume method. - # result = client.get_volume request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - # p result - # - def get_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_volume request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single storage volume. - # - # @overload update_volume(request, options = nil) - # Pass arguments to `update_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_volume(volume: nil, update_mask: nil) - # Pass arguments to `update_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash] - # Required. The volume to update. - # - # The `name` field is used to identify the volume to update. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # 'labels' - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new - # - # # Call the update_volume method. - # result = client.update_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest - - # Converts hash and nil to an 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_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.update_volume request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameVolume sets a new name for a volume. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_volume(request, options = nil) - # Pass arguments to `rename_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rename_volume(name: nil, new_volume_id: nil) - # Pass arguments to `rename_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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` field is used to identify the volume. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @param new_volume_id [::String] - # Required. The new `id` of the volume. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new - # - # # Call the rename_volume method. - # result = client.rename_volume request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - # p result - # - def rename_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rename_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_volume.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rename_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.rename_volume request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Skips volume's cooloff and deletes it now. - # Volume must be in cooloff state. - # - # @overload evict_volume(request, options = nil) - # Pass arguments to `evict_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload evict_volume(name: nil) - # Pass arguments to `evict_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Volume. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new - # - # # Call the evict_volume method. - # result = client.evict_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def evict_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.evict_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.evict_volume.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.evict_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.evict_volume request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Emergency Volume resize. - # - # @overload resize_volume(request, options = nil) - # Pass arguments to `resize_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload resize_volume(volume: nil, size_gib: nil) - # Pass arguments to `resize_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume [::String] - # Required. Volume to resize. - # @param size_gib [::Integer] - # New Volume size, in GiB. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new - # - # # Call the resize_volume method. - # result = client.resize_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def resize_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.resize_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.resize_volume.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.resize_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.resize_volume request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List network in a given project and location. - # - # @overload list_networks(request, options = nil) - # Pass arguments to `list_networks` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_networks` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListNetworksRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new - # - # # Call the list_networks method. - # result = client.list_networks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. - # p item - # end - # - def list_networks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_networks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_networks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_networks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_networks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, "networks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all Networks (and used IPs for each Network) in the vendor account - # associated with the specified project. - # - # @overload list_network_usage(request, options = nil) - # Pass arguments to `list_network_usage` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_network_usage(location: nil) - # Pass arguments to `list_network_usage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param location [::String] - # Required. Parent value (project and location). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new - # - # # Call the list_network_usage method. - # result = client.list_network_usage request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. - # p result - # - def list_network_usage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_network_usage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_network_usage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_network_usage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_network_usage request, 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 details of a single network. - # - # @overload get_network(request, options = nil) - # Pass arguments to `get_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_network(name: nil) - # Pass arguments to `get_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Network] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new - # - # # Call the get_network method. - # result = client.get_network request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - # p result - # - def get_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_network.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_network request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single network. - # - # @overload update_network(request, options = nil) - # Pass arguments to `update_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_network(network: nil, update_mask: nil) - # Pass arguments to `update_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash] - # Required. The network to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # `labels`, `reservations`, `vrf.vlan_attachments` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new - # - # # Call the update_network method. - # result = client.update_network request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest - - # Converts hash and nil to an 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_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_network.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.update_network request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Takes a snapshot of a boot volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload create_volume_snapshot(request, options = nil) - # Pass arguments to `create_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_volume_snapshot(parent: nil, volume_snapshot: nil) - # Pass arguments to `create_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The volume to snapshot. - # @param volume_snapshot [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot, ::Hash] - # Required. The snapshot to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new - # - # # Call the create_volume_snapshot method. - # result = client.create_volume_snapshot request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p result - # - def create_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest - - # Converts hash and nil to an 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_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.create_volume_snapshot request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Uses the specified snapshot to restore its parent volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload restore_volume_snapshot(request, options = nil) - # Pass arguments to `restore_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_volume_snapshot(volume_snapshot: nil) - # Pass arguments to `restore_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume_snapshot [::String] - # Required. Name of the snapshot which will be used to restore its parent - # volume. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new - # - # # Call the restore_volume_snapshot method. - # result = client.restore_volume_snapshot request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest - - # Converts hash and nil to an 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_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.restore_volume_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restore_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.restore_volume_snapshot request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 volume snapshot. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload delete_volume_snapshot(request, options = nil) - # Pass arguments to `delete_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_volume_snapshot(name: nil) - # Pass arguments to `delete_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 snapshot 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/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new - # - # # Call the delete_volume_snapshot method. - # result = client.delete_volume_snapshot request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest - - # Converts hash and nil to an 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_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.delete_volume_snapshot request, 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 specified snapshot resource. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload get_volume_snapshot(request, options = nil) - # Pass arguments to `get_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_volume_snapshot(name: nil) - # Pass arguments to `get_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 snapshot. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new - # - # # Call the get_volume_snapshot method. - # result = client.get_volume_snapshot request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p result - # - def get_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_volume_snapshot request, 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 the list of snapshots for the specified volume. - # Returns a response with an empty list of snapshots if called - # for a non-boot volume. - # - # @overload list_volume_snapshots(request, options = nil) - # Pass arguments to `list_volume_snapshots` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_volume_snapshots` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListVolumesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new - # - # # Call the list_volume_snapshots method. - # result = client.list_volume_snapshots request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p item - # end - # - def list_volume_snapshots request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_volume_snapshots.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_volume_snapshots.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_volume_snapshots.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_volume_snapshots request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_volume_snapshots, "volume_snapshots", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single storage logical unit number(LUN). - # - # @overload get_lun(request, options = nil) - # Pass arguments to `get_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_lun(name: nil) - # Pass arguments to `get_lun` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::BareMetalSolution::V2::Lun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Lun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new - # - # # Call the get_lun method. - # result = client.get_lun request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. - # p result - # - def get_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_lun.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_lun request, 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 storage volume luns for given storage volume. - # - # @overload list_luns(request, options = nil) - # Pass arguments to `list_luns` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_luns(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_luns` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListLunsRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new - # - # # Call the list_luns method. - # result = client.list_luns request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. - # p item - # end - # - def list_luns request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_luns.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_luns.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_luns.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_luns request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, "luns", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Skips lun's cooloff and deletes it now. - # Lun must be in cooloff state. - # - # @overload evict_lun(request, options = nil) - # Pass arguments to `evict_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EvictLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload evict_lun(name: nil) - # Pass arguments to `evict_lun` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 lun. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new - # - # # Call the evict_lun method. - # result = client.evict_lun request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def evict_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.evict_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.evict_lun.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.evict_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.evict_lun request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single NFS share. - # - # @overload get_nfs_share(request, options = nil) - # Pass arguments to `get_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_nfs_share(name: nil) - # Pass arguments to `get_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new - # - # # Call the get_nfs_share method. - # result = client.get_nfs_share request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - # p result - # - def get_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_nfs_share request, 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 NFS shares. - # - # @overload list_nfs_shares(request, options = nil) - # Pass arguments to `list_nfs_shares` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_nfs_shares` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListNfsSharesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new - # - # # Call the list_nfs_shares method. - # result = client.list_nfs_shares request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. - # p item - # end - # - def list_nfs_shares request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_nfs_shares.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_shares.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_nfs_shares.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_nfs_shares request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, "nfs_shares", request, result, 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 details of a single NFS share. - # - # @overload update_nfs_share(request, options = nil) - # Pass arguments to `update_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_nfs_share(nfs_share: nil, update_mask: nil) - # Pass arguments to `update_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] - # Required. The NFS share to update. - # - # The `name` field is used to identify the NFS share to update. - # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # `labels` - # `allowed_clients` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new - # - # # Call the update_nfs_share method. - # result = client.update_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest - - # Converts hash and nil to an 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_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.update_nfs_share request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 an NFS share. - # - # @overload create_nfs_share(request, options = nil) - # Pass arguments to `create_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_nfs_share(parent: nil, nfs_share: nil) - # Pass arguments to `create_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location. - # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] - # Required. The NfsShare 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/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new - # - # # Call the create_nfs_share method. - # result = client.create_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest - - # Converts hash and nil to an 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_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.create_nfs_share request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameNfsShare sets a new name for an nfsshare. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_nfs_share(request, options = nil) - # Pass arguments to `rename_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rename_nfs_share(name: nil, new_nfsshare_id: nil) - # Pass arguments to `rename_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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` field is used to identify the nfsshare. - # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} - # @param new_nfsshare_id [::String] - # Required. The new `id` of the nfsshare. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new - # - # # Call the rename_nfs_share method. - # result = client.rename_nfs_share request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - # p result - # - def rename_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rename_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_nfs_share.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rename_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.rename_nfs_share request, 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 an NFS share. The underlying volume is automatically deleted. - # - # @overload delete_nfs_share(request, options = nil) - # Pass arguments to `delete_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_nfs_share(name: nil) - # Pass arguments to `delete_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 NFS share to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new - # - # # Call the delete_nfs_share method. - # result = client.delete_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest - - # Converts hash and nil to an 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_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_nfs_share.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.delete_nfs_share request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List the budget details to provision resources on a given project. - # - # @overload list_provisioning_quotas(request, options = nil) - # Pass arguments to `list_provisioning_quotas` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_provisioning_quotas` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListProvisioningQuotasRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new - # - # # Call the list_provisioning_quotas method. - # result = client.list_provisioning_quotas request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. - # p item - # end - # - def list_provisioning_quotas request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_provisioning_quotas.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_provisioning_quotas.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_provisioning_quotas.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_provisioning_quotas request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_provisioning_quotas, "provisioning_quotas", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Submit a provisiong configuration for a given project. - # - # @overload submit_provisioning_config(request, options = nil) - # Pass arguments to `submit_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_provisioning_config(parent: nil, provisioning_config: nil, email: nil) - # Pass arguments to `submit_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to create. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new - # - # # Call the submit_provisioning_config method. - # result = client.submit_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. - # p result - # - def submit_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest - - # Converts hash and nil to an 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_provisioning_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::BareMetalSolution::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.submit_provisioning_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.submit_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.submit_provisioning_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 - - ## - # Get ProvisioningConfig by name. - # - # @overload get_provisioning_config(request, options = nil) - # Pass arguments to `get_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_provisioning_config(name: nil) - # Pass arguments to `get_provisioning_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 ProvisioningConfig. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new - # - # # Call the get_provisioning_config method. - # result = client.get_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def get_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_provisioning_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::BareMetalSolution::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_provisioning_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_provisioning_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 - - ## - # Create new ProvisioningConfig. - # - # @overload create_provisioning_config(request, options = nil) - # Pass arguments to `create_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) - # Pass arguments to `create_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to create. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new - # - # # Call the create_provisioning_config method. - # result = client.create_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def create_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest - - # Converts hash and nil to an 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_provisioning_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::BareMetalSolution::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_provisioning_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.create_provisioning_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 - - ## - # Update existing ProvisioningConfig. - # - # @overload update_provisioning_config(request, options = nil) - # Pass arguments to `update_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) - # Pass arguments to `update_provisioning_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 provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new - # - # # Call the update_provisioning_config method. - # result = client.update_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def update_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest - - # Converts hash and nil to an 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_provisioning_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::BareMetalSolution::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_provisioning_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.update_provisioning_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 - - ## - # RenameNetwork sets a new name for a network. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_network(request, options = nil) - # Pass arguments to `rename_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rename_network(name: nil, new_network_id: nil) - # Pass arguments to `rename_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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` field is used to identify the network. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @param new_network_id [::String] - # Required. The new `id` of the network. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new - # - # # Call the rename_network method. - # result = client.rename_network request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - # p result - # - def rename_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rename_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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.rename_network.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rename_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.rename_network request, 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 the list of OS images which are currently approved. - # - # @overload list_os_images(request, options = nil) - # Pass arguments to `list_os_images` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_os_images(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_os_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListProvisioningQuotasRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new - # - # # Call the list_os_images method. - # result = client.list_os_images request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. - # p item - # end - # - def list_os_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_os_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::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_os_images.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_os_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_os_images request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_os_images, "os_images", request, result, 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 BareMetalSolution REST API. - # - # This class represents the configuration for BareMetalSolution 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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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 = "baremetalsolution.googleapis.com" - - config_attr :endpoint, nil, ::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 BareMetalSolution API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `rename_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_instance - ## - # RPC-specific configuration for `reset_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :reset_instance - ## - # RPC-specific configuration for `start_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :start_instance - ## - # RPC-specific configuration for `stop_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_instance - ## - # RPC-specific configuration for `enable_interactive_serial_console` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_interactive_serial_console - ## - # RPC-specific configuration for `disable_interactive_serial_console` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_interactive_serial_console - ## - # RPC-specific configuration for `detach_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :detach_lun - ## - # RPC-specific configuration for `list_ssh_keys` - # @return [::Gapic::Config::Method] - # - attr_reader :list_ssh_keys - ## - # RPC-specific configuration for `create_ssh_key` - # @return [::Gapic::Config::Method] - # - attr_reader :create_ssh_key - ## - # RPC-specific configuration for `delete_ssh_key` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_ssh_key - ## - # RPC-specific configuration for `list_volumes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volumes - ## - # RPC-specific configuration for `get_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume - ## - # RPC-specific configuration for `update_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :update_volume - ## - # RPC-specific configuration for `rename_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_volume - ## - # RPC-specific configuration for `evict_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :evict_volume - ## - # RPC-specific configuration for `resize_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :resize_volume - ## - # RPC-specific configuration for `list_networks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_networks - ## - # RPC-specific configuration for `list_network_usage` - # @return [::Gapic::Config::Method] - # - attr_reader :list_network_usage - ## - # RPC-specific configuration for `get_network` - # @return [::Gapic::Config::Method] - # - attr_reader :get_network - ## - # RPC-specific configuration for `update_network` - # @return [::Gapic::Config::Method] - # - attr_reader :update_network - ## - # RPC-specific configuration for `create_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :create_volume_snapshot - ## - # RPC-specific configuration for `restore_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_volume_snapshot - ## - # RPC-specific configuration for `delete_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_volume_snapshot - ## - # RPC-specific configuration for `get_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume_snapshot - ## - # RPC-specific configuration for `list_volume_snapshots` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volume_snapshots - ## - # RPC-specific configuration for `get_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lun - ## - # RPC-specific configuration for `list_luns` - # @return [::Gapic::Config::Method] - # - attr_reader :list_luns - ## - # RPC-specific configuration for `evict_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :evict_lun - ## - # RPC-specific configuration for `get_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :get_nfs_share - ## - # RPC-specific configuration for `list_nfs_shares` - # @return [::Gapic::Config::Method] - # - attr_reader :list_nfs_shares - ## - # RPC-specific configuration for `update_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :update_nfs_share - ## - # RPC-specific configuration for `create_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :create_nfs_share - ## - # RPC-specific configuration for `rename_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_nfs_share - ## - # RPC-specific configuration for `delete_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_nfs_share - ## - # RPC-specific configuration for `list_provisioning_quotas` - # @return [::Gapic::Config::Method] - # - attr_reader :list_provisioning_quotas - ## - # RPC-specific configuration for `submit_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_provisioning_config - ## - # RPC-specific configuration for `get_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_provisioning_config - ## - # RPC-specific configuration for `create_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_provisioning_config - ## - # RPC-specific configuration for `update_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_provisioning_config - ## - # RPC-specific configuration for `rename_network` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_network - ## - # RPC-specific configuration for `list_os_images` - # @return [::Gapic::Config::Method] - # - attr_reader :list_os_images - - # @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 - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_instance_config - rename_instance_config = parent_rpcs.rename_instance if parent_rpcs.respond_to? :rename_instance - @rename_instance = ::Gapic::Config::Method.new rename_instance_config - reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance - @reset_instance = ::Gapic::Config::Method.new reset_instance_config - start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance - @start_instance = ::Gapic::Config::Method.new start_instance_config - stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance - @stop_instance = ::Gapic::Config::Method.new stop_instance_config - enable_interactive_serial_console_config = parent_rpcs.enable_interactive_serial_console if parent_rpcs.respond_to? :enable_interactive_serial_console - @enable_interactive_serial_console = ::Gapic::Config::Method.new enable_interactive_serial_console_config - disable_interactive_serial_console_config = parent_rpcs.disable_interactive_serial_console if parent_rpcs.respond_to? :disable_interactive_serial_console - @disable_interactive_serial_console = ::Gapic::Config::Method.new disable_interactive_serial_console_config - detach_lun_config = parent_rpcs.detach_lun if parent_rpcs.respond_to? :detach_lun - @detach_lun = ::Gapic::Config::Method.new detach_lun_config - list_ssh_keys_config = parent_rpcs.list_ssh_keys if parent_rpcs.respond_to? :list_ssh_keys - @list_ssh_keys = ::Gapic::Config::Method.new list_ssh_keys_config - create_ssh_key_config = parent_rpcs.create_ssh_key if parent_rpcs.respond_to? :create_ssh_key - @create_ssh_key = ::Gapic::Config::Method.new create_ssh_key_config - delete_ssh_key_config = parent_rpcs.delete_ssh_key if parent_rpcs.respond_to? :delete_ssh_key - @delete_ssh_key = ::Gapic::Config::Method.new delete_ssh_key_config - list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes - @list_volumes = ::Gapic::Config::Method.new list_volumes_config - get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume - @get_volume = ::Gapic::Config::Method.new get_volume_config - update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume - @update_volume = ::Gapic::Config::Method.new update_volume_config - rename_volume_config = parent_rpcs.rename_volume if parent_rpcs.respond_to? :rename_volume - @rename_volume = ::Gapic::Config::Method.new rename_volume_config - evict_volume_config = parent_rpcs.evict_volume if parent_rpcs.respond_to? :evict_volume - @evict_volume = ::Gapic::Config::Method.new evict_volume_config - resize_volume_config = parent_rpcs.resize_volume if parent_rpcs.respond_to? :resize_volume - @resize_volume = ::Gapic::Config::Method.new resize_volume_config - list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks - @list_networks = ::Gapic::Config::Method.new list_networks_config - list_network_usage_config = parent_rpcs.list_network_usage if parent_rpcs.respond_to? :list_network_usage - @list_network_usage = ::Gapic::Config::Method.new list_network_usage_config - get_network_config = parent_rpcs.get_network if parent_rpcs.respond_to? :get_network - @get_network = ::Gapic::Config::Method.new get_network_config - update_network_config = parent_rpcs.update_network if parent_rpcs.respond_to? :update_network - @update_network = ::Gapic::Config::Method.new update_network_config - create_volume_snapshot_config = parent_rpcs.create_volume_snapshot if parent_rpcs.respond_to? :create_volume_snapshot - @create_volume_snapshot = ::Gapic::Config::Method.new create_volume_snapshot_config - restore_volume_snapshot_config = parent_rpcs.restore_volume_snapshot if parent_rpcs.respond_to? :restore_volume_snapshot - @restore_volume_snapshot = ::Gapic::Config::Method.new restore_volume_snapshot_config - delete_volume_snapshot_config = parent_rpcs.delete_volume_snapshot if parent_rpcs.respond_to? :delete_volume_snapshot - @delete_volume_snapshot = ::Gapic::Config::Method.new delete_volume_snapshot_config - get_volume_snapshot_config = parent_rpcs.get_volume_snapshot if parent_rpcs.respond_to? :get_volume_snapshot - @get_volume_snapshot = ::Gapic::Config::Method.new get_volume_snapshot_config - list_volume_snapshots_config = parent_rpcs.list_volume_snapshots if parent_rpcs.respond_to? :list_volume_snapshots - @list_volume_snapshots = ::Gapic::Config::Method.new list_volume_snapshots_config - get_lun_config = parent_rpcs.get_lun if parent_rpcs.respond_to? :get_lun - @get_lun = ::Gapic::Config::Method.new get_lun_config - list_luns_config = parent_rpcs.list_luns if parent_rpcs.respond_to? :list_luns - @list_luns = ::Gapic::Config::Method.new list_luns_config - evict_lun_config = parent_rpcs.evict_lun if parent_rpcs.respond_to? :evict_lun - @evict_lun = ::Gapic::Config::Method.new evict_lun_config - get_nfs_share_config = parent_rpcs.get_nfs_share if parent_rpcs.respond_to? :get_nfs_share - @get_nfs_share = ::Gapic::Config::Method.new get_nfs_share_config - list_nfs_shares_config = parent_rpcs.list_nfs_shares if parent_rpcs.respond_to? :list_nfs_shares - @list_nfs_shares = ::Gapic::Config::Method.new list_nfs_shares_config - update_nfs_share_config = parent_rpcs.update_nfs_share if parent_rpcs.respond_to? :update_nfs_share - @update_nfs_share = ::Gapic::Config::Method.new update_nfs_share_config - create_nfs_share_config = parent_rpcs.create_nfs_share if parent_rpcs.respond_to? :create_nfs_share - @create_nfs_share = ::Gapic::Config::Method.new create_nfs_share_config - rename_nfs_share_config = parent_rpcs.rename_nfs_share if parent_rpcs.respond_to? :rename_nfs_share - @rename_nfs_share = ::Gapic::Config::Method.new rename_nfs_share_config - delete_nfs_share_config = parent_rpcs.delete_nfs_share if parent_rpcs.respond_to? :delete_nfs_share - @delete_nfs_share = ::Gapic::Config::Method.new delete_nfs_share_config - list_provisioning_quotas_config = parent_rpcs.list_provisioning_quotas if parent_rpcs.respond_to? :list_provisioning_quotas - @list_provisioning_quotas = ::Gapic::Config::Method.new list_provisioning_quotas_config - submit_provisioning_config_config = parent_rpcs.submit_provisioning_config if parent_rpcs.respond_to? :submit_provisioning_config - @submit_provisioning_config = ::Gapic::Config::Method.new submit_provisioning_config_config - get_provisioning_config_config = parent_rpcs.get_provisioning_config if parent_rpcs.respond_to? :get_provisioning_config - @get_provisioning_config = ::Gapic::Config::Method.new get_provisioning_config_config - create_provisioning_config_config = parent_rpcs.create_provisioning_config if parent_rpcs.respond_to? :create_provisioning_config - @create_provisioning_config = ::Gapic::Config::Method.new create_provisioning_config_config - update_provisioning_config_config = parent_rpcs.update_provisioning_config if parent_rpcs.respond_to? :update_provisioning_config - @update_provisioning_config = ::Gapic::Config::Method.new update_provisioning_config_config - rename_network_config = parent_rpcs.rename_network if parent_rpcs.respond_to? :rename_network - @rename_network = ::Gapic::Config::Method.new rename_network_config - list_os_images_config = parent_rpcs.list_os_images if parent_rpcs.respond_to? :list_os_images - @list_os_images = ::Gapic::Config::Method.new list_os_images_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb deleted file mode 100644 index 0cfaa78087af..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/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 BareMetalSolution - module V2 - module BareMetalSolution - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BareMetalSolution 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 BareMetalSolution 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::BareMetalSolution::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::BareMetalSolution::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::BareMetalSolution::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::BareMetalSolution::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 = "baremetalsolution.googleapis.com" - - config_attr :endpoint, nil, ::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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb deleted file mode 100644 index 5dc3748f6217..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb +++ /dev/null @@ -1,2789 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - module Rest - ## - # REST service stub for the BareMetalSolution 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::BareMetalSolution::V2::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::BareMetalSolution::V2::ListInstancesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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 update_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::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 rename_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # A result object deserialized from the server's reply - def rename_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rename_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: "rename_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::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 reset_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def reset_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_reset_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: "reset_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 start_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_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: "start_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 stop_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def stop_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_stop_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: "stop_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 enable_interactive_serial_console REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_interactive_serial_console request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_interactive_serial_console_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_interactive_serial_console", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_interactive_serial_console REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_interactive_serial_console request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_interactive_serial_console_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_interactive_serial_console", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the detach_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def detach_lun request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_detach_lun_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "detach_lun", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_ssh_keys REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse] - # A result object deserialized from the server's reply - def list_ssh_keys request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_ssh_keys_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_ssh_keys", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.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_ssh_key REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # A result object deserialized from the server's reply - def create_ssh_key request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_ssh_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: "create_ssh_key", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::SSHKey.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_ssh_key REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_ssh_key request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_ssh_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: "delete_ssh_key", - 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_volumes REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse] - # A result object deserialized from the server's reply - def list_volumes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_volumes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_volumes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # A result object deserialized from the server's reply - def get_volume request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_volume", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Volume.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_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_volume request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_volume_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_volume", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rename_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # A result object deserialized from the server's reply - def rename_volume request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rename_volume_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rename_volume", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Volume.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the evict_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def evict_volume request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_evict_volume_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "evict_volume", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the resize_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def resize_volume request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_resize_volume_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "resize_volume", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_networks REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse] - # A result object deserialized from the server's reply - def list_networks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_networks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_networks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.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_network_usage REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # A result object deserialized from the server's reply - def list_network_usage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_network_usage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_network_usage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # A result object deserialized from the server's reply - def get_network request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_network_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_network", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Network.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_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_network request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_network_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_network", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # A result object deserialized from the server's reply - def create_volume_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_volume_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_volume_snapshot", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.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_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_volume_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restore_volume_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_volume_snapshot", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_volume_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_volume_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_volume_snapshot", - 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_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # A result object deserialized from the server's reply - def get_volume_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_volume_snapshot", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.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_volume_snapshots REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse] - # A result object deserialized from the server's reply - def list_volume_snapshots request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_volume_snapshots_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_volume_snapshots", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetLunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Lun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Lun] - # A result object deserialized from the server's reply - def get_lun request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lun_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_lun", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Lun.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_luns REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListLunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListLunsResponse] - # A result object deserialized from the server's reply - def list_luns request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_luns_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_luns", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the evict_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def evict_lun request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_evict_lun_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "evict_lun", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # A result object deserialized from the server's reply - def get_nfs_share request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_nfs_share_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_nfs_share", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.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_nfs_shares REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse] - # A result object deserialized from the server's reply - def list_nfs_shares request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_nfs_shares_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_nfs_shares", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.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_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_nfs_share request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_nfs_share_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_nfs_share", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_nfs_share request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_nfs_share_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_nfs_share", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rename_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # A result object deserialized from the server's reply - def rename_nfs_share request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rename_nfs_share_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rename_nfs_share", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.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_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_nfs_share request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_nfs_share_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_nfs_share", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_provisioning_quotas REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse] - # A result object deserialized from the server's reply - def list_provisioning_quotas request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_provisioning_quotas_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_provisioning_quotas", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.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_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # A result object deserialized from the server's reply - def submit_provisioning_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_submit_provisioning_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: "submit_provisioning_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # A result object deserialized from the server's reply - def get_provisioning_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_provisioning_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_provisioning_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.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_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # A result object deserialized from the server's reply - def create_provisioning_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_provisioning_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_provisioning_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.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_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # A result object deserialized from the server's reply - def update_provisioning_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_provisioning_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_provisioning_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rename_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # A result object deserialized from the server's reply - def rename_network request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rename_network_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rename_network", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Network.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_os_images REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse] - # A result object deserialized from the server's reply - def list_os_images request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_os_images_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_os_images", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.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::BareMetalSolution::V2::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: "/v2/{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::BareMetalSolution::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::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: "/v2/{instance.name}", - body: "instance", - matches: [ - ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rename_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rename_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:rename", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the reset_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_reset_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:reset", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:start", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the stop_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_stop_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:stop", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_interactive_serial_console REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest] - # 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_interactive_serial_console_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:enableInteractiveSerialConsole", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_interactive_serial_console REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest] - # 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_interactive_serial_console_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:disableInteractiveSerialConsole", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the detach_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_detach_lun_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{instance}:detachLun", - body: "*", - matches: [ - ["instance", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_ssh_keys REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_ssh_keys_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/sshKeys", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_ssh_key REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest] - # 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_ssh_key_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/sshKeys", - body: "ssh_key", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_ssh_key REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest] - # 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_ssh_key_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/sshKeys/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_volumes REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_volumes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/volumes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_volume_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest] - # 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_volume_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{volume.name}", - body: "volume", - matches: [ - ["volume.name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rename_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rename_volume_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:rename", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the evict_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_evict_volume_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:evict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the resize_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_resize_volume_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{volume}:resize", - body: "*", - matches: [ - ["volume", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_networks REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_networks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/networks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_network_usage REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_network_usage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{location}/networks:listNetworkUsage", - matches: [ - ["location", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_network_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest] - # 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_network_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{network.name}", - body: "network", - matches: [ - ["network.name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest] - # 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_volume_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/snapshots", - body: "volume_snapshot", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restore_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest] - # 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_volume_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{volume_snapshot}:restoreVolumeSnapshot", - body: "*", - matches: [ - ["volume_snapshot", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest] - # 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_volume_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_volume_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_volume_snapshots REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_volume_snapshots_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/snapshots", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetLunRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_lun_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/luns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_luns REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_luns_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/luns", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the evict_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_evict_lun_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:evict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/luns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_nfs_share_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_nfs_shares REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_nfs_shares_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/nfsShares", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest] - # 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_nfs_share_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{nfs_share.name}", - body: "nfs_share", - matches: [ - ["nfs_share.name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest] - # 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_nfs_share_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/nfsShares", - body: "nfs_share", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rename_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rename_nfs_share_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:rename", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest] - # 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_nfs_share_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_provisioning_quotas REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_provisioning_quotas_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/provisioningQuotas", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the submit_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest] - # 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_provisioning_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/provisioningConfigs:submit", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_provisioning_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest] - # 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_provisioning_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/provisioningConfigs", - body: "provisioning_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest] - # 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_provisioning_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{provisioning_config.name}", - body: "provisioning_config", - matches: [ - ["provisioning_config.name", %r{^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rename_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rename_network_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:rename", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_os_images REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_os_images_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/osImages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb deleted file mode 100644 index 37345efedc50..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/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 BareMetalSolution - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/bare_metal_solution/v2/rest" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - module V2 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BareMetalSolution"] - 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: "/v2/{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: "/v2/{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-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb deleted file mode 100644 index 980745ed179a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/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/bare_metal_solution/v2/bare_metal_solution/rest" -require "google/cloud/bare_metal_solution/v2/bindings_override" -require "google/cloud/bare_metal_solution/v2/version" - -module Google - module Cloud - module BareMetalSolution - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bare_metal_solution/v2/rest" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - module V2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb deleted file mode 100644 index 8c3694d57a2e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/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 BareMetalSolution - module V2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb deleted file mode 100644 index ea11c0b2c2e0..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/cloud/baremetalsolution/v2/instance_pb' -require 'google/cloud/baremetalsolution/v2/lun_pb' -require 'google/cloud/baremetalsolution/v2/network_pb' -require 'google/cloud/baremetalsolution/v2/nfs_share_pb' -require 'google/cloud/baremetalsolution/v2/osimage_pb' -require 'google/cloud/baremetalsolution/v2/provisioning_pb' -require 'google/cloud/baremetalsolution/v2/ssh_key_pb' -require 'google/cloud/baremetalsolution/v2/volume_pb' -require 'google/cloud/baremetalsolution/v2/volume_snapshot_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n9google/cloud/baremetalsolution/v2/baremetalsolution.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x30google/cloud/baremetalsolution/v2/instance.proto\x1a+google/cloud/baremetalsolution/v2/lun.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a\x31google/cloud/baremetalsolution/v2/nfs_share.proto\x1a/google/cloud/baremetalsolution/v2/osimage.proto\x1a\x34google/cloud/baremetalsolution/v2/provisioning.proto\x1a/google/cloud/baremetalsolution/v2/ssh_key.proto\x1a.google/cloud/baremetalsolution/v2/volume.proto\x1a\x37google/cloud/baremetalsolution/v2/volume_snapshot.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\x17\n\x15ResetInstanceResponse2\xbaK\n\x11\x42\x61reMetalSolution\x12\xc2\x01\n\rListInstances\x12\x37.google.cloud.baremetalsolution.v2.ListInstancesRequest\x1a\x38.google.cloud.baremetalsolution.v2.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/instances\x12\xaf\x01\n\x0bGetInstance\x12\x35.google.cloud.baremetalsolution.v2.GetInstanceRequest\x1a+.google.cloud.baremetalsolution.v2.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/instances/*}\x12\xea\x01\n\x0eUpdateInstance\x12\x38.google.cloud.baremetalsolution.v2.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v2/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xcf\x01\n\x0eRenameInstance\x12\x38.google.cloud.baremetalsolution.v2.RenameInstanceRequest\x1a+.google.cloud.baremetalsolution.v2.Instance\"V\xda\x41\x14name,new_instance_id\x82\xd3\xe4\x93\x02\x39\"4/v2/{name=projects/*/locations/*/instances/*}:rename:\x01*\x12\xdb\x01\n\rResetInstance\x12\x37.google.cloud.baremetalsolution.v2.ResetInstanceRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15ResetInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/instances/*}:reset:\x01*\x12\xdb\x01\n\rStartInstance\x12\x37.google.cloud.baremetalsolution.v2.StartInstanceRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15StartInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/instances/*}:start:\x01*\x12\xd7\x01\n\x0cStopInstance\x12\x36.google.cloud.baremetalsolution.v2.StopInstanceRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41)\n\x14StopInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/instances/*}:stop:\x01*\x12\xa8\x02\n\x1e\x45nableInteractiveSerialConsole\x12H.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest\x1a\x1d.google.longrunning.Operation\"\x9c\x01\xca\x41;\n&EnableInteractiveSerialConsoleResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v2/{name=projects/*/locations/*/instances/*}:enableInteractiveSerialConsole:\x01*\x12\xac\x02\n\x1f\x44isableInteractiveSerialConsole\x12I.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41<\n\'DisableInteractiveSerialConsoleResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v2/{name=projects/*/locations/*/instances/*}:disableInteractiveSerialConsole:\x01*\x12\xd6\x01\n\tDetachLun\x12\x33.google.cloud.baremetalsolution.v2.DetachLunRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x0cinstance,lun\x82\xd3\xe4\x93\x02@\";/v2/{instance=projects/*/locations/*/instances/*}:detachLun:\x01*\x12\xba\x01\n\x0bListSSHKeys\x12\x35.google.cloud.baremetalsolution.v2.ListSSHKeysRequest\x1a\x36.google.cloud.baremetalsolution.v2.ListSSHKeysResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v2/{parent=projects/*/locations/*}/sshKeys\x12\xcb\x01\n\x0c\x43reateSSHKey\x12\x36.google.cloud.baremetalsolution.v2.CreateSSHKeyRequest\x1a).google.cloud.baremetalsolution.v2.SSHKey\"X\xda\x41\x19parent,ssh_key,ssh_key_id\x82\xd3\xe4\x93\x02\x36\"+/v2/{parent=projects/*/locations/*}/sshKeys:\x07ssh_key\x12\x9a\x01\n\x0c\x44\x65leteSSHKey\x12\x36.google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v2/{name=projects/*/locations/*/sshKeys/*}\x12\xba\x01\n\x0bListVolumes\x12\x35.google.cloud.baremetalsolution.v2.ListVolumesRequest\x1a\x36.google.cloud.baremetalsolution.v2.ListVolumesResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v2/{parent=projects/*/locations/*}/volumes\x12\xa7\x01\n\tGetVolume\x12\x33.google.cloud.baremetalsolution.v2.GetVolumeRequest\x1a).google.cloud.baremetalsolution.v2.Volume\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v2/{name=projects/*/locations/*/volumes/*}\x12\xdc\x01\n\x0cUpdateVolume\x12\x36.google.cloud.baremetalsolution.v2.UpdateVolumeRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06Volume\x12\x11OperationMetadata\xda\x41\x12volume,update_mask\x82\xd3\xe4\x93\x02<22/v2/{volume.name=projects/*/locations/*/volumes/*}:\x06volume\x12\xc5\x01\n\x0cRenameVolume\x12\x36.google.cloud.baremetalsolution.v2.RenameVolumeRequest\x1a).google.cloud.baremetalsolution.v2.Volume\"R\xda\x41\x12name,new_volume_id\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/volumes/*}:rename:\x01*\x12\xd5\x01\n\x0b\x45victVolume\x12\x35.google.cloud.baremetalsolution.v2.EvictVolumeRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v2/{name=projects/*/locations/*/volumes/*}:evict:\x01*\x12\xd6\x01\n\x0cResizeVolume\x12\x36.google.cloud.baremetalsolution.v2.ResizeVolumeRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41\x1b\n\x06Volume\x12\x11OperationMetadata\xda\x41\x0fvolume,size_gib\x82\xd3\xe4\x93\x02\x39\"4/v2/{volume=projects/*/locations/*/volumes/*}:resize:\x01*\x12\xbe\x01\n\x0cListNetworks\x12\x36.google.cloud.baremetalsolution.v2.ListNetworksRequest\x1a\x37.google.cloud.baremetalsolution.v2.ListNetworksResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/networks\x12\xdf\x01\n\x10ListNetworkUsage\x12:.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest\x1a;.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse\"R\xda\x41\x08location\x82\xd3\xe4\x93\x02\x41\x12?/v2/{location=projects/*/locations/*}/networks:listNetworkUsage\x12\xab\x01\n\nGetNetwork\x12\x34.google.cloud.baremetalsolution.v2.GetNetworkRequest\x1a*.google.cloud.baremetalsolution.v2.Network\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v2/{name=projects/*/locations/*/networks/*}\x12\xe3\x01\n\rUpdateNetwork\x12\x37.google.cloud.baremetalsolution.v2.UpdateNetworkRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07Network\x12\x11OperationMetadata\xda\x41\x13network,update_mask\x82\xd3\xe4\x93\x02?24/v2/{network.name=projects/*/locations/*/networks/*}:\x07network\x12\xf4\x01\n\x14\x43reateVolumeSnapshot\x12>.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest\x1a\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\"i\xda\x41\x16parent,volume_snapshot\x82\xd3\xe4\x93\x02J\"7/v2/{parent=projects/*/locations/*/volumes/*}/snapshots:\x0fvolume_snapshot\x12\x95\x02\n\x15RestoreVolumeSnapshot\x12?.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41#\n\x0eVolumeSnapshot\x12\x11OperationMetadata\xda\x41\x0fvolume_snapshot\x82\xd3\xe4\x93\x02]\"X/v2/{volume_snapshot=projects/*/locations/*/volumes/*/snapshots/*}:restoreVolumeSnapshot:\x01*\x12\xb6\x01\n\x14\x44\x65leteVolumeSnapshot\x12>.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}\x12\xcb\x01\n\x11GetVolumeSnapshot\x12;.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest\x1a\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}\x12\xde\x01\n\x13ListVolumeSnapshots\x12=.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest\x1a>.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{parent=projects/*/locations/*/volumes/*}/snapshots\x12\xa5\x01\n\x06GetLun\x12\x30.google.cloud.baremetalsolution.v2.GetLunRequest\x1a&.google.cloud.baremetalsolution.v2.Lun\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{name=projects/*/locations/*/volumes/*/luns/*}\x12\xb8\x01\n\x08ListLuns\x12\x32.google.cloud.baremetalsolution.v2.ListLunsRequest\x1a\x33.google.cloud.baremetalsolution.v2.ListLunsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{parent=projects/*/locations/*/volumes/*}/luns\x12\xd6\x01\n\x08\x45victLun\x12\x32.google.cloud.baremetalsolution.v2.EvictLunRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v2/{name=projects/*/locations/*/volumes/*/luns/*}:evict:\x01*\x12\xaf\x01\n\x0bGetNfsShare\x12\x35.google.cloud.baremetalsolution.v2.GetNfsShareRequest\x1a+.google.cloud.baremetalsolution.v2.NfsShare\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/nfsShares/*}\x12\xc2\x01\n\rListNfsShares\x12\x37.google.cloud.baremetalsolution.v2.ListNfsSharesRequest\x1a\x38.google.cloud.baremetalsolution.v2.ListNfsSharesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/nfsShares\x12\xee\x01\n\x0eUpdateNfsShare\x12\x38.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x1d\n\x08NfsShare\x12\x11OperationMetadata\xda\x41\x15nfs_share,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v2/{nfs_share.name=projects/*/locations/*/nfsShares/*}:\tnfs_share\x12\xde\x01\n\x0e\x43reateNfsShare\x12\x38.google.cloud.baremetalsolution.v2.CreateNfsShareRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x1d\n\x08NfsShare\x12\x11OperationMetadata\xda\x41\x10parent,nfs_share\x82\xd3\xe4\x93\x02:\"-/v2/{parent=projects/*/locations/*}/nfsShares:\tnfs_share\x12\xcf\x01\n\x0eRenameNfsShare\x12\x38.google.cloud.baremetalsolution.v2.RenameNfsShareRequest\x1a+.google.cloud.baremetalsolution.v2.NfsShare\"V\xda\x41\x14name,new_nfsshare_id\x82\xd3\xe4\x93\x02\x39\"4/v2/{name=projects/*/locations/*/nfsShares/*}:rename:\x01*\x12\xd4\x01\n\x0e\x44\x65leteNfsShare\x12\x38.google.cloud.baremetalsolution.v2.DeleteNfsShareRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/nfsShares/*}\x12\xe6\x01\n\x16ListProvisioningQuotas\x12@.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest\x1a\x41.google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v2/{parent=projects/*/locations/*}/provisioningQuotas\x12\x8b\x02\n\x18SubmitProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest\x1a\x43.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse\"f\xda\x41\x1aparent,provisioning_config\x82\xd3\xe4\x93\x02\x43\">/v2/{parent=projects/*/locations/*}/provisioningConfigs:submit:\x01*\x12\xd7\x01\n\x15GetProvisioningConfig\x12?.google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/provisioningConfigs/*}\x12\x88\x02\n\x18\x43reateProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"q\xda\x41\x1aparent,provisioning_config\x82\xd3\xe4\x93\x02N\"7/v2/{parent=projects/*/locations/*}/provisioningConfigs:\x13provisioning_config\x12\xa2\x02\n\x18UpdateProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"\x8a\x01\xda\x41\x1fprovisioning_config,update_mask\x82\xd3\xe4\x93\x02\x62\x32K/v2/{provisioning_config.name=projects/*/locations/*/provisioningConfigs/*}:\x13provisioning_config\x12\xca\x01\n\rRenameNetwork\x12\x37.google.cloud.baremetalsolution.v2.RenameNetworkRequest\x1a*.google.cloud.baremetalsolution.v2.Network\"T\xda\x41\x13name,new_network_id\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/networks/*}:rename:\x01*\x12\xbe\x01\n\x0cListOSImages\x12\x36.google.cloud.baremetalsolution.v2.ListOSImagesRequest\x1a\x37.google.cloud.baremetalsolution.v2.ListOSImagesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/osImages\x1aT\xca\x41 baremetalsolution.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x85\x02\n%com.google.cloud.baremetalsolution.v2B\x16\x42\x61reMetalSolutionProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.OperationMetadata").msgclass - ResetInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResetInstanceResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb deleted file mode 100644 index 7a1a2a562afe..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb +++ /dev/null @@ -1,154 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/baremetalsolution/v2/baremetalsolution.proto for package 'Google.Cloud.BareMetalSolution.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/baremetalsolution/v2/baremetalsolution_pb' - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - # Performs management operations on Bare Metal Solution servers. - # - # The `baremetalsolution.googleapis.com` service provides management - # capabilities for Bare Metal Solution servers. To access the API methods, you - # must assign Bare Metal Solution IAM roles containing the desired permissions - # to your staff in your Google Cloud project. You must also enable the Bare - # Metal Solution API. Once enabled, the methods act - # upon specific servers in your Bare Metal Solution environment. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.baremetalsolution.v2.BareMetalSolution' - - # List servers in a given project and location. - rpc :ListInstances, ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse - # Get details about a single server. - rpc :GetInstance, ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, ::Google::Cloud::BareMetalSolution::V2::Instance - # Update details of a single server. - rpc :UpdateInstance, ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, ::Google::Longrunning::Operation - # RenameInstance sets a new name for an instance. - # Use with caution, previous names become immediately invalidated. - rpc :RenameInstance, ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Google::Cloud::BareMetalSolution::V2::Instance - # Perform an ungraceful, hard reset on a server. Equivalent to shutting the - # power off and then turning it back on. - rpc :ResetInstance, ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Google::Longrunning::Operation - # Starts a server that was shutdown. - rpc :StartInstance, ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Google::Longrunning::Operation - # Stop a running server. - rpc :StopInstance, ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Google::Longrunning::Operation - # Enable the interactive serial console feature on an instance. - rpc :EnableInteractiveSerialConsole, ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Google::Longrunning::Operation - # Disable the interactive serial console feature on an instance. - rpc :DisableInteractiveSerialConsole, ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Google::Longrunning::Operation - # Detach LUN from Instance. - rpc :DetachLun, ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Google::Longrunning::Operation - # Lists the public SSH keys registered for the specified project. - # These SSH keys are used only for the interactive serial console feature. - rpc :ListSSHKeys, ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse - # Register a public SSH key in the specified project for use with the - # interactive serial console feature. - rpc :CreateSSHKey, ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Google::Cloud::BareMetalSolution::V2::SSHKey - # Deletes a public SSH key registered in the specified project. - rpc :DeleteSSHKey, ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Google::Protobuf::Empty - # List storage volumes in a given project and location. - rpc :ListVolumes, ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse - # Get details of a single storage volume. - rpc :GetVolume, ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Google::Cloud::BareMetalSolution::V2::Volume - # Update details of a single storage volume. - rpc :UpdateVolume, ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Google::Longrunning::Operation - # RenameVolume sets a new name for a volume. - # Use with caution, previous names become immediately invalidated. - rpc :RenameVolume, ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Google::Cloud::BareMetalSolution::V2::Volume - # Skips volume's cooloff and deletes it now. - # Volume must be in cooloff state. - rpc :EvictVolume, ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Google::Longrunning::Operation - # Emergency Volume resize. - rpc :ResizeVolume, ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Google::Longrunning::Operation - # List network in a given project and location. - rpc :ListNetworks, ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse - # List all Networks (and used IPs for each Network) in the vendor account - # associated with the specified project. - rpc :ListNetworkUsage, ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse - # Get details of a single network. - rpc :GetNetwork, ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Google::Cloud::BareMetalSolution::V2::Network - # Update details of a single network. - rpc :UpdateNetwork, ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Google::Longrunning::Operation - # Takes a snapshot of a boot volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - rpc :CreateVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot - # Uses the specified snapshot to restore its parent volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - rpc :RestoreVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Google::Longrunning::Operation - # Deletes a volume snapshot. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - rpc :DeleteVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Google::Protobuf::Empty - # Returns the specified snapshot resource. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - rpc :GetVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot - # Retrieves the list of snapshots for the specified volume. - # Returns a response with an empty list of snapshots if called - # for a non-boot volume. - rpc :ListVolumeSnapshots, ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse - # Get details of a single storage logical unit number(LUN). - rpc :GetLun, ::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Google::Cloud::BareMetalSolution::V2::Lun - # List storage volume luns for given storage volume. - rpc :ListLuns, ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse - # Skips lun's cooloff and deletes it now. - # Lun must be in cooloff state. - rpc :EvictLun, ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Google::Longrunning::Operation - # Get details of a single NFS share. - rpc :GetNfsShare, ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Google::Cloud::BareMetalSolution::V2::NfsShare - # List NFS shares. - rpc :ListNfsShares, ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse - # Update details of a single NFS share. - rpc :UpdateNfsShare, ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Google::Longrunning::Operation - # Create an NFS share. - rpc :CreateNfsShare, ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Google::Longrunning::Operation - # RenameNfsShare sets a new name for an nfsshare. - # Use with caution, previous names become immediately invalidated. - rpc :RenameNfsShare, ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Google::Cloud::BareMetalSolution::V2::NfsShare - # Delete an NFS share. The underlying volume is automatically deleted. - rpc :DeleteNfsShare, ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Google::Longrunning::Operation - # List the budget details to provision resources on a given project. - rpc :ListProvisioningQuotas, ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse - # Submit a provisiong configuration for a given project. - rpc :SubmitProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse - # Get ProvisioningConfig by name. - rpc :GetProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig - # Create new ProvisioningConfig. - rpc :CreateProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig - # Update existing ProvisioningConfig. - rpc :UpdateProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig - # RenameNetwork sets a new name for a network. - # Use with caution, previous names become immediately invalidated. - rpc :RenameNetwork, ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Google::Cloud::BareMetalSolution::V2::Network - # Retrieves the list of OS images which are currently approved. - rpc :ListOSImages, ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb deleted file mode 100644 index 6dcab60b7988..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/common.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/baremetalsolution/v2/common.proto\x12!google.cloud.baremetalsolution.v2*\xaa\x01\n\x15VolumePerformanceTier\x12\'\n#VOLUME_PERFORMANCE_TIER_UNSPECIFIED\x10\x00\x12\"\n\x1eVOLUME_PERFORMANCE_TIER_SHARED\x10\x01\x12$\n VOLUME_PERFORMANCE_TIER_ASSIGNED\x10\x02\x12\x1e\n\x1aVOLUME_PERFORMANCE_TIER_HT\x10\x03*l\n\x0fWorkloadProfile\x12 \n\x1cWORKLOAD_PROFILE_UNSPECIFIED\x10\x00\x12\x1c\n\x18WORKLOAD_PROFILE_GENERIC\x10\x01\x12\x19\n\x15WORKLOAD_PROFILE_HANA\x10\x02\x42\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0b\x43ommonProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - VolumePerformanceTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumePerformanceTier").enummodule - WorkloadProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.WorkloadProfile").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb deleted file mode 100644 index a8f5ce8b427a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/instance.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/baremetalsolution/v2/common_pb' -require 'google/cloud/baremetalsolution/v2/lun_pb' -require 'google/cloud/baremetalsolution/v2/network_pb' -require 'google/cloud/baremetalsolution/v2/volume_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/baremetalsolution/v2/instance.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a+google/cloud/baremetalsolution/v2/lun.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a.google/cloud/baremetalsolution/v2/volume.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc9\t\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x0f\n\x02id\x18\x0b \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\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0cmachine_type\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x45\n\x05state\x18\x05 \x01(\x0e\x32\x31.google.cloud.baremetalsolution.v2.Instance.StateB\x03\xe0\x41\x03\x12\x1e\n\x16hyperthreading_enabled\x18\x06 \x01(\x08\x12G\n\x06labels\x18\x07 \x03(\x0b\x32\x37.google.cloud.baremetalsolution.v2.Instance.LabelsEntry\x12\x39\n\x04luns\x18\x08 \x03(\x0b\x32&.google.cloud.baremetalsolution.v2.LunB\x03\xe0\x41\x05\x12?\n\x07volumes\x18\x10 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.VolumeB\x03\xe0\x41\x04\x12\x41\n\x08networks\x18\t \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.NetworkB\x03\xe0\x41\x03\x12/\n\"interactive_serial_console_enabled\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12\x10\n\x08os_image\x18\x0c \x01(\t\x12\x10\n\x03pod\x18\r \x01(\tB\x03\xe0\x41\x05\x12U\n\x10network_template\x18\x0e \x01(\tB;\xfa\x41\x38\n6baremetalsolution.googleapis.com/ServerNetworkTemplate\x12O\n\x12logical_interfaces\x18\x0f \x03(\x0b\x32\x33.google.cloud.baremetalsolution.v2.LogicalInterface\x12\x17\n\nlogin_info\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12L\n\x10workload_profile\x18\x12 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.WorkloadProfile\x12\x1d\n\x10\x66irmware_version\x18\x13 \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\"\x82\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08STARTING\x10\x05\x12\x0c\n\x08STOPPING\x10\x06\x12\x0c\n\x08SHUTDOWN\x10\x07:l\xea\x41i\n)baremetalsolution.googleapis.com/Instance\x12\n\tinstances\x18\x01 \x03(\x0b\x32+.google.cloud.baremetalsolution.v2.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8c\x01\n\x15UpdateInstanceRequest\x12\x42\n\x08instance\x18\x01 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.InstanceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"v\n\x15RenameInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x1c\n\x0fnew_instance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"W\n\x14ResetInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"W\n\x14StartInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"\x17\n\x15StartInstanceResponse\"V\n\x13StopInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"\x16\n\x14StopInstanceResponse\"h\n%EnableInteractiveSerialConsoleRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"(\n&EnableInteractiveSerialConsoleResponse\"i\n&DisableInteractiveSerialConsoleRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\")\n\'DisableInteractiveSerialConsoleResponse\"\xa7\x01\n\x10\x44\x65tachLunRequest\x12\x43\n\x08instance\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x39\n\x03lun\x18\x02 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/Lun\x12\x13\n\x0bskip_reboot\x18\x03 \x01(\x08\"\xac\x04\n\x15ServerNetworkTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12!\n\x19\x61pplicable_instance_types\x18\x02 \x03(\t\x12\x65\n\x12logical_interfaces\x18\x03 \x03(\x0b\x32I.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface\x1a\xdd\x01\n\x10LogicalInterface\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x65\n\x04type\x18\x02 \x01(\x0e\x32W.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType\x12\x10\n\x08required\x18\x03 \x01(\x08\"B\n\rInterfaceType\x12\x1e\n\x1aINTERFACE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OND\x10\x01\x12\x07\n\x03NIC\x10\x02:\x95\x01\xea\x41\x91\x01\n6baremetalsolution.googleapis.com/ServerNetworkTemplate\x12Wprojects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}B\xfc\x01\n%com.google.cloud.baremetalsolution.v2B\rInstanceProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Instance").msgclass - Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Instance.State").enummodule - GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetInstanceRequest").msgclass - ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListInstancesRequest").msgclass - ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListInstancesResponse").msgclass - UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateInstanceRequest").msgclass - RenameInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameInstanceRequest").msgclass - ResetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResetInstanceRequest").msgclass - StartInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StartInstanceRequest").msgclass - StartInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StartInstanceResponse").msgclass - StopInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StopInstanceRequest").msgclass - StopInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StopInstanceResponse").msgclass - EnableInteractiveSerialConsoleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest").msgclass - EnableInteractiveSerialConsoleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleResponse").msgclass - DisableInteractiveSerialConsoleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest").msgclass - DisableInteractiveSerialConsoleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleResponse").msgclass - DetachLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DetachLunRequest").msgclass - ServerNetworkTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate").msgclass - ServerNetworkTemplate::LogicalInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface").msgclass - ServerNetworkTemplate::LogicalInterface::InterfaceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb deleted file mode 100644 index 36f0a6678470..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/lun.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/baremetalsolution/v2/lun.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdd\x06\n\x03Lun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\n \x01(\t\x12;\n\x05state\x18\x02 \x01(\x0e\x32,.google.cloud.baremetalsolution.v2.Lun.State\x12\x0f\n\x07size_gb\x18\x03 \x01(\x03\x12T\n\x12multiprotocol_type\x18\x04 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType\x12\x44\n\x0estorage_volume\x18\x05 \x01(\tB,\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tshareable\x18\x06 \x01(\x08\x12\x10\n\x08\x62oot_lun\x18\x07 \x01(\x08\x12H\n\x0cstorage_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.Lun.StorageType\x12\x0c\n\x04wwid\x18\t \x01(\t\x12\x34\n\x0b\x65xpire_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x0c \x03(\tB1\xe0\x41\x03\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0c\n\x08UPDATING\x10\x02\x12\t\n\x05READY\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0c\n\x08\x43OOL_OFF\x10\x05\"B\n\x11MultiprotocolType\x12\"\n\x1eMULTIPROTOCOL_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05LINUX\x10\x01\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02:n\xea\x41k\n$baremetalsolution.googleapis.com/Lun\x12\x43projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}\"K\n\rGetLunRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/Lun\"y\n\x0fListLunsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"v\n\x10ListLunsResponse\x12\x34\n\x04luns\x18\x01 \x03(\x0b\x32&.google.cloud.baremetalsolution.v2.Lun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x0f\x45victLunRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/LunB\xf7\x01\n%com.google.cloud.baremetalsolution.v2B\x08LunProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - Lun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun").msgclass - Lun::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.State").enummodule - Lun::MultiprotocolType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.MultiprotocolType").enummodule - Lun::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.StorageType").enummodule - GetLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetLunRequest").msgclass - ListLunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListLunsRequest").msgclass - ListLunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListLunsResponse").msgclass - EvictLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EvictLunRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb deleted file mode 100644 index 309def4c477c..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/network.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n/google/cloud/baremetalsolution/v2/network.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa8\x07\n\x07Network\x12\x11\n\x04name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\n \x01(\t\x12=\n\x04type\x18\x02 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Network.Type\x12\x12\n\nip_address\x18\x03 \x01(\t\x12\x13\n\x0bmac_address\x18\x04 \x03(\t\x12?\n\x05state\x18\x06 \x01(\x0e\x32\x30.google.cloud.baremetalsolution.v2.Network.State\x12\x0f\n\x07vlan_id\x18\x07 \x01(\t\x12\x0c\n\x04\x63idr\x18\x08 \x01(\t\x12\x33\n\x03vrf\x18\t \x01(\x0b\x32&.google.cloud.baremetalsolution.v2.VRF\x12\x46\n\x06labels\x18\x0b \x03(\x0b\x32\x36.google.cloud.baremetalsolution.v2.Network.LabelsEntry\x12\x15\n\rservices_cidr\x18\x0c \x01(\t\x12R\n\x0creservations\x18\r \x03(\x0b\x32<.google.cloud.baremetalsolution.v2.NetworkAddressReservation\x12\x10\n\x03pod\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12O\n\x0cmount_points\x18\x0f \x03(\x0b\x32\x34.google.cloud.baremetalsolution.v2.NetworkMountPointB\x03\xe0\x41\x04\x12\x1c\n\x14jumbo_frames_enabled\x18\x10 \x01(\x08\x12\x17\n\ngateway_ip\x18\x11 \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\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\"c\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0f\n\x0bPROVISIONED\x10\x02\x12\x12\n\x0e\x44\x45PROVISIONING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04:i\xea\x41\x66\n(baremetalsolution.googleapis.com/Network\x12:projects/{project}/locations/{location}/networks/{network}\"U\n\x19NetworkAddressReservation\x12\x15\n\rstart_address\x18\x01 \x01(\t\x12\x13\n\x0b\x65nd_address\x18\x02 \x01(\t\x12\x0c\n\x04note\x18\x03 \x01(\t\"\xe5\x04\n\x03VRF\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x05state\x18\x05 \x01(\x0e\x32,.google.cloud.baremetalsolution.v2.VRF.State\x12\x44\n\nqos_policy\x18\x06 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.VRF.QosPolicy\x12O\n\x10vlan_attachments\x18\x07 \x03(\x0b\x32\x35.google.cloud.baremetalsolution.v2.VRF.VlanAttachment\x1a#\n\tQosPolicy\x12\x16\n\x0e\x62\x61ndwidth_gbps\x18\x01 \x01(\x01\x1a\x93\x02\n\x0eVlanAttachment\x12\x14\n\x0cpeer_vlan_id\x18\x01 \x01(\x03\x12\x0f\n\x07peer_ip\x18\x02 \x01(\t\x12\x11\n\trouter_ip\x18\x03 \x01(\t\x12\x18\n\x0bpairing_key\x18\x04 \x01(\tB\x03\xe0\x41\x04\x12\x44\n\nqos_policy\x18\x05 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.VRF.QosPolicy\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x05\x12V\n\x17interconnect_attachment\x18\x07 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-compute.googleapis.com/InterconnectAttachment\"A\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0f\n\x0bPROVISIONED\x10\x02\"\xdb\x02\n\x10LogicalInterface\x12o\n\x1alogical_network_interfaces\x18\x01 \x03(\x0b\x32K.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1b\n\x0finterface_index\x18\x03 \x01(\x05\x42\x02\x18\x01\x1a\xaa\x01\n\x17LogicalNetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nip_address\x18\x02 \x01(\t\x12\x17\n\x0f\x64\x65\x66\x61ult_gateway\x18\x03 \x01(\x08\x12\x45\n\x0cnetwork_type\x18\x04 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Network.Type\x12\n\n\x02id\x18\x05 \x01(\t\"S\n\x11GetNetworkRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(baremetalsolution.googleapis.com/Network\"\x87\x01\n\x13ListNetworksRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x82\x01\n\x14ListNetworksResponse\x12<\n\x08networks\x18\x01 \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.Network\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x89\x01\n\x14UpdateNetworkRequest\x12@\n\x07network\x18\x01 \x01(\x0b\x32*.google.cloud.baremetalsolution.v2.NetworkB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"]\n\x0cNetworkUsage\x12;\n\x07network\x18\x01 \x01(\x0b\x32*.google.cloud.baremetalsolution.v2.Network\x12\x10\n\x08used_ips\x18\x02 \x03(\t\"V\n\x17ListNetworkUsageRequest\x12;\n\x08location\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"]\n\x18ListNetworkUsageResponse\x12\x41\n\x08networks\x18\x01 \x03(\x0b\x32/.google.cloud.baremetalsolution.v2.NetworkUsage\"\x9d\x01\n\x11NetworkMountPoint\x12@\n\x08instance\x18\x01 \x01(\tB.\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x19\n\x11logical_interface\x18\x02 \x01(\t\x12\x17\n\x0f\x64\x65\x66\x61ult_gateway\x18\x03 \x01(\x08\x12\x12\n\nip_address\x18\x04 \x01(\t\"s\n\x14RenameNetworkRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(baremetalsolution.googleapis.com/Network\x12\x1b\n\x0enew_network_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x85\x03\n%com.google.cloud.baremetalsolution.v2B\x0cNetworkProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2\xea\x41\x86\x01\n-compute.googleapis.com/InterconnectAttachment\x12Uprojects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network").msgclass - Network::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network.Type").enummodule - Network::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network.State").enummodule - NetworkAddressReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkAddressReservation").msgclass - VRF = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF").msgclass - VRF::QosPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.QosPolicy").msgclass - VRF::VlanAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.VlanAttachment").msgclass - VRF::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.State").enummodule - LogicalInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.LogicalInterface").msgclass - LogicalInterface::LogicalNetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface").msgclass - GetNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetNetworkRequest").msgclass - ListNetworksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworksRequest").msgclass - ListNetworksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworksResponse").msgclass - UpdateNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateNetworkRequest").msgclass - NetworkUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkUsage").msgclass - ListNetworkUsageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworkUsageRequest").msgclass - ListNetworkUsageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworkUsageResponse").msgclass - NetworkMountPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkMountPoint").msgclass - RenameNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameNetworkRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb deleted file mode 100644 index 2039cd5c0463..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/nfs_share.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n1google/cloud/baremetalsolution/v2/nfs_share.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x9d\t\n\x08NfsShare\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0cnfs_share_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x03 \x01(\x0e\x32\x31.google.cloud.baremetalsolution.v2.NfsShare.StateB\x03\xe0\x41\x03\x12?\n\x06volume\x18\x04 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12R\n\x0f\x61llowed_clients\x18\x05 \x03(\x0b\x32\x39.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient\x12G\n\x06labels\x18\x06 \x03(\x0b\x32\x37.google.cloud.baremetalsolution.v2.NfsShare.LabelsEntry\x12\x1a\n\x12requested_size_gib\x18\x07 \x01(\x03\x12R\n\x0cstorage_type\x18\t \x01(\x0e\x32\x37.google.cloud.baremetalsolution.v2.NfsShare.StorageTypeB\x03\xe0\x41\x05\x1a\xb3\x02\n\rAllowedClient\x12>\n\x07network\x18\x01 \x01(\tB-\xfa\x41*\n(baremetalsolution.googleapis.com/Network\x12\x15\n\x08share_ip\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x14\x61llowed_clients_cidr\x18\x03 \x01(\t\x12W\n\x11mount_permissions\x18\x04 \x01(\x0e\x32<.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions\x12\x11\n\tallow_dev\x18\x05 \x01(\x08\x12\x12\n\nallow_suid\x18\x06 \x01(\x08\x12\x16\n\x0eno_root_squash\x18\x07 \x01(\x08\x12\x15\n\x08nfs_path\x18\x08 \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\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPROVISIONED\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"O\n\x10MountPermissions\x12!\n\x1dMOUNT_PERMISSIONS_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x0e\n\nREAD_WRITE\x10\x02\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02:m\xea\x41j\n)baremetalsolution.googleapis.com/NFSShare\x12=projects/{project}/locations/{location}/nfsShares/{nfs_share}\"U\n\x12GetNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShare\"\x88\x01\n\x14ListNfsSharesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x86\x01\n\x15ListNfsSharesResponse\x12?\n\nnfs_shares\x18\x01 \x03(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShare\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8d\x01\n\x15UpdateNfsShareRequest\x12\x43\n\tnfs_share\x18\x01 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShareB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"v\n\x15RenameNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShare\x12\x1c\n\x0fnew_nfsshare_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x97\x01\n\x15\x43reateNfsShareRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\tnfs_share\x18\x02 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShareB\x03\xe0\x41\x02\"X\n\x15\x44\x65leteNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShareB\xfc\x01\n%com.google.cloud.baremetalsolution.v2B\rNfsShareProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - NfsShare = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare").msgclass - NfsShare::AllowedClient = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.AllowedClient").msgclass - NfsShare::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.State").enummodule - NfsShare::MountPermissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.MountPermissions").enummodule - NfsShare::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.StorageType").enummodule - GetNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetNfsShareRequest").msgclass - ListNfsSharesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNfsSharesRequest").msgclass - ListNfsSharesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNfsSharesResponse").msgclass - UpdateNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateNfsShareRequest").msgclass - RenameNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameNfsShareRequest").msgclass - CreateNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateNfsShareRequest").msgclass - DeleteNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteNfsShareRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb deleted file mode 100644 index 2d966313407d..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/osimage.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n/google/cloud/baremetalsolution/v2/osimage.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x86\x02\n\x07OSImage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12!\n\x19\x61pplicable_instance_types\x18\x04 \x03(\t\x12#\n\x1bsupported_network_templates\x18\x05 \x03(\t:}\xea\x41z\n(baremetalsolution.googleapis.com/OsImage\x12;projects/{project}/locations/{location}/osImages/{os_image}*\x08osImages2\x07osImage\"w\n\x13ListOSImagesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n\x14ListOSImagesResponse\x12=\n\tos_images\x18\x01 \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.OSImage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xfb\x01\n%com.google.cloud.baremetalsolution.v2B\x0cOsImageProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - OSImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.OSImage").msgclass - ListOSImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListOSImagesRequest").msgclass - ListOSImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListOSImagesResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb deleted file mode 100644 index 9167b7547176..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/provisioning.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/baremetalsolution/v2/common_pb' -require 'google/cloud/baremetalsolution/v2/network_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/baremetalsolution/v2/provisioning.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\x06\n\x12ProvisioningConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x02 \x03(\x0b\x32\x31.google.cloud.baremetalsolution.v2.InstanceConfig\x12\x42\n\x08networks\x18\x03 \x03(\x0b\x32\x30.google.cloud.baremetalsolution.v2.NetworkConfig\x12@\n\x07volumes\x18\x04 \x03(\x0b\x32/.google.cloud.baremetalsolution.v2.VolumeConfig\x12\x11\n\tticket_id\x18\x05 \x01(\t\x12 \n\x18handover_service_account\x18\x06 \x01(\t\x12\x11\n\x05\x65mail\x18\x07 \x01(\tB\x02\x18\x01\x12O\n\x05state\x18\x08 \x01(\x0e\x32;.google.cloud.baremetalsolution.v2.ProvisioningConfig.StateB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11\x63loud_console_uri\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x0evpc_sc_enabled\x18\x0c \x01(\x08\x12\x16\n\x0estatus_message\x18\r \x01(\t\x12\x16\n\tcustom_id\x18\x0e \x01(\tB\x03\xe0\x41\x01\"\x85\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\r\n\tSUBMITTED\x10\x02\x12\x10\n\x0cPROVISIONING\x10\x03\x12\x0f\n\x0bPROVISIONED\x10\x04\x12\r\n\tVALIDATED\x10\x05\x12\r\n\tCANCELLED\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07:\x8c\x01\xea\x41\x88\x01\n3baremetalsolution.googleapis.com/ProvisioningConfig\x12Qprojects/{project}/locations/{location}/provisioningConfigs/{provisioning_config}\"\xc9\x01\n\x1fSubmitProvisioningConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12W\n\x13provisioning_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\"v\n SubmitProvisioningConfigResponse\x12R\n\x13provisioning_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"\xe7\x04\n\x11ProvisioningQuota\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12R\n\nasset_type\x18\x02 \x01(\x0e\x32>.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType\x12\x13\n\x0bgcp_service\x18\x03 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x17\n\x0f\x61vailable_count\x18\x05 \x01(\x05\x12J\n\x0einstance_quota\x18\x06 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.InstanceQuotaH\x00\x12\x16\n\x0cserver_count\x18\x07 \x01(\x03H\x01\x12\x1b\n\x11network_bandwidth\x18\x08 \x01(\x03H\x01\x12\x15\n\x0bstorage_gib\x18\t \x01(\x03H\x01\"n\n\tAssetType\x12\x1a\n\x16\x41SSET_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41SSET_TYPE_SERVER\x10\x01\x12\x16\n\x12\x41SSET_TYPE_STORAGE\x10\x02\x12\x16\n\x12\x41SSET_TYPE_NETWORK\x10\x03:\x89\x01\xea\x41\x85\x01\n2baremetalsolution.googleapis.com/ProvisioningQuota\x12Oprojects/{project}/locations/{location}/provisioningQuotas/{provisioning_quota}B\x07\n\x05quotaB\x0e\n\x0c\x61vailability\"\x81\x01\n\x1dListProvisioningQuotasRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8c\x01\n\x1eListProvisioningQuotasResponse\x12Q\n\x13provisioning_quotas\x18\x01 \x03(\x0b\x32\x34.google.cloud.baremetalsolution.v2.ProvisioningQuota\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe3\x06\n\x0eInstanceConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x15\n\rinstance_type\x18\x03 \x01(\t\x12\x16\n\x0ehyperthreading\x18\x04 \x01(\x08\x12\x10\n\x08os_image\x18\x05 \x01(\t\x12\\\n\x0e\x63lient_network\x18\x06 \x01(\x0b\x32@.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressB\x02\x18\x01\x12]\n\x0fprivate_network\x18\x07 \x01(\x0b\x32@.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressB\x02\x18\x01\x12\x11\n\tuser_note\x18\x08 \x01(\t\x12 \n\x18\x61\x63\x63ount_networks_enabled\x18\t \x01(\x08\x12W\n\x0enetwork_config\x18\n \x01(\x0e\x32?.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig\x12\x18\n\x10network_template\x18\x0b \x01(\t\x12O\n\x12logical_interfaces\x18\x0c \x03(\x0b\x32\x33.google.cloud.baremetalsolution.v2.LogicalInterface\x12\x15\n\rssh_key_names\x18\r \x03(\t\x1aR\n\x0eNetworkAddress\x12\x12\n\nnetwork_id\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x1b\n\x13\x65xisting_network_id\x18\x03 \x01(\t\"O\n\rNetworkConfig\x12\x1d\n\x19NETWORKCONFIG_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSINGLE_VLAN\x10\x01\x12\x0e\n\nMULTI_VLAN\x10\x02:\x7f\xea\x41|\n/baremetalsolution.googleapis.com/InstanceConfig\x12Iprojects/{project}/locations/{location}/instanceConfigs/{instance_config}\"\xf6\x08\n\x0cVolumeConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x19\n\x11snapshots_enabled\x18\x03 \x01(\x08\x12\x42\n\x04type\x18\x04 \x01(\x0e\x32\x34.google.cloud.baremetalsolution.v2.VolumeConfig.Type\x12J\n\x08protocol\x18\x05 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol\x12\x0f\n\x07size_gb\x18\x06 \x01(\x05\x12L\n\nlun_ranges\x18\x07 \x03(\x0b\x32\x38.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange\x12\x13\n\x0bmachine_ids\x18\x08 \x03(\t\x12N\n\x0bnfs_exports\x18\t \x03(\x0b\x32\x39.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport\x12\x11\n\tuser_note\x18\n \x01(\t\x12\x13\n\x0bgcp_service\x18\x0b \x01(\t\x12R\n\x10performance_tier\x18\x0c \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumePerformanceTier\x1a-\n\x08LunRange\x12\x10\n\x08quantity\x18\x01 \x01(\x05\x12\x0f\n\x07size_gb\x18\x02 \x01(\x05\x1a\xb5\x02\n\tNfsExport\x12\x12\n\nnetwork_id\x18\x01 \x01(\t\x12\x14\n\nmachine_id\x18\x02 \x01(\tH\x00\x12\x0e\n\x04\x63idr\x18\x03 \x01(\tH\x00\x12Z\n\x0bpermissions\x18\x04 \x01(\x0e\x32\x45.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions\x12\x16\n\x0eno_root_squash\x18\x05 \x01(\x08\x12\x12\n\nallow_suid\x18\x06 \x01(\x08\x12\x11\n\tallow_dev\x18\x07 \x01(\x08\"I\n\x0bPermissions\x12\x1b\n\x17PERMISSIONS_UNSPECIFIED\x10\x00\x12\r\n\tREAD_ONLY\x10\x01\x12\x0e\n\nREAD_WRITE\x10\x02\x42\x08\n\x06\x63lient\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x46LASH\x10\x01\x12\x08\n\x04\x44ISK\x10\x02\"G\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPROTOCOL_FC\x10\x01\x12\x10\n\x0cPROTOCOL_NFS\x10\x02:y\xea\x41v\n-baremetalsolution.googleapis.com/VolumeConfig\x12\x45projects/{project}/locations/{location}/volumeConfigs/{volume_config}\"\x9b\x07\n\rNetworkConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x43\n\x04type\x18\x03 \x01(\x0e\x32\x35.google.cloud.baremetalsolution.v2.NetworkConfig.Type\x12M\n\tbandwidth\x18\x04 \x01(\x0e\x32:.google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth\x12_\n\x10vlan_attachments\x18\x05 \x03(\x0b\x32\x45.google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment\x12\x0c\n\x04\x63idr\x18\x06 \x01(\t\x12R\n\x0cservice_cidr\x18\x07 \x01(\x0e\x32<.google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr\x12\x11\n\tuser_note\x18\x08 \x01(\t\x12\x13\n\x0bgcp_service\x18\t \x01(\t\x12\x19\n\x11vlan_same_project\x18\n \x01(\x08\x12\x1c\n\x14jumbo_frames_enabled\x18\x0b \x01(\x08\x1a\x37\n\x14IntakeVlanAttachment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0bpairing_key\x18\x02 \x01(\t\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\"c\n\tBandwidth\x12\x19\n\x15\x42\x41NDWIDTH_UNSPECIFIED\x10\x00\x12\r\n\tBW_1_GBPS\x10\x01\x12\r\n\tBW_2_GBPS\x10\x02\x12\r\n\tBW_5_GBPS\x10\x03\x12\x0e\n\nBW_10_GBPS\x10\x04\"`\n\x0bServiceCidr\x12\x1c\n\x18SERVICE_CIDR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07HIGH_26\x10\x02\x12\x0b\n\x07HIGH_27\x10\x03\x12\x0b\n\x07HIGH_28\x10\x04:|\xea\x41y\n.baremetalsolution.googleapis.com/NetworkConfig\x12Gprojects/{project}/locations/{location}/networkConfigs/{network_config}\"\x83\x02\n\rInstanceQuota\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\rinstance_type\x18\x02 \x01(\tB\x02\x18\x01\x12\x13\n\x0bgcp_service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\x12\x1f\n\x17\x61vailable_machine_count\x18\x04 \x01(\x05:|\xea\x41y\n.baremetalsolution.googleapis.com/InstanceQuota\x12Gprojects/{project}/locations/{location}/instanceQuotas/{instance_quota}\"i\n\x1cGetProvisioningConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3baremetalsolution.googleapis.com/ProvisioningConfig\"\xc9\x01\n\x1f\x43reateProvisioningConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12W\n\x13provisioning_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x1fUpdateProvisioningConfigRequest\x12W\n\x13provisioning_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x80\x02\n%com.google.cloud.baremetalsolution.v2B\x11ProvisioningProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - ProvisioningConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningConfig").msgclass - ProvisioningConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningConfig.State").enummodule - SubmitProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest").msgclass - SubmitProvisioningConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse").msgclass - ProvisioningQuota = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningQuota").msgclass - ProvisioningQuota::AssetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType").enummodule - ListProvisioningQuotasRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest").msgclass - ListProvisioningQuotasResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse").msgclass - InstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig").msgclass - InstanceConfig::NetworkAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress").msgclass - InstanceConfig::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig").enummodule - VolumeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig").msgclass - VolumeConfig::LunRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.LunRange").msgclass - VolumeConfig::NfsExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport").msgclass - VolumeConfig::NfsExport::Permissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions").enummodule - VolumeConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.Type").enummodule - VolumeConfig::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.Protocol").enummodule - NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig").msgclass - NetworkConfig::IntakeVlanAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment").msgclass - NetworkConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.Type").enummodule - NetworkConfig::Bandwidth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth").enummodule - NetworkConfig::ServiceCidr = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr").enummodule - InstanceQuota = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceQuota").msgclass - GetProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest").msgclass - CreateProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest").msgclass - UpdateProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb deleted file mode 100644 index 47a5792e89d8..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/ssh_key.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n/google/cloud/baremetalsolution/v2/ssh_key.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x01\n\x06SSHKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\npublic_key\x18\x02 \x01(\t:g\xea\x41\x64\n\'baremetalsolution.googleapis.com/SshKey\x12\x39projects/{project}/locations/{location}/sshKeys/{ssh_key}\"v\n\x12ListSSHKeysRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x13ListSSHKeysResponse\x12;\n\x08ssh_keys\x18\x01 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.SSHKey\x12\x17\n\x0fnext_page_token\x18Z \x01(\t\"\xaa\x01\n\x13\x43reateSSHKeyRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12?\n\x07ssh_key\x18\x02 \x01(\x0b\x32).google.cloud.baremetalsolution.v2.SSHKeyB\x03\xe0\x41\x02\x12\x17\n\nssh_key_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"T\n\x13\x44\x65leteSSHKeyRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/SshKeyB\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0bSshKeyProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - SSHKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SSHKey").msgclass - ListSSHKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListSSHKeysRequest").msgclass - ListSSHKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListSSHKeysResponse").msgclass - CreateSSHKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateSSHKeyRequest").msgclass - DeleteSSHKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb deleted file mode 100644 index 1456dbe6e009..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/volume.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/baremetalsolution/v2/common_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/baremetalsolution/v2/volume.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xec\x0e\n\x06Volume\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x0b \x01(\t\x12K\n\x0cstorage_type\x18\x02 \x01(\x0e\x32\x35.google.cloud.baremetalsolution.v2.Volume.StorageType\x12>\n\x05state\x18\x03 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Volume.State\x12\x1a\n\x12requested_size_gib\x18\x04 \x01(\x03\x12%\n\x1doriginally_requested_size_gib\x18\x10 \x01(\x03\x12\x18\n\x10\x63urrent_size_gib\x18\x05 \x01(\x03\x12\x1a\n\x12\x65mergency_size_gib\x18\x0e \x01(\x03\x12\x14\n\x0cmax_size_gib\x18\x11 \x01(\x03\x12\x1b\n\x13\x61uto_grown_size_gib\x18\x06 \x01(\x03\x12\x1b\n\x13remaining_space_gib\x18\x07 \x01(\x03\x12h\n\x1bsnapshot_reservation_detail\x18\x08 \x01(\x0b\x32\x43.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail\x12k\n\x1dsnapshot_auto_delete_behavior\x18\t \x01(\x0e\x32\x44.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior\x12\x45\n\x06labels\x18\x0c \x03(\x0b\x32\x35.google.cloud.baremetalsolution.v2.Volume.LabelsEntry\x12\x18\n\x10snapshot_enabled\x18\r \x01(\x08\x12\x10\n\x03pod\x18\x0f \x01(\tB\x03\xe0\x41\x05\x12I\n\x08protocol\x18\x12 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.Volume.ProtocolB\x03\xe0\x41\x03\x12\x18\n\x0b\x62oot_volume\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x10performance_tier\x18\x14 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumePerformanceTierB\x03\xe0\x41\x05\x12\x12\n\x05notes\x18\x15 \x01(\tB\x03\xe0\x41\x04\x12S\n\x10workload_profile\x18\x16 \x01(\x0e\x32\x39.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile\x12\x34\n\x0b\x65xpire_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x19 \x03(\tB1\xe0\x41\x03\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x15\n\x08\x61ttached\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x1a\xa2\x01\n\x19SnapshotReservationDetail\x12\x1a\n\x12reserved_space_gib\x18\x01 \x01(\x03\x12#\n\x1breserved_space_used_percent\x18\x02 \x01(\x05\x12$\n\x1creserved_space_remaining_gib\x18\x03 \x01(\x03\x12\x1e\n\x16reserved_space_percent\x18\x04 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08\x43OOL_OFF\x10\x05\"}\n\x1aSnapshotAutoDeleteBehavior\x12-\n)SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x10\n\x0cOLDEST_FIRST\x10\x02\x12\x10\n\x0cNEWEST_FIRST\x10\x03\"@\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x11\n\rFIBRE_CHANNEL\x10\x01\x12\x07\n\x03NFS\x10\x02\"J\n\x0fWorkloadProfile\x12 \n\x1cWORKLOAD_PROFILE_UNSPECIFIED\x10\x00\x12\x0b\n\x07GENERIC\x10\x01\x12\x08\n\x04HANA\x10\x02:f\xea\x41\x63\n\'baremetalsolution.googleapis.com/Volume\x12\x38projects/{project}/locations/{location}/volumes/{volume}\"Q\n\x10GetVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\"\x86\x01\n\x12ListVolumesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x7f\n\x13ListVolumesResponse\x12:\n\x07volumes\x18\x01 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.Volume\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x86\x01\n\x13UpdateVolumeRequest\x12>\n\x06volume\x18\x01 \x01(\x0b\x32).google.cloud.baremetalsolution.v2.VolumeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"p\n\x13RenameVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x1a\n\rnew_volume_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"S\n\x12\x45victVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\"h\n\x13ResizeVolumeRequest\x12?\n\x06volume\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x10\n\x08size_gib\x18\x02 \x01(\x03\x42\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0bVolumeProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume").msgclass - Volume::SnapshotReservationDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail").msgclass - Volume::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.StorageType").enummodule - Volume::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.State").enummodule - Volume::SnapshotAutoDeleteBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior").enummodule - Volume::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.Protocol").enummodule - Volume::WorkloadProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.WorkloadProfile").enummodule - GetVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetVolumeRequest").msgclass - ListVolumesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumesRequest").msgclass - ListVolumesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumesResponse").msgclass - UpdateVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateVolumeRequest").msgclass - RenameVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameVolumeRequest").msgclass - EvictVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EvictVolumeRequest").msgclass - ResizeVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResizeVolumeRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb deleted file mode 100644 index 6dfa4dbe4766..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/volume_snapshot.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n7google/cloud/baremetalsolution/v2/volume_snapshot.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe7\x03\n\x0eVolumeSnapshot\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x0estorage_volume\x18\x05 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12Q\n\x04type\x18\x07 \x01(\x0e\x32>.google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotTypeB\x03\xe0\x41\x03\"H\n\x0cSnapshotType\x12\x1d\n\x19SNAPSHOT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x44_HOC\x10\x01\x12\r\n\tSCHEDULED\x10\x02:\x84\x01\xea\x41\x80\x01\n/baremetalsolution.googleapis.com/VolumeSnapshot\x12Mprojects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}\"a\n\x18GetVolumeSnapshotRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshot\"\x84\x01\n\x1aListVolumeSnapshotsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x98\x01\n\x1bListVolumeSnapshotsResponse\x12K\n\x10volume_snapshots\x18\x01 \x03(\x0b\x32\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x1b\x44\x65leteVolumeSnapshotRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshot\"\xaf\x01\n\x1b\x43reateVolumeSnapshotRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12O\n\x0fvolume_snapshot\x18\x02 \x01(\x0b\x32\x31.google.cloud.baremetalsolution.v2.VolumeSnapshotB\x03\xe0\x41\x02\"p\n\x1cRestoreVolumeSnapshotRequest\x12P\n\x0fvolume_snapshot\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshotB\x82\x02\n%com.google.cloud.baremetalsolution.v2B\x13VolumeSnapshotProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - VolumeSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeSnapshot").msgclass - VolumeSnapshot::SnapshotType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType").enummodule - GetVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest").msgclass - ListVolumeSnapshotsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest").msgclass - ListVolumeSnapshotsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse").msgclass - DeleteVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest").msgclass - CreateVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest").msgclass - RestoreVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md deleted file mode 100644 index 60e71df2a508..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Bare Metal Solution 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-bare_metal_solution-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb deleted file mode 100644 index 78d8f06ad169..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.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! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # Represents the metadata from a long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!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 action 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 requested the cancellation - # of the operation. Operations that have been successfully 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 with the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message from resetting a server. - class ResetInstanceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb deleted file mode 100644 index 0213f58e1483..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.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 BareMetalSolution - module V2 - # Performance tier of the Volume. - module VolumePerformanceTier - # Value is not specified. - VOLUME_PERFORMANCE_TIER_UNSPECIFIED = 0 - - # Regular volumes, shared aggregates. - VOLUME_PERFORMANCE_TIER_SHARED = 1 - - # Assigned aggregates. - VOLUME_PERFORMANCE_TIER_ASSIGNED = 2 - - # High throughput aggregates. - VOLUME_PERFORMANCE_TIER_HT = 3 - end - - # The possible values for a workload profile. - module WorkloadProfile - # The workload profile is in an unknown state. - WORKLOAD_PROFILE_UNSPECIFIED = 0 - - # The workload profile is generic. - WORKLOAD_PROFILE_GENERIC = 1 - - # The workload profile is hana. - WORKLOAD_PROFILE_HANA = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb deleted file mode 100644 index 71f94868fea9..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb +++ /dev/null @@ -1,354 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A server. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name of this `Instance`. - # Resource names are schemeless URIs that follow the conventions in - # https://cloud.google.com/apis/design/resource_names. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [r] id - # @return [::String] - # Output only. An identifier for the `Instance`, generated by the backend. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create a time stamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update a time stamp. - # @!attribute [rw] machine_type - # @return [::String] - # Immutable. The server type. - # [Available server - # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - # @!attribute [r] state - # @return [::Google::Cloud::BareMetalSolution::V2::Instance::State] - # Output only. The state of the server. - # @!attribute [rw] hyperthreading_enabled - # @return [::Boolean] - # True if you enable hyperthreading for the server, otherwise false. - # The default value is false. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] luns - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Lun>] - # Immutable. List of LUNs associated with this server. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Volume>] - # Input only. List of Volumes to attach to this Instance on creation. - # This field won't be populated in Get/List responses. - # @!attribute [r] networks - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Network>] - # Output only. List of networks associated with this server. - # @!attribute [r] interactive_serial_console_enabled - # @return [::Boolean] - # Output only. True if the interactive serial console feature is enabled for - # the instance, false otherwise. The default value is false. - # @!attribute [rw] os_image - # @return [::String] - # The OS image currently installed on the server. - # @!attribute [rw] pod - # @return [::String] - # Immutable. Pod name. - # Pod is an independent part of infrastructure. - # Instance can be connected to the assets (networks, volumes) allocated - # in the same pod only. - # @!attribute [rw] network_template - # @return [::String] - # Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. - # Generally, the template name follows the syntax of - # "bond" or "nic". - # @!attribute [rw] logical_interfaces - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface>] - # List of logical interfaces for the instance. The number of logical - # interfaces will be the same as number of hardware bond/nic on the chosen - # network template. For the non-multivlan configurations (for eg, existing - # servers) that use existing default network template (bondaa-bondaa), both - # the Instance.networks field and the Instance.logical_interfaces fields will - # be filled to ensure backward compatibility. For the others, only - # Instance.logical_interfaces will be filled. - # @!attribute [r] login_info - # @return [::String] - # Output only. Text field about info for logging in. - # @!attribute [rw] workload_profile - # @return [::Google::Cloud::BareMetalSolution::V2::WorkloadProfile] - # The workload profile for the instance. - # @!attribute [r] firmware_version - # @return [::String] - # Output only. The firmware version for 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 - - # The possible states for this server. - module State - # The server is in an unknown state. - STATE_UNSPECIFIED = 0 - - # The server is being provisioned. - PROVISIONING = 1 - - # The server is running. - RUNNING = 2 - - # The server has been deleted. - DELETED = 3 - - # The server is being updated. - UPDATING = 4 - - # The server is starting. - STARTING = 5 - - # The server is stopping. - STOPPING = 6 - - # The server is shutdown. - SHUTDOWN = 7 - end - end - - # Message for requesting server information. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the list of servers. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListInstancesRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, the server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] filter - # @return [::String] - # List filter. - class ListInstancesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the list of servers. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Instance>] - # The list of servers. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListInstancesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to updating a server. - # @!attribute [rw] instance - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # Required. The server to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # The currently supported fields are: - # `labels` - # `hyperthreading_enabled` - # `os_image` - class UpdateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting rename of a server. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the instance. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] new_instance_id - # @return [::String] - # Required. The new `id` of the instance. - class RenameInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to reset a server. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class ResetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to start a server. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class StartInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message from starting a server. - class StartInstanceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to stop a server. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class StopInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message from stopping a server. - class StopInstanceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for enabling the interactive serial console on an instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class EnableInteractiveSerialConsoleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response of EnableInteractiveSerialConsole. - class EnableInteractiveSerialConsoleResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for disabling the interactive serial console on an instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class DisableInteractiveSerialConsoleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response of DisableInteractiveSerialConsole. - class DisableInteractiveSerialConsoleResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for detach specific LUN from an Instance. - # @!attribute [rw] instance - # @return [::String] - # Required. Name of the instance. - # @!attribute [rw] lun - # @return [::String] - # Required. Name of the Lun to detach. - # @!attribute [rw] skip_reboot - # @return [::Boolean] - # If true, performs lun unmapping without instance reboot. - class DetachLunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Network template. - # @!attribute [r] name - # @return [::String] - # Output only. Template's unique name. The full resource name follows the - # pattern: - # `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` - # Generally, the \\{server_network_template} follows the syntax of - # "bond" or "nic". - # @!attribute [rw] applicable_instance_types - # @return [::Array<::String>] - # Instance types this template is applicable to. - # @!attribute [rw] logical_interfaces - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::ServerNetworkTemplate::LogicalInterface>] - # Logical interfaces. - class ServerNetworkTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Logical interface. - # @!attribute [rw] name - # @return [::String] - # Interface name. - # This is not a globally unique identifier. - # Name is unique only inside the ServerNetworkTemplate. This is of syntax - # or - # and forms part of the network template name. - # @!attribute [rw] type - # @return [::Google::Cloud::BareMetalSolution::V2::ServerNetworkTemplate::LogicalInterface::InterfaceType] - # Interface type. - # @!attribute [rw] required - # @return [::Boolean] - # If true, interface must have network connected. - class LogicalInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Interface type. - module InterfaceType - # Unspecified value. - INTERFACE_TYPE_UNSPECIFIED = 0 - - # Bond interface type. - BOND = 1 - - # NIC interface type. - NIC = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb deleted file mode 100644 index f7a9d2d4263b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb +++ /dev/null @@ -1,161 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A storage volume logical unit number (LUN). - # @!attribute [r] name - # @return [::String] - # Output only. The name of the LUN. - # @!attribute [rw] id - # @return [::String] - # An identifier for the LUN, generated by the backend. - # @!attribute [rw] state - # @return [::Google::Cloud::BareMetalSolution::V2::Lun::State] - # The state of this storage volume. - # @!attribute [rw] size_gb - # @return [::Integer] - # The size of this LUN, in gigabytes. - # @!attribute [rw] multiprotocol_type - # @return [::Google::Cloud::BareMetalSolution::V2::Lun::MultiprotocolType] - # The LUN multiprotocol type ensures the characteristics of the LUN are - # optimized for each operating system. - # @!attribute [rw] storage_volume - # @return [::String] - # Display the storage volume for this LUN. - # @!attribute [rw] shareable - # @return [::Boolean] - # Display if this LUN can be shared between multiple physical servers. - # @!attribute [rw] boot_lun - # @return [::Boolean] - # Display if this LUN is a boot LUN. - # @!attribute [rw] storage_type - # @return [::Google::Cloud::BareMetalSolution::V2::Lun::StorageType] - # The storage type for this LUN. - # @!attribute [rw] wwid - # @return [::String] - # The WWID for this LUN. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time after which LUN will be fully deleted. - # It is filled only for LUNs in COOL_OFF state. - # @!attribute [r] instances - # @return [::Array<::String>] - # Output only. Instances this Lun is attached to. - class Lun - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible states for the LUN. - module State - # The LUN is in an unknown state. - STATE_UNSPECIFIED = 0 - - # The LUN is being created. - CREATING = 1 - - # The LUN is being updated. - UPDATING = 2 - - # The LUN is ready for use. - READY = 3 - - # The LUN has been requested to be deleted. - DELETING = 4 - - # The LUN is in cool off state. It will be deleted after `expire_time`. - COOL_OFF = 5 - end - - # Display the operating systems present for the LUN multiprotocol type. - module MultiprotocolType - # Server has no OS specified. - MULTIPROTOCOL_TYPE_UNSPECIFIED = 0 - - # Server with Linux OS. - LINUX = 1 - end - - # The storage types for a LUN. - module StorageType - # The storage type for this LUN is unknown. - STORAGE_TYPE_UNSPECIFIED = 0 - - # This storage type for this LUN is SSD. - SSD = 1 - - # This storage type for this LUN is HDD. - HDD = 2 - end - end - - # Message for requesting storage lun information. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetLunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of storage volume luns. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListLunsRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - class ListLunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the list of storage volume luns. - # @!attribute [rw] luns - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Lun>] - # The list of luns. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for skip lun cooloff and delete it. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the lun. - class EvictLunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb deleted file mode 100644 index 8448a21a3ceb..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb +++ /dev/null @@ -1,379 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A Network. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of this `Network`. - # Resource names are schemeless URIs that follow the conventions in - # https://cloud.google.com/apis/design/resource_names. - # Format: - # `projects/{project}/locations/{location}/networks/{network}` - # @!attribute [rw] id - # @return [::String] - # An identifier for the `Network`, generated by the backend. - # @!attribute [rw] type - # @return [::Google::Cloud::BareMetalSolution::V2::Network::Type] - # The type of this network. - # @!attribute [rw] ip_address - # @return [::String] - # IP address configured. - # @!attribute [rw] mac_address - # @return [::Array<::String>] - # List of physical interfaces. - # @!attribute [rw] state - # @return [::Google::Cloud::BareMetalSolution::V2::Network::State] - # The Network state. - # @!attribute [rw] vlan_id - # @return [::String] - # The vlan id of the Network. - # @!attribute [rw] cidr - # @return [::String] - # The cidr of the Network. - # @!attribute [rw] vrf - # @return [::Google::Cloud::BareMetalSolution::V2::VRF] - # The vrf for the Network. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] services_cidr - # @return [::String] - # IP range for reserved for services (e.g. NFS). - # @!attribute [rw] reservations - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkAddressReservation>] - # List of IP address reservations in this network. - # When updating this field, an error will be generated if a reservation - # conflicts with an IP address already allocated to a physical server. - # @!attribute [r] pod - # @return [::String] - # Output only. Pod name. - # @!attribute [rw] mount_points - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkMountPoint>] - # Input only. List of mount points to attach the network to. - # @!attribute [rw] jumbo_frames_enabled - # @return [::Boolean] - # Whether network uses standard frames or jumbo ones. - # @!attribute [r] gateway_ip - # @return [::String] - # Output only. Gateway ip address. - class Network - 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 - - # Network type. - module Type - # Unspecified value. - TYPE_UNSPECIFIED = 0 - - # Client network, a network peered to a Google Cloud VPC. - CLIENT = 1 - - # Private network, a network local to the Bare Metal Solution environment. - PRIVATE = 2 - end - - # The possible states for this Network. - module State - # The Network is in an unknown state. - STATE_UNSPECIFIED = 0 - - # The Network is provisioning. - PROVISIONING = 1 - - # The Network has been provisioned. - PROVISIONED = 2 - - # The Network is being deprovisioned. - DEPROVISIONING = 3 - - # The Network is being updated. - UPDATING = 4 - end - end - - # A reservation of one or more addresses in a network. - # @!attribute [rw] start_address - # @return [::String] - # The first address of this reservation block. - # Must be specified as a single IPv4 address, e.g. 10.1.2.2. - # @!attribute [rw] end_address - # @return [::String] - # The last address of this reservation block, inclusive. I.e., for cases when - # reservations are only single addresses, end_address and start_address will - # be the same. - # Must be specified as a single IPv4 address, e.g. 10.1.2.2. - # @!attribute [rw] note - # @return [::String] - # A note about this reservation, intended for human consumption. - class NetworkAddressReservation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A network VRF. - # @!attribute [rw] name - # @return [::String] - # The name of the VRF. - # @!attribute [rw] state - # @return [::Google::Cloud::BareMetalSolution::V2::VRF::State] - # The possible state of VRF. - # @!attribute [rw] qos_policy - # @return [::Google::Cloud::BareMetalSolution::V2::VRF::QosPolicy] - # The QOS policy applied to this VRF. - # The value is only meaningful when all the vlan attachments have the same - # QoS. This field should not be used for new integrations, use vlan - # attachment level qos instead. The field is left for backward-compatibility. - # @!attribute [rw] vlan_attachments - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VRF::VlanAttachment>] - # The list of VLAN attachments for the VRF. - class VRF - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # QOS policy parameters. - # @!attribute [rw] bandwidth_gbps - # @return [::Float] - # The bandwidth permitted by the QOS policy, in gbps. - class QosPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # VLAN attachment details. - # @!attribute [rw] peer_vlan_id - # @return [::Integer] - # The peer vlan ID of the attachment. - # @!attribute [rw] peer_ip - # @return [::String] - # The peer IP of the attachment. - # @!attribute [rw] router_ip - # @return [::String] - # The router IP of the attachment. - # @!attribute [rw] pairing_key - # @return [::String] - # Input only. Pairing key. - # @!attribute [rw] qos_policy - # @return [::Google::Cloud::BareMetalSolution::V2::VRF::QosPolicy] - # The QOS policy applied to this VLAN attachment. - # This value should be preferred to using qos at vrf level. - # @!attribute [rw] id - # @return [::String] - # Immutable. The identifier of the attachment within vrf. - # @!attribute [rw] interconnect_attachment - # @return [::String] - # Optional. The name of the vlan attachment within vrf. This is of the form - # projects/\\{project_number}/regions/\\{region}/interconnectAttachments/\\{interconnect_attachment} - class VlanAttachment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible states for this VRF. - module State - # The unspecified state. - STATE_UNSPECIFIED = 0 - - # The vrf is provisioning. - PROVISIONING = 1 - - # The vrf is provisioned. - PROVISIONED = 2 - end - end - - # Each logical interface represents a logical abstraction of the underlying - # physical interface (for eg. bond, nic) of the instance. Each logical - # interface can effectively map to multiple network-IP pairs and still be - # mapped to one underlying physical interface. - # @!attribute [rw] logical_network_interfaces - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface::LogicalNetworkInterface>] - # List of logical network interfaces within a logical interface. - # @!attribute [rw] name - # @return [::String] - # Interface name. This is of syntax or and - # forms part of the network template name. - # @!attribute [rw] interface_index - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # The index of the logical interface mapping to the index of the hardware - # bond or nic on the chosen network template. This field is deprecated. - class LogicalInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Each logical network interface is effectively a network and IP pair. - # @!attribute [rw] network - # @return [::String] - # Name of the network - # @!attribute [rw] ip_address - # @return [::String] - # IP address in the network - # @!attribute [rw] default_gateway - # @return [::Boolean] - # Whether this interface is the default gateway for the instance. Only - # one interface can be the default gateway for the instance. - # @!attribute [rw] network_type - # @return [::Google::Cloud::BareMetalSolution::V2::Network::Type] - # Type of network. - # @!attribute [rw] id - # @return [::String] - # An identifier for the `Network`, generated by the backend. - class LogicalNetworkInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Message for requesting network information. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetNetworkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of networks. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListNetworksRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] filter - # @return [::String] - # List filter. - class ListNetworksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the list of networks. - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Network>] - # The list of networks. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListNetworksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to updating a network. - # @!attribute [rw] network - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # Required. The network to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # The only currently supported fields are: - # `labels`, `reservations`, `vrf.vlan_attachments` - class UpdateNetworkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Network with all used IP addresses. - # @!attribute [rw] network - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # Network. - # @!attribute [rw] used_ips - # @return [::Array<::String>] - # All used IP addresses in this network. - class NetworkUsage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get networks with IPs. - # @!attribute [rw] location - # @return [::String] - # Required. Parent value (project and location). - class ListNetworkUsageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response with Networks with IPs - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkUsage>] - # Networks with IPs. - class ListNetworkUsageResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Mount point for a network. - # @!attribute [rw] instance - # @return [::String] - # Instance to attach network to. - # @!attribute [rw] logical_interface - # @return [::String] - # Logical interface to detach from. - # @!attribute [rw] default_gateway - # @return [::Boolean] - # Network should be a default gateway. - # @!attribute [rw] ip_address - # @return [::String] - # Ip address of the server. - class NetworkMountPoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting rename of a server. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the network. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @!attribute [rw] new_network_id - # @return [::String] - # Required. The new `id` of the network. - class RenameNetworkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb deleted file mode 100644 index a40034963b4f..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb +++ /dev/null @@ -1,243 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # An NFS share. - # @!attribute [rw] name - # @return [::String] - # Immutable. The name of the NFS share. - # @!attribute [r] nfs_share_id - # @return [::String] - # Output only. An identifier for the NFS share, generated by the backend. - # This field will be deprecated in the future, use `id` instead. - # @!attribute [r] id - # @return [::String] - # Output only. An identifier for the NFS share, generated by the backend. - # This is the same value as nfs_share_id and will replace it in the future. - # @!attribute [r] state - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::State] - # Output only. The state of the NFS share. - # @!attribute [r] volume - # @return [::String] - # Output only. The underlying volume of the share. Created automatically - # during provisioning. - # @!attribute [rw] allowed_clients - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NfsShare::AllowedClient>] - # List of allowed access points. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] requested_size_gib - # @return [::Integer] - # The requested size, in GiB. - # @!attribute [rw] storage_type - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::StorageType] - # Immutable. The storage type of the underlying volume. - class NfsShare - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents an 'access point' for the share. - # @!attribute [rw] network - # @return [::String] - # The network the access point sits on. - # @!attribute [r] share_ip - # @return [::String] - # Output only. The IP address of the share on this network. Assigned - # automatically during provisioning based on the network's services_cidr. - # @!attribute [rw] allowed_clients_cidr - # @return [::String] - # The subnet of IP addresses permitted to access the share. - # @!attribute [rw] mount_permissions - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::MountPermissions] - # Mount permissions. - # @!attribute [rw] allow_dev - # @return [::Boolean] - # Allow dev flag. Which controls whether to allow creation of devices. - # @!attribute [rw] allow_suid - # @return [::Boolean] - # Allow the setuid flag. - # @!attribute [rw] no_root_squash - # @return [::Boolean] - # Disable root squashing, which is a feature of NFS. - # Root squash is a special mapping of the remote superuser (root) identity - # when using identity authentication. - # @!attribute [r] nfs_path - # @return [::String] - # Output only. The path to access NFS, in format shareIP:/InstanceID - # InstanceID is the generated ID instead of customer provided name. - # example like "10.0.0.0:/g123456789-nfs001" - class AllowedClient - 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 possible states for this NFS share. - module State - # The share is in an unknown state. - STATE_UNSPECIFIED = 0 - - # The share has been provisioned. - PROVISIONED = 1 - - # The NFS Share is being created. - CREATING = 2 - - # The NFS Share is being updated. - UPDATING = 3 - - # The NFS Share has been requested to be deleted. - DELETING = 4 - end - - # The possible mount permissions. - module MountPermissions - # Permissions were not specified. - MOUNT_PERMISSIONS_UNSPECIFIED = 0 - - # NFS share can be mount with read-only permissions. - READ = 1 - - # NFS share can be mount with read-write permissions. - READ_WRITE = 2 - end - - # The storage type for a volume. - module StorageType - # The storage type for this volume is unknown. - STORAGE_TYPE_UNSPECIFIED = 0 - - # The storage type for this volume is SSD. - SSD = 1 - - # This storage type for this volume is HDD. - HDD = 2 - end - end - - # Message for requesting NFS share information. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetNfsShareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of NFS shares. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListNfsSharesRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] filter - # @return [::String] - # List filter. - class ListNfsSharesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the list of NFS shares. - # @!attribute [rw] nfs_shares - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NfsShare>] - # The list of NFS shares. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListNfsSharesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to updating an NFS share. - # @!attribute [rw] nfs_share - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # Required. The NFS share to update. - # - # The `name` field is used to identify the NFS share to update. - # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # The only currently supported fields are: - # `labels` - # `allowed_clients` - class UpdateNfsShareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting rename of a server. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the nfsshare. - # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} - # @!attribute [rw] new_nfsshare_id - # @return [::String] - # Required. The new `id` of the nfsshare. - class RenameNfsShareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating an NFS share. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent project and location. - # @!attribute [rw] nfs_share - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # Required. The NfsShare to create. - class CreateNfsShareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting an NFS share. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the NFS share to delete. - class DeleteNfsShareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb deleted file mode 100644 index b4785e50e209..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # Operation System image. - # @!attribute [r] name - # @return [::String] - # Output only. OS Image's unique name. - # @!attribute [rw] code - # @return [::String] - # OS Image code. - # @!attribute [rw] description - # @return [::String] - # OS Image description. - # @!attribute [rw] applicable_instance_types - # @return [::Array<::String>] - # Instance types this image is applicable to. - # [Available - # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - # @!attribute [rw] supported_network_templates - # @return [::Array<::String>] - # Network templates that can be used with this OS Image. - class OSImage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting all available OS images. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListProvisioningQuotasRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - class ListOSImagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting all available OS images. - # @!attribute [rw] os_images - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::OSImage>] - # The OS images available. - # @!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 ListOSImagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb deleted file mode 100644 index 423eea65f0f8..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb +++ /dev/null @@ -1,603 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A provisioning configuration. - # @!attribute [r] name - # @return [::String] - # Output only. The system-generated name of the provisioning config. This - # follows the UUID format. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::InstanceConfig>] - # Instances to be created. - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkConfig>] - # Networks to be created. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig>] - # Volumes to be created. - # @!attribute [rw] ticket_id - # @return [::String] - # A generated ticket id to track provisioning request. - # @!attribute [rw] handover_service_account - # @return [::String] - # A service account to enable customers to access instance credentials upon - # handover. - # @!attribute [rw] email - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Email provided to send a confirmation with provisioning config to. - # Deprecated in favour of email field in request messages. - # @!attribute [r] state - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig::State] - # Output only. State of ProvisioningConfig. - # @!attribute [rw] location - # @return [::String] - # Optional. Location name of this ProvisioningConfig. - # It is optional only for Intake UI transition period. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp. - # @!attribute [r] cloud_console_uri - # @return [::String] - # Output only. URI to Cloud Console UI view of this provisioning config. - # @!attribute [rw] vpc_sc_enabled - # @return [::Boolean] - # If true, VPC SC is enabled for the cluster. - # @!attribute [rw] status_message - # @return [::String] - # Optional status messages associated with the FAILED state. - # @!attribute [rw] custom_id - # @return [::String] - # Optional. The user-defined identifier of the provisioning config. - class ProvisioningConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible states for this ProvisioningConfig. - module State - # State wasn't specified. - STATE_UNSPECIFIED = 0 - - # ProvisioningConfig is a draft and can be freely modified. - DRAFT = 1 - - # ProvisioningConfig was already submitted and cannot be modified. - SUBMITTED = 2 - - # ProvisioningConfig was in the provisioning state. Initially this state - # comes from the work order table in big query when SNOW is used. Later - # this field can be set by the work order API. - PROVISIONING = 3 - - # ProvisioningConfig was provisioned, meaning the resources exist. - PROVISIONED = 4 - - # ProvisioningConfig was validated. A validation tool will be run to - # set this state. - VALIDATED = 5 - - # ProvisioningConfig was canceled. - CANCELLED = 6 - - # The request is submitted for provisioning, with error return. - FAILED = 7 - end - end - - # Request for SubmitProvisioningConfig. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @!attribute [rw] provisioning_config - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # Required. The ProvisioningConfig to create. - # @!attribute [rw] email - # @return [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - class SubmitProvisioningConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for SubmitProvisioningConfig. - # @!attribute [rw] provisioning_config - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # The submitted provisioning config. - class SubmitProvisioningConfigResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A provisioning quota for a given project. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the provisioning quota. - # @!attribute [rw] asset_type - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota::AssetType] - # The asset type of this provisioning quota. - # @!attribute [rw] gcp_service - # @return [::String] - # The gcp service of the provisioning quota. - # @!attribute [rw] location - # @return [::String] - # The specific location of the provisioining quota. - # @!attribute [rw] available_count - # @return [::Integer] - # The available count of the provisioning quota. - # @!attribute [rw] instance_quota - # @return [::Google::Cloud::BareMetalSolution::V2::InstanceQuota] - # Instance quota. - # @!attribute [rw] server_count - # @return [::Integer] - # Server count. - # - # Note: The following fields are mutually exclusive: `server_count`, `network_bandwidth`, `storage_gib`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] network_bandwidth - # @return [::Integer] - # Network bandwidth, Gbps - # - # Note: The following fields are mutually exclusive: `network_bandwidth`, `server_count`, `storage_gib`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] storage_gib - # @return [::Integer] - # Storage size (GB). - # - # Note: The following fields are mutually exclusive: `storage_gib`, `server_count`, `network_bandwidth`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ProvisioningQuota - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The available asset types for intake. - module AssetType - # The unspecified type. - ASSET_TYPE_UNSPECIFIED = 0 - - # The server asset type. - ASSET_TYPE_SERVER = 1 - - # The storage asset type. - ASSET_TYPE_STORAGE = 2 - - # The network asset type. - ASSET_TYPE_NETWORK = 3 - end - end - - # Message for requesting the list of provisioning quotas. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListProvisioningQuotasRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - class ListProvisioningQuotasRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the list of provisioning quotas. - # @!attribute [rw] provisioning_quotas - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] - # The provisioning quotas registered in this project. - # @!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 ListProvisioningQuotasResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration parameters for a new instance. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the instance config. - # @!attribute [rw] id - # @return [::String] - # A transient unique identifier to idenfity an instance within an - # ProvisioningConfig request. - # @!attribute [rw] instance_type - # @return [::String] - # Instance type. - # [Available - # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - # @!attribute [rw] hyperthreading - # @return [::Boolean] - # Whether the instance should be provisioned with Hyperthreading enabled. - # @!attribute [rw] os_image - # @return [::String] - # OS image to initialize the instance. - # [Available - # images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - # @!attribute [rw] client_network - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkAddress] - # Client network address. Filled if InstanceConfig.multivlan_config is false. - # @!attribute [rw] private_network - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkAddress] - # Private network address, if any. Filled if InstanceConfig.multivlan_config - # is false. - # @!attribute [rw] user_note - # @return [::String] - # User note field, it can be used by customers to add additional information - # for the BMS Ops team . - # @!attribute [rw] account_networks_enabled - # @return [::Boolean] - # If true networks can be from different projects of the same vendor account. - # @!attribute [rw] network_config - # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkConfig] - # The type of network configuration on the instance. - # @!attribute [rw] network_template - # @return [::String] - # Server network template name. Filled if InstanceConfig.multivlan_config is - # true. - # @!attribute [rw] logical_interfaces - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface>] - # List of logical interfaces for the instance. The number of logical - # interfaces will be the same as number of hardware bond/nic on the chosen - # network template. Filled if InstanceConfig.multivlan_config is true. - # @!attribute [rw] ssh_key_names - # @return [::Array<::String>] - # List of names of ssh keys used to provision the instance. - class InstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A network. - # @!attribute [rw] network_id - # @return [::String] - # Id of the network to use, within the same ProvisioningConfig request. - # @!attribute [rw] address - # @return [::String] - # IPv4 address to be assigned to the server. - # @!attribute [rw] existing_network_id - # @return [::String] - # Name of the existing network to use. - class NetworkAddress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The network configuration of the instance. - module NetworkConfig - # The unspecified network configuration. - NETWORKCONFIG_UNSPECIFIED = 0 - - # Instance part of single client network and single private network. - SINGLE_VLAN = 1 - - # Instance part of multiple (or single) client networks and private - # networks. - MULTI_VLAN = 2 - end - end - - # Configuration parameters for a new volume. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the volume config. - # @!attribute [rw] id - # @return [::String] - # A transient unique identifier to identify a volume within an - # ProvisioningConfig request. - # @!attribute [rw] snapshots_enabled - # @return [::Boolean] - # Whether snapshots should be enabled. - # @!attribute [rw] type - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::Type] - # The type of this Volume. - # @!attribute [rw] protocol - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::Protocol] - # Volume protocol. - # @!attribute [rw] size_gb - # @return [::Integer] - # The requested size of this volume, in GB. - # @!attribute [rw] lun_ranges - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig::LunRange>] - # LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. - # @!attribute [rw] machine_ids - # @return [::Array<::String>] - # Machine ids connected to this volume. Set only when protocol is - # PROTOCOL_FC. - # @!attribute [rw] nfs_exports - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig::NfsExport>] - # NFS exports. Set only when protocol is PROTOCOL_NFS. - # @!attribute [rw] user_note - # @return [::String] - # User note field, it can be used by customers to add additional information - # for the BMS Ops team . - # @!attribute [rw] gcp_service - # @return [::String] - # The GCP service of the storage volume. Available gcp_service are in - # https://cloud.google.com/bare-metal/docs/bms-planning. - # @!attribute [rw] performance_tier - # @return [::Google::Cloud::BareMetalSolution::V2::VolumePerformanceTier] - # Performance tier of the Volume. - # Default is SHARED. - class VolumeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A LUN(Logical Unit Number) range. - # @!attribute [rw] quantity - # @return [::Integer] - # Number of LUNs to create. - # @!attribute [rw] size_gb - # @return [::Integer] - # The requested size of each LUN, in GB. - class LunRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A NFS export entry. - # @!attribute [rw] network_id - # @return [::String] - # Network to use to publish the export. - # @!attribute [rw] machine_id - # @return [::String] - # Either a single machine, identified by an ID, or a comma-separated - # list of machine IDs. - # - # Note: The following fields are mutually exclusive: `machine_id`, `cidr`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cidr - # @return [::String] - # A CIDR range. - # - # Note: The following fields are mutually exclusive: `cidr`, `machine_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] permissions - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::NfsExport::Permissions] - # Export permissions. - # @!attribute [rw] no_root_squash - # @return [::Boolean] - # Disable root squashing, which is a feature of NFS. - # Root squash is a special mapping of the remote superuser (root) identity - # when using identity authentication. - # @!attribute [rw] allow_suid - # @return [::Boolean] - # Allow the setuid flag. - # @!attribute [rw] allow_dev - # @return [::Boolean] - # Allow dev flag in NfsShare AllowedClientsRequest. - class NfsExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Permissions that can granted for an export. - module Permissions - # Unspecified value. - PERMISSIONS_UNSPECIFIED = 0 - - # Read-only permission. - READ_ONLY = 1 - - # Read-write permission. - READ_WRITE = 2 - end - end - - # The types of Volumes. - module Type - # The unspecified type. - TYPE_UNSPECIFIED = 0 - - # This Volume is on flash. - FLASH = 1 - - # This Volume is on disk. - DISK = 2 - end - - # The protocol used to access the volume. - module Protocol - # Unspecified value. - PROTOCOL_UNSPECIFIED = 0 - - # Fibre channel. - PROTOCOL_FC = 1 - - # Network file system. - PROTOCOL_NFS = 2 - end - end - - # Configuration parameters for a new network. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the network config. - # @!attribute [rw] id - # @return [::String] - # A transient unique identifier to identify a volume within an - # ProvisioningConfig request. - # @!attribute [rw] type - # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::Type] - # The type of this network, either Client or Private. - # @!attribute [rw] bandwidth - # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::Bandwidth] - # Interconnect bandwidth. Set only when type is CLIENT. - # @!attribute [rw] vlan_attachments - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkConfig::IntakeVlanAttachment>] - # List of VLAN attachments. As of now there are always 2 attachments, but it - # is going to change in the future (multi vlan). - # @!attribute [rw] cidr - # @return [::String] - # CIDR range of the network. - # @!attribute [rw] service_cidr - # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::ServiceCidr] - # Service CIDR, if any. - # @!attribute [rw] user_note - # @return [::String] - # User note field, it can be used by customers to add additional information - # for the BMS Ops team . - # @!attribute [rw] gcp_service - # @return [::String] - # The GCP service of the network. Available gcp_service are in - # https://cloud.google.com/bare-metal/docs/bms-planning. - # @!attribute [rw] vlan_same_project - # @return [::Boolean] - # Whether the VLAN attachment pair is located in the same project. - # @!attribute [rw] jumbo_frames_enabled - # @return [::Boolean] - # The JumboFramesEnabled option for customer to set. - class NetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A GCP vlan attachment. - # @!attribute [rw] id - # @return [::String] - # Identifier of the VLAN attachment. - # @!attribute [rw] pairing_key - # @return [::String] - # Attachment pairing key. - class IntakeVlanAttachment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Network type. - module Type - # Unspecified value. - TYPE_UNSPECIFIED = 0 - - # Client network, that is a network peered to a GCP VPC. - CLIENT = 1 - - # Private network, that is a network local to the BMS POD. - PRIVATE = 2 - end - - # Interconnect bandwidth. - module Bandwidth - # Unspecified value. - BANDWIDTH_UNSPECIFIED = 0 - - # 1 Gbps. - BW_1_GBPS = 1 - - # 2 Gbps. - BW_2_GBPS = 2 - - # 5 Gbps. - BW_5_GBPS = 3 - - # 10 Gbps. - BW_10_GBPS = 4 - end - - # Service network block. - module ServiceCidr - # Unspecified value. - SERVICE_CIDR_UNSPECIFIED = 0 - - # Services are disabled for the given network. - DISABLED = 1 - - # Use the highest /26 block of the network to host services. - HIGH_26 = 2 - - # Use the highest /27 block of the network to host services. - HIGH_27 = 3 - - # Use the highest /28 block of the network to host services. - HIGH_28 = 4 - end - end - - # A resource budget. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the instance quota. - # @!attribute [rw] instance_type - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Instance type. - # Deprecated: use gcp_service. - # @!attribute [rw] gcp_service - # @return [::String] - # The gcp service of the provisioning quota. - # @!attribute [rw] location - # @return [::String] - # Location where the quota applies. - # @!attribute [rw] available_machine_count - # @return [::Integer] - # Number of machines than can be created for the given location and - # instance_type. - class InstanceQuota - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetProvisioningConfig. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the ProvisioningConfig. - class GetProvisioningConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for CreateProvisioningConfig. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @!attribute [rw] provisioning_config - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # Required. The ProvisioningConfig to create. - # @!attribute [rw] email - # @return [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - class CreateProvisioningConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a ProvisioningConfig. - # @!attribute [rw] provisioning_config - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # Required. The ProvisioningConfig to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - # @!attribute [rw] email - # @return [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - class UpdateProvisioningConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb deleted file mode 100644 index b01344ba719c..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # An SSH key, used for authorizing with the interactive serial console feature. - # @!attribute [r] name - # @return [::String] - # Output only. The name of this SSH key. - # Currently, the only valid value for the location is "global". - # @!attribute [rw] public_key - # @return [::String] - # The public SSH key. This must be in OpenSSH .authorized_keys format. - class SSHKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for listing the public SSH keys in a project. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent containing the SSH keys. - # Currently, the only valid value for the location is "global". - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListSSHKeysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response of ListSSHKeys. - # @!attribute [rw] ssh_keys - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::SSHKey>] - # The SSH keys registered in the project. - # @!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 ListSSHKeysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for registering a public SSH key in a project. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent containing the SSH keys. - # @!attribute [rw] ssh_key - # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # Required. The SSH key to register. - # @!attribute [rw] ssh_key_id - # @return [::String] - # Required. The ID to use for the key, which will become the final component - # of the key's resource name. - # - # This value must match the regex: - # [a-zA-Z0-9@.\-_]\\{1,64} - class CreateSSHKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting an SSH key from a project. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the SSH key to delete. - # Currently, the only valid value for the location is "global". - class DeleteSSHKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb deleted file mode 100644 index d1e0bc7a2db8..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.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 BareMetalSolution - module V2 - # A storage volume. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of this `Volume`. - # Resource names are schemeless URIs that follow the conventions in - # https://cloud.google.com/apis/design/resource_names. - # Format: - # `projects/{project}/locations/{location}/volumes/{volume}` - # @!attribute [rw] id - # @return [::String] - # An identifier for the `Volume`, generated by the backend. - # @!attribute [rw] storage_type - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::StorageType] - # The storage type for this volume. - # @!attribute [rw] state - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::State] - # The state of this storage volume. - # @!attribute [rw] requested_size_gib - # @return [::Integer] - # The requested size of this storage volume, in GiB. - # @!attribute [rw] originally_requested_size_gib - # @return [::Integer] - # Originally requested size, in GiB. - # @!attribute [rw] current_size_gib - # @return [::Integer] - # The current size of this storage volume, in GiB, including space reserved - # for snapshots. This size might be different than the requested size if the - # storage volume has been configured with auto grow or auto shrink. - # @!attribute [rw] emergency_size_gib - # @return [::Integer] - # Additional emergency size that was requested for this Volume, in GiB. - # current_size_gib includes this value. - # @!attribute [rw] max_size_gib - # @return [::Integer] - # Maximum size volume can be expanded to in case of evergency, in GiB. - # @!attribute [rw] auto_grown_size_gib - # @return [::Integer] - # The size, in GiB, that this storage volume has expanded as a result of an - # auto grow policy. In the absence of auto-grow, the value is 0. - # @!attribute [rw] remaining_space_gib - # @return [::Integer] - # The space remaining in the storage volume for new LUNs, in GiB, excluding - # space reserved for snapshots. - # @!attribute [rw] snapshot_reservation_detail - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::SnapshotReservationDetail] - # Details about snapshot space reservation and usage on the storage volume. - # @!attribute [rw] snapshot_auto_delete_behavior - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::SnapshotAutoDeleteBehavior] - # The behavior to use when snapshot reserved space is full. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] snapshot_enabled - # @return [::Boolean] - # Whether snapshots are enabled. - # @!attribute [rw] pod - # @return [::String] - # Immutable. Pod name. - # @!attribute [r] protocol - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::Protocol] - # Output only. Storage protocol for the Volume. - # @!attribute [r] boot_volume - # @return [::Boolean] - # Output only. Whether this volume is a boot volume. A boot volume is one - # which contains a boot LUN. - # @!attribute [rw] performance_tier - # @return [::Google::Cloud::BareMetalSolution::V2::VolumePerformanceTier] - # Immutable. Performance tier of the Volume. - # Default is SHARED. - # @!attribute [rw] notes - # @return [::String] - # Input only. User-specified notes for new Volume. - # Used to provision Volumes that require manual intervention. - # @!attribute [rw] workload_profile - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::WorkloadProfile] - # The workload profile for the volume. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time after which volume will be fully deleted. - # It is filled only for volumes in COOLOFF state. - # @!attribute [r] instances - # @return [::Array<::String>] - # Output only. Instances this Volume is attached to. - # This field is set only in Get requests. - # @!attribute [r] attached - # @return [::Boolean] - # Output only. Is the Volume attached at at least one instance. - # This field is a lightweight counterpart of `instances` field. - # It is filled in List responses as well. - class Volume - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details about snapshot space reservation and usage on the storage volume. - # @!attribute [rw] reserved_space_gib - # @return [::Integer] - # The space on this storage volume reserved for snapshots, shown in GiB. - # @!attribute [rw] reserved_space_used_percent - # @return [::Integer] - # The percent of snapshot space on this storage volume actually being used - # by the snapshot copies. This value might be higher than 100% if the - # snapshot copies have overflowed into the data portion of the storage - # volume. - # @!attribute [rw] reserved_space_remaining_gib - # @return [::Integer] - # The amount, in GiB, of available space in this storage volume's reserved - # snapshot space. - # @!attribute [rw] reserved_space_percent - # @return [::Integer] - # Percent of the total Volume size reserved for snapshot copies. - # Enabling snapshots requires reserving 20% or more of - # the storage volume space for snapshots. Maximum reserved space for - # snapshots is 40%. - # Setting this field will effectively set snapshot_enabled to true. - class SnapshotReservationDetail - 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 storage type for a volume. - module StorageType - # The storage type for this volume is unknown. - STORAGE_TYPE_UNSPECIFIED = 0 - - # The storage type for this volume is SSD. - SSD = 1 - - # This storage type for this volume is HDD. - HDD = 2 - end - - # The possible states for a storage volume. - module State - # The storage volume is in an unknown state. - STATE_UNSPECIFIED = 0 - - # The storage volume is being created. - CREATING = 1 - - # The storage volume is ready for use. - READY = 2 - - # The storage volume has been requested to be deleted. - DELETING = 3 - - # The storage volume is being updated. - UPDATING = 4 - - # The storage volume is in cool off state. It will be deleted after - # `expire_time`. - COOL_OFF = 5 - end - - # The kinds of auto delete behavior to use when snapshot reserved space is - # full. - module SnapshotAutoDeleteBehavior - # The unspecified behavior. - SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0 - - # Don't delete any snapshots. This disables new snapshot creation, as - # long as the snapshot reserved space is full. - DISABLED = 1 - - # Delete the oldest snapshots first. - OLDEST_FIRST = 2 - - # Delete the newest snapshots first. - NEWEST_FIRST = 3 - end - - # Storage protocol. - module Protocol - # Value is not specified. - PROTOCOL_UNSPECIFIED = 0 - - # Fibre Channel protocol. - FIBRE_CHANNEL = 1 - - # NFS protocol means Volume is a NFS Share volume. - # Such volumes cannot be manipulated via Volumes API. - NFS = 2 - end - - # The possible values for a workload profile. - module WorkloadProfile - # The workload profile is in an unknown state. - WORKLOAD_PROFILE_UNSPECIFIED = 0 - - # The workload profile is generic. - GENERIC = 1 - - # The workload profile is hana. - HANA = 2 - end - end - - # Message for requesting storage volume information. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetVolumeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of storage volumes. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListVolumesRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] filter - # @return [::String] - # List filter. - class ListVolumesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the list of storage volumes. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Volume>] - # The list of storage volumes. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListVolumesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a volume. - # @!attribute [rw] volume - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # Required. The volume to update. - # - # The `name` field is used to identify the volume to update. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # The only currently supported fields are: - # 'labels' - class UpdateVolumeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting rename of a server. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the volume. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @!attribute [rw] new_volume_id - # @return [::String] - # Required. The new `id` of the volume. - class RenameVolumeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for skip volume cooloff and delete it. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Volume. - class EvictVolumeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for emergency resize Volume. - # @!attribute [rw] volume - # @return [::String] - # Required. Volume to resize. - # @!attribute [rw] size_gib - # @return [::Integer] - # New Volume size, in GiB. - class ResizeVolumeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb deleted file mode 100644 index 0525748dfd87..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb +++ /dev/null @@ -1,134 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A snapshot of a volume. Only boot volumes can have snapshots. - # @!attribute [rw] name - # @return [::String] - # The name of the snapshot. - # @!attribute [r] id - # @return [::String] - # Output only. An identifier for the snapshot, generated by the backend. - # @!attribute [rw] description - # @return [::String] - # The description of the snapshot. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time of the snapshot. - # @!attribute [r] storage_volume - # @return [::String] - # Output only. The name of the volume which this snapshot belongs to. - # @!attribute [r] type - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot::SnapshotType] - # Output only. The type of the snapshot which indicates whether it was - # scheduled or manual/ad-hoc. - class VolumeSnapshot - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the type of a snapshot. - module SnapshotType - # Type is not specified. - SNAPSHOT_TYPE_UNSPECIFIED = 0 - - # Snapshot was taken manually by user. - AD_HOC = 1 - - # Snapshot was taken automatically as a part of a snapshot schedule. - SCHEDULED = 2 - end - end - - # Message for requesting volume snapshot information. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the snapshot. - class GetVolumeSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of volume snapshots. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListVolumesRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - class ListVolumeSnapshotsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the list of volume snapshots. - # @!attribute [rw] volume_snapshots - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] - # The list of snapshots. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListVolumeSnapshotsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting named Volume snapshot. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the snapshot to delete. - class DeleteVolumeSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a volume snapshot. - # @!attribute [rw] parent - # @return [::String] - # Required. The volume to snapshot. - # @!attribute [rw] volume_snapshot - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # Required. The snapshot to create. - class CreateVolumeSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for restoring a volume snapshot. - # @!attribute [rw] volume_snapshot - # @return [::String] - # Required. Name of the snapshot which will be used to restore its parent - # volume. - class RestoreVolumeSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile deleted file mode 100644 index 5d699c275013..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-bare_metal_solution-v2", path: "../" -else - gem "google-cloud-bare_metal_solution-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-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb deleted file mode 100644 index 358c745fc756..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.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 baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the create_nfs_share call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share. -# -def create_nfs_share - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new - - # Call the create_nfs_share method. - result = client.create_nfs_share request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb deleted file mode 100644 index a06fe4fb4bde..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_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 baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the create_provisioning_config call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config. -# -def create_provisioning_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new - - # Call the create_provisioning_config method. - result = client.create_provisioning_config request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb deleted file mode 100644 index d8bb10ff6bad..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the create_ssh_key call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key. -# -def create_ssh_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new - - # Call the create_ssh_key method. - result = client.create_ssh_key request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb deleted file mode 100644 index d476c4950cff..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the create_volume_snapshot call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot. -# -def create_volume_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new - - # Call the create_volume_snapshot method. - result = client.create_volume_snapshot request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb deleted file mode 100644 index d93b24926574..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.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 baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the delete_nfs_share call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share. -# -def delete_nfs_share - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new - - # Call the delete_nfs_share method. - result = client.delete_nfs_share request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb deleted file mode 100644 index 3439a897492e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the delete_ssh_key call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key. -# -def delete_ssh_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new - - # Call the delete_ssh_key method. - result = client.delete_ssh_key request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb deleted file mode 100644 index 2adfa46b129e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the delete_volume_snapshot call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot. -# -def delete_volume_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new - - # Call the delete_volume_snapshot method. - result = client.delete_volume_snapshot request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb deleted file mode 100644 index 3883f7f5756b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.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 baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the detach_lun call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun. -# -def detach_lun - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new - - # Call the detach_lun method. - result = client.detach_lun request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb deleted file mode 100644 index 18430c661223..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.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 baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the disable_interactive_serial_console call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console. -# -def disable_interactive_serial_console - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new - - # Call the disable_interactive_serial_console method. - result = client.disable_interactive_serial_console request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb deleted file mode 100644 index 169e030b544f..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.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 baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the enable_interactive_serial_console call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console. -# -def enable_interactive_serial_console - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new - - # Call the enable_interactive_serial_console method. - result = client.enable_interactive_serial_console request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb deleted file mode 100644 index 916a0b294499..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.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 baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the evict_lun call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun. -# -def evict_lun - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new - - # Call the evict_lun method. - result = client.evict_lun request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb deleted file mode 100644 index d7d6e882e4a6..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.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 baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the evict_volume call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume. -# -def evict_volume - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new - - # Call the evict_volume method. - result = client.evict_volume request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb deleted file mode 100644 index 716e61b4abcd..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/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 baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb deleted file mode 100644 index 58f24d70f77f..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_lun call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun. -# -def get_lun - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new - - # Call the get_lun method. - result = client.get_lun request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb deleted file mode 100644 index 5df941d15772..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_network call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network. -# -def get_network - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new - - # Call the get_network method. - result = client.get_network request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb deleted file mode 100644 index d2c6e1709af7..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_nfs_share call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share. -# -def get_nfs_share - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new - - # Call the get_nfs_share method. - result = client.get_nfs_share request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb deleted file mode 100644 index 986b6c62e235..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_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 baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_provisioning_config call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config. -# -def get_provisioning_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new - - # Call the get_provisioning_config method. - result = client.get_provisioning_config request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb deleted file mode 100644 index 939f442e87ae..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_volume call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume. -# -def get_volume - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new - - # Call the get_volume method. - result = client.get_volume request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb deleted file mode 100644 index 001c45e34f3b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_volume_snapshot call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot. -# -def get_volume_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new - - # Call the get_volume_snapshot method. - result = client.get_volume_snapshot request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb deleted file mode 100644 index 3e017bcb7a63..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/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 baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_instances call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances. -# -def list_instances - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::Instance. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb deleted file mode 100644 index 6a79522dc049..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.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 baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_luns call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns. -# -def list_luns - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new - - # Call the list_luns method. - result = client.list_luns request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb deleted file mode 100644 index 3c008bae622a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_network_usage call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage. -# -def list_network_usage - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new - - # Call the list_network_usage method. - result = client.list_network_usage request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb deleted file mode 100644 index b98c7b7f9d00..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.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 baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_networks call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks. -# -def list_networks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new - - # Call the list_networks method. - result = client.list_networks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb deleted file mode 100644 index a865e2f86d3f..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.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 baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_nfs_shares call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares. -# -def list_nfs_shares - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new - - # Call the list_nfs_shares method. - result = client.list_nfs_shares request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb deleted file mode 100644 index 12e6f9f047d6..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.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 baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_os_images call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images. -# -def list_os_images - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new - - # Call the list_os_images method. - result = client.list_os_images request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb deleted file mode 100644 index 0dca5eff2d85..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.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 baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_provisioning_quotas call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas. -# -def list_provisioning_quotas - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new - - # Call the list_provisioning_quotas method. - result = client.list_provisioning_quotas request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb deleted file mode 100644 index 158656b868d3..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.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 baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_ssh_keys call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys. -# -def list_ssh_keys - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new - - # Call the list_ssh_keys method. - result = client.list_ssh_keys request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb deleted file mode 100644 index 58b170292d00..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.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 baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_volume_snapshots call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots. -# -def list_volume_snapshots - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new - - # Call the list_volume_snapshots method. - result = client.list_volume_snapshots request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb deleted file mode 100644 index a423d77af7e6..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.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 baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_volumes call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes. -# -def list_volumes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new - - # Call the list_volumes method. - result = client.list_volumes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb deleted file mode 100644 index 94dbdb0a41ad..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_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 baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the rename_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance. -# -def rename_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new - - # Call the rename_instance method. - result = client.rename_instance request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb deleted file mode 100644 index da01cd4cae26..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the rename_network call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network. -# -def rename_network - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new - - # Call the rename_network method. - result = client.rename_network request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb deleted file mode 100644 index 32ec197121d8..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the rename_nfs_share call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share. -# -def rename_nfs_share - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new - - # Call the rename_nfs_share method. - result = client.rename_nfs_share request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb deleted file mode 100644 index 150aa2cb0fbb..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the rename_volume call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume. -# -def rename_volume - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new - - # Call the rename_volume method. - result = client.rename_volume request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb deleted file mode 100644 index c1010158d5fc..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_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 baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the reset_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance. -# -def reset_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new - - # Call the reset_instance method. - result = client.reset_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 baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb deleted file mode 100644 index c79249eb863d..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.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 baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the resize_volume call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume. -# -def resize_volume - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new - - # Call the resize_volume method. - result = client.resize_volume request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb deleted file mode 100644 index d37a07635475..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.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 baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the restore_volume_snapshot call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot. -# -def restore_volume_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new - - # Call the restore_volume_snapshot method. - result = client.restore_volume_snapshot request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb deleted file mode 100644 index 7beed0235a9a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_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 baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the start_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance. -# -def start_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new - - # Call the start_instance method. - result = client.start_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 baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb deleted file mode 100644 index 6728055e6fe6..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_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 baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the stop_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance. -# -def stop_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new - - # Call the stop_instance method. - result = client.stop_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 baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb deleted file mode 100644 index f35b9ef72741..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_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 baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the submit_provisioning_config call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config. -# -def submit_provisioning_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new - - # Call the submit_provisioning_config method. - result = client.submit_provisioning_config request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb deleted file mode 100644 index f95a8f3457e7..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/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 baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the update_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance. -# -def update_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::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 baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb deleted file mode 100644 index b4c3d334f859..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.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 baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the update_network call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network. -# -def update_network - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new - - # Call the update_network method. - result = client.update_network request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb deleted file mode 100644 index 6caf796b8964..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.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 baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the update_nfs_share call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share. -# -def update_nfs_share - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new - - # Call the update_nfs_share method. - result = client.update_nfs_share request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb deleted file mode 100644 index 3c5676e4d0fe..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_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 baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the update_provisioning_config call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config. -# -def update_provisioning_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new - - # Call the update_provisioning_config method. - result = client.update_provisioning_config request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb deleted file mode 100644 index a6f74e17e36c..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.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 baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the update_volume call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume. -# -def update_volume - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new - - # Call the update_volume method. - result = client.update_volume request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json deleted file mode 100644 index a6e0209d6718..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json +++ /dev/null @@ -1,1775 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bare_metal_solution-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.baremetalsolution.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync", - "title": "Snippet for the list_instances call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances.", - "file": "bare_metal_solution/list_instances.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instances", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListInstances", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListInstances", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync", - "title": "Snippet for the get_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance.", - "file": "bare_metal_solution/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Instance", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync", - "title": "Snippet for the update_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance.", - "file": "bare_metal_solution/update_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "UpdateInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync", - "title": "Snippet for the rename_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance.", - "file": "bare_metal_solution/rename_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "rename_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Instance", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "RenameInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync", - "title": "Snippet for the reset_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance.", - "file": "bare_metal_solution/reset_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "reset_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ResetInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResetInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync", - "title": "Snippet for the start_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance.", - "file": "bare_metal_solution/start_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "StartInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.StartInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync", - "title": "Snippet for the stop_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance.", - "file": "bare_metal_solution/stop_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "stop_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "StopInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.StopInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync", - "title": "Snippet for the enable_interactive_serial_console call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console.", - "file": "bare_metal_solution/enable_interactive_serial_console.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_interactive_serial_console", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "EnableInteractiveSerialConsole", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EnableInteractiveSerialConsole", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync", - "title": "Snippet for the disable_interactive_serial_console call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console.", - "file": "bare_metal_solution/disable_interactive_serial_console.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_interactive_serial_console", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "DisableInteractiveSerialConsole", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DisableInteractiveSerialConsole", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync", - "title": "Snippet for the detach_lun call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun.", - "file": "bare_metal_solution/detach_lun.rb", - "language": "RUBY", - "client_method": { - "short_name": "detach_lun", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::DetachLunRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "DetachLun", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DetachLun", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync", - "title": "Snippet for the list_ssh_keys call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys.", - "file": "bare_metal_solution/list_ssh_keys.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_ssh_keys", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListSSHKeys", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListSSHKeys", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync", - "title": "Snippet for the create_ssh_key call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key.", - "file": "bare_metal_solution/create_ssh_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_ssh_key", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::SSHKey", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "CreateSSHKey", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateSSHKey", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync", - "title": "Snippet for the delete_ssh_key call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key.", - "file": "bare_metal_solution/delete_ssh_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_ssh_key", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "DeleteSSHKey", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteSSHKey", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync", - "title": "Snippet for the list_volumes call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes.", - "file": "bare_metal_solution/list_volumes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_volumes", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListVolumes", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListVolumes", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync", - "title": "Snippet for the get_volume call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume.", - "file": "bare_metal_solution/get_volume.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_volume", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Volume", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetVolume", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetVolume", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync", - "title": "Snippet for the update_volume call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume.", - "file": "bare_metal_solution/update_volume.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_volume", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "UpdateVolume", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateVolume", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync", - "title": "Snippet for the rename_volume call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume.", - "file": "bare_metal_solution/rename_volume.rb", - "language": "RUBY", - "client_method": { - "short_name": "rename_volume", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Volume", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "RenameVolume", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameVolume", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync", - "title": "Snippet for the evict_volume call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume.", - "file": "bare_metal_solution/evict_volume.rb", - "language": "RUBY", - "client_method": { - "short_name": "evict_volume", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "EvictVolume", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EvictVolume", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync", - "title": "Snippet for the resize_volume call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume.", - "file": "bare_metal_solution/resize_volume.rb", - "language": "RUBY", - "client_method": { - "short_name": "resize_volume", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ResizeVolume", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResizeVolume", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync", - "title": "Snippet for the list_networks call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks.", - "file": "bare_metal_solution/list_networks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_networks", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListNetworks", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworks", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync", - "title": "Snippet for the list_network_usage call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage.", - "file": "bare_metal_solution/list_network_usage.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_network_usage", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListNetworkUsage", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworkUsage", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync", - "title": "Snippet for the get_network call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network.", - "file": "bare_metal_solution/get_network.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_network", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Network", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetNetwork", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNetwork", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync", - "title": "Snippet for the update_network call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network.", - "file": "bare_metal_solution/update_network.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_network", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "UpdateNetwork", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNetwork", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync", - "title": "Snippet for the create_volume_snapshot call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot.", - "file": "bare_metal_solution/create_volume_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_volume_snapshot", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "CreateVolumeSnapshot", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateVolumeSnapshot", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync", - "title": "Snippet for the restore_volume_snapshot call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot.", - "file": "bare_metal_solution/restore_volume_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "restore_volume_snapshot", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "RestoreVolumeSnapshot", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RestoreVolumeSnapshot", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync", - "title": "Snippet for the delete_volume_snapshot call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot.", - "file": "bare_metal_solution/delete_volume_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_volume_snapshot", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "DeleteVolumeSnapshot", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteVolumeSnapshot", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync", - "title": "Snippet for the get_volume_snapshot call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot.", - "file": "bare_metal_solution/get_volume_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_volume_snapshot", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetVolumeSnapshot", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetVolumeSnapshot", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync", - "title": "Snippet for the list_volume_snapshots call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots.", - "file": "bare_metal_solution/list_volume_snapshots.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_volume_snapshots", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListVolumeSnapshots", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListVolumeSnapshots", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync", - "title": "Snippet for the get_lun call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun.", - "file": "bare_metal_solution/get_lun.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lun", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetLunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Lun", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetLun", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetLun", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync", - "title": "Snippet for the list_luns call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns.", - "file": "bare_metal_solution/list_luns.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_luns", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListLunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListLunsResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListLuns", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListLuns", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync", - "title": "Snippet for the evict_lun call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun.", - "file": "bare_metal_solution/evict_lun.rb", - "language": "RUBY", - "client_method": { - "short_name": "evict_lun", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::EvictLunRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "EvictLun", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EvictLun", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync", - "title": "Snippet for the get_nfs_share call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share.", - "file": "bare_metal_solution/get_nfs_share.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_nfs_share", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::NfsShare", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetNfsShare", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNfsShare", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync", - "title": "Snippet for the list_nfs_shares call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares.", - "file": "bare_metal_solution/list_nfs_shares.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_nfs_shares", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListNfsShares", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNfsShares", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync", - "title": "Snippet for the update_nfs_share call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share.", - "file": "bare_metal_solution/update_nfs_share.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_nfs_share", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "UpdateNfsShare", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNfsShare", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync", - "title": "Snippet for the create_nfs_share call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share.", - "file": "bare_metal_solution/create_nfs_share.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_nfs_share", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "CreateNfsShare", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateNfsShare", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync", - "title": "Snippet for the rename_nfs_share call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share.", - "file": "bare_metal_solution/rename_nfs_share.rb", - "language": "RUBY", - "client_method": { - "short_name": "rename_nfs_share", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::NfsShare", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "RenameNfsShare", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameNfsShare", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync", - "title": "Snippet for the delete_nfs_share call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share.", - "file": "bare_metal_solution/delete_nfs_share.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_nfs_share", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "DeleteNfsShare", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteNfsShare", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync", - "title": "Snippet for the list_provisioning_quotas call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas.", - "file": "bare_metal_solution/list_provisioning_quotas.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_provisioning_quotas", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListProvisioningQuotas", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListProvisioningQuotas", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync", - "title": "Snippet for the submit_provisioning_config call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config.", - "file": "bare_metal_solution/submit_provisioning_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "submit_provisioning_config", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "SubmitProvisioningConfig", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.SubmitProvisioningConfig", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync", - "title": "Snippet for the get_provisioning_config call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config.", - "file": "bare_metal_solution/get_provisioning_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_provisioning_config", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetProvisioningConfig", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetProvisioningConfig", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync", - "title": "Snippet for the create_provisioning_config call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config.", - "file": "bare_metal_solution/create_provisioning_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_provisioning_config", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "CreateProvisioningConfig", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateProvisioningConfig", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync", - "title": "Snippet for the update_provisioning_config call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config.", - "file": "bare_metal_solution/update_provisioning_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_provisioning_config", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "UpdateProvisioningConfig", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateProvisioningConfig", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync", - "title": "Snippet for the rename_network call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network.", - "file": "bare_metal_solution/rename_network.rb", - "language": "RUBY", - "client_method": { - "short_name": "rename_network", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Network", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "RenameNetwork", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameNetwork", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync", - "title": "Snippet for the list_os_images call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images.", - "file": "bare_metal_solution/list_os_images.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_os_images", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListOSImages", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListOSImages", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "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-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb deleted file mode 100644 index d0c2f98192c9..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_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/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/baremetalsolution/v2/baremetalsolution_services_pb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution" - -class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb deleted file mode 100644 index 0969c53605e0..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_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/bare_metal_solution/v2/bare_metal_solution" - -class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_config_path project: "value0", location: "value1", instance_config: "value2" - assert_equal "projects/value0/locations/value1/instanceConfigs/value2", path - end - end - - def test_interconnect_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.interconnect_attachment_path project: "value0", region: "value1", interconnect_attachment: "value2" - assert_equal "projects/value0/regions/value1/interconnectAttachments/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::BareMetalSolution::V2::BareMetalSolution::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_lun_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lun_path project: "value0", location: "value1", volume: "value2", lun: "value3" - assert_equal "projects/value0/locations/value1/volumes/value2/luns/value3", path - end - end - - def test_nfs_share_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.nfs_share_path project: "value0", location: "value1", nfs_share: "value2" - assert_equal "projects/value0/locations/value1/nfsShares/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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_path project: "value0", location: "value1", network: "value2" - assert_equal "projects/value0/locations/value1/networks/value2", path - end - end - - def test_network_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_config_path project: "value0", location: "value1", network_config: "value2" - assert_equal "projects/value0/locations/value1/networkConfigs/value2", path - end - end - - def test_provisioning_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.provisioning_config_path project: "value0", location: "value1", provisioning_config: "value2" - assert_equal "projects/value0/locations/value1/provisioningConfigs/value2", path - end - end - - def test_server_network_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.server_network_template_path project: "value0", location: "value1", server_network_template: "value2" - assert_equal "projects/value0/locations/value1/serverNetworkTemplate/value2", path - end - end - - def test_ssh_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.ssh_key_path project: "value0", location: "value1", ssh_key: "value2" - assert_equal "projects/value0/locations/value1/sshKeys/value2", path - end - end - - def test_volume_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.volume_path project: "value0", location: "value1", volume: "value2" - assert_equal "projects/value0/locations/value1/volumes/value2", path - end - end - - def test_volume_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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.volume_config_path project: "value0", location: "value1", volume_config: "value2" - assert_equal "projects/value0/locations/value1/volumeConfigs/value2", path - end - end - - def test_volume_snapshot_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.volume_snapshot_path project: "value0", location: "value1", volume: "value2", snapshot: "value3" - assert_equal "projects/value0/locations/value1/volumes/value2/snapshots/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb deleted file mode 100644 index 2565ded3d7fb..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb +++ /dev/null @@ -1,2518 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" - - -class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::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" - - 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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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 }) 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 do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_instances ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.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_instances({ 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_instances(::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.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_instances_client_stub.call_count - end - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::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::BareMetalSolution::V2::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_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 = {} - update_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_instance({ instance: instance, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_instance instance: instance, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_instance ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_instance({ instance: instance, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_instance(::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_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_rename_instance - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_instance_id = "hello world" - - rename_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rename_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.rename_instance({ name: name, new_instance_id: new_instance_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.rename_instance name: name, new_instance_id: new_instance_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.rename_instance ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.rename_instance({ name: name, new_instance_id: new_instance_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.rename_instance(::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rename_instance_client_stub.call_count - end - end - end - - def test_reset_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" - - reset_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_reset_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, reset_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.reset_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.reset_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.reset_instance ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.reset_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.reset_instance(::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, reset_instance_client_stub.call_count - end - end - end - - def test_start_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" - - start_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_start_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.start_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.start_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.start_instance ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.start_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.start_instance(::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_instance_client_stub.call_count - end - end - end - - def test_stop_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" - - stop_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_stop_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, stop_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.stop_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.stop_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.stop_instance ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.stop_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.stop_instance(::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, stop_instance_client_stub.call_count - end - end - end - - def test_enable_interactive_serial_console - # Create test objects. - 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_interactive_serial_console_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_enable_interactive_serial_console_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_interactive_serial_console_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.enable_interactive_serial_console({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.enable_interactive_serial_console name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.enable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.enable_interactive_serial_console({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.enable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_interactive_serial_console_client_stub.call_count - end - end - end - - def test_disable_interactive_serial_console - # Create test objects. - 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_interactive_serial_console_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_disable_interactive_serial_console_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_interactive_serial_console_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.disable_interactive_serial_console({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.disable_interactive_serial_console name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.disable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.disable_interactive_serial_console({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.disable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_interactive_serial_console_client_stub.call_count - end - end - end - - def test_detach_lun - # Create test objects. - 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 = "hello world" - lun = "hello world" - skip_reboot = true - - detach_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_detach_lun_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, detach_lun_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.detach_lun instance: instance, lun: lun, skip_reboot: skip_reboot do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.detach_lun ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.detach_lun(::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, detach_lun_client_stub.call_count - end - end - end - - def test_list_ssh_keys - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.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_ssh_keys_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_ssh_keys_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_ssh_keys_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_ssh_keys({ 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_ssh_keys 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_ssh_keys ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.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_ssh_keys({ 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_ssh_keys(::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.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_ssh_keys_client_stub.call_count - end - end - end - - def test_create_ssh_key - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::SSHKey.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - ssh_key = {} - ssh_key_id = "hello world" - - create_ssh_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_ssh_key_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_ssh_key_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_ssh_key parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_ssh_key ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_ssh_key(::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_ssh_key_client_stub.call_count - end - end - end - - def test_delete_ssh_key - # 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_ssh_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_ssh_key_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_ssh_key_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_ssh_key({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_ssh_key name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_ssh_key ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_ssh_key({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_ssh_key(::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_ssh_key_client_stub.call_count - end - end - end - - def test_list_volumes - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.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_volumes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_volumes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_volumes_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_volumes({ 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_volumes 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_volumes ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.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_volumes({ 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_volumes(::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.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_volumes_client_stub.call_count - end - end - end - - def test_get_volume - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Volume.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_volume_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_volume_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_volume({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_volume name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_volume ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_volume({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_volume(::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_volume_client_stub.call_count - end - end - end - - def test_update_volume - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - volume = {} - update_mask = {} - - update_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_volume_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_volume_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_volume({ volume: volume, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_volume volume: volume, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_volume ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_volume({ volume: volume, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_volume(::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_volume_client_stub.call_count - end - end - end - - def test_rename_volume - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Volume.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_volume_id = "hello world" - - rename_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_volume_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rename_volume_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.rename_volume({ name: name, new_volume_id: new_volume_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.rename_volume name: name, new_volume_id: new_volume_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.rename_volume ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.rename_volume({ name: name, new_volume_id: new_volume_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.rename_volume(::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rename_volume_client_stub.call_count - end - end - end - - def test_evict_volume - # Create test objects. - 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" - - evict_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_evict_volume_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, evict_volume_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.evict_volume({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.evict_volume name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.evict_volume ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.evict_volume({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.evict_volume(::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, evict_volume_client_stub.call_count - end - end - end - - def test_resize_volume - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - volume = "hello world" - size_gib = 42 - - resize_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_resize_volume_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, resize_volume_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.resize_volume({ volume: volume, size_gib: size_gib }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.resize_volume volume: volume, size_gib: size_gib do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.resize_volume ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.resize_volume({ volume: volume, size_gib: size_gib }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.resize_volume(::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, resize_volume_client_stub.call_count - end - end - end - - def test_list_networks - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.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_networks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_networks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_networks_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_networks({ 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_networks 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_networks ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.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_networks({ 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_networks(::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.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_networks_client_stub.call_count - end - end - end - - def test_list_network_usage - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - location = "hello world" - - list_network_usage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_network_usage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_network_usage_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_network_usage({ location: location }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_network_usage location: location do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_network_usage ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_network_usage({ location: location }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_network_usage(::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_network_usage_client_stub.call_count - end - end - end - - def test_get_network - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Network.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_network_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_network_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_network({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_network name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_network ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_network({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_network(::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_network_client_stub.call_count - end - end - end - - def test_update_network - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - network = {} - update_mask = {} - - update_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_network_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_network_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_network({ network: network, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_network network: network, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_network ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_network({ network: network, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_network(::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_network_client_stub.call_count - end - end - end - - def test_create_volume_snapshot - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - volume_snapshot = {} - - create_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_volume_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_volume_snapshot_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_volume_snapshot parent: parent, volume_snapshot: volume_snapshot do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_volume_snapshot_client_stub.call_count - end - end - end - - def test_restore_volume_snapshot - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - volume_snapshot = "hello world" - - restore_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_restore_volume_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restore_volume_snapshot_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.restore_volume_snapshot({ volume_snapshot: volume_snapshot }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.restore_volume_snapshot volume_snapshot: volume_snapshot do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.restore_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.restore_volume_snapshot({ volume_snapshot: volume_snapshot }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.restore_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restore_volume_snapshot_client_stub.call_count - end - end - end - - def test_delete_volume_snapshot - # 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_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_volume_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_volume_snapshot_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_volume_snapshot({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_volume_snapshot name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_volume_snapshot({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_volume_snapshot_client_stub.call_count - end - end - end - - def test_get_volume_snapshot - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_volume_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_volume_snapshot_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_volume_snapshot({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_volume_snapshot name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_volume_snapshot({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_volume_snapshot_client_stub.call_count - end - end - end - - def test_list_volume_snapshots - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.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_volume_snapshots_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_volume_snapshots_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_volume_snapshots_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_volume_snapshots({ 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_volume_snapshots 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_volume_snapshots ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.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_volume_snapshots({ 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_volume_snapshots(::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.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_volume_snapshots_client_stub.call_count - end - end - end - - def test_get_lun - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Lun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_lun_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lun_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lun({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lun name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_lun ::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_lun({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_lun(::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lun_client_stub.call_count - end - end - end - - def test_list_luns - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.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_luns_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_luns_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_luns_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_luns({ 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_luns 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_luns ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.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_luns({ 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_luns(::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.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_luns_client_stub.call_count - end - end - end - - def test_evict_lun - # Create test objects. - 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" - - evict_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_evict_lun_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, evict_lun_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.evict_lun({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.evict_lun name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.evict_lun ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.evict_lun({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.evict_lun(::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, evict_lun_client_stub.call_count - end - end - end - - def test_get_nfs_share - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_nfs_share_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_nfs_share_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_nfs_share({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_nfs_share name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_nfs_share ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_nfs_share({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_nfs_share(::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_nfs_share_client_stub.call_count - end - end - end - - def test_list_nfs_shares - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.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_nfs_shares_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_nfs_shares_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_nfs_shares_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_nfs_shares({ 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_nfs_shares 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_nfs_shares ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.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_nfs_shares({ 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_nfs_shares(::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.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_nfs_shares_client_stub.call_count - end - end - end - - def test_update_nfs_share - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - nfs_share = {} - update_mask = {} - - update_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_nfs_share_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_nfs_share_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_nfs_share nfs_share: nfs_share, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_nfs_share ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_nfs_share(::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_nfs_share_client_stub.call_count - end - end - end - - def test_create_nfs_share - # Create test objects. - 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" - nfs_share = {} - - create_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_nfs_share_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_nfs_share_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_nfs_share({ parent: parent, nfs_share: nfs_share }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_nfs_share parent: parent, nfs_share: nfs_share do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_nfs_share ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_nfs_share({ parent: parent, nfs_share: nfs_share }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_nfs_share(::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_nfs_share_client_stub.call_count - end - end - end - - def test_rename_nfs_share - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_nfsshare_id = "hello world" - - rename_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_nfs_share_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rename_nfs_share_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.rename_nfs_share name: name, new_nfsshare_id: new_nfsshare_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.rename_nfs_share ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.rename_nfs_share(::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rename_nfs_share_client_stub.call_count - end - end - end - - def test_delete_nfs_share - # Create test objects. - 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_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_nfs_share_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_nfs_share_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_nfs_share({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_nfs_share name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_nfs_share ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_nfs_share({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_nfs_share(::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_nfs_share_client_stub.call_count - end - end - end - - def test_list_provisioning_quotas - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.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_provisioning_quotas_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_provisioning_quotas_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_provisioning_quotas_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_provisioning_quotas({ 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_provisioning_quotas 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_provisioning_quotas ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.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_provisioning_quotas({ 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_provisioning_quotas(::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.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_provisioning_quotas_client_stub.call_count - end - end - end - - def test_submit_provisioning_config - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - provisioning_config = {} - email = "hello world" - - submit_provisioning_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_submit_provisioning_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, submit_provisioning_config_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.submit_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.submit_provisioning_config ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.submit_provisioning_config(::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, submit_provisioning_config_client_stub.call_count - end - end - end - - def test_get_provisioning_config - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_provisioning_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_provisioning_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_provisioning_config_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_provisioning_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_provisioning_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_provisioning_config ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_provisioning_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_provisioning_config(::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_provisioning_config_client_stub.call_count - end - end - end - - def test_create_provisioning_config - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - provisioning_config = {} - email = "hello world" - - create_provisioning_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_provisioning_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_provisioning_config_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_provisioning_config ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_provisioning_config(::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_provisioning_config_client_stub.call_count - end - end - end - - def test_update_provisioning_config - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - provisioning_config = {} - update_mask = {} - email = "hello world" - - update_provisioning_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::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_provisioning_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_provisioning_config_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_provisioning_config provisioning_config: provisioning_config, update_mask: update_mask, email: email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_provisioning_config ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_provisioning_config(::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_provisioning_config_client_stub.call_count - end - end - end - - def test_rename_network - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Network.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_network_id = "hello world" - - rename_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_network_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rename_network_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.rename_network({ name: name, new_network_id: new_network_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.rename_network name: name, new_network_id: new_network_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.rename_network ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.rename_network({ name: name, new_network_id: new_network_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.rename_network(::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rename_network_client_stub.call_count - end - end - end - - def test_list_os_images - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.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_os_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_os_images_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_os_images_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_os_images({ 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_os_images 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_os_images ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.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_os_images({ 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_os_images(::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.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_os_images_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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb deleted file mode 100644 index 8c8eb4f1435b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb +++ /dev/null @@ -1,2881 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution" - -class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::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" - - list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instances, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_instances_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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 }) 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 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::BareMetalSolution::V2::ListInstancesRequest.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_instances({ 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_instances(::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.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_instances_client_stub.call_rpc_count - end - end - - def test_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::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::BareMetalSolution::V2::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::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::BareMetalSolution::V2::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_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 = {} - update_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::BareMetalSolution::V2::UpdateInstanceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Instance), request["instance"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_instance({ instance: instance, 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_instance instance: instance, 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_instance ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, 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_instance({ instance: instance, 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_instance(::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, 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_instance_client_stub.call_rpc_count - end - end - - def test_rename_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::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" - new_instance_id = "hello world" - - rename_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rename_instance, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["new_instance_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rename_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.rename_instance({ name: name, new_instance_id: new_instance_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.rename_instance name: name, new_instance_id: new_instance_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.rename_instance ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.rename_instance({ name: name, new_instance_id: new_instance_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.rename_instance(::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rename_instance_client_stub.call_rpc_count - end - end - - def test_reset_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" - - reset_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :reset_instance, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, reset_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.reset_instance({ 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.reset_instance 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.reset_instance ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.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.reset_instance({ 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.reset_instance(::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.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, reset_instance_client_stub.call_rpc_count - end - end - - def test_start_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" - - start_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_instance, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.start_instance({ 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.start_instance 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.start_instance ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.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.start_instance({ 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.start_instance(::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.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, start_instance_client_stub.call_rpc_count - end - end - - def test_stop_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" - - stop_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :stop_instance, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, stop_instance_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.stop_instance({ 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.stop_instance 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.stop_instance ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.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.stop_instance({ 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.stop_instance(::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.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, stop_instance_client_stub.call_rpc_count - end - end - - def test_enable_interactive_serial_console - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_interactive_serial_console_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_interactive_serial_console, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_interactive_serial_console_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.enable_interactive_serial_console({ 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_interactive_serial_console 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_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.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_interactive_serial_console({ 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_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.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_interactive_serial_console_client_stub.call_rpc_count - end - end - - def test_disable_interactive_serial_console - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_interactive_serial_console_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_interactive_serial_console, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_interactive_serial_console_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.disable_interactive_serial_console({ 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.disable_interactive_serial_console 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.disable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.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.disable_interactive_serial_console({ 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.disable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.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, disable_interactive_serial_console_client_stub.call_rpc_count - end - end - - def test_detach_lun - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = "hello world" - lun = "hello world" - skip_reboot = true - - detach_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :detach_lun, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, request - assert_equal "hello world", request["instance"] - assert_equal "hello world", request["lun"] - assert_equal true, request["skip_reboot"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, detach_lun_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }) do |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.detach_lun instance: instance, lun: lun, skip_reboot: skip_reboot do |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.detach_lun ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot) do |response, operation| - 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.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }, grpc_options) do |response, operation| - 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.detach_lun(::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, detach_lun_client_stub.call_rpc_count - end - end - - def test_list_ssh_keys - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_ssh_keys_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_ssh_keys, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, 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_ssh_keys_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_ssh_keys({ parent: parent, page_size: page_size, page_token: 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_ssh_keys parent: parent, page_size: page_size, page_token: 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_ssh_keys ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.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_ssh_keys({ 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_ssh_keys(::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.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_ssh_keys_client_stub.call_rpc_count - end - end - - def test_create_ssh_key - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::SSHKey.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - ssh_key = {} - ssh_key_id = "hello world" - - create_ssh_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_ssh_key, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::SSHKey), request["ssh_key"] - assert_equal "hello world", request["ssh_key_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_ssh_key_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_ssh_key parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_ssh_key ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_ssh_key(::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_ssh_key_client_stub.call_rpc_count - end - end - - def test_delete_ssh_key - # 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_ssh_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_ssh_key, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_ssh_key_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_ssh_key({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_ssh_key name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_ssh_key ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_ssh_key({ 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_ssh_key(::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(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_ssh_key_client_stub.call_rpc_count - end - end - - def test_list_volumes - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_volumes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_volumes, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, 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_volumes_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_volumes({ 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_volumes 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_volumes ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.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_volumes({ 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_volumes(::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.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_volumes_client_stub.call_rpc_count - end - end - - def test_get_volume - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Volume.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_volume, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_volume_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_volume({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_volume name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_volume ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_volume({ 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_volume(::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(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_volume_client_stub.call_rpc_count - end - end - - def test_update_volume - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - volume = {} - update_mask = {} - - update_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_volume, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Volume), request["volume"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_volume_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_volume({ volume: volume, 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_volume volume: volume, 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_volume ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, 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_volume({ volume: volume, 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_volume(::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, 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_volume_client_stub.call_rpc_count - end - end - - def test_rename_volume - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Volume.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_volume_id = "hello world" - - rename_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rename_volume, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["new_volume_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rename_volume_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.rename_volume({ name: name, new_volume_id: new_volume_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.rename_volume name: name, new_volume_id: new_volume_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.rename_volume ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.rename_volume({ name: name, new_volume_id: new_volume_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.rename_volume(::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rename_volume_client_stub.call_rpc_count - end - end - - def test_evict_volume - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - evict_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :evict_volume, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, evict_volume_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.evict_volume({ 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.evict_volume 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.evict_volume ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.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.evict_volume({ 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.evict_volume(::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.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, evict_volume_client_stub.call_rpc_count - end - end - - def test_resize_volume - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - volume = "hello world" - size_gib = 42 - - resize_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :resize_volume, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, request - assert_equal "hello world", request["volume"] - assert_equal 42, request["size_gib"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, resize_volume_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.resize_volume({ volume: volume, size_gib: size_gib }) do |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.resize_volume volume: volume, size_gib: size_gib do |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.resize_volume ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib) do |response, operation| - 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.resize_volume({ volume: volume, size_gib: size_gib }, grpc_options) do |response, operation| - 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.resize_volume(::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, resize_volume_client_stub.call_rpc_count - end - end - - def test_list_networks - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_networks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_networks, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, 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_networks_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_networks({ 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_networks 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_networks ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.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_networks({ 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_networks(::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.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_networks_client_stub.call_rpc_count - end - end - - def test_list_network_usage - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - location = "hello world" - - list_network_usage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_network_usage, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, request - assert_equal "hello world", request["location"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_network_usage_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_network_usage({ location: location }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_network_usage location: location do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_network_usage ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_network_usage({ location: location }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_network_usage(::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_network_usage_client_stub.call_rpc_count - end - end - - def test_get_network - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Network.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_network, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_network_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_network({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_network name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_network ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_network({ 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_network(::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(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_network_client_stub.call_rpc_count - end - end - - def test_update_network - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - network = {} - update_mask = {} - - update_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_network, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Network), request["network"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_network_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_network({ network: network, 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_network network: network, 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_network ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, 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_network({ network: network, 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_network(::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, 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_network_client_stub.call_rpc_count - end - end - - def test_create_volume_snapshot - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - volume_snapshot = {} - - create_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_volume_snapshot, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot), request["volume_snapshot"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_volume_snapshot_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_volume_snapshot parent: parent, volume_snapshot: volume_snapshot do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_volume_snapshot_client_stub.call_rpc_count - end - end - - def test_restore_volume_snapshot - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - volume_snapshot = "hello world" - - restore_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restore_volume_snapshot, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, request - assert_equal "hello world", request["volume_snapshot"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, restore_volume_snapshot_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.restore_volume_snapshot({ volume_snapshot: volume_snapshot }) do |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_volume_snapshot volume_snapshot: volume_snapshot do |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_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot) do |response, operation| - 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_volume_snapshot({ volume_snapshot: volume_snapshot }, grpc_options) do |response, operation| - 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_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot), grpc_options) do |response, operation| - assert_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_volume_snapshot_client_stub.call_rpc_count - end - end - - def test_delete_volume_snapshot - # 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_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_volume_snapshot, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_volume_snapshot_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_volume_snapshot({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_volume_snapshot name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_volume_snapshot({ 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_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(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_volume_snapshot_client_stub.call_rpc_count - end - end - - def test_get_volume_snapshot - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_volume_snapshot, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_volume_snapshot_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_volume_snapshot({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_volume_snapshot name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_volume_snapshot({ 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_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(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_volume_snapshot_client_stub.call_rpc_count - end - end - - def test_list_volume_snapshots - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_volume_snapshots_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_volume_snapshots, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, 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_volume_snapshots_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_volume_snapshots({ parent: parent, page_size: page_size, page_token: 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_volume_snapshots parent: parent, page_size: page_size, page_token: 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_volume_snapshots ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.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_volume_snapshots({ 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_volume_snapshots(::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.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_volume_snapshots_client_stub.call_rpc_count - end - end - - def test_get_lun - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Lun.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lun, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetLunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lun_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lun({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lun name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_lun ::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_lun({ 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_lun(::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(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_lun_client_stub.call_rpc_count - end - end - - def test_list_luns - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_luns_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_luns, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, 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_luns_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_luns({ parent: parent, page_size: page_size, page_token: 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_luns parent: parent, page_size: page_size, page_token: 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_luns ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.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_luns({ 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_luns(::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.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_luns_client_stub.call_rpc_count - end - end - - def test_evict_lun - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - evict_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :evict_lun, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, evict_lun_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.evict_lun({ 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.evict_lun 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.evict_lun ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.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.evict_lun({ 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.evict_lun(::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.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, evict_lun_client_stub.call_rpc_count - end - end - - def test_get_nfs_share - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_nfs_share, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_nfs_share_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_nfs_share({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_nfs_share name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_nfs_share ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_nfs_share({ 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_nfs_share(::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(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_nfs_share_client_stub.call_rpc_count - end - end - - def test_list_nfs_shares - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_nfs_shares_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_nfs_shares, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, 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_nfs_shares_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_nfs_shares({ 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_nfs_shares 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_nfs_shares ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.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_nfs_shares({ 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_nfs_shares(::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.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_nfs_shares_client_stub.call_rpc_count - end - end - - def test_update_nfs_share - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - nfs_share = {} - update_mask = {} - - update_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_nfs_share, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::NfsShare), request["nfs_share"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_nfs_share_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_nfs_share({ nfs_share: nfs_share, 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_nfs_share nfs_share: nfs_share, 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_nfs_share ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, 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_nfs_share({ nfs_share: nfs_share, 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_nfs_share(::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, 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_nfs_share_client_stub.call_rpc_count - end - end - - def test_create_nfs_share - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - nfs_share = {} - - create_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_nfs_share, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::NfsShare), request["nfs_share"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_nfs_share_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_nfs_share({ parent: parent, nfs_share: nfs_share }) do |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_nfs_share parent: parent, nfs_share: nfs_share do |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_nfs_share ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share) do |response, operation| - 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_nfs_share({ parent: parent, nfs_share: nfs_share }, grpc_options) do |response, operation| - 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_nfs_share(::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share), grpc_options) do |response, operation| - assert_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_nfs_share_client_stub.call_rpc_count - end - end - - def test_rename_nfs_share - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_nfsshare_id = "hello world" - - rename_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rename_nfs_share, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["new_nfsshare_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rename_nfs_share_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.rename_nfs_share name: name, new_nfsshare_id: new_nfsshare_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.rename_nfs_share ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.rename_nfs_share(::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rename_nfs_share_client_stub.call_rpc_count - end - end - - def test_delete_nfs_share - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_nfs_share, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_nfs_share_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_nfs_share({ 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_nfs_share 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_nfs_share ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.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_nfs_share({ 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_nfs_share(::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.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_nfs_share_client_stub.call_rpc_count - end - end - - def test_list_provisioning_quotas - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_provisioning_quotas_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_provisioning_quotas, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, 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_provisioning_quotas_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_provisioning_quotas({ parent: parent, page_size: page_size, page_token: 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_provisioning_quotas parent: parent, page_size: page_size, page_token: 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_provisioning_quotas ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.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_provisioning_quotas({ 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_provisioning_quotas(::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.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_provisioning_quotas_client_stub.call_rpc_count - end - end - - def test_submit_provisioning_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - provisioning_config = {} - email = "hello world" - - submit_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :submit_provisioning_config, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] - assert_equal "hello world", request["email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, submit_provisioning_config_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.submit_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.submit_provisioning_config ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.submit_provisioning_config(::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, submit_provisioning_config_client_stub.call_rpc_count - end - end - - def test_get_provisioning_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_provisioning_config, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_provisioning_config_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_provisioning_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_provisioning_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_provisioning_config ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_provisioning_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_provisioning_config(::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(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_provisioning_config_client_stub.call_rpc_count - end - end - - def test_create_provisioning_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - provisioning_config = {} - email = "hello world" - - create_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_provisioning_config, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] - assert_equal "hello world", request["email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_provisioning_config_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_provisioning_config ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_provisioning_config(::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_provisioning_config_client_stub.call_rpc_count - end - end - - def test_update_provisioning_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - provisioning_config = {} - update_mask = {} - email = "hello world" - - update_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_provisioning_config, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_provisioning_config_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_provisioning_config provisioning_config: provisioning_config, update_mask: update_mask, email: email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_provisioning_config ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_provisioning_config(::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_provisioning_config_client_stub.call_rpc_count - end - end - - def test_rename_network - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Network.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_network_id = "hello world" - - rename_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rename_network, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["new_network_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rename_network_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.rename_network({ name: name, new_network_id: new_network_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.rename_network name: name, new_network_id: new_network_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.rename_network ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.rename_network({ name: name, new_network_id: new_network_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.rename_network(::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rename_network_client_stub.call_rpc_count - end - end - - def test_list_os_images - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_os_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_os_images, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, 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_os_images_client_stub do - # Create client - c = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_os_images({ parent: parent, page_size: page_size, page_token: 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_os_images parent: parent, page_size: page_size, page_token: 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_os_images ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.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_os_images({ 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_os_images(::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.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_os_images_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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::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::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-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-batch-v1/.gitignore b/owl-bot-staging/google-cloud-batch-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json deleted file mode 100644 index e36027edffb2..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "api_id": "batch.googleapis.com", - "api_shortname": "batch", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest", - "distribution_name": "google-cloud-batch-v1", - "is_cloud": true, - "language": "ruby", - "name": "batch", - "name_pretty": "Batch V1 API", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. Note that google-cloud-batch-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-batch instead. See the readme for more details.", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml b/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml deleted file mode 100644 index dfe88aff925c..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-batch-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-batch-v1.rb" diff --git a/owl-bot-staging/google-cloud-batch-v1/.toys.rb b/owl-bot-staging/google-cloud-batch-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/.yardopts b/owl-bot-staging/google-cloud-batch-v1/.yardopts deleted file mode 100644 index 5628edd53225..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Batch 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-batch-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md deleted file mode 100644 index 08e3de31e49e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-batch-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-batch-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/batch/v1" - -client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/batch/v1" - -::Google::Cloud::Batch::V1::BatchService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Batch::V1::BatchService::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-batch-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/batch/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Batch::V1::BatchService::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-batch-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-batch-v1/Gemfile b/owl-bot-staging/google-cloud-batch-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/LICENSE.md b/owl-bot-staging/google-cloud-batch-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/README.md b/owl-bot-staging/google-cloud-batch-v1/README.md deleted file mode 100644 index 0769ac925913..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/README.md +++ /dev/null @@ -1,151 +0,0 @@ -# Ruby Client for the Batch V1 API - -An API to manage the running of Batch resources on Google Cloud Platform. - -Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Batch V1 API. Most users should consider using -the main client gem, -[google-cloud-batch](https://rubygems.org/gems/google-cloud-batch). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-batch-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/batch.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/batch/v1" - -client = ::Google::Cloud::Batch::V1::BatchService::Client.new -request = ::Google::Cloud::Batch::V1::CreateJobRequest.new # (request fields as keyword arguments...) -response = client.create_job request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest) -for class and method documentation. - -## 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/batch/v1" -require "logger" - -client = ::Google::Cloud::Batch::V1::BatchService::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-batch`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-batch-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-batch`. -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-batch-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-batch-v1/Rakefile b/owl-bot-staging/google-cloud-batch-v1/Rakefile deleted file mode 100644 index 639b120c30c6..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-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/batch/v1/batch_service/credentials" - ::Google::Cloud::Batch::V1::BatchService::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-batch-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-batch-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-batch-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-batch-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-batch-v1" - header "google-cloud-batch-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-batch-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-batch-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-batch-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-batch-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-batch-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json deleted file mode 100644 index 58078d42bdf0..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.batch.v1", - "libraryPackage": "::Google::Cloud::Batch::V1", - "services": { - "BatchService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Batch::V1::BatchService::Client", - "rpcs": { - "CreateJob": { - "methods": [ - "create_job" - ] - }, - "GetJob": { - "methods": [ - "get_job" - ] - }, - "DeleteJob": { - "methods": [ - "delete_job" - ] - }, - "CancelJob": { - "methods": [ - "cancel_job" - ] - }, - "ListJobs": { - "methods": [ - "list_jobs" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec b/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec deleted file mode 100644 index bd34e5aac37b..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/batch/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-batch-v1" - gem.version = Google::Cloud::Batch::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. Note that google-cloud-batch-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-batch instead. See the readme for more details." - gem.summary = "An API to manage the running of Batch resources on Google Cloud Platform." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.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-batch-v1/lib/google-cloud-batch-v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb deleted file mode 100644 index d1d4a294e405..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/batch/v1" -# require "google/iam/v1" diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb deleted file mode 100644 index fe260a4306e2..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/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/batch/v1/batch_service" -require "google/cloud/batch/v1/version" - -module Google - module Cloud - module Batch - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/batch/v1" - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/batch/v1" - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/batch/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb deleted file mode 100644 index 32d4ce08cba2..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/batch/v1/batch.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/batch/v1/job_pb' -require 'google/cloud/batch/v1/task_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n!google/cloud/batch/v1/batch.proto\x12\x15google.cloud.batch.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\x1fgoogle/cloud/batch/v1/job.proto\x1a google/cloud/batch/v1/task.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\x01\n\x10\x43reateJobRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x62\x61tch.googleapis.com/Job\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12,\n\x03job\x18\x03 \x01(\x0b\x32\x1a.google.cloud.batch.v1.JobB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"?\n\rGetJobRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x62\x61tch.googleapis.com/Job\"N\n\x10\x44\x65leteJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"c\n\x10\x43\x61ncelJobRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x62\x61tch.googleapis.com/Job\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x13\n\x11\x43\x61ncelJobResponse\"o\n\x0fListJobsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"j\n\x10ListJobsResponse\x12(\n\x04jobs\x18\x01 \x03(\x0b\x32\x1a.google.cloud.batch.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61tch.googleapis.com/TaskGroup\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\"m\n\x11ListTasksResponse\x12*\n\x05tasks\x18\x01 \x03(\x0b\x32\x1b.google.cloud.batch.v1.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"A\n\x0eGetTaskRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x62\x61tch.googleapis.com/Task\"\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\xa5\n\n\x0c\x42\x61tchService\x12\x9b\x01\n\tCreateJob\x12\'.google.cloud.batch.v1.CreateJobRequest\x1a\x1a.google.cloud.batch.v1.Job\"I\xda\x41\x11parent,job,job_id\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/jobs:\x03job\x12\x83\x01\n\x06GetJob\x12$.google.cloud.batch.v1.GetJobRequest\x1a\x1a.google.cloud.batch.v1.Job\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/jobs/*}\x12\xcf\x01\n\tDeleteJob\x12\'.google.cloud.batch.v1.DeleteJobRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41@\n\x15google.protobuf.Empty\x12\'google.cloud.batch.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/jobs/*}\x12\xec\x01\n\tCancelJob\x12\'.google.cloud.batch.v1.CancelJobRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41R\n\'google.cloud.batch.v1.CancelJobResponse\x12\'google.cloud.batch.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/locations/*/jobs/*}:cancel:\x01*\x12\x96\x01\n\x08ListJobs\x12&.google.cloud.batch.v1.ListJobsRequest\x1a\'.google.cloud.batch.v1.ListJobsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/jobs\x12\x9b\x01\n\x07GetTask\x12%.google.cloud.batch.v1.GetTaskRequest\x1a\x1b.google.cloud.batch.v1.Task\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}\x12\xae\x01\n\tListTasks\x12\'.google.cloud.batch.v1.ListTasksRequest\x1a(.google.cloud.batch.v1.ListTasksResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasks\x1aH\xca\x41\x14\x62\x61tch.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xab\x01\n\x19\x63om.google.cloud.batch.v1B\nBatchProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Batch - module V1 - CreateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CreateJobRequest").msgclass - GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GetJobRequest").msgclass - DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.DeleteJobRequest").msgclass - CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CancelJobRequest").msgclass - CancelJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CancelJobResponse").msgclass - ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListJobsRequest").msgclass - ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListJobsResponse").msgclass - ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListTasksRequest").msgclass - ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListTasksResponse").msgclass - GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GetTaskRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb deleted file mode 100644 index d6104f270747..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/batch/v1/version" - -require "google/cloud/batch/v1/batch_service/credentials" -require "google/cloud/batch/v1/batch_service/paths" -require "google/cloud/batch/v1/batch_service/operations" -require "google/cloud/batch/v1/batch_service/client" -require "google/cloud/batch/v1/batch_service/rest" - -module Google - module Cloud - module Batch - module V1 - ## - # Google Batch Service. - # The service manages user submitted batch jobs and allocates Google Compute - # Engine VM instances to run the jobs. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/batch/v1/batch_service" - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/batch/v1/batch_service/rest" - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - module BatchService - end - end - end - end -end - -helper_path = ::File.join __dir__, "batch_service", "helpers.rb" -require "google/cloud/batch/v1/batch_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb deleted file mode 100644 index 72b6b44bd7a6..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb +++ /dev/null @@ -1,1192 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/batch/v1/batch_pb" -require "google/cloud/location" - -module Google - module Cloud - module Batch - module V1 - module BatchService - ## - # Client for the BatchService service. - # - # Google Batch Service. - # The service manages user submitted batch jobs and allocates Google Compute - # Engine VM instances to run the jobs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :batch_service_stub - - ## - # Configure the BatchService Client class. - # - # See {::Google::Cloud::Batch::V1::BatchService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BatchService clients - # ::Google::Cloud::Batch::V1::BatchService::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", "Batch", "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_job.timeout = 60.0 - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_job.timeout = 60.0 - - default_config.rpcs.cancel_job.timeout = 60.0 - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.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 BatchService 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::Batch::V1::BatchService::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 - @batch_service_stub.universe_domain - end - - ## - # Create a new BatchService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BatchService 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/batch/v1/batch_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 - - @batch_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Batch::V1::BatchService::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 - ) - - @batch_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 = @batch_service_stub.endpoint - config.universe_domain = @batch_service_stub.universe_domain - config.logger = @batch_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Batch::V1::BatchService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @batch_service_stub.logger - end - - # Service calls - - ## - # Create a Job. - # - # @overload create_job(request, options = nil) - # Pass arguments to `create_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::CreateJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::CreateJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_job(parent: nil, job_id: nil, job: nil, request_id: nil) - # Pass arguments to `create_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name where the Job will be created. - # Pattern: "projects/\\{project}/locations/\\{location}" - # @param job_id [::String] - # ID used to uniquely identify the Job within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and '-' are accepted. - # The '-' character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The job.name field in the request will be ignored and the created resource - # name of the Job will be "\\{parent}/jobs/\\{job_id}". - # @param job [::Google::Cloud::Batch::V1::Job, ::Hash] - # Required. The Job to create. - # @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 [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::CreateJobRequest.new - # - # # Call the create_job method. - # result = client.create_job request - # - # # The returned object is of type Google::Cloud::Batch::V1::Job. - # p result - # - def create_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CreateJobRequest - - # Converts hash and nil to 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :create_job, request, 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 Job specified by its resource name. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Job name. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Batch::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :get_job, request, 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 Job. - # - # @overload delete_job(request, options = nil) - # Pass arguments to `delete_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::DeleteJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::DeleteJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_job(name: nil, reason: nil, request_id: nil) - # Pass arguments to `delete_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Job name. - # @param reason [::String] - # Optional. Reason for this deletion. - # @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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::DeleteJobRequest.new - # - # # Call the delete_job method. - # result = client.delete_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::DeleteJobRequest - - # Converts hash and nil to 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :delete_job, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel a Job. - # - # @overload cancel_job(request, options = nil) - # Pass arguments to `cancel_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::CancelJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::CancelJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_job(name: nil, request_id: nil) - # Pass arguments to `cancel_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Job name. - # @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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::CancelJobRequest.new - # - # # Call the cancel_job method. - # result = client.cancel_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def cancel_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CancelJobRequest - - # Converts hash and nil to 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :cancel_job, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all Jobs for a project within a region. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Batch::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_jobs(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To 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 path. - # @param filter [::String] - # List filter. - # @param order_by [::String] - # Optional. Sort results. Supported are "name", "name desc", "create_time", - # and "create_time desc". - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Batch::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @batch_service_stub, :list_jobs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Return a single Task. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Batch::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Task name. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Batch::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Batch::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Batch::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :get_task, request, 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 Tasks associated with a job. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Batch::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 a TaskGroup from which Tasks are being requested. - # Pattern: - # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" - # @param filter [::String] - # Task filter, null filter matches all Tasks. - # Filter string should be of the format State=TaskStatus.State e.g. - # State=RUNNING - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Batch::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @batch_service_stub, :list_tasks, request, response, 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 BatchService API. - # - # This class represents the configuration for BatchService, - # providing control 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::Batch::V1::BatchService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_job to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Batch::V1::BatchService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Batch::V1::BatchService::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 = "batch.googleapis.com" - - config_attr :endpoint, nil, ::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 BatchService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `delete_job` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job - ## - # RPC-specific configuration for `cancel_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_job - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - - # @private - def initialize parent_rpcs = nil - create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job - @create_job = ::Gapic::Config::Method.new create_job_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job - @delete_job = ::Gapic::Config::Method.new delete_job_config - cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job - @cancel_job = ::Gapic::Config::Method.new cancel_job_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb deleted file mode 100644 index 6a4be9120312..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Batch - module V1 - module BatchService - # Credentials for the BatchService 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-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb deleted file mode 100644 index 901498db28be..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_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 Batch - module V1 - module BatchService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BatchService 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 BatchService 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::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Batch::V1::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 = "batch.googleapis.com" - - config_attr :endpoint, nil, ::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-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb deleted file mode 100644 index b30e342ea480..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.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 Batch - module V1 - module BatchService - # Path helper methods for the BatchService API. - module Paths - ## - # Create a fully-qualified Job resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/jobs/{job}` - # - # @param project [String] - # @param location [String] - # @param job [String] - # - # @return [::String] - def job_path project:, location:, 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}/jobs/#{job}" - 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 Task resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}` - # - # @param project [String] - # @param location [String] - # @param job [String] - # @param task_group [String] - # @param task [String] - # - # @return [::String] - def task_path project:, location:, job:, task_group:, task: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/" - raise ::ArgumentError, "task_group cannot contain /" if task_group.to_s.include? "/" - - "projects/#{project}/locations/#{location}/jobs/#{job}/taskGroups/#{task_group}/tasks/#{task}" - end - - ## - # Create a fully-qualified TaskGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}` - # - # @param project [String] - # @param location [String] - # @param job [String] - # @param task_group [String] - # - # @return [::String] - def task_group_path project:, location:, job:, task_group: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/" - - "projects/#{project}/locations/#{location}/jobs/#{job}/taskGroups/#{task_group}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb deleted file mode 100644 index 8c251def07d4..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_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/batch/v1/version" -require "google/cloud/batch/v1/bindings_override" - -require "google/cloud/batch/v1/batch_service/credentials" -require "google/cloud/batch/v1/batch_service/paths" -require "google/cloud/batch/v1/batch_service/rest/operations" -require "google/cloud/batch/v1/batch_service/rest/client" - -module Google - module Cloud - module Batch - module V1 - ## - # Google Batch Service. - # The service manages user submitted batch jobs and allocates Google Compute - # Engine VM instances to run the jobs. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/batch/v1/batch_service/rest" - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - module BatchService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/batch/v1/batch_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb deleted file mode 100644 index 907bbca3ee39..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb +++ /dev/null @@ -1,1108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/batch/v1/batch_pb" -require "google/cloud/batch/v1/batch_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Batch - module V1 - module BatchService - module Rest - ## - # REST client for the BatchService service. - # - # Google Batch Service. - # The service manages user submitted batch jobs and allocates Google Compute - # Engine VM instances to run the jobs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :batch_service_stub - - ## - # Configure the BatchService Client class. - # - # See {::Google::Cloud::Batch::V1::BatchService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BatchService clients - # ::Google::Cloud::Batch::V1::BatchService::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", "Batch", "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_job.timeout = 60.0 - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_job.timeout = 60.0 - - default_config.rpcs.cancel_job.timeout = 60.0 - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.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 BatchService 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::Batch::V1::BatchService::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 - @batch_service_stub.universe_domain - end - - ## - # Create a new BatchService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BatchService 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::Batch::V1::BatchService::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 - - @batch_service_stub = ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @batch_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 = @batch_service_stub.endpoint - config.universe_domain = @batch_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @batch_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Batch::V1::BatchService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @batch_service_stub.logger - end - - # Service calls - - ## - # Create a Job. - # - # @overload create_job(request, options = nil) - # Pass arguments to `create_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::CreateJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::CreateJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_job(parent: nil, job_id: nil, job: nil, request_id: nil) - # Pass arguments to `create_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name where the Job will be created. - # Pattern: "projects/\\{project}/locations/\\{location}" - # @param job_id [::String] - # ID used to uniquely identify the Job within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and '-' are accepted. - # The '-' character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The job.name field in the request will be ignored and the created resource - # name of the Job will be "\\{parent}/jobs/\\{job_id}". - # @param job [::Google::Cloud::Batch::V1::Job, ::Hash] - # Required. The Job to create. - # @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 [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::CreateJobRequest.new - # - # # Call the create_job method. - # result = client.create_job request - # - # # The returned object is of type Google::Cloud::Batch::V1::Job. - # p result - # - def create_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CreateJobRequest - - # Converts hash and nil to an 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.create_job request, 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 Job specified by its resource name. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Job name. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Batch::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.get_job request, 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 Job. - # - # @overload delete_job(request, options = nil) - # Pass arguments to `delete_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::DeleteJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::DeleteJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_job(name: nil, reason: nil, request_id: nil) - # Pass arguments to `delete_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Job name. - # @param reason [::String] - # Optional. Reason for this deletion. - # @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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::DeleteJobRequest.new - # - # # Call the delete_job method. - # result = client.delete_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::DeleteJobRequest - - # Converts hash and nil to an 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.delete_job request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel a Job. - # - # @overload cancel_job(request, options = nil) - # Pass arguments to `cancel_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::CancelJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::CancelJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_job(name: nil, request_id: nil) - # Pass arguments to `cancel_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Job name. - # @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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::CancelJobRequest.new - # - # # Call the cancel_job method. - # result = client.cancel_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def cancel_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CancelJobRequest - - # Converts hash and nil to an 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.cancel_job request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all Jobs for a project within a region. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Batch::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_jobs(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To 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 path. - # @param filter [::String] - # List filter. - # @param order_by [::String] - # Optional. Sort results. Supported are "name", "name desc", "create_time", - # and "create_time desc". - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Batch::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.list_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @batch_service_stub, :list_jobs, "jobs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Return a single Task. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Batch::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Task name. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Batch::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.get_task request, 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 Tasks associated with a job. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Batch::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 a TaskGroup from which Tasks are being requested. - # Pattern: - # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" - # @param filter [::String] - # Task filter, null filter matches all Tasks. - # Filter string should be of the format State=TaskStatus.State e.g. - # State=RUNNING - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Batch::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.list_tasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @batch_service_stub, :list_tasks, "tasks", request, result, 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 BatchService REST API. - # - # This class represents the configuration for BatchService 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::Batch::V1::BatchService::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_job to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Batch::V1::BatchService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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 = "batch.googleapis.com" - - config_attr :endpoint, nil, ::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 BatchService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `delete_job` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job - ## - # RPC-specific configuration for `cancel_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_job - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - - # @private - def initialize parent_rpcs = nil - create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job - @create_job = ::Gapic::Config::Method.new create_job_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job - @delete_job = ::Gapic::Config::Method.new delete_job_config - cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job - @cancel_job = ::Gapic::Config::Method.new cancel_job_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb deleted file mode 100644 index 1240267dbffc..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_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 Batch - module V1 - module BatchService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BatchService 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 BatchService 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::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "batch.googleapis.com" - - config_attr :endpoint, nil, ::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-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb deleted file mode 100644 index c5de3cdedd51..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb +++ /dev/null @@ -1,510 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/batch/v1/batch_pb" - -module Google - module Cloud - module Batch - module V1 - module BatchService - module Rest - ## - # REST service stub for the BatchService 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_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::CreateJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # A result object deserialized from the server's reply - def create_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Batch::V1::Job.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # A result object deserialized from the server's reply - def get_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Batch::V1::Job.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_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::DeleteJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::CancelJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def cancel_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_jobs REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::ListJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::ListJobsResponse] - # A result object deserialized from the server's reply - def list_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Batch::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Batch::V1::Task.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_tasks REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Batch::V1::ListTasksResponse.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_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::CreateJobRequest] - # 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_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/jobs", - body: "job", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::DeleteJobRequest] - # 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_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::CancelJobRequest] - # 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_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb deleted file mode 100644 index 6619a0c9e9fb..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/batch/v1/batch.proto for package 'Google.Cloud.Batch.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/batch/v1/batch_pb' - -module Google - module Cloud - module Batch - module V1 - module BatchService - # Google Batch Service. - # The service manages user submitted batch jobs and allocates Google Compute - # Engine VM instances to run the jobs. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.batch.v1.BatchService' - - # Create a Job. - rpc :CreateJob, ::Google::Cloud::Batch::V1::CreateJobRequest, ::Google::Cloud::Batch::V1::Job - # Get a Job specified by its resource name. - rpc :GetJob, ::Google::Cloud::Batch::V1::GetJobRequest, ::Google::Cloud::Batch::V1::Job - # Delete a Job. - rpc :DeleteJob, ::Google::Cloud::Batch::V1::DeleteJobRequest, ::Google::Longrunning::Operation - # Cancel a Job. - rpc :CancelJob, ::Google::Cloud::Batch::V1::CancelJobRequest, ::Google::Longrunning::Operation - # List all Jobs for a project within a region. - rpc :ListJobs, ::Google::Cloud::Batch::V1::ListJobsRequest, ::Google::Cloud::Batch::V1::ListJobsResponse - # Return a single Task. - rpc :GetTask, ::Google::Cloud::Batch::V1::GetTaskRequest, ::Google::Cloud::Batch::V1::Task - # List Tasks associated with a job. - rpc :ListTasks, ::Google::Cloud::Batch::V1::ListTasksRequest, ::Google::Cloud::Batch::V1::ListTasksResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb deleted file mode 100644 index 16f6486ef2cf..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/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 Batch - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/batch/v1/rest" - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Batch"] - 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-batch-v1/lib/google/cloud/batch/v1/job_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb deleted file mode 100644 index 8127bff9136b..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/batch/v1/job.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/batch/v1/task_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\x1fgoogle/cloud/batch/v1/job.proto\x12\x15google.cloud.batch.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/cloud/batch/v1/task.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x05\n\x03Job\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08priority\x18\x03 \x01(\x03\x12:\n\x0btask_groups\x18\x04 \x03(\x0b\x32 .google.cloud.batch.v1.TaskGroupB\x03\xe0\x41\x02\x12\x42\n\x11\x61llocation_policy\x18\x07 \x01(\x0b\x32\'.google.cloud.batch.v1.AllocationPolicy\x12\x36\n\x06labels\x18\x08 \x03(\x0b\x32&.google.cloud.batch.v1.Job.LabelsEntry\x12\x35\n\x06status\x18\t \x01(\x0b\x32 .google.cloud.batch.v1.JobStatusB\x03\xe0\x41\x03\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\x12\x36\n\x0blogs_policy\x18\r \x01(\x0b\x32!.google.cloud.batch.v1.LogsPolicy\x12=\n\rnotifications\x18\x0e \x03(\x0b\x32&.google.cloud.batch.v1.JobNotification\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:Q\xea\x41N\n\x18\x62\x61tch.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}\"\xcd\x02\n\nLogsPolicy\x12\x42\n\x0b\x64\x65stination\x18\x01 \x01(\x0e\x32-.google.cloud.batch.v1.LogsPolicy.Destination\x12\x11\n\tlogs_path\x18\x02 \x01(\t\x12W\n\x14\x63loud_logging_option\x18\x03 \x01(\x0b\x32\x34.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionB\x03\xe0\x41\x01\x1a\x46\n\x12\x43loudLoggingOption\x12\x30\n#use_generic_task_monitored_resource\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x0b\x44\x65stination\x12\x1b\n\x17\x44\x45STINATION_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_LOGGING\x10\x01\x12\x08\n\x04PATH\x10\x02\"\xae\x07\n\tJobStatus\x12\x35\n\x05state\x18\x01 \x01(\x0e\x32&.google.cloud.batch.v1.JobStatus.State\x12\x39\n\rstatus_events\x18\x02 \x03(\x0b\x32\".google.cloud.batch.v1.StatusEvent\x12\x45\n\x0btask_groups\x18\x04 \x03(\x0b\x32\x30.google.cloud.batch.v1.JobStatus.TaskGroupsEntry\x12/\n\x0crun_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xd1\x01\n\x0eInstanceStatus\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12U\n\x12provisioning_model\x18\x02 \x01(\x0e\x32\x39.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel\x12\x11\n\ttask_pack\x18\x03 \x01(\x03\x12?\n\tboot_disk\x18\x04 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.Disk\x1a\xd2\x01\n\x0fTaskGroupStatus\x12L\n\x06\x63ounts\x18\x01 \x03(\x0b\x32<.google.cloud.batch.v1.JobStatus.TaskGroupStatus.CountsEntry\x12\x42\n\tinstances\x18\x02 \x03(\x0b\x32/.google.cloud.batch.v1.JobStatus.InstanceStatus\x1a-\n\x0b\x43ountsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x63\n\x0fTaskGroupsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.google.cloud.batch.v1.JobStatus.TaskGroupStatus:\x02\x38\x01\"\xa8\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\r\n\tSCHEDULED\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x18\n\x14\x44\x45LETION_IN_PROGRESS\x10\x06\x12\x1c\n\x18\x43\x41NCELLATION_IN_PROGRESS\x10\x07\x12\r\n\tCANCELLED\x10\x08\"\xfc\x02\n\x0fJobNotification\x12\x14\n\x0cpubsub_topic\x18\x01 \x01(\t\x12?\n\x07message\x18\x02 \x01(\x0b\x32..google.cloud.batch.v1.JobNotification.Message\x1a\xc4\x01\n\x07Message\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.google.cloud.batch.v1.JobNotification.Type\x12=\n\rnew_job_state\x18\x02 \x01(\x0e\x32&.google.cloud.batch.v1.JobStatus.State\x12?\n\x0enew_task_state\x18\x03 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\"K\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11JOB_STATE_CHANGED\x10\x01\x12\x16\n\x12TASK_STATE_CHANGED\x10\x02\"\xad\x0f\n\x10\x41llocationPolicy\x12H\n\x08location\x18\x01 \x01(\x0b\x32\x36.google.cloud.batch.v1.AllocationPolicy.LocationPolicy\x12S\n\tinstances\x18\x08 \x03(\x0b\x32@.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate\x12>\n\x0fservice_account\x18\t \x01(\x0b\x32%.google.cloud.batch.v1.ServiceAccount\x12\x43\n\x06labels\x18\x06 \x03(\x0b\x32\x33.google.cloud.batch.v1.AllocationPolicy.LabelsEntry\x12\x46\n\x07network\x18\x07 \x01(\x0b\x32\x35.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy\x12J\n\tplacement\x18\n \x01(\x0b\x32\x37.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy\x12\x11\n\x04tags\x18\x0b \x03(\tB\x03\xe0\x41\x01\x1a+\n\x0eLocationPolicy\x12\x19\n\x11\x61llowed_locations\x18\x01 \x03(\t\x1aq\n\x04\x44isk\x12\x0f\n\x05image\x18\x04 \x01(\tH\x00\x12\x12\n\x08snapshot\x18\x05 \x01(\tH\x00\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07size_gb\x18\x02 \x01(\x03\x12\x16\n\x0e\x64isk_interface\x18\x06 \x01(\tB\r\n\x0b\x64\x61ta_source\x1a\x8a\x01\n\x0c\x41ttachedDisk\x12@\n\x08new_disk\x18\x01 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.DiskH\x00\x12\x17\n\rexisting_disk\x18\x02 \x01(\tH\x00\x12\x13\n\x0b\x64\x65vice_name\x18\x03 \x01(\tB\n\n\x08\x61ttached\x1ah\n\x0b\x41\x63\x63\x65lerator\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\x1f\n\x13install_gpu_drivers\x18\x03 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x0e\x64river_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x82\x03\n\x0eInstancePolicy\x12\x14\n\x0cmachine_type\x18\x02 \x01(\t\x12\x18\n\x10min_cpu_platform\x18\x03 \x01(\t\x12U\n\x12provisioning_model\x18\x04 \x01(\x0e\x32\x39.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel\x12I\n\x0c\x61\x63\x63\x65lerators\x18\x05 \x03(\x0b\x32\x33.google.cloud.batch.v1.AllocationPolicy.Accelerator\x12?\n\tboot_disk\x18\x08 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.Disk\x12\x43\n\x05\x64isks\x18\x06 \x03(\x0b\x32\x34.google.cloud.batch.v1.AllocationPolicy.AttachedDisk\x12\x18\n\x0breservation\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\xf6\x01\n\x18InstancePolicyOrTemplate\x12H\n\x06policy\x18\x01 \x01(\x0b\x32\x36.google.cloud.batch.v1.AllocationPolicy.InstancePolicyH\x00\x12\x1b\n\x11instance_template\x18\x02 \x01(\tH\x00\x12\x1b\n\x13install_gpu_drivers\x18\x03 \x01(\x08\x12\x1e\n\x11install_ops_agent\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x62lock_project_ssh_keys\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x42\x11\n\x0fpolicy_template\x1aW\n\x10NetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\x12\x1e\n\x16no_external_ip_address\x18\x03 \x01(\x08\x1a\x65\n\rNetworkPolicy\x12T\n\x12network_interfaces\x18\x01 \x03(\x0b\x32\x38.google.cloud.batch.v1.AllocationPolicy.NetworkInterface\x1a<\n\x0fPlacementPolicy\x12\x13\n\x0b\x63ollocation\x18\x01 \x01(\t\x12\x14\n\x0cmax_distance\x18\x02 \x01(\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8b\x01\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\x12\x13\n\x0bPREEMPTIBLE\x10\x03\x1a\x02\x08\x01\x12\x15\n\x11RESERVATION_BOUND\x10\x04\x12\x0e\n\nFLEX_START\x10\x05\"\xcb\x04\n\tTaskGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x37\n\ttask_spec\x18\x03 \x01(\x0b\x32\x1f.google.cloud.batch.v1.TaskSpecB\x03\xe0\x41\x02\x12\x12\n\ntask_count\x18\x04 \x01(\x03\x12\x13\n\x0bparallelism\x18\x05 \x01(\x03\x12L\n\x11scheduling_policy\x18\x06 \x01(\x0e\x32\x31.google.cloud.batch.v1.TaskGroup.SchedulingPolicy\x12=\n\x11task_environments\x18\t \x03(\x0b\x32\".google.cloud.batch.v1.Environment\x12\x1b\n\x13task_count_per_node\x18\n \x01(\x03\x12\x1a\n\x12require_hosts_file\x18\x0b \x01(\x08\x12\x16\n\x0epermissive_ssh\x18\x0c \x01(\x08\x12\x1c\n\x0frun_as_non_root\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\"\\\n\x10SchedulingPolicy\x12!\n\x1dSCHEDULING_POLICY_UNSPECIFIED\x10\x00\x12\x17\n\x13\x41S_SOON_AS_POSSIBLE\x10\x01\x12\x0c\n\x08IN_ORDER\x10\x02:o\xea\x41l\n\x1e\x62\x61tch.googleapis.com/TaskGroup\x12Jprojects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}\"/\n\x0eServiceAccount\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x0e\n\x06scopes\x18\x02 \x03(\tB\xa9\x01\n\x19\x63om.google.cloud.batch.v1B\x08JobProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Batch - module V1 - Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Job").msgclass - LogsPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy").msgclass - LogsPolicy::CloudLoggingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy.CloudLoggingOption").msgclass - LogsPolicy::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy.Destination").enummodule - JobStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus").msgclass - JobStatus::InstanceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.InstanceStatus").msgclass - JobStatus::TaskGroupStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.TaskGroupStatus").msgclass - JobStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.State").enummodule - JobNotification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification").msgclass - JobNotification::Message = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification.Message").msgclass - JobNotification::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification.Type").enummodule - AllocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy").msgclass - AllocationPolicy::LocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.LocationPolicy").msgclass - AllocationPolicy::Disk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.Disk").msgclass - AllocationPolicy::AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.AttachedDisk").msgclass - AllocationPolicy::Accelerator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.Accelerator").msgclass - AllocationPolicy::InstancePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicy").msgclass - AllocationPolicy::InstancePolicyOrTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate").msgclass - AllocationPolicy::NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkInterface").msgclass - AllocationPolicy::NetworkPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkPolicy").msgclass - AllocationPolicy::PlacementPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.PlacementPolicy").msgclass - AllocationPolicy::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.ProvisioningModel").enummodule - TaskGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskGroup").msgclass - TaskGroup::SchedulingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskGroup.SchedulingPolicy").enummodule - ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ServiceAccount").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb deleted file mode 100644 index 4c1a51eb92d3..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/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/batch/v1/batch_service/rest" -require "google/cloud/batch/v1/bindings_override" -require "google/cloud/batch/v1/version" - -module Google - module Cloud - module Batch - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/batch/v1/rest" - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb deleted file mode 100644 index a3e7ce4ede39..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/batch/v1/task.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/batch/v1/volume_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n google/cloud/batch/v1/task.proto\x12\x15google.cloud.batch.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\"google/cloud/batch/v1/volume.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"O\n\x0f\x43omputeResource\x12\x11\n\tcpu_milli\x18\x01 \x01(\x03\x12\x12\n\nmemory_mib\x18\x02 \x01(\x03\x12\x15\n\rboot_disk_mib\x18\x04 \x01(\x03\"\xdb\x01\n\x0bStatusEvent\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12.\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x0etask_execution\x18\x04 \x01(\x0b\x32$.google.cloud.batch.v1.TaskExecution\x12;\n\ntask_state\x18\x05 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\"\"\n\rTaskExecution\x12\x11\n\texit_code\x18\x01 \x01(\x05\"\xf2\x01\n\nTaskStatus\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\x12\x39\n\rstatus_events\x18\x02 \x03(\x0b\x32\".google.cloud.batch.v1.StatusEvent\"q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x41SSIGNED\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05\x12\x0e\n\nUNEXECUTED\x10\x06\"\x9e\x06\n\x08Runnable\x12>\n\tcontainer\x18\x01 \x01(\x0b\x32).google.cloud.batch.v1.Runnable.ContainerH\x00\x12\x38\n\x06script\x18\x02 \x01(\x0b\x32&.google.cloud.batch.v1.Runnable.ScriptH\x00\x12:\n\x07\x62\x61rrier\x18\x06 \x01(\x0b\x32\'.google.cloud.batch.v1.Runnable.BarrierH\x00\x12\x19\n\x0c\x64isplay_name\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\x12ignore_exit_status\x18\x03 \x01(\x08\x12\x12\n\nbackground\x18\x04 \x01(\x08\x12\x12\n\nalways_run\x18\x05 \x01(\x08\x12\x37\n\x0b\x65nvironment\x18\x07 \x01(\x0b\x32\".google.cloud.batch.v1.Environment\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\x06labels\x18\t \x03(\x0b\x32+.google.cloud.batch.v1.Runnable.LabelsEntry\x1a\xcf\x01\n\tContainer\x12\x11\n\timage_uri\x18\x01 \x01(\t\x12\x10\n\x08\x63ommands\x18\x02 \x03(\t\x12\x12\n\nentrypoint\x18\x03 \x01(\t\x12\x0f\n\x07volumes\x18\x07 \x03(\t\x12\x0f\n\x07options\x18\x08 \x01(\t\x12\x1e\n\x16\x62lock_external_network\x18\t \x01(\x08\x12\x10\n\x08username\x18\n \x01(\t\x12\x10\n\x08password\x18\x0b \x01(\t\x12#\n\x16\x65nable_image_streaming\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a\x33\n\x06Script\x12\x0e\n\x04path\x18\x01 \x01(\tH\x00\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x42\t\n\x07\x63ommand\x1a\x17\n\x07\x42\x61rrier\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\nexecutable\"\xfd\x03\n\x08TaskSpec\x12\x32\n\trunnables\x18\x08 \x03(\x0b\x32\x1f.google.cloud.batch.v1.Runnable\x12@\n\x10\x63ompute_resource\x18\x03 \x01(\x0b\x32&.google.cloud.batch.v1.ComputeResource\x12\x33\n\x10max_run_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fmax_retry_count\x18\x05 \x01(\x05\x12\x42\n\x12lifecycle_policies\x18\t \x03(\x0b\x32&.google.cloud.batch.v1.LifecyclePolicy\x12K\n\x0c\x65nvironments\x18\x06 \x03(\x0b\x32\x31.google.cloud.batch.v1.TaskSpec.EnvironmentsEntryB\x02\x18\x01\x12.\n\x07volumes\x18\x07 \x03(\x0b\x32\x1d.google.cloud.batch.v1.Volume\x12\x37\n\x0b\x65nvironment\x18\n \x01(\x0b\x32\".google.cloud.batch.v1.Environment\x1a\x33\n\x11\x45nvironmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x02\n\x0fLifecyclePolicy\x12=\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32-.google.cloud.batch.v1.LifecyclePolicy.Action\x12P\n\x10\x61\x63tion_condition\x18\x02 \x01(\x0b\x32\x36.google.cloud.batch.v1.LifecyclePolicy.ActionCondition\x1a%\n\x0f\x41\x63tionCondition\x12\x12\n\nexit_codes\x18\x01 \x03(\x05\"?\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x0e\n\nRETRY_TASK\x10\x01\x12\r\n\tFAIL_TASK\x10\x02\"\xc0\x01\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x06status\x18\x02 \x01(\x0b\x32!.google.cloud.batch.v1.TaskStatus:w\xea\x41t\n\x19\x62\x61tch.googleapis.com/Task\x12Wprojects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}\"\x8f\x03\n\x0b\x45nvironment\x12\x44\n\tvariables\x18\x01 \x03(\x0b\x32\x31.google.cloud.batch.v1.Environment.VariablesEntry\x12Q\n\x10secret_variables\x18\x02 \x03(\x0b\x32\x37.google.cloud.batch.v1.Environment.SecretVariablesEntry\x12I\n\x13\x65ncrypted_variables\x18\x03 \x01(\x0b\x32,.google.cloud.batch.v1.Environment.KMSEnvMap\x1a\x32\n\tKMSEnvMap\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x13\n\x0b\x63ipher_text\x18\x02 \x01(\t\x1a\x30\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x36\n\x14SecretVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\xaa\x01\n\x19\x63om.google.cloud.batch.v1B\tTaskProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Batch - module V1 - ComputeResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ComputeResource").msgclass - StatusEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.StatusEvent").msgclass - TaskExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskExecution").msgclass - TaskStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus").msgclass - TaskStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus.State").enummodule - Runnable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable").msgclass - Runnable::Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Container").msgclass - Runnable::Script = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Script").msgclass - Runnable::Barrier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Barrier").msgclass - TaskSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskSpec").msgclass - LifecyclePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy").msgclass - LifecyclePolicy::ActionCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.ActionCondition").msgclass - LifecyclePolicy::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.Action").enummodule - Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Task").msgclass - Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment").msgclass - Environment::KMSEnvMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment.KMSEnvMap").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb deleted file mode 100644 index 01b65f088389..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/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 Batch - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb deleted file mode 100644 index c4253a7ced01..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/batch/v1/volume.proto - -require 'google/protobuf' - - -descriptor_data = "\n\"google/cloud/batch/v1/volume.proto\x12\x15google.cloud.batch.v1\"\xaa\x01\n\x06Volume\x12)\n\x03nfs\x18\x01 \x01(\x0b\x32\x1a.google.cloud.batch.v1.NFSH\x00\x12)\n\x03gcs\x18\x03 \x01(\x0b\x32\x1a.google.cloud.batch.v1.GCSH\x00\x12\x15\n\x0b\x64\x65vice_name\x18\x06 \x01(\tH\x00\x12\x12\n\nmount_path\x18\x04 \x01(\t\x12\x15\n\rmount_options\x18\x05 \x03(\tB\x08\n\x06source\"*\n\x03NFS\x12\x0e\n\x06server\x18\x01 \x01(\t\x12\x13\n\x0bremote_path\x18\x02 \x01(\t\"\x1a\n\x03GCS\x12\x13\n\x0bremote_path\x18\x01 \x01(\tB\xac\x01\n\x19\x63om.google.cloud.batch.v1B\x0bVolumeProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Batch - module V1 - Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Volume").msgclass - NFS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.NFS").msgclass - GCS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GCS").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb deleted file mode 100644 index 0cf0d5bd1303..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v1/iam_policy" -require "google/cloud/batch/v1/version" - -module Google - module Iam - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/v1" - # client = ::Google::Iam::V1::IAMPolicy::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/v1" - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - module V1 - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/iam/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb deleted file mode 100644 index 9797016a6751..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.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! - -require "gapic/rest" - -module Google - module Iam - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/iam/v1/rest" - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Iam"] - 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 diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb deleted file mode 100644 index e4bdf8b4e266..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/batch/v1/version" - -require "google/iam/v1/iam_policy/credentials" -require "google/iam/v1/iam_policy/client" -require "google/iam/v1/iam_policy/rest" - -module Google - module Iam - module V1 - ## - # API Overview - # - # Manages Identity and Access Management (IAM) policies. - # - # Any implementation of an API that offers access control features - # implements the google.iam.v1.IAMPolicy interface. - # - # ## Data model - # - # Access control is applied when a principal (user or service account), takes - # some action on a resource exposed by a service. Resources, identified by - # URI-like names, are the unit of access control specification. Service - # implementations can choose the granularity of access control and the - # supported permissions for their resources. - # For example one database service may allow access control to be - # specified only at the Table level, whereas another might allow access control - # to also be specified at the Column level. - # - # ## Policy Structure - # - # See google.iam.v1.Policy - # - # This is intentionally not a CRUD style API because access control policies - # are created and deleted implicitly with the resources to which they are - # attached. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v1/iam_policy" - # client = ::Google::Iam::V1::IAMPolicy::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v1/iam_policy/rest" - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - module IAMPolicy - end - end - end -end - -helper_path = ::File.join __dir__, "iam_policy", "helpers.rb" -require "google/iam/v1/iam_policy/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb deleted file mode 100644 index d3ee0a26ee84..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb +++ /dev/null @@ -1,729 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/iam/v1/iam_policy_pb" -require "google/cloud/location" - -module Google - module Iam - module V1 - module IAMPolicy - ## - # Client for the IAMPolicy service. - # - # API Overview - # - # Manages Identity and Access Management (IAM) policies. - # - # Any implementation of an API that offers access control features - # implements the google.iam.v1.IAMPolicy interface. - # - # ## Data model - # - # Access control is applied when a principal (user or service account), takes - # some action on a resource exposed by a service. Resources, identified by - # URI-like names, are the unit of access control specification. Service - # implementations can choose the granularity of access control and the - # supported permissions for their resources. - # For example one database service may allow access control to be - # specified only at the Table level, whereas another might allow access control - # to also be specified at the Column level. - # - # ## Policy Structure - # - # See google.iam.v1.Policy - # - # This is intentionally not a CRUD style API because access control policies - # are created and deleted implicitly with the resources to which they are - # attached. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :iam_policy_stub - - ## - # Configure the IAMPolicy Client class. - # - # See {::Google::Iam::V1::IAMPolicy::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IAMPolicy clients - # ::Google::Iam::V1::IAMPolicy::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", "Iam", "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 IAMPolicy 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::Iam::V1::IAMPolicy::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 - @iam_policy_stub.universe_domain - end - - ## - # Create a new IAMPolicy client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V1::IAMPolicy::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IAMPolicy 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/iam/v1/iam_policy_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 - - @iam_policy_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V1::IAMPolicy::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 - ) - - @iam_policy_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @iam_policy_stub.endpoint - config.universe_domain = @iam_policy_stub.universe_domain - config.logger = @iam_policy_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 - @iam_policy_stub.logger - end - - # Service calls - - ## - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # - # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. - # - # @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/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION - metadata[:"x-goog-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 - - @iam_policy_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 resource. - # Returns an empty policy if the resource 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/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION - metadata[:"x-goog-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 - - @iam_policy_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 on the specified resource. - # If the resource does not exist, this will return 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/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION - metadata[:"x-goog-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 - - @iam_policy_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 IAMPolicy API. - # - # This class represents the configuration for IAMPolicy, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Iam::V1::IAMPolicy::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # set_iam_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V1::IAMPolicy::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.set_iam_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.set_iam_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Iam::V1::IAMPolicy::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 = "iam-meta-api.googleapis.com" - - config_attr :endpoint, nil, ::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 IAMPolicy API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `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 - 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 diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb deleted file mode 100644 index ae4df78450b3..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Iam - module V1 - module IAMPolicy - # Credentials for the IAMPolicy API. - class Credentials < ::Google::Auth::Credentials - 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 diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb deleted file mode 100644 index cd6d6cbdd883..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/batch/v1/version" -require "google/iam/v1/bindings_override" - -require "google/iam/v1/iam_policy/credentials" -require "google/iam/v1/iam_policy/rest/client" - -module Google - module Iam - module V1 - ## - # API Overview - # - # Manages Identity and Access Management (IAM) policies. - # - # Any implementation of an API that offers access control features - # implements the google.iam.v1.IAMPolicy interface. - # - # ## Data model - # - # Access control is applied when a principal (user or service account), takes - # some action on a resource exposed by a service. Resources, identified by - # URI-like names, are the unit of access control specification. Service - # implementations can choose the granularity of access control and the - # supported permissions for their resources. - # For example one database service may allow access control to be - # specified only at the Table level, whereas another might allow access control - # to also be specified at the Column level. - # - # ## Policy Structure - # - # See google.iam.v1.Policy - # - # This is intentionally not a CRUD style API because access control policies - # are created and deleted implicitly with the resources to which they are - # attached. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v1/iam_policy/rest" - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - module IAMPolicy - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v1/iam_policy/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb deleted file mode 100644 index ce59c5c8c1f4..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb +++ /dev/null @@ -1,673 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/iam/v1/iam_policy_pb" -require "google/iam/v1/iam_policy/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V1 - module IAMPolicy - module Rest - ## - # REST client for the IAMPolicy service. - # - # API Overview - # - # Manages Identity and Access Management (IAM) policies. - # - # Any implementation of an API that offers access control features - # implements the google.iam.v1.IAMPolicy interface. - # - # ## Data model - # - # Access control is applied when a principal (user or service account), takes - # some action on a resource exposed by a service. Resources, identified by - # URI-like names, are the unit of access control specification. Service - # implementations can choose the granularity of access control and the - # supported permissions for their resources. - # For example one database service may allow access control to be - # specified only at the Table level, whereas another might allow access control - # to also be specified at the Column level. - # - # ## Policy Structure - # - # See google.iam.v1.Policy - # - # This is intentionally not a CRUD style API because access control policies - # are created and deleted implicitly with the resources to which they are - # attached. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :iam_policy_stub - - ## - # Configure the IAMPolicy Client class. - # - # See {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IAMPolicy clients - # ::Google::Iam::V1::IAMPolicy::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", "Iam", "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 IAMPolicy 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::Iam::V1::IAMPolicy::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 - @iam_policy_stub.universe_domain - end - - ## - # Create a new IAMPolicy REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IAMPolicy 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 - - @iam_policy_stub = ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @iam_policy_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @iam_policy_stub.endpoint - config.universe_domain = @iam_policy_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @iam_policy_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 - @iam_policy_stub.logger - end - - # Service calls - - ## - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # - # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. - # - # @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/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @iam_policy_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 resource. - # Returns an empty policy if the resource 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/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @iam_policy_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 on the specified resource. - # If the resource does not exist, this will return 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/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::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::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @iam_policy_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 IAMPolicy REST API. - # - # This class represents the configuration for IAMPolicy 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::Iam::V1::IAMPolicy::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 - # # set_iam_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V1::IAMPolicy::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.set_iam_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.set_iam_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam-meta-api.googleapis.com" - - config_attr :endpoint, nil, ::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 IAMPolicy API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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 `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 - 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-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb deleted file mode 100644 index 913f9d5fd09f..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.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! - -require "google/iam/v1/iam_policy_pb" - -module Google - module Iam - module V1 - module IAMPolicy - module Rest - ## - # REST service stub for the IAMPolicy 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 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 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{^(?<__wildcard__>.*)$}, true] - ] - ) - 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{^(?<__wildcard__>.*)$}, true] - ] - ) - 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{^(?<__wildcard__>.*)$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb deleted file mode 100644 index 548e0e659b74..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.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! - -require "google/iam/v1/iam_policy/rest" -require "google/iam/v1/bindings_override" -require "google/cloud/batch/v1/version" - -module Google - module Iam - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/v1/rest" - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - module V1 - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md deleted file mode 100644 index 40b55bf3d716..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Batch 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-batch-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb deleted file mode 100644 index 2c6e39a147a3..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb +++ /dev/null @@ -1,246 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Batch - module V1 - # CreateJob Request. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name where the Job will be created. - # Pattern: "projects/\\{project}/locations/\\{location}" - # @!attribute [rw] job_id - # @return [::String] - # ID used to uniquely identify the Job within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and '-' are accepted. - # The '-' character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The job.name field in the request will be ignored and the created resource - # name of the Job will be "\\{parent}/jobs/\\{job_id}". - # @!attribute [rw] job - # @return [::Google::Cloud::Batch::V1::Job] - # Required. The Job to create. - # @!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 CreateJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetJob Request. - # @!attribute [rw] name - # @return [::String] - # Required. Job name. - class GetJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteJob Request. - # @!attribute [rw] name - # @return [::String] - # Job name. - # @!attribute [rw] reason - # @return [::String] - # Optional. Reason for this deletion. - # @!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). - class DeleteJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CancelJob Request. - # @!attribute [rw] name - # @return [::String] - # Required. Job name. - # @!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). - class CancelJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to the CancelJob request. - class CancelJobResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListJob Request. - # @!attribute [rw] parent - # @return [::String] - # Parent path. - # @!attribute [rw] filter - # @return [::String] - # List filter. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Sort results. Supported are "name", "name desc", "create_time", - # and "create_time desc". - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. - # @!attribute [rw] page_token - # @return [::String] - # Page token. - class ListJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListJob Response. - # @!attribute [rw] jobs - # @return [::Array<::Google::Cloud::Batch::V1::Job>] - # Jobs. - # @!attribute [rw] next_page_token - # @return [::String] - # Next page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListTasks Request. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of a TaskGroup from which Tasks are being requested. - # Pattern: - # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" - # @!attribute [rw] filter - # @return [::String] - # Task filter, null filter matches all Tasks. - # Filter string should be of the format State=TaskStatus.State e.g. - # State=RUNNING - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. - # @!attribute [rw] page_token - # @return [::String] - # Page token. - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListTasks Response. - # @!attribute [rw] tasks - # @return [::Array<::Google::Cloud::Batch::V1::Task>] - # Tasks. - # @!attribute [rw] next_page_token - # @return [::String] - # Next page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for a single Task by name. - # @!attribute [rw] name - # @return [::String] - # Required. Task name. - class GetTaskRequest - 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 diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb deleted file mode 100644 index 3096f4fede93..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb +++ /dev/null @@ -1,801 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Batch - module V1 - # The Cloud Batch Job description. - # @!attribute [r] name - # @return [::String] - # Output only. Job name. - # For example: "projects/123456/locations/us-central1/jobs/job01". - # @!attribute [r] uid - # @return [::String] - # Output only. A system generated unique ID for the Job. - # @!attribute [rw] priority - # @return [::Integer] - # Priority of the Job. - # The valid value range is [0, 100). Default value is 0. - # Higher value indicates higher priority. - # A job with higher priority value is more likely to run earlier if all other - # requirements are satisfied. - # @!attribute [rw] task_groups - # @return [::Array<::Google::Cloud::Batch::V1::TaskGroup>] - # Required. TaskGroups in the Job. Only one TaskGroup is supported now. - # @!attribute [rw] allocation_policy - # @return [::Google::Cloud::Batch::V1::AllocationPolicy] - # Compute resource allocation for all TaskGroups in the Job. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Custom labels to apply to the job and any Cloud Logging - # [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) - # that it generates. - # - # Use labels to group and describe the resources they are applied to. Batch - # automatically applies predefined labels and supports multiple `labels` - # fields for each job, which each let you apply custom labels to various - # resources. Label names that start with "goog-" or "google-" are - # reserved for predefined labels. For more information about labels with - # Batch, see - # [Organize resources using - # labels](https://cloud.google.com/batch/docs/organize-resources-using-labels). - # @!attribute [r] status - # @return [::Google::Cloud::Batch::V1::JobStatus] - # Output only. Job status. It is read only for users. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the Job was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time the Job was updated. - # @!attribute [rw] logs_policy - # @return [::Google::Cloud::Batch::V1::LogsPolicy] - # Log preservation policy for the Job. - # @!attribute [rw] notifications - # @return [::Array<::Google::Cloud::Batch::V1::JobNotification>] - # Notification configurations. - class Job - 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 - - # LogsPolicy describes if and how a job's logs are preserved. Logs include - # information that is automatically written by the Batch service agent and any - # information that you configured the job's runnables to write to the `stdout` - # or `stderr` streams. - # @!attribute [rw] destination - # @return [::Google::Cloud::Batch::V1::LogsPolicy::Destination] - # If and where logs should be saved. - # @!attribute [rw] logs_path - # @return [::String] - # When `destination` is set to `PATH`, you must set this field to the path - # where you want logs to be saved. This path can point to a local directory - # on the VM or (if congifured) a directory under the mount path of any - # Cloud Storage bucket, network file system (NFS), or writable persistent - # disk that is mounted to the job. For example, if the job has a bucket with - # `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the - # root directory of the `remotePath` of that bucket by setting this field to - # `/mnt/disks/my-bucket/`. - # @!attribute [rw] cloud_logging_option - # @return [::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption] - # Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally - # set this field to configure additional settings for Cloud Logging. - class LogsPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `CloudLoggingOption` contains additional settings for Cloud Logging logs - # generated by Batch job. - # @!attribute [rw] use_generic_task_monitored_resource - # @return [::Boolean] - # Optional. Set this field to `true` to change the [monitored resource - # type](https://cloud.google.com/monitoring/api/resources) for - # Cloud Logging logs generated by this Batch job from - # the - # [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) - # type to the formerly used - # [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) - # type. - class CloudLoggingOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The destination (if any) for logs. - module Destination - # (Default) Logs are not preserved. - DESTINATION_UNSPECIFIED = 0 - - # Logs are streamed to Cloud Logging. Optionally, you can configure - # additional settings in the `cloudLoggingOption` field. - CLOUD_LOGGING = 1 - - # Logs are saved to the file path specified in the `logsPath` field. - PATH = 2 - end - end - - # Job status. - # @!attribute [rw] state - # @return [::Google::Cloud::Batch::V1::JobStatus::State] - # Job state - # @!attribute [rw] status_events - # @return [::Array<::Google::Cloud::Batch::V1::StatusEvent>] - # Job status events - # @!attribute [rw] task_groups - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Batch::V1::JobStatus::TaskGroupStatus}] - # Aggregated task status for each TaskGroup in the Job. - # The map key is TaskGroup ID. - # @!attribute [rw] run_duration - # @return [::Google::Protobuf::Duration] - # The duration of time that the Job spent in status RUNNING. - class JobStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VM instance status. - # @!attribute [rw] machine_type - # @return [::String] - # The Compute Engine machine type. - # @!attribute [rw] provisioning_model - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel] - # The VM instance provisioning model. - # @!attribute [rw] task_pack - # @return [::Integer] - # The max number of tasks can be assigned to this instance type. - # @!attribute [rw] boot_disk - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] - # The VM boot disk. - class InstanceStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Aggregated task status for a TaskGroup. - # @!attribute [rw] counts - # @return [::Google::Protobuf::Map{::String => ::Integer}] - # Count of task in each state in the TaskGroup. - # The map key is task state name. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::Batch::V1::JobStatus::InstanceStatus>] - # Status of instances allocated for the TaskGroup. - class TaskGroupStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Integer] - class CountsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Batch::V1::JobStatus::TaskGroupStatus] - class TaskGroupsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Valid Job states. - module State - # Job state unspecified. - STATE_UNSPECIFIED = 0 - - # Job is admitted (validated and persisted) and waiting for resources. - QUEUED = 1 - - # Job is scheduled to run as soon as resource allocation is ready. - # The resource allocation may happen at a later time but with a high - # chance to succeed. - SCHEDULED = 2 - - # Resource allocation has been successful. At least one Task in the Job is - # RUNNING. - RUNNING = 3 - - # All Tasks in the Job have finished successfully. - SUCCEEDED = 4 - - # At least one Task in the Job has failed. - FAILED = 5 - - # The Job will be deleted, but has not been deleted yet. Typically this is - # because resources used by the Job are still being cleaned up. - DELETION_IN_PROGRESS = 6 - - # The Job cancellation is in progress, this is because the resources used - # by the Job are still being cleaned up. - CANCELLATION_IN_PROGRESS = 7 - - # The Job has been cancelled, the task executions were stopped and the - # resources were cleaned up. - CANCELLED = 8 - end - end - - # Notification configurations. - # @!attribute [rw] pubsub_topic - # @return [::String] - # The Pub/Sub topic where notifications for the job, like state - # changes, will be published. If undefined, no Pub/Sub notifications - # are sent for this job. - # - # Specify the topic using the following format: - # `projects/{project}/topics/{topic}`. - # Notably, if you want to specify a Pub/Sub topic that is in a - # different project than the job, your administrator must grant your - # project's Batch service agent permission to publish to that topic. - # - # For more information about configuring Pub/Sub notifications for - # a job, see - # https://cloud.google.com/batch/docs/enable-notifications. - # @!attribute [rw] message - # @return [::Google::Cloud::Batch::V1::JobNotification::Message] - # The attribute requirements of messages to be sent to this Pub/Sub topic. - # Without this field, no message will be sent. - class JobNotification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message details. - # Describe the conditions under which messages will be sent. - # If no attribute is defined, no message will be sent by default. - # One message should specify either the job or the task level attributes, - # but not both. For example, - # job level: JOB_STATE_CHANGED and/or a specified new_job_state; - # task level: TASK_STATE_CHANGED and/or a specified new_task_state. - # @!attribute [rw] type - # @return [::Google::Cloud::Batch::V1::JobNotification::Type] - # The message type. - # @!attribute [rw] new_job_state - # @return [::Google::Cloud::Batch::V1::JobStatus::State] - # The new job state. - # @!attribute [rw] new_task_state - # @return [::Google::Cloud::Batch::V1::TaskStatus::State] - # The new task state. - class Message - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message type. - module Type - # Unspecified. - TYPE_UNSPECIFIED = 0 - - # Notify users that the job state has changed. - JOB_STATE_CHANGED = 1 - - # Notify users that the task state has changed. - TASK_STATE_CHANGED = 2 - end - end - - # A Job's resource allocation policy describes when, where, and how compute - # resources should be allocated for the Job. - # @!attribute [rw] location - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::LocationPolicy] - # Location where compute resources should be allocated for the Job. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::InstancePolicyOrTemplate>] - # Describe instances that can be created by this AllocationPolicy. - # Only instances[0] is supported now. - # @!attribute [rw] service_account - # @return [::Google::Cloud::Batch::V1::ServiceAccount] - # Defines the service account for Batch-created VMs. If omitted, the [default - # Compute Engine service - # account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - # is used. Must match the service account specified in any used instance - # template configured in the Batch job. - # - # Includes the following fields: - # * email: The service account's email address. If not set, the default - # Compute Engine service account is used. - # * scopes: Additional OAuth scopes to grant the service account, beyond the - # default cloud-platform scope. (list of strings) - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Custom labels to apply to the job and all the Compute Engine resources - # that both are created by this allocation policy and support labels. - # - # Use labels to group and describe the resources they are applied to. Batch - # automatically applies predefined labels and supports multiple `labels` - # fields for each job, which each let you apply custom labels to various - # resources. Label names that start with "goog-" or "google-" are - # reserved for predefined labels. For more information about labels with - # Batch, see - # [Organize resources using - # labels](https://cloud.google.com/batch/docs/organize-resources-using-labels). - # @!attribute [rw] network - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::NetworkPolicy] - # The network policy. - # - # If you define an instance template in the `InstancePolicyOrTemplate` field, - # Batch will use the network settings in the instance template instead of - # this field. - # @!attribute [rw] placement - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::PlacementPolicy] - # The placement policy. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Optional. Tags applied to the VM instances. - # - # The tags identify valid sources or targets for network firewalls. - # Each tag must be 1-63 characters long, and comply with - # [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - class AllocationPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] allowed_locations - # @return [::Array<::String>] - # A list of location names that are allowed for the job's VMs formatted - # as URLs. Each location can be a region or a zone, but you can only - # specify one region or multiple zones in one region per job. For example, - # `["regions/us-central1"]` allow VMs in any zones in region - # `us-central1`, and `["zones/us-central1-a", "zones/us-central1-c"]` - # only allow VMs in zones `us-central1-a` and `us-central1-c`. However, - # `["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - # "zones/us-west1-a"]` causes an error because it contains multiple regions - # (`us-central1` and `us-west1`). - # - # The specified region or zones must be in the same region in - # which the job is created starting on the following dates: - # - # + For projects that have successfully submitted before - # July 31, 2026 at least one job that uses the - # `allowedLocations[]` field with any region or zones - # outside of the job's location, the changes are starting - # on _June 30, 2027_. - # - # + For all other projects, the changes are starting on - # _July 31, 2026_. - # - # For example, for job `projects/123/locations/us-central1/jobs/jobid`, - # the specified region or zones must be in `us-central1`. Using a - # different region (e.g. `regions/us-west1`) or a zone not in - # `us-central1` (e.g. `zones/us-west1-a`) causes an error. - class LocationPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A new persistent disk or a local ssd. - # A VM can only have one local SSD setting but multiple local SSD partitions. - # See https://cloud.google.com/compute/docs/disks#pdspecs and - # https://cloud.google.com/compute/docs/disks#localssds. - # @!attribute [rw] image - # @return [::String] - # URL for a VM image to use as the data source for this disk. - # For example, the following are all valid URLs: - # - # * Specify the image by its family name: - # projects/\\{project}/global/images/family/\\{image_family} - # * Specify the image version: - # projects/\\{project}/global/images/\\{image_version} - # - # You can also use Batch customized image in short names. - # The following image values are supported for a boot disk: - # - # * `batch-debian`: use Batch Debian images. - # * `batch-cos`: use Batch Container-Optimized images. - # * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. - # - # Note: The following fields are mutually exclusive: `image`, `snapshot`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] snapshot - # @return [::String] - # Name of a snapshot used as the data source. - # Snapshot is not supported as boot disk now. - # - # Note: The following fields are mutually exclusive: `snapshot`, `image`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] type - # @return [::String] - # Disk type as shown in `gcloud compute disk-types list`. - # For example, local SSD uses type "local-ssd". - # Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" - # or "pd-standard". If not specified, "pd-standard" will be used as the - # default type for non-boot disks, "pd-balanced" will be used as the - # default type for boot disks. - # @!attribute [rw] size_gb - # @return [::Integer] - # Disk size in GB. - # - # **Non-Boot Disk**: - # If the `type` specifies a persistent disk, this field - # is ignored if `data_source` is set as `image` or `snapshot`. - # If the `type` specifies a local SSD, this field should be a multiple of - # 375 GB, otherwise, the final size will be the next greater multiple of - # 375 GB. - # - # **Boot Disk**: - # Batch will calculate the boot disk size based on source - # image and task requirements if you do not speicify the size. - # If both this field and the `boot_disk_mib` field in task spec's - # `compute_resource` are defined, Batch will only honor this field. - # Also, this field should be no smaller than the source disk's - # size when the `data_source` is set as `snapshot` or `image`. - # For example, if you set an image as the `data_source` field and the - # image's default disk size 30 GB, you can only use this field to make the - # disk larger or equal to 30 GB. - # @!attribute [rw] disk_interface - # @return [::String] - # Local SSDs are available through both "SCSI" and "NVMe" interfaces. - # If not indicated, "NVMe" will be the default one for local ssds. - # This field is ignored for persistent disks as the interface is chosen - # automatically. See - # https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. - class Disk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A new or an existing persistent disk (PD) or a local ssd attached to a VM - # instance. - # @!attribute [rw] new_disk - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] - # Note: The following fields are mutually exclusive: `new_disk`, `existing_disk`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] existing_disk - # @return [::String] - # Name of an existing PD. - # - # Note: The following fields are mutually exclusive: `existing_disk`, `new_disk`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] device_name - # @return [::String] - # Device name that the guest operating system will see. - # It is used by Runnable.volumes field to mount disks. So please specify - # the device_name if you want Batch to help mount the disk, and it should - # match the device_name field in volumes. - class AttachedDisk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Accelerator describes Compute Engine accelerators to be attached to the VM. - # @!attribute [rw] type - # @return [::String] - # The accelerator type. For example, "nvidia-tesla-t4". - # See `gcloud compute accelerator-types list`. - # @!attribute [rw] count - # @return [::Integer] - # The number of accelerators of this type. - # @!attribute [rw] install_gpu_drivers - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Deprecated: please use instances[0].install_gpu_drivers instead. - # @!attribute [rw] driver_version - # @return [::String] - # Optional. The NVIDIA GPU driver version that should be installed for this - # type. - # - # You can define the specific driver version such as "470.103.01", - # following the driver version requirements in - # https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. - # Batch will install the specific accelerator driver if qualified. - class Accelerator - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # InstancePolicy describes an instance type and resources attached to each VM - # created by this InstancePolicy. - # @!attribute [rw] machine_type - # @return [::String] - # The Compute Engine machine type. - # @!attribute [rw] min_cpu_platform - # @return [::String] - # The minimum CPU platform. - # See - # https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - # @!attribute [rw] provisioning_model - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel] - # The provisioning model. - # @!attribute [rw] accelerators - # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::Accelerator>] - # The accelerators attached to each VM instance. - # @!attribute [rw] boot_disk - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] - # Boot disk to be created and attached to each VM by this InstancePolicy. - # Boot disk will be deleted when the VM is deleted. - # Batch API now only supports booting from image. - # @!attribute [rw] disks - # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::AttachedDisk>] - # Non-boot disks to be attached for each VM created by this InstancePolicy. - # New disks will be deleted when the VM is deleted. - # A non-boot disk is a disk that can be of a device with a - # file system or a raw storage drive that is not ready for data - # storage and accessing. - # @!attribute [rw] reservation - # @return [::String] - # Optional. If not specified (default), VMs will consume any applicable - # reservation. If "NO_RESERVATION" is specified, VMs will not consume any - # reservation. Otherwise, if specified, VMs will consume only the specified - # reservation. - class InstancePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # InstancePolicyOrTemplate lets you define the type of resources to use for - # this job either with an InstancePolicy or an instance template. - # If undefined, Batch picks the type of VM to use and doesn't include - # optional VM resources such as GPUs and extra disks. - # @!attribute [rw] policy - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::InstancePolicy] - # InstancePolicy. - # - # Note: The following fields are mutually exclusive: `policy`, `instance_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] instance_template - # @return [::String] - # Name of an instance template used to create VMs. - # Named the field as 'instance_template' instead of 'template' to avoid - # C++ keyword conflict. - # - # Batch only supports global instance templates from the same project as - # the job. - # You can specify the global instance template as a full or partial URL. - # - # Note: The following fields are mutually exclusive: `instance_template`, `policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] install_gpu_drivers - # @return [::Boolean] - # Set this field true if you want Batch to help fetch drivers from a third - # party location and install them for GPUs specified in - # `policy.accelerators` or `instance_template` on your behalf. Default is - # false. - # - # For Container-Optimized Image cases, Batch will install the - # accelerator driver following milestones of - # https://cloud.google.com/container-optimized-os/docs/release-notes. For - # non Container-Optimized Image cases, following - # https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. - # @!attribute [rw] install_ops_agent - # @return [::Boolean] - # Optional. Set this field true if you want Batch to install Ops Agent on - # your behalf. Default is false. - # @!attribute [rw] block_project_ssh_keys - # @return [::Boolean] - # Optional. Set this field to `true` if you want Batch to block - # project-level SSH keys from accessing this job's VMs. Alternatively, you - # can configure the job to specify a VM instance template that blocks - # project-level SSH keys. In either case, Batch blocks project-level SSH - # keys while creating the VMs for this job. - # - # Batch allows project-level SSH keys for a job's VMs only if all - # the following are true: - # - # + This field is undefined or set to `false`. - # + The job's VM instance template (if any) doesn't block project-level - # SSH keys. - # - # Notably, you can override this behavior by manually updating a VM to - # block or allow project-level SSH keys. For more information about - # blocking project-level SSH keys, see the Compute Engine documentation: - # https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys - class InstancePolicyOrTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A network interface. - # @!attribute [rw] network - # @return [::String] - # The URL of an existing network resource. - # You can specify the network as a full or partial URL. - # - # For example, the following are all valid URLs: - # - # * https://www.googleapis.com/compute/v1/projects/\\{project}/global/networks/\\{network} - # * projects/\\{project}/global/networks/\\{network} - # * global/networks/\\{network} - # @!attribute [rw] subnetwork - # @return [::String] - # The URL of an existing subnetwork resource in the network. - # You can specify the subnetwork as a full or partial URL. - # - # For example, the following are all valid URLs: - # - # * https://www.googleapis.com/compute/v1/projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetwork} - # * projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetwork} - # * regions/\\{region}/subnetworks/\\{subnetwork} - # @!attribute [rw] no_external_ip_address - # @return [::Boolean] - # Default is false (with an external IP address). Required if - # no external public IP address is attached to the VM. If no external - # public IP address, additional configuration is required to allow the VM - # to access Google Services. See - # https://cloud.google.com/vpc/docs/configure-private-google-access and - # https://cloud.google.com/nat/docs/gce-example#create-nat for more - # information. - class NetworkInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NetworkPolicy describes VM instance network configurations. - # @!attribute [rw] network_interfaces - # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::NetworkInterface>] - # Network configurations. - class NetworkPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PlacementPolicy describes a group placement policy for the VMs controlled - # by this AllocationPolicy. - # @!attribute [rw] collocation - # @return [::String] - # UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you - # want VMs to be located close to each other for low network latency - # between the VMs. No placement policy will be generated when collocation - # is UNSPECIFIED. - # @!attribute [rw] max_distance - # @return [::Integer] - # When specified, causes the job to fail if more than max_distance logical - # switches are required between VMs. Batch uses the most compact possible - # placement of VMs even when max_distance is not specified. An explicit - # max_distance makes that level of compactness a strict requirement. - # Not yet implemented - class PlacementPolicy - 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 - - # Compute Engine VM instance provisioning model. - module ProvisioningModel - # Unspecified. - PROVISIONING_MODEL_UNSPECIFIED = 0 - - # Standard VM. - STANDARD = 1 - - # SPOT VM. - SPOT = 2 - - # Preemptible VM (PVM). - # - # Above SPOT VM is the preferable model for preemptible VM instances: the - # old preemptible VM model (indicated by this field) is the older model, - # and has been migrated to use the SPOT model as the underlying technology. - # This old model will still be supported. - PREEMPTIBLE = 3 - - # Bound to the lifecycle of the reservation in which it is provisioned. - RESERVATION_BOUND = 4 - - # Instance is provisioned with DWS Flex Start and has limited max run - # duration. - FLEX_START = 5 - end - end - - # A TaskGroup defines one or more Tasks that all share the same TaskSpec. - # @!attribute [r] name - # @return [::String] - # Output only. TaskGroup name. - # The system generates this field based on parent Job name. - # For example: - # "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". - # @!attribute [rw] task_spec - # @return [::Google::Cloud::Batch::V1::TaskSpec] - # Required. Tasks in the group share the same task spec. - # @!attribute [rw] task_count - # @return [::Integer] - # Number of Tasks in the TaskGroup. - # Default is 1. - # @!attribute [rw] parallelism - # @return [::Integer] - # Max number of tasks that can run in parallel. - # Default to min(task_count, parallel tasks per job limit). - # See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). - # Field parallelism must be 1 if the scheduling_policy is IN_ORDER. - # @!attribute [rw] scheduling_policy - # @return [::Google::Cloud::Batch::V1::TaskGroup::SchedulingPolicy] - # Scheduling policy for Tasks in the TaskGroup. - # The default value is AS_SOON_AS_POSSIBLE. - # @!attribute [rw] task_environments - # @return [::Array<::Google::Cloud::Batch::V1::Environment>] - # An array of environment variable mappings, which are passed to Tasks with - # matching indices. If task_environments is used then task_count should - # not be specified in the request (and will be ignored). Task count will be - # the length of task_environments. - # - # Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in - # addition to any environment variables set in task_environments, specifying - # the number of Tasks in the Task's parent TaskGroup, and the specific Task's - # index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). - # @!attribute [rw] task_count_per_node - # @return [::Integer] - # Max number of tasks that can be run on a VM at the same time. - # If not specified, the system will decide a value based on available - # compute resources on a VM and task requirements. - # @!attribute [rw] require_hosts_file - # @return [::Boolean] - # When true, Batch will populate a file with a list of all VMs assigned to - # the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path - # of that file. Defaults to false. The host file supports up to 1000 VMs. - # @!attribute [rw] permissive_ssh - # @return [::Boolean] - # When true, Batch will configure SSH to allow passwordless login between - # VMs running the Batch tasks in the same TaskGroup. - # @!attribute [rw] run_as_non_root - # @return [::Boolean] - # Optional. If not set or set to false, Batch uses the root user to execute - # runnables. If set to true, Batch runs the runnables using a non-root user. - # Currently, the non-root user Batch used is generated by OS Login. For more - # information, see [About OS - # Login](https://cloud.google.com/compute/docs/oslogin). - class TaskGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How Tasks in the TaskGroup should be scheduled relative to each other. - module SchedulingPolicy - # Unspecified. - SCHEDULING_POLICY_UNSPECIFIED = 0 - - # Run Tasks as soon as resources are available. - # - # Tasks might be executed in parallel depending on parallelism and - # task_count values. - AS_SOON_AS_POSSIBLE = 1 - - # Run Tasks sequentially with increased task index. - IN_ORDER = 2 - end - end - - # Carries information about a Google Cloud service account. - # @!attribute [rw] email - # @return [::String] - # Email address of the service account. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # List of scopes to be enabled for this service account. - class ServiceAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb deleted file mode 100644 index 4f4c80930d3c..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb +++ /dev/null @@ -1,547 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Batch - module V1 - # Compute resource requirements. - # - # ComputeResource defines the amount of resources required for each task. - # Make sure your tasks have enough resources to successfully run. - # If you also define the types of resources for a job to use with the - # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - # field, make sure both fields are compatible with each other. - # @!attribute [rw] cpu_milli - # @return [::Integer] - # The milliCPU count. - # - # `cpuMilli` defines the amount of CPU resources per task in milliCPU units. - # For example, `1000` corresponds to 1 vCPU per task. If undefined, the - # default value is `2000`. - # - # If you also define the VM's machine type using the `machineType` in - # [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - # field or inside the `instanceTemplate` in the - # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - # field, make sure the CPU resources for both fields are compatible with each - # other and with how many tasks you want to allow to run on the same VM at - # the same time. - # - # For example, if you specify the `n2-standard-2` machine type, which has 2 - # vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or - # you are recommended to run two tasks on the same VM if you set `cpuMilli` - # to `1000` or less. - # @!attribute [rw] memory_mib - # @return [::Integer] - # Memory in MiB. - # - # `memoryMib` defines the amount of memory per task in MiB units. - # If undefined, the default value is `2000`. - # If you also define the VM's machine type using the `machineType` in - # [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - # field or inside the `instanceTemplate` in the - # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - # field, make sure the memory resources for both fields are compatible with - # each other and with how many tasks you want to allow to run on the same VM - # at the same time. - # - # For example, if you specify the `n2-standard-2` machine type, which has 8 - # GiB each, you are recommended to set `memoryMib` to no more than `8192`, - # or you are recommended to run two tasks on the same VM if you set - # `memoryMib` to `4096` or less. - # @!attribute [rw] boot_disk_mib - # @return [::Integer] - # Extra boot disk size in MiB for each task. - class ComputeResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status event. - # @!attribute [rw] type - # @return [::String] - # Type of the event. - # @!attribute [rw] description - # @return [::String] - # Description of the event. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # The time this event occurred. - # @!attribute [rw] task_execution - # @return [::Google::Cloud::Batch::V1::TaskExecution] - # Task Execution. - # This field is only defined for task-level status events where the task - # fails. - # @!attribute [rw] task_state - # @return [::Google::Cloud::Batch::V1::TaskStatus::State] - # Task State. - # This field is only defined for task-level status events. - class StatusEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This Task Execution field includes detail information for - # task execution procedures, based on StatusEvent types. - # @!attribute [rw] exit_code - # @return [::Integer] - # The exit code of a finished task. - # - # If the task succeeded, the exit code will be 0. If the task failed but not - # due to the following reasons, the exit code will be 50000. - # - # Otherwise, it can be from different sources: - # * Batch known failures: - # https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - # * Batch runnable execution failures; you can rely on Batch logs to further - # diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If - # there are multiple runnables failures, Batch only exposes the first error. - class TaskExecution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of a task. - # @!attribute [rw] state - # @return [::Google::Cloud::Batch::V1::TaskStatus::State] - # Task state. - # @!attribute [rw] status_events - # @return [::Array<::Google::Cloud::Batch::V1::StatusEvent>] - # Detailed info about why the state is reached. - class TaskStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Task states. - module State - # Unknown state. - STATE_UNSPECIFIED = 0 - - # The Task is created and waiting for resources. - PENDING = 1 - - # The Task is assigned to at least one VM. - ASSIGNED = 2 - - # The Task is running. - RUNNING = 3 - - # The Task has failed. - FAILED = 4 - - # The Task has succeeded. - SUCCEEDED = 5 - - # The Task has not been executed when the Job finishes. - UNEXECUTED = 6 - end - end - - # Runnable describes instructions for executing a specific script or container - # as part of a Task. - # @!attribute [rw] container - # @return [::Google::Cloud::Batch::V1::Runnable::Container] - # Container runnable. - # - # Note: The following fields are mutually exclusive: `container`, `script`, `barrier`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] script - # @return [::Google::Cloud::Batch::V1::Runnable::Script] - # Script runnable. - # - # Note: The following fields are mutually exclusive: `script`, `container`, `barrier`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] barrier - # @return [::Google::Cloud::Batch::V1::Runnable::Barrier] - # Barrier runnable. - # - # Note: The following fields are mutually exclusive: `barrier`, `container`, `script`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] display_name - # @return [::String] - # Optional. DisplayName is an optional field that can be provided by the - # caller. If provided, it will be used in logs and other outputs to identify - # the script, making it easier for users to understand the logs. If not - # provided the index of the runnable will be used for outputs. - # @!attribute [rw] ignore_exit_status - # @return [::Boolean] - # Normally, a runnable that returns a non-zero exit status fails and causes - # the task to fail. However, you can set this field to `true` to allow the - # task to continue executing its other runnables even if this runnable - # fails. - # @!attribute [rw] background - # @return [::Boolean] - # Normally, a runnable that doesn't exit causes its task to fail. However, - # you can set this field to `true` to configure a background runnable. - # Background runnables are allowed continue running in the background while - # the task executes subsequent runnables. For example, background runnables - # are useful for providing services to other runnables or providing - # debugging-support tools like SSH servers. - # - # Specifically, background runnables are killed automatically (if they have - # not already exited) a short time after all foreground runnables have - # completed. Even though this is likely to result in a non-zero exit status - # for the background runnable, these automatic kills are not treated as task - # failures. - # @!attribute [rw] always_run - # @return [::Boolean] - # By default, after a Runnable fails, no further Runnable are executed. This - # flag indicates that this Runnable must be run even if the Task has already - # failed. This is useful for Runnables that copy output files off of the VM - # or for debugging. - # - # The always_run flag does not override the Task's overall max_run_duration. - # If the max_run_duration has expired then no further Runnables will execute, - # not even always_run Runnables. - # @!attribute [rw] environment - # @return [::Google::Cloud::Batch::V1::Environment] - # Environment variables for this Runnable (overrides variables set for the - # whole Task or TaskGroup). - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Timeout for this Runnable. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels for this Runnable. - class Runnable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Container runnable. - # @!attribute [rw] image_uri - # @return [::String] - # Required. The URI to pull the container image from. - # @!attribute [rw] commands - # @return [::Array<::String>] - # Required for some container images. Overrides the `CMD` specified in the - # container. If there is an `ENTRYPOINT` (either in the container image or - # with the `entrypoint` field below) then these commands are appended as - # arguments to the `ENTRYPOINT`. - # @!attribute [rw] entrypoint - # @return [::String] - # Required for some container images. Overrides the `ENTRYPOINT` specified - # in the container. - # @!attribute [rw] volumes - # @return [::Array<::String>] - # Volumes to mount (bind mount) from the host machine files or directories - # into the container, formatted to match `--volume` option for the - # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. - # - # If the `TaskSpec.Volumes` field is specified but this field is not, Batch - # will mount each volume from the host machine to the container with the - # same mount path by default. In this case, the default mount option for - # containers will be read-only (`ro`) for existing persistent disks and - # read-write (`rw`) for other volume types, regardless of the original - # mount options specified in `TaskSpec.Volumes`. If you need different - # mount settings, you can explicitly configure them in this field. - # @!attribute [rw] options - # @return [::String] - # Required for some container images. Arbitrary additional options to - # include in the `docker run` command when running this container—for - # example, `--network host`. For the `--volume` option, use the `volumes` - # field for the container. - # @!attribute [rw] block_external_network - # @return [::Boolean] - # If set to true, external network access to and from container will be - # blocked, containers that are with block_external_network as true can - # still communicate with each other, network cannot be specified in the - # `container.options` field. - # @!attribute [rw] username - # @return [::String] - # Required if the container image is from a private Docker registry. The - # username to login to the Docker registry that contains the image. - # - # You can either specify the username directly by using plain text or - # specify an encrypted username by using a Secret Manager secret: - # `projects/*/secrets/*/versions/*`. However, using a secret is - # recommended for enhanced security. - # - # Caution: If you specify the username using plain text, you risk the - # username being exposed to any users who can view the job or its logs. - # To avoid this risk, specify a secret that contains the username instead. - # - # Learn more about [Secret - # Manager](https://cloud.google.com/secret-manager/docs/) and [using - # Secret Manager with - # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - # @!attribute [rw] password - # @return [::String] - # Required if the container image is from a private Docker registry. The - # password to login to the Docker registry that contains the image. - # - # For security, it is strongly recommended to specify an - # encrypted password by using a Secret Manager secret: - # `projects/*/secrets/*/versions/*`. - # - # Warning: If you specify the password using plain text, you risk the - # password being exposed to any users who can view the job or its logs. - # To avoid this risk, specify a secret that contains the password instead. - # - # Learn more about [Secret - # Manager](https://cloud.google.com/secret-manager/docs/) and [using - # Secret Manager with - # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - # @!attribute [rw] enable_image_streaming - # @return [::Boolean] - # Optional. If set to true, this container runnable uses Image streaming. - # - # Use Image streaming to allow the runnable to initialize without - # waiting for the entire container image to download, which can - # significantly reduce startup time for large container images. - # - # When `enableImageStreaming` is set to true, the container - # runtime is [containerd](https://containerd.io/) instead of Docker. - # Additionally, this container runnable only supports the following - # `container` subfields: `imageUri`, - # `commands[]`, `entrypoint`, and - # `volumes[]`; any other `container` subfields are ignored. - # - # For more information about the requirements and limitations for using - # Image streaming with Batch, see the [`image-streaming` - # sample on - # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). - class Container - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Script runnable. - # @!attribute [rw] path - # @return [::String] - # The path to a script file that is accessible from the host VM(s). - # - # Unless the script file supports the default `#!/bin/sh` shell - # interpreter, you must specify an interpreter by including a - # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the - # first line of the file. For example, to execute the script using bash, - # include `#!/bin/bash` as the first line of the file. Alternatively, - # to execute the script using Python3, include `#!/usr/bin/env python3` - # as the first line of the file. - # - # Note: The following fields are mutually exclusive: `path`, `text`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text - # @return [::String] - # The text for a script. - # - # Unless the script text supports the default `#!/bin/sh` shell - # interpreter, you must specify an interpreter by including a - # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the - # beginning of the text. For example, to execute the script using bash, - # include `#!/bin/bash\n` at the beginning of the text. Alternatively, - # to execute the script using Python3, include `#!/usr/bin/env python3\n` - # at the beginning of the text. - # - # Note: The following fields are mutually exclusive: `text`, `path`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Script - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A barrier runnable automatically blocks the execution of subsequent - # runnables until all the tasks in the task group reach the barrier. - # @!attribute [rw] name - # @return [::String] - # Barriers are identified by their index in runnable list. - # Names are not required, but if present should be an identifier. - class Barrier - 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 - - # Spec of a task - # @!attribute [rw] runnables - # @return [::Array<::Google::Cloud::Batch::V1::Runnable>] - # Required. The sequence of one or more runnables (executable scripts, - # executable containers, and/or barriers) for each task in this task group to - # run. Each task runs this list of runnables in order. For a task to succeed, - # all of its script and container runnables each must meet at least one of - # the following conditions: - # - # + The runnable exited with a zero status. - # + The runnable didn't finish, but you enabled its `background` subfield. - # + The runnable exited with a non-zero status, but you enabled its - # `ignore_exit_status` subfield. - # @!attribute [rw] compute_resource - # @return [::Google::Cloud::Batch::V1::ComputeResource] - # ComputeResource requirements. - # @!attribute [rw] max_run_duration - # @return [::Google::Protobuf::Duration] - # Maximum duration the task should run before being automatically retried - # (if enabled) or automatically failed. Format the value of this field - # as a time limit in seconds followed by `s`—for example, `3600s` - # for 1 hour. The field accepts any value between 0 and the maximum listed - # for the `Duration` field type at - # https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, - # the actual maximum run time for a job will be limited to the maximum run - # time for a job listed at - # https://cloud.google.com/batch/quotas#max-job-duration. - # @!attribute [rw] max_retry_count - # @return [::Integer] - # Maximum number of retries on failures. - # The default, 0, which means never retry. - # The valid value range is [0, 10]. - # @!attribute [rw] lifecycle_policies - # @return [::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>] - # Lifecycle management schema when any task in a task group is failed. - # Currently we only support one lifecycle policy. - # When the lifecycle policy condition is met, - # the action in the policy will execute. - # If task execution result does not meet with the defined lifecycle - # policy, we consider it as the default policy. - # Default policy means if the exit code is 0, exit task. - # If task ends with non-zero exit code, retry the task with max_retry_count. - # @!attribute [rw] environments - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Map{::String => ::String}] - # Deprecated: please use environment(non-plural) instead. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::Batch::V1::Volume>] - # Volumes to mount before running Tasks using this TaskSpec. - # @!attribute [rw] environment - # @return [::Google::Cloud::Batch::V1::Environment] - # Environment variables to set before running the Task. - class TaskSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class EnvironmentsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # LifecyclePolicy describes how to deal with task failures - # based on different conditions. - # @!attribute [rw] action - # @return [::Google::Cloud::Batch::V1::LifecyclePolicy::Action] - # Action to execute when ActionCondition is true. - # When RETRY_TASK is specified, we will retry failed tasks - # if we notice any exit code match and fail tasks if no match is found. - # Likewise, when FAIL_TASK is specified, we will fail tasks - # if we notice any exit code match and retry tasks if no match is found. - # @!attribute [rw] action_condition - # @return [::Google::Cloud::Batch::V1::LifecyclePolicy::ActionCondition] - # Conditions that decide why a task failure is dealt with a specific action. - class LifecyclePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Conditions for actions to deal with task failures. - # @!attribute [rw] exit_codes - # @return [::Array<::Integer>] - # Exit codes of a task execution. - # If there are more than 1 exit codes, - # when task executes with any of the exit code in the list, - # the condition is met and the action will be executed. - class ActionCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action on task failures based on different conditions. - module Action - # Action unspecified. - ACTION_UNSPECIFIED = 0 - - # Action that tasks in the group will be scheduled to re-execute. - RETRY_TASK = 1 - - # Action that tasks in the group will be stopped immediately. - FAIL_TASK = 2 - end - end - - # A Cloud Batch task. - # @!attribute [rw] name - # @return [::String] - # Task name. - # The name is generated from the parent TaskGroup name and 'id' field. - # For example: - # "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". - # @!attribute [rw] status - # @return [::Google::Cloud::Batch::V1::TaskStatus] - # Task Status. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An Environment describes a collection of environment variables to set when - # executing Tasks. - # @!attribute [rw] variables - # @return [::Google::Protobuf::Map{::String => ::String}] - # A map of environment variable names to values. - # @!attribute [rw] secret_variables - # @return [::Google::Protobuf::Map{::String => ::String}] - # A map of environment variable names to Secret Manager secret names. - # The VM will access the named secrets to set the value of each environment - # variable. - # @!attribute [rw] encrypted_variables - # @return [::Google::Cloud::Batch::V1::Environment::KMSEnvMap] - # An encrypted JSON dictionary where the key/value pairs correspond to - # environment variable names and their values. - class Environment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key_name - # @return [::String] - # The name of the KMS key that will be used to decrypt the cipher text. - # @!attribute [rw] cipher_text - # @return [::String] - # The value of the cipherText response from the `encrypt` method. - class KMSEnvMap - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class VariablesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class SecretVariablesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb deleted file mode 100644 index 5c9f7a233fea..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.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 Batch - module V1 - # Volume describes a volume and parameters for it to be mounted to a VM. - # @!attribute [rw] nfs - # @return [::Google::Cloud::Batch::V1::NFS] - # A Network File System (NFS) volume. For example, a - # Filestore file share. - # - # Note: The following fields are mutually exclusive: `nfs`, `gcs`, `device_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcs - # @return [::Google::Cloud::Batch::V1::GCS] - # A Google Cloud Storage (GCS) volume. - # - # Note: The following fields are mutually exclusive: `gcs`, `nfs`, `device_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] device_name - # @return [::String] - # Device name of an attached disk volume, which should align with a - # device_name specified by - # job.allocation_policy.instances[0].policy.disks[i].device_name or - # defined by the given instance template in - # job.allocation_policy.instances[0].instance_template. - # - # Note: The following fields are mutually exclusive: `device_name`, `nfs`, `gcs`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mount_path - # @return [::String] - # The mount path for the volume, e.g. /mnt/disks/share. - # @!attribute [rw] mount_options - # @return [::Array<::String>] - # Mount options vary based on the type of storage volume: - # - # * For a Cloud Storage bucket, all the mount options provided - # by - # the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) - # are supported. - # * For an existing persistent disk, all mount options provided by the - # [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) - # except writing are supported. This is due to restrictions of - # [multi-writer - # mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). - # * For any other disk or a Network File System (NFS), all the - # mount options provided by the `mount` command are supported. - class Volume - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an NFS volume. - # @!attribute [rw] server - # @return [::String] - # The IP address of the NFS. - # @!attribute [rw] remote_path - # @return [::String] - # Remote source path exported from the NFS, e.g., "/share". - class NFS - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Google Cloud Storage volume. - # @!attribute [rw] remote_path - # @return [::String] - # Remote path, either a bucket name or a subdirectory of a bucket, e.g.: - # bucket_name, bucket_name/subdirectory/ - class GCS - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile deleted file mode 100644 index da55e968f9ea..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-batch-v1", path: "../" -else - gem "google-cloud-batch-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-batch-v1/snippets/batch_service/cancel_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb deleted file mode 100644 index 4025c81c42d8..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.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 batch_v1_generated_BatchService_CancelJob_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the cancel_job call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#cancel_job. -# -def cancel_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::CancelJobRequest.new - - # Call the cancel_job method. - result = client.cancel_job request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END batch_v1_generated_BatchService_CancelJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb deleted file mode 100644 index 2c18c23c163e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_BatchService_CreateJob_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the create_job call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#create_job. -# -def create_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::CreateJobRequest.new - - # Call the create_job method. - result = client.create_job request - - # The returned object is of type Google::Cloud::Batch::V1::Job. - p result -end -# [END batch_v1_generated_BatchService_CreateJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb deleted file mode 100644 index a4dac580732e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.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 batch_v1_generated_BatchService_DeleteJob_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the delete_job call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#delete_job. -# -def delete_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::DeleteJobRequest.new - - # Call the delete_job method. - result = client.delete_job request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END batch_v1_generated_BatchService_DeleteJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb deleted file mode 100644 index 51b591988ead..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_BatchService_GetJob_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the get_job call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#get_job. -# -def get_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::GetJobRequest.new - - # Call the get_job method. - result = client.get_job request - - # The returned object is of type Google::Cloud::Batch::V1::Job. - p result -end -# [END batch_v1_generated_BatchService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb deleted file mode 100644 index fb681197281e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_BatchService_GetTask_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the get_task call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Cloud::Batch::V1::Task. - p result -end -# [END batch_v1_generated_BatchService_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb deleted file mode 100644 index 27e5f50995a4..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.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 batch_v1_generated_BatchService_ListJobs_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the list_jobs call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#list_jobs. -# -def list_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::ListJobsRequest.new - - # Call the list_jobs method. - result = client.list_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Batch::V1::Job. - p item - end -end -# [END batch_v1_generated_BatchService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb deleted file mode 100644 index a94c440293e7..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.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 batch_v1_generated_BatchService_ListTasks_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the list_tasks call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Batch::V1::Task. - p item - end -end -# [END batch_v1_generated_BatchService_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb deleted file mode 100644 index 1ad5b84a516b..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/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 batch_v1_generated_IAMPolicy_GetIamPolicy_sync] -require "google/iam/v1" - -## -# Snippet for the get_iam_policy call in the IAMPolicy service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V1::IAMPolicy::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V1::IAMPolicy::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 batch_v1_generated_IAMPolicy_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb deleted file mode 100644 index 7fb1c919b8da..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/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 batch_v1_generated_IAMPolicy_SetIamPolicy_sync] -require "google/iam/v1" - -## -# Snippet for the set_iam_policy call in the IAMPolicy service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V1::IAMPolicy::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V1::IAMPolicy::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 batch_v1_generated_IAMPolicy_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb deleted file mode 100644 index 722df828728f..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/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 batch_v1_generated_IAMPolicy_TestIamPermissions_sync] -require "google/iam/v1" - -## -# Snippet for the test_iam_permissions call in the IAMPolicy service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V1::IAMPolicy::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V1::IAMPolicy::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 batch_v1_generated_IAMPolicy_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json deleted file mode 100644 index 53f2a1c4992e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-batch-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.batch.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "batch_v1_generated_BatchService_CreateJob_sync", - "title": "Snippet for the create_job call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#create_job.", - "file": "batch_service/create_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_job", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#create_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::CreateJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Batch::V1::Job", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "CreateJob", - "full_name": "google.cloud.batch.v1.BatchService.CreateJob", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_GetJob_sync", - "title": "Snippet for the get_job call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#get_job.", - "file": "batch_service/get_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_job", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#get_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::GetJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Batch::V1::Job", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "GetJob", - "full_name": "google.cloud.batch.v1.BatchService.GetJob", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_DeleteJob_sync", - "title": "Snippet for the delete_job call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#delete_job.", - "file": "batch_service/delete_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_job", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#delete_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::DeleteJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "DeleteJob", - "full_name": "google.cloud.batch.v1.BatchService.DeleteJob", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_CancelJob_sync", - "title": "Snippet for the cancel_job call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#cancel_job.", - "file": "batch_service/cancel_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_job", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#cancel_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::CancelJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "CancelJob", - "full_name": "google.cloud.batch.v1.BatchService.CancelJob", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_ListJobs_sync", - "title": "Snippet for the list_jobs call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#list_jobs.", - "file": "batch_service/list_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_jobs", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#list_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::ListJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Batch::V1::ListJobsResponse", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "ListJobs", - "full_name": "google.cloud.batch.v1.BatchService.ListJobs", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_GetTask_sync", - "title": "Snippet for the get_task call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#get_task.", - "file": "batch_service/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Batch::V1::Task", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "google.cloud.batch.v1.BatchService.GetTask", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_ListTasks_sync", - "title": "Snippet for the list_tasks call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#list_tasks.", - "file": "batch_service/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Batch::V1::ListTasksResponse", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "google.cloud.batch.v1.BatchService.ListTasks", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "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-batch-v1/snippets/snippet_metadata_google.iam.v1.json b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json deleted file mode 100644 index 8e7486b5b5d6..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-batch-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "batch_v1_generated_IAMPolicy_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the IAMPolicy service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#set_iam_policy.", - "file": "iam_policy/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Iam::V1::IAMPolicy::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "IAMPolicy::Client", - "full_name": "::Google::Iam::V1::IAMPolicy::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.iam.v1.IAMPolicy.SetIamPolicy", - "service": { - "short_name": "IAMPolicy", - "full_name": "google.iam.v1.IAMPolicy" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_IAMPolicy_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the IAMPolicy service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#get_iam_policy.", - "file": "iam_policy/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Iam::V1::IAMPolicy::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "IAMPolicy::Client", - "full_name": "::Google::Iam::V1::IAMPolicy::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.iam.v1.IAMPolicy.GetIamPolicy", - "service": { - "short_name": "IAMPolicy", - "full_name": "google.iam.v1.IAMPolicy" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_IAMPolicy_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the IAMPolicy service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#test_iam_permissions.", - "file": "iam_policy/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Iam::V1::IAMPolicy::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "IAMPolicy::Client", - "full_name": "::Google::Iam::V1::IAMPolicy::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.iam.v1.IAMPolicy.TestIamPermissions", - "service": { - "short_name": "IAMPolicy", - "full_name": "google.iam.v1.IAMPolicy" - } - } - }, - "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-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb deleted file mode 100644 index a030912c842e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_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/batch/v1/batch_pb" -require "google/cloud/batch/v1/batch_services_pb" -require "google/cloud/batch/v1/batch_service" - -class ::Google::Cloud::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb deleted file mode 100644 index 094400644c40..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/batch/v1/batch_service" - -class ::Google::Cloud::Batch::V1::BatchService::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_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::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.job_path project: "value0", location: "value1", job: "value2" - assert_equal "projects/value0/locations/value1/jobs/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::Batch::V1::BatchService::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_task_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path project: "value0", location: "value1", job: "value2", task_group: "value3", task: "value4" - assert_equal "projects/value0/locations/value1/jobs/value2/taskGroups/value3/tasks/value4", path - end - end - - def test_task_group_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_group_path project: "value0", location: "value1", job: "value2", task_group: "value3" - assert_equal "projects/value0/locations/value1/jobs/value2/taskGroups/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb deleted file mode 100644 index 12a63083daf3..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb +++ /dev/null @@ -1,490 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/batch/v1/batch_pb" -require "google/cloud/batch/v1/batch_service/rest" - - -class ::Google::Cloud::Batch::V1::BatchService::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_job - # Create test objects. - client_result = ::Google::Cloud::Batch::V1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job_id = "hello world" - job = {} - request_id = "hello world" - - create_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_create_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_job_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_job parent: parent, job_id: job_id, job: job, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_job ::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_job(::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_job_client_stub.call_count - end - end - end - - def test_get_job - # Create test objects. - client_result = ::Google::Cloud::Batch::V1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_job_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_job ::Google::Cloud::Batch::V1::GetJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_job(::Google::Cloud::Batch::V1::GetJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_count - end - end - end - - def test_delete_job - # Create test objects. - 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" - reason = "hello world" - request_id = "hello world" - - delete_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_delete_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_job_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_job({ name: name, reason: reason, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_job name: name, reason: reason, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_job ::Google::Cloud::Batch::V1::DeleteJobRequest.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.delete_job({ 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.delete_job(::Google::Cloud::Batch::V1::DeleteJobRequest.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, delete_job_client_stub.call_count - end - end - end - - def test_cancel_job - # Create test objects. - 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" - - cancel_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_cancel_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_job_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.cancel_job({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.cancel_job name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.cancel_job ::Google::Cloud::Batch::V1::CancelJobRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.cancel_job({ 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.cancel_job(::Google::Cloud::Batch::V1::CancelJobRequest.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, cancel_job_client_stub.call_count - end - end - end - - def test_list_jobs - # Create test objects. - client_result = ::Google::Cloud::Batch::V1::ListJobsResponse.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" - page_size = 42 - page_token = "hello world" - - list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_jobs parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_jobs ::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, 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_jobs({ parent: parent, filter: filter, order_by: order_by, 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_jobs(::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, 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_jobs_client_stub.call_count - end - end - end - - def test_get_task - # Create test objects. - client_result = ::Google::Cloud::Batch::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_task ::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_task(::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Cloud::Batch::V1::ListTasksResponse.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_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_tasks({ 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_tasks 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_tasks ::Google::Cloud::Batch::V1::ListTasksRequest.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_tasks({ 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_tasks(::Google::Cloud::Batch::V1::ListTasksRequest.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_tasks_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::Batch::V1::BatchService::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::Batch::V1::BatchService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb deleted file mode 100644 index e1a4d725a308..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb +++ /dev/null @@ -1,570 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/batch/v1/batch_pb" -require "google/cloud/batch/v1/batch_service" - -class ::Google::Cloud::Batch::V1::BatchService::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_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Batch::V1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job_id = "hello world" - job = {} - request_id = "hello world" - - create_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_job, name - assert_kind_of ::Google::Cloud::Batch::V1::CreateJobRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["job_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Batch::V1::Job), request["job"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_job_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_job parent: parent, job_id: job_id, job: job, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_job ::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, 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_job({ parent: parent, job_id: job_id, job: job, 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_job(::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, 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_job_client_stub.call_rpc_count - end - end - - def test_get_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Batch::V1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_job, name - assert_kind_of ::Google::Cloud::Batch::V1::GetJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_job_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_job ::Google::Cloud::Batch::V1::GetJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_job({ 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_job(::Google::Cloud::Batch::V1::GetJobRequest.new(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_job_client_stub.call_rpc_count - end - end - - def test_delete_job - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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 = "hello world" - request_id = "hello world" - - delete_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_job, name - assert_kind_of ::Google::Cloud::Batch::V1::DeleteJobRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["reason"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_job_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_job({ name: name, reason: reason, 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_job name: name, reason: reason, 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_job ::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, 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_job({ name: name, reason: reason, 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_job(::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, 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_job_client_stub.call_rpc_count - end - end - - def test_cancel_job - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - cancel_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_job, name - assert_kind_of ::Google::Cloud::Batch::V1::CancelJobRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_job_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_job({ 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.cancel_job 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.cancel_job ::Google::Cloud::Batch::V1::CancelJobRequest.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.cancel_job({ 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.cancel_job(::Google::Cloud::Batch::V1::CancelJobRequest.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, cancel_job_client_stub.call_rpc_count - end - end - - def test_list_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Batch::V1::ListJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - page_size = 42 - page_token = "hello world" - - list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_jobs, name - assert_kind_of ::Google::Cloud::Batch::V1::ListJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_jobs_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: 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_jobs parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: 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_jobs ::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: 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_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_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_jobs(::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_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_jobs_client_stub.call_rpc_count - end - end - - def test_get_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Batch::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Cloud::Batch::V1::GetTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_task({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_task name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_task ::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_task({ 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_task(::Google::Cloud::Batch::V1::GetTaskRequest.new(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_task_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Batch::V1::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tasks, name - assert_kind_of ::Google::Cloud::Batch::V1::ListTasksRequest, 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_tasks_client_stub do - # Create client - c = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_tasks({ 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_tasks 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_tasks ::Google::Cloud::Batch::V1::ListTasksRequest.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_tasks({ 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_tasks(::Google::Cloud::Batch::V1::ListTasksRequest.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_tasks_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::Batch::V1::BatchService::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::Batch::V1::BatchService::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::Batch::V1::BatchService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Batch::V1::BatchService::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::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb deleted file mode 100644 index d00eb93071e6..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/iam/v1/iam_policy_pb" -require "google/iam/v1/iam_policy/rest" - - -class ::Google::Iam::V1::IAMPolicy::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_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::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb deleted file mode 100644 index 86b551f1cfd6..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v1/iam_policy_pb" -require "google/iam/v1/iam_policy" - -class ::Google::Iam::V1::IAMPolicy::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_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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::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::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V1::IAMPolicy::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/helper.rb b/owl-bot-staging/google-cloud-batch-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-batch-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-beyond_corp-app_connections-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json deleted file mode 100644 index b59fbd964684..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "beyondcorp.googleapis.com", - "api_shortname": "beyondcorp", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connections-v1/latest", - "distribution_name": "google-cloud-beyond_corp-app_connections-v1", - "is_cloud": true, - "language": "ruby", - "name": "beyondcorp", - "name_pretty": "BeyondCorp AppConnections V1 API", - "product_documentation": "https://cloud.google.com/beyondcorp/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connections-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml deleted file mode 100644 index 9a0f1608e53e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts deleted file mode 100644 index d57ef993f75d..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BeyondCorp AppConnections 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-beyond_corp-app_connections-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md deleted file mode 100644 index 5fb552e9ca72..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-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/beyond_corp/app_connections/v1" - -client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/beyond_corp/app_connections/v1" - -::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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-beyond_corp-app_connections-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/beyond_corp/app_connections/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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-beyond_corp-app_connections-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md deleted file mode 100644 index 7b29871dfed5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the BeyondCorp AppConnections V1 API - -Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BeyondCorp AppConnections V1 API. Most users should consider using -the main client gem, -[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-beyond_corp-app_connections-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/beyondcorp.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/beyond_corp/app_connections/v1" - -client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new -request = ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new # (request fields as keyword arguments...) -response = client.list_app_connections request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connections-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/beyondcorp/) -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/beyond_corp/app_connections/v1" -require "logger" - -client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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-beyond_corp`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-beyond_corp-app_connections-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-beyond_corp`. -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-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile deleted file mode 100644 index 31baa9b2971f..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-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/beyond_corp/app_connections/v1/app_connections_service/credentials" - ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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-beyond_corp-app_connections-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-beyond_corp-app_connections-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-beyond_corp-app_connections-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-beyond_corp-app_connections-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-beyond_corp-app_connections-v1" - header "google-cloud-beyond_corp-app_connections-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-beyond_corp-app_connections-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-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-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json deleted file mode 100644 index 525a196a960a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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.beyondcorp.appconnections.v1", - "libraryPackage": "::Google::Cloud::BeyondCorp::AppConnections::V1", - "services": { - "AppConnectionsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client", - "rpcs": { - "ListAppConnections": { - "methods": [ - "list_app_connections" - ] - }, - "GetAppConnection": { - "methods": [ - "get_app_connection" - ] - }, - "CreateAppConnection": { - "methods": [ - "create_app_connection" - ] - }, - "UpdateAppConnection": { - "methods": [ - "update_app_connection" - ] - }, - "DeleteAppConnection": { - "methods": [ - "delete_app_connection" - ] - }, - "ResolveAppConnections": { - "methods": [ - "resolve_app_connections" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec deleted file mode 100644 index 8a9fae867038..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/beyond_corp/app_connections/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-beyond_corp-app_connections-v1" - gem.version = Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connections-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." - gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." - 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-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb deleted file mode 100644 index 1ac7623cc398..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-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/beyond_corp/app_connections/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb deleted file mode 100644 index bcc50c2b3a0a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" -require "google/cloud/beyond_corp/app_connections/v1/version" - -module Google - module Cloud - module BeyondCorp - module AppConnections - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_connections/v1" - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/beyond_corp/app_connections/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb deleted file mode 100644 index 41f69b3c5f7e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.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! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/beyond_corp/app_connections/v1/version" - -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/client" - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - ## - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectionsService exposes the following resources: - # - # * AppConnections, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. - # - # The AppConnectionsService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnections. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - module AppConnectionsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "app_connections_service", "helpers.rb" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb deleted file mode 100644 index ae05eeca3f7e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb +++ /dev/null @@ -1,1143 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/beyondcorp/appconnections/v1/app_connections_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - module AppConnectionsService - ## - # Client for the AppConnectionsService service. - # - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectionsService exposes the following resources: - # - # * AppConnections, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. - # - # The AppConnectionsService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnections. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_connections_service_stub - - ## - # Configure the AppConnectionsService Client class. - # - # See {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppConnectionsService clients - # ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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", "BeyondCorp", "AppConnections", "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 AppConnectionsService 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::BeyondCorp::AppConnections::V1::AppConnectionsService::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 - @app_connections_service_stub.universe_domain - end - - ## - # Create a new AppConnectionsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppConnectionsService 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/beyondcorp/appconnections/v1/app_connections_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 - - @app_connections_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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 - ) - - @app_connections_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 = @app_connections_service_stub.endpoint - config.universe_domain = @app_connections_service_stub.universe_domain - config.logger = @app_connections_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 = @app_connections_service_stub.endpoint - config.universe_domain = @app_connections_service_stub.universe_domain - config.logger = @app_connections_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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 - @app_connections_service_stub.logger - end - - # Service calls - - ## - # Lists AppConnections in a given project and location. - # - # @overload list_app_connections(request, options = nil) - # Pass arguments to `list_app_connections` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_app_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_app_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AppConnection location using the form: - # `projects/{project_id}/locations/{location_id}` - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous - # ListAppConnectionsRequest, if any. - # @param filter [::String] - # Optional. A filter specifying constraints of a list operation. - # @param order_by [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new - # - # # Call the list_app_connections method. - # result = client.list_app_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. - # p item - # end - # - def list_app_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_app_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_app_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_app_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :list_app_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_connections_service_stub, :list_app_connections, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single AppConnection. - # - # @overload get_app_connection(request, options = nil) - # Pass arguments to `get_app_connection` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_app_connection(name: nil) - # Pass arguments to `get_app_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp AppConnection name using the form: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new - # - # # Call the get_app_connection method. - # result = client.get_app_connection request - # - # # The returned object is of type Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. - # p result - # - def get_app_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_app_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_app_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_app_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :get_app_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new AppConnection in a given project and location. - # - # @overload create_app_connection(request, options = nil) - # Pass arguments to `create_app_connection` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_app_connection(parent: nil, app_connection_id: nil, app_connection: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_app_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource project name of the AppConnection location using the - # form: `projects/{project_id}/locations/{location_id}` - # @param app_connection_id [::String] - # Optional. User-settable AppConnection resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @param app_connection [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash] - # Required. A BeyondCorp AppConnection 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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new - # - # # Call the create_app_connection method. - # result = client.create_app_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_app_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest - - # Converts hash and nil to 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_app_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_app_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_app_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :create_app_connection, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single AppConnection. - # - # @overload update_app_connection(request, options = nil) - # Pass arguments to `update_app_connection` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_app_connection(update_mask: nil, app_connection: nil, request_id: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_app_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. The elements of the repeated paths field may only include these - # fields from [BeyondCorp.AppConnection]: - # * `labels` - # * `display_name` - # * `application_endpoint` - # * `connectors` - # @param app_connection [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash] - # Required. AppConnection message with updated fields. Only supported fields - # specified in update_mask are updated. - # @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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # @param allow_missing [::Boolean] - # Optional. If set as true, will create the resource if it is not found. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new - # - # # Call the update_app_connection method. - # result = client.update_app_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_app_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest - - # Converts hash and nil to 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_app_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.app_connection&.name - header_params["app_connection.name"] = request.app_connection.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_app_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_app_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :update_app_connection, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single AppConnection. - # - # @overload delete_app_connection(request, options = nil) - # Pass arguments to `delete_app_connection` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_app_connection(name: nil, request_id: nil, validate_only: nil) - # Pass arguments to `delete_app_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp Connector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - # @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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new - # - # # Call the delete_app_connection method. - # result = client.delete_app_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_app_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest - - # Converts hash and nil to 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_app_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_app_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_app_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :delete_app_connection, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resolves AppConnections details for a given AppConnector. - # An internal method called by a connector to find AppConnections to connect - # to. - # - # @overload resolve_app_connections(request, options = nil) - # Pass arguments to `resolve_app_connections` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app_connections(parent: nil, app_connector_id: nil, page_size: nil, page_token: nil) - # Pass arguments to `resolve_app_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AppConnection location using the form: - # `projects/{project_id}/locations/{location_id}` - # @param app_connector_id [::String] - # Required. BeyondCorp Connector name of the connector associated with those - # AppConnections using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous - # ResolveAppConnectionsResponse, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new - # - # # Call the resolve_app_connections method. - # result = client.resolve_app_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails. - # p item - # end - # - def resolve_app_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest - - # Converts hash and nil to 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_app_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_app_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.resolve_app_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :resolve_app_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_connections_service_stub, :resolve_app_connections, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AppConnectionsService API. - # - # This class represents the configuration for AppConnectionsService, - # providing control 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::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_app_connections to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_connections.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_connections.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::BeyondCorp::AppConnections::V1::AppConnectionsService::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 = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::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 AppConnectionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_app_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_app_connections - ## - # RPC-specific configuration for `get_app_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_app_connection - ## - # RPC-specific configuration for `create_app_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_app_connection - ## - # RPC-specific configuration for `update_app_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :update_app_connection - ## - # RPC-specific configuration for `delete_app_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_app_connection - ## - # RPC-specific configuration for `resolve_app_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :resolve_app_connections - - # @private - def initialize parent_rpcs = nil - list_app_connections_config = parent_rpcs.list_app_connections if parent_rpcs.respond_to? :list_app_connections - @list_app_connections = ::Gapic::Config::Method.new list_app_connections_config - get_app_connection_config = parent_rpcs.get_app_connection if parent_rpcs.respond_to? :get_app_connection - @get_app_connection = ::Gapic::Config::Method.new get_app_connection_config - create_app_connection_config = parent_rpcs.create_app_connection if parent_rpcs.respond_to? :create_app_connection - @create_app_connection = ::Gapic::Config::Method.new create_app_connection_config - update_app_connection_config = parent_rpcs.update_app_connection if parent_rpcs.respond_to? :update_app_connection - @update_app_connection = ::Gapic::Config::Method.new update_app_connection_config - delete_app_connection_config = parent_rpcs.delete_app_connection if parent_rpcs.respond_to? :delete_app_connection - @delete_app_connection = ::Gapic::Config::Method.new delete_app_connection_config - resolve_app_connections_config = parent_rpcs.resolve_app_connections if parent_rpcs.respond_to? :resolve_app_connections - @resolve_app_connections = ::Gapic::Config::Method.new resolve_app_connections_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb deleted file mode 100644 index d8c727b63578..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - module AppConnectionsService - # Credentials for the AppConnectionsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb deleted file mode 100644 index b87df03b9fef..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_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 BeyondCorp - module AppConnections - module V1 - module AppConnectionsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppConnectionsService 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 AppConnectionsService 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::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::BeyondCorp::AppConnections::V1::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 = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::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-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb deleted file mode 100644 index 52ef4c16714c..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - module AppConnectionsService - # Path helper methods for the AppConnectionsService API. - module Paths - ## - # Create a fully-qualified AppConnection resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/appConnections/{app_connection}` - # - # @param project [String] - # @param location [String] - # @param app_connection [String] - # - # @return [::String] - def app_connection_path project:, location:, app_connection: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/appConnections/#{app_connection}" - end - - ## - # Create a fully-qualified AppConnector resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/appConnectors/{app_connector}` - # - # @param project [String] - # @param location [String] - # @param app_connector [String] - # - # @return [::String] - def app_connector_path project:, location:, app_connector: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/appConnectors/#{app_connector}" - end - - ## - # Create a fully-qualified AppGateway resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/appGateways/{app_gateway}` - # - # @param project [String] - # @param location [String] - # @param app_gateway [String] - # - # @return [::String] - def app_gateway_path project:, location:, app_gateway: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/appGateways/#{app_gateway}" - 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-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb deleted file mode 100644 index 182a98d114a3..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/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 BeyondCorp - module AppConnections - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb deleted file mode 100644 index 1446e9c3fde5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/appconnections/v1/app_connections_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/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nGgoogle/cloud/beyondcorp/appconnections/v1/app_connections_service.proto\x12)google.cloud.beyondcorp.appconnections.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 google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x01\n\x19ListAppConnectionsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\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\"\x9d\x01\n\x1aListAppConnectionsResponse\x12Q\n\x0f\x61pp_connections\x18\x01 \x03(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x17GetAppConnectionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/AppConnection\"\x89\x02\n\x1a\x43reateAppConnectionRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\x12\x1e\n\x11\x61pp_connection_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x61pp_connection\x18\x03 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnectionB\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\"\xfa\x01\n\x1aUpdateAppConnectionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12U\n\x0e\x61pp_connection\x18\x02 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnectionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x90\x01\n\x1a\x44\x65leteAppConnectionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/AppConnection\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xda\x01\n\x1cResolveAppConnectionsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\x12H\n\x10\x61pp_connector_id\x18\x02 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\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\"\xcf\x02\n\x1dResolveAppConnectionsResponse\x12}\n\x16\x61pp_connection_details\x18\x01 \x03(\x0b\x32].google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\x1a\x80\x01\n\x14\x41ppConnectionDetails\x12P\n\x0e\x61pp_connection\x18\x01 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\x12\x16\n\x0erecent_mig_vms\x18\x02 \x03(\t\"\x99\n\n\rAppConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x06labels\x18\x04 \x03(\x0b\x32\x44.google.cloud.beyondcorp.appconnections.v1.AppConnection.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12P\n\x04type\x18\x07 \x01(\x0e\x32=.google.cloud.beyondcorp.appconnections.v1.AppConnection.TypeB\x03\xe0\x41\x02\x12o\n\x14\x61pplication_endpoint\x18\x08 \x01(\x0b\x32L.google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpointB\x03\xe0\x41\x02\x12\x17\n\nconnectors\x18\t \x03(\tB\x03\xe0\x41\x01\x12R\n\x05state\x18\n \x01(\x0e\x32>.google.cloud.beyondcorp.appconnections.v1.AppConnection.StateB\x03\xe0\x41\x03\x12V\n\x07gateway\x18\x0b \x01(\x0b\x32@.google.cloud.beyondcorp.appconnections.v1.AppConnection.GatewayB\x03\xe0\x41\x01\x1a;\n\x13\x41pplicationEndpoint\x12\x11\n\x04host\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\x87\x02\n\x07Gateway\x12X\n\x04type\x18\x02 \x01(\x0e\x32\x45.google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.TypeB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cingress_port\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x41\n\x0b\x61pp_gateway\x18\x05 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_REGIONAL_MIG\x10\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\r\n\tTCP_PROXY\x10\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05:u\xea\x41r\n\'beyondcorp.googleapis.com/AppConnection\x12Gprojects/{project}/locations/{location}/appConnections/{app_connection}\"\x8d\x02\n\x1e\x41ppConnectionOperationMetadata\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\xea\x0c\n\x15\x41ppConnectionsService\x12\xe6\x01\n\x12ListAppConnections\x12\x44.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest\x1a\x45.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/appConnections\x12\xd3\x01\n\x10GetAppConnection\x12\x42.google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest\x1a\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/appConnections/*}\x12\xa4\x02\n\x13\x43reateAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41/\n\rAppConnection\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\'parent,app_connection,app_connection_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/appConnections:\x0e\x61pp_connection\x12\xa6\x02\n\x13UpdateAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41/\n\rAppConnection\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\x1a\x61pp_connection,update_mask\x82\xd3\xe4\x93\x02S2A/v1/{app_connection.name=projects/*/locations/*/appConnections/*}:\x0e\x61pp_connection\x12\xf8\x01\n\x13\x44\x65leteAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x37\n\x15google.protobuf.Empty\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/appConnections/*}\x12\xf7\x01\n\x15ResolveAppConnections\x12G.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest\x1aH.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/appConnections:resolve\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8a\x04\n-com.google.cloud.beyondcorp.appconnections.v1B\x1a\x41ppConnectionsServiceProtoP\x01ZUcloud.google.com/go/beyondcorp/appconnections/apiv1/appconnectionspb;appconnectionspb\xaa\x02)Google.Cloud.BeyondCorp.AppConnections.V1\xca\x02)Google\\Cloud\\BeyondCorp\\AppConnections\\V1\xea\x02-Google::Cloud::BeyondCorp::AppConnections::V1\xea\x41o\n&beyondcorp.googleapis.com/AppConnector\x12\x45projects/{project}/locations/{location}/appConnectors/{app_connector}\xea\x41i\n$beyondcorp.googleapis.com/AppGateway\x12\x41projects/{project}/locations/{location}/appGateways/{app_gateway}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - ListAppConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest").msgclass - ListAppConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsResponse").msgclass - GetAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest").msgclass - CreateAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest").msgclass - UpdateAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest").msgclass - DeleteAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest").msgclass - ResolveAppConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest").msgclass - ResolveAppConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse").msgclass - ResolveAppConnectionsResponse::AppConnectionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails").msgclass - AppConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection").msgclass - AppConnection::ApplicationEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint").msgclass - AppConnection::Gateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway").msgclass - AppConnection::Gateway::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type").enummodule - AppConnection::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Type").enummodule - AppConnection::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.State").enummodule - AppConnectionOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnectionOperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb deleted file mode 100644 index e5383bb39ab7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto for package 'Google.Cloud.BeyondCorp.AppConnections.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/beyondcorp/appconnections/v1/app_connections_service_pb' - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - module AppConnectionsService - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectionsService exposes the following resources: - # - # * AppConnections, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. - # - # The AppConnectionsService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnections. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.beyondcorp.appconnections.v1.AppConnectionsService' - - # Lists AppConnections in a given project and location. - rpc :ListAppConnections, ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse - # Gets details of a single AppConnection. - rpc :GetAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection - # Creates a new AppConnection in a given project and location. - rpc :CreateAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single AppConnection. - rpc :UpdateAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, ::Google::Longrunning::Operation - # Deletes a single AppConnection. - rpc :DeleteAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, ::Google::Longrunning::Operation - # Resolves AppConnections details for a given AppConnector. - # An internal method called by a connector to find AppConnections to connect - # to. - rpc :ResolveAppConnections, ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md deleted file mode 100644 index 0a721b5b0912..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BeyondCorp AppConnections 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-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb deleted file mode 100644 index 9d00efe6f19d..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb +++ /dev/null @@ -1,411 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - # Request message for BeyondCorp.ListAppConnections. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AppConnection location using the form: - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous - # ListAppConnectionsRequest, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter specifying constraints of a list operation. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - class ListAppConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BeyondCorp.ListAppConnections. - # @!attribute [rw] app_connections - # @return [::Array<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] - # A list of BeyondCorp AppConnections in the project. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations that could not be reached. - class ListAppConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.GetAppConnection. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp AppConnection name using the form: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - class GetAppConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.CreateAppConnection. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource project name of the AppConnection location using the - # form: `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] app_connection_id - # @return [::String] - # Optional. User-settable AppConnection resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @!attribute [rw] app_connection - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] - # Required. A BeyondCorp AppConnection 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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class CreateAppConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.UpdateAppConnection. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. The elements of the repeated paths field may only include these - # fields from [BeyondCorp.AppConnection]: - # * `labels` - # * `display_name` - # * `application_endpoint` - # * `connectors` - # @!attribute [rw] app_connection - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] - # Required. AppConnection message with updated fields. Only supported fields - # specified in update_mask are updated. - # @!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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set as true, will create the resource if it is not found. - class UpdateAppConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.DeleteAppConnection. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp Connector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - # @!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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class DeleteAppConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.ResolveAppConnections. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AppConnection location using the form: - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] app_connector_id - # @return [::String] - # Required. BeyondCorp Connector name of the connector associated with those - # AppConnections using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous - # ResolveAppConnectionsResponse, if any. - class ResolveAppConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BeyondCorp.ResolveAppConnections. - # @!attribute [rw] app_connection_details - # @return [::Array<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] - # A list of BeyondCorp AppConnections with details in the project. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations that could not be reached. - class ResolveAppConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details of the AppConnection. - # @!attribute [rw] app_connection - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] - # A BeyondCorp AppConnection in the project. - # @!attribute [rw] recent_mig_vms - # @return [::Array<::String>] - # If type=GCP_REGIONAL_MIG, contains most recent VM instances, like - # `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. - class AppConnectionDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A BeyondCorp AppConnection resource represents a BeyondCorp protected - # AppConnection to a remote application. It creates all the necessary GCP - # components needed for creating a BeyondCorp protected AppConnection. Multiple - # connectors can be authorised for a single AppConnection. - # @!attribute [rw] name - # @return [::String] - # Required. Unique resource name of the AppConnection. - # The name is ignored when creating a AppConnection. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was last modified. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # @!attribute [rw] display_name - # @return [::String] - # Optional. An arbitrary user-provided name for the AppConnection. Cannot - # exceed 64 characters. - # @!attribute [r] uid - # @return [::String] - # Output only. A unique identifier for the instance generated by the - # system. - # @!attribute [rw] type - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Type] - # Required. The type of network connectivity used by the AppConnection. - # @!attribute [rw] application_endpoint - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::ApplicationEndpoint] - # Required. Address of the remote application endpoint for the BeyondCorp - # AppConnection. - # @!attribute [rw] connectors - # @return [::Array<::String>] - # Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are - # authorised to be associated with this AppConnection. - # @!attribute [r] state - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::State] - # Output only. The current state of the AppConnection. - # @!attribute [rw] gateway - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Gateway] - # Optional. Gateway used by the AppConnection. - class AppConnection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # ApplicationEndpoint represents a remote application endpoint. - # @!attribute [rw] host - # @return [::String] - # Required. Hostname or IP address of the remote application endpoint. - # @!attribute [rw] port - # @return [::Integer] - # Required. Port of the remote application endpoint. - class ApplicationEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Gateway represents a user facing component that serves as an entrance to - # enable connectivity. - # @!attribute [rw] type - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Gateway::Type] - # Required. The type of hosting used by the gateway. - # @!attribute [r] uri - # @return [::String] - # Output only. Server-defined URI for this resource. - # @!attribute [r] ingress_port - # @return [::Integer] - # Output only. Ingress port reserved on the gateways for this - # AppConnection, if not specified or zero, the default port is 19443. - # @!attribute [rw] app_gateway - # @return [::String] - # Required. AppGateway name in following format: - # `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` - class Gateway - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum listing possible gateway hosting options. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # Gateway hosted in a GCP regional managed instance group. - GCP_REGIONAL_MIG = 1 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum containing list of all possible network connectivity options - # supported by BeyondCorp AppConnection. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # TCP Proxy based BeyondCorp AppConnection. API will default to this if - # unset. - TCP_PROXY = 1 - end - - # Represents the different states of a AppConnection. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # AppConnection is being created. - CREATING = 1 - - # AppConnection has been created. - CREATED = 2 - - # AppConnection's configuration is being updated. - UPDATING = 3 - - # AppConnection is being deleted. - DELETING = 4 - - # AppConnection is down and may be restored in the future. - # This happens when CCFE sends ProjectState = OFF. - DOWN = 5 - end - 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 AppConnectionOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile deleted file mode 100644 index 50af8c28bf87..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1", path: "../" -else - gem "google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb deleted file mode 100644 index b4dde20ea729..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the create_app_connection call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection. -# -def create_app_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new - - # Call the create_app_connection method. - result = client.create_app_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb deleted file mode 100644 index 00ee3ec93ef7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the delete_app_connection call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection. -# -def delete_app_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new - - # Call the delete_app_connection method. - result = client.delete_app_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb deleted file mode 100644 index c7a6da25f24b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the get_app_connection call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection. -# -def get_app_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new - - # Call the get_app_connection method. - result = client.get_app_connection request - - # The returned object is of type Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. - p result -end -# [END beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb deleted file mode 100644 index 89cc6f1a0e02..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the list_app_connections call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections. -# -def list_app_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new - - # Call the list_app_connections method. - result = client.list_app_connections request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. - p item - end -end -# [END beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb deleted file mode 100644 index a68f644a3648..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the resolve_app_connections call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections. -# -def resolve_app_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new - - # Call the resolve_app_connections method. - result = client.resolve_app_connections request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails. - p item - end -end -# [END beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb deleted file mode 100644 index 66b87a042ff8..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the update_app_connection call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection. -# -def update_app_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new - - # Call the update_app_connection method. - result = client.update_app_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json deleted file mode 100644 index 37d1445fa1d6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-beyond_corp-app_connections-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.beyondcorp.appconnections.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync", - "title": "Snippet for the list_app_connections call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections.", - "file": "app_connections_service/list_app_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_app_connections", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "ListAppConnections", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ListAppConnections", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync", - "title": "Snippet for the get_app_connection call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection.", - "file": "app_connections_service/get_app_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_app_connection", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "GetAppConnection", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.GetAppConnection", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync", - "title": "Snippet for the create_app_connection call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection.", - "file": "app_connections_service/create_app_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_app_connection", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "CreateAppConnection", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.CreateAppConnection", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync", - "title": "Snippet for the update_app_connection call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection.", - "file": "app_connections_service/update_app_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_app_connection", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "UpdateAppConnection", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.UpdateAppConnection", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync", - "title": "Snippet for the delete_app_connection call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection.", - "file": "app_connections_service/delete_app_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_app_connection", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "DeleteAppConnection", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.DeleteAppConnection", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync", - "title": "Snippet for the resolve_app_connections call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections.", - "file": "app_connections_service/resolve_app_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "resolve_app_connections", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "ResolveAppConnections", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ResolveAppConnections", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "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-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb deleted file mode 100644 index 117c58b9ea9e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_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/beyondcorp/appconnections/v1/app_connections_service_pb" -require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" - -class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb deleted file mode 100644 index 8dbd4e5cb9e4..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" - -class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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_app_connection_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_connection_path project: "value0", location: "value1", app_connection: "value2" - assert_equal "projects/value0/locations/value1/appConnections/value2", path - end - end - - def test_app_connector_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_connector_path project: "value0", location: "value1", app_connector: "value2" - assert_equal "projects/value0/locations/value1/appConnectors/value2", path - end - end - - def test_app_gateway_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_gateway_path project: "value0", location: "value1", app_gateway: "value2" - assert_equal "projects/value0/locations/value1/appGateways/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::BeyondCorp::AppConnections::V1::AppConnectionsService::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-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb deleted file mode 100644 index 51c9b1f4be11..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb +++ /dev/null @@ -1,525 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/beyondcorp/appconnections/v1/app_connections_service_pb" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" - -class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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_app_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_app_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_app_connections, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, 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_app_connections_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_app_connections({ 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_app_connections 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_app_connections ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.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_app_connections({ 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_app_connections(::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.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_app_connections_client_stub.call_rpc_count - end - end - - def test_get_app_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_app_connection, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_app_connection_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_app_connection({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_app_connection name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_app_connection({ 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_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new(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_app_connection_client_stub.call_rpc_count - end - end - - def test_create_app_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - app_connection_id = "hello world" - app_connection = {} - request_id = "hello world" - validate_only = true - - create_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_app_connection, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["app_connection_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection), request["app_connection"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_app_connection_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_app_connection({ parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_app_connection parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new(parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_app_connection({ parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new(parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_app_connection_client_stub.call_rpc_count - end - end - - def test_update_app_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - app_connection = {} - request_id = "hello world" - validate_only = true - allow_missing = true - - update_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_app_connection, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection), request["app_connection"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_app_connection_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_app_connection({ update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, 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.update_app_connection update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, 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.update_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new(update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, 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.update_app_connection({ update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, 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.update_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new(update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, 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, update_app_connection_client_stub.call_rpc_count - end - end - - def test_delete_app_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - - delete_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_app_connection, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_app_connection_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_app_connection({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_app_connection name: name, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_app_connection({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_app_connection_client_stub.call_rpc_count - end - end - - def test_resolve_app_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - app_connector_id = "hello world" - page_size = 42 - page_token = "hello world" - - resolve_app_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :resolve_app_connections, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["app_connector_id"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, resolve_app_connections_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.resolve_app_connections({ parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.resolve_app_connections parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.resolve_app_connections ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new(parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.resolve_app_connections({ parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.resolve_app_connections(::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new(parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, resolve_app_connections_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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::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::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-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-beyond_corp-app_connectors-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json deleted file mode 100644 index 8737a08b2ed0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "beyondcorp.googleapis.com", - "api_shortname": "beyondcorp", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connectors-v1/latest", - "distribution_name": "google-cloud-beyond_corp-app_connectors-v1", - "is_cloud": true, - "language": "ruby", - "name": "beyondcorp", - "name_pretty": "BeyondCorp AppConnectors V1 API", - "product_documentation": "https://cloud.google.com/beyondcorp/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connectors-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml deleted file mode 100644 index 7c746abab61f..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts deleted file mode 100644 index 1b1ee4a36299..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BeyondCorp AppConnectors 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-beyond_corp-app_connectors-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md deleted file mode 100644 index 4252892c67b5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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/beyond_corp/app_connectors/v1" - -client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/beyond_corp/app_connectors/v1" - -::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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-beyond_corp-app_connectors-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/beyond_corp/app_connectors/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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-beyond_corp-app_connectors-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md deleted file mode 100644 index 6ff15b55eefb..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the BeyondCorp AppConnectors V1 API - -Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BeyondCorp AppConnectors V1 API. Most users should consider using -the main client gem, -[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-beyond_corp-app_connectors-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/beyondcorp.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/beyond_corp/app_connectors/v1" - -client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new -request = ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new # (request fields as keyword arguments...) -response = client.list_app_connectors request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connectors-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/beyondcorp/) -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/beyond_corp/app_connectors/v1" -require "logger" - -client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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-beyond_corp`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-beyond_corp-app_connectors-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-beyond_corp`. -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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile deleted file mode 100644 index 73cfd1f9a5c4..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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/beyond_corp/app_connectors/v1/app_connectors_service/credentials" - ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-beyond_corp-app_connectors-v1" - header "google-cloud-beyond_corp-app_connectors-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-beyond_corp-app_connectors-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json deleted file mode 100644 index d617a8d7418e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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.beyondcorp.appconnectors.v1", - "libraryPackage": "::Google::Cloud::BeyondCorp::AppConnectors::V1", - "services": { - "AppConnectorsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client", - "rpcs": { - "ListAppConnectors": { - "methods": [ - "list_app_connectors" - ] - }, - "GetAppConnector": { - "methods": [ - "get_app_connector" - ] - }, - "CreateAppConnector": { - "methods": [ - "create_app_connector" - ] - }, - "UpdateAppConnector": { - "methods": [ - "update_app_connector" - ] - }, - "DeleteAppConnector": { - "methods": [ - "delete_app_connector" - ] - }, - "ReportStatus": { - "methods": [ - "report_status" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec deleted file mode 100644 index 08ec4fe60325..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/beyond_corp/app_connectors/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-beyond_corp-app_connectors-v1" - gem.version = Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connectors-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." - gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." - 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-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb deleted file mode 100644 index d557f7c0d50f..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-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/beyond_corp/app_connectors/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb deleted file mode 100644 index 96a31864e164..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" -require "google/cloud/beyond_corp/app_connectors/v1/version" - -module Google - module Cloud - module BeyondCorp - module AppConnectors - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_connectors/v1" - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/beyond_corp/app_connectors/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb deleted file mode 100644 index e9d2c90330e5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.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! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/beyond_corp/app_connectors/v1/version" - -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client" - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - ## - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectorsService exposes the following resource: - # - # * AppConnectors, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. - # - # The AppConnectorsService provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnectors. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - module AppConnectorsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "app_connectors_service", "helpers.rb" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb deleted file mode 100644 index ce6660869d98..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb +++ /dev/null @@ -1,1146 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - module AppConnectorsService - ## - # Client for the AppConnectorsService service. - # - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectorsService exposes the following resource: - # - # * AppConnectors, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. - # - # The AppConnectorsService provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnectors. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_connectors_service_stub - - ## - # Configure the AppConnectorsService Client class. - # - # See {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppConnectorsService clients - # ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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", "BeyondCorp", "AppConnectors", "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 AppConnectorsService 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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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 - @app_connectors_service_stub.universe_domain - end - - ## - # Create a new AppConnectorsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppConnectorsService 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/beyondcorp/appconnectors/v1/app_connectors_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 - - @app_connectors_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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 - ) - - @app_connectors_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 = @app_connectors_service_stub.endpoint - config.universe_domain = @app_connectors_service_stub.universe_domain - config.logger = @app_connectors_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 = @app_connectors_service_stub.endpoint - config.universe_domain = @app_connectors_service_stub.universe_domain - config.logger = @app_connectors_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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 - @app_connectors_service_stub.logger - end - - # Service calls - - ## - # Lists AppConnectors in a given project and location. - # - # @overload list_app_connectors(request, options = nil) - # Pass arguments to `list_app_connectors` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_app_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_app_connectors` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 AppConnector location using the form: - # `projects/{project_id}/locations/{location_id}` - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous - # ListAppConnectorsRequest, if any. - # @param filter [::String] - # Optional. A filter specifying constraints of a list operation. - # @param order_by [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new - # - # # Call the list_app_connectors method. - # result = client.list_app_connectors request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. - # p item - # end - # - def list_app_connectors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_app_connectors.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_app_connectors.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_app_connectors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :list_app_connectors, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_connectors_service_stub, :list_app_connectors, request, response, 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 AppConnector. - # - # @overload get_app_connector(request, options = nil) - # Pass arguments to `get_app_connector` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_app_connector(name: nil) - # Pass arguments to `get_app_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp AppConnector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new - # - # # Call the get_app_connector method. - # result = client.get_app_connector request - # - # # The returned object is of type Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. - # p result - # - def get_app_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_app_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_app_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_app_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :get_app_connector, request, 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 AppConnector in a given project and location. - # - # @overload create_app_connector(request, options = nil) - # Pass arguments to `create_app_connector` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_app_connector(parent: nil, app_connector_id: nil, app_connector: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_app_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 project name of the AppConnector location using the - # form: `projects/{project_id}/locations/{location_id}` - # @param app_connector_id [::String] - # Optional. User-settable AppConnector resource ID. - # - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @param app_connector [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash] - # Required. A BeyondCorp AppConnector 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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new - # - # # Call the create_app_connector method. - # result = client.create_app_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_app_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest - - # Converts hash and nil to 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_app_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_app_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_app_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :create_app_connector, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 parameters of a single AppConnector. - # - # @overload update_app_connector(request, options = nil) - # Pass arguments to `update_app_connector` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_app_connector(update_mask: nil, app_connector: nil, request_id: nil, validate_only: nil) - # Pass arguments to `update_app_connector` via keyword arguments. Note that at - # least one keyword argument is 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. Mask of fields to update. At least one path must be supplied in - # this field. The elements of the repeated paths field may only include these - # fields from [BeyondCorp.AppConnector]: - # * `labels` - # * `display_name` - # @param app_connector [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash] - # Required. AppConnector message with updated fields. Only supported fields - # specified in update_mask are updated. - # @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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new - # - # # Call the update_app_connector method. - # result = client.update_app_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_app_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest - - # Converts hash and nil to 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_app_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.app_connector&.name - header_params["app_connector.name"] = request.app_connector.name - end - - request_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_app_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_app_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :update_app_connector, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 AppConnector. - # - # @overload delete_app_connector(request, options = nil) - # Pass arguments to `delete_app_connector` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_app_connector(name: nil, request_id: nil, validate_only: nil) - # Pass arguments to `delete_app_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp AppConnector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - # @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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new - # - # # Call the delete_app_connector method. - # result = client.delete_app_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_app_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest - - # Converts hash and nil to 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_app_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_app_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_app_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :delete_app_connector, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Report status for a given connector. - # - # @overload report_status(request, options = nil) - # Pass arguments to `report_status` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_status(app_connector: nil, resource_info: nil, request_id: nil, validate_only: nil) - # Pass arguments to `report_status` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param app_connector [::String] - # Required. BeyondCorp Connector name using the form: - # `projects/{project_id}/locations/{location_id}/connectors/{connector}` - # @param resource_info [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo, ::Hash] - # Required. Resource info of the connector. - # @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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new - # - # # Call the report_status method. - # result = client.report_status request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def report_status request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest - - # Converts hash and nil to 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_status.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.app_connector - header_params["app_connector"] = request.app_connector - end - - request_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_status.timeout, - metadata: metadata, - retry_policy: @config.rpcs.report_status.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :report_status, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 AppConnectorsService API. - # - # This class represents the configuration for AppConnectorsService, - # providing control 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::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_app_connectors to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_connectors.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_connectors.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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 = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::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 AppConnectorsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_app_connectors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_app_connectors - ## - # RPC-specific configuration for `get_app_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :get_app_connector - ## - # RPC-specific configuration for `create_app_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :create_app_connector - ## - # RPC-specific configuration for `update_app_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :update_app_connector - ## - # RPC-specific configuration for `delete_app_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_app_connector - ## - # RPC-specific configuration for `report_status` - # @return [::Gapic::Config::Method] - # - attr_reader :report_status - - # @private - def initialize parent_rpcs = nil - list_app_connectors_config = parent_rpcs.list_app_connectors if parent_rpcs.respond_to? :list_app_connectors - @list_app_connectors = ::Gapic::Config::Method.new list_app_connectors_config - get_app_connector_config = parent_rpcs.get_app_connector if parent_rpcs.respond_to? :get_app_connector - @get_app_connector = ::Gapic::Config::Method.new get_app_connector_config - create_app_connector_config = parent_rpcs.create_app_connector if parent_rpcs.respond_to? :create_app_connector - @create_app_connector = ::Gapic::Config::Method.new create_app_connector_config - update_app_connector_config = parent_rpcs.update_app_connector if parent_rpcs.respond_to? :update_app_connector - @update_app_connector = ::Gapic::Config::Method.new update_app_connector_config - delete_app_connector_config = parent_rpcs.delete_app_connector if parent_rpcs.respond_to? :delete_app_connector - @delete_app_connector = ::Gapic::Config::Method.new delete_app_connector_config - report_status_config = parent_rpcs.report_status if parent_rpcs.respond_to? :report_status - @report_status = ::Gapic::Config::Method.new report_status_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb deleted file mode 100644 index 8e856ab92cab..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - module AppConnectorsService - # Credentials for the AppConnectorsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb deleted file mode 100644 index 1ba6b0b25b21..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_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 BeyondCorp - module AppConnectors - module V1 - module AppConnectorsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppConnectorsService 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 AppConnectorsService 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::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::BeyondCorp::AppConnectors::V1::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 = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::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-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb deleted file mode 100644 index dd5a91475be8..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - module AppConnectorsService - # Path helper methods for the AppConnectorsService API. - module Paths - ## - # Create a fully-qualified AppConnector resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/appConnectors/{app_connector}` - # - # @param project [String] - # @param location [String] - # @param app_connector [String] - # - # @return [::String] - def app_connector_path project:, location:, app_connector: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/appConnectors/#{app_connector}" - 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-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb deleted file mode 100644 index 4a35a95f37ea..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/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 BeyondCorp - module AppConnectors - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb deleted file mode 100644 index 3d9532fa3b37..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/any_pb' - - -descriptor_data = "\nLgoogle/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto\x12(google.cloud.beyondcorp.appconnectors.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\"\x91\x02\n\x1a\x41ppConnectorInstanceConfig\x12\x1c\n\x0fsequence_number\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12-\n\x0finstance_config\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any\x12Y\n\x13notification_config\x18\x03 \x01(\x0b\x32<.google.cloud.beyondcorp.appconnectors.v1.NotificationConfig\x12K\n\x0cimage_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.beyondcorp.appconnectors.v1.ImageConfig\"\xd7\x01\n\x12NotificationConfig\x12y\n\x13pubsub_notification\x18\x01 \x01(\x0b\x32Z.google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfigH\x00\x1a<\n\x1d\x43loudPubSubNotificationConfig\x12\x1b\n\x13pubsub_subscription\x18\x01 \x01(\tB\x08\n\x06\x63onfig\"9\n\x0bImageConfig\x12\x14\n\x0ctarget_image\x18\x01 \x01(\t\x12\x14\n\x0cstable_image\x18\x02 \x01(\tB\xaa\x02\n,com.google.cloud.beyondcorp.appconnectors.v1B\x1f\x41ppConnectorInstanceConfigProtoP\x01ZRcloud.google.com/go/beyondcorp/appconnectors/apiv1/appconnectorspb;appconnectorspb\xaa\x02(Google.Cloud.BeyondCorp.AppConnectors.V1\xca\x02(Google\\Cloud\\BeyondCorp\\AppConnectors\\V1\xea\x02,Google::Cloud::BeyondCorp::AppConnectors::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - AppConnectorInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnectorInstanceConfig").msgclass - NotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.NotificationConfig").msgclass - NotificationConfig::CloudPubSubNotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfig").msgclass - ImageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ImageConfig").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb deleted file mode 100644 index a1ba56613e21..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_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/beyondcorp/appconnectors/v1/app_connector_instance_config_pb' -require 'google/cloud/beyondcorp/appconnectors/v1/resource_info_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nEgoogle/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto\x12(google.cloud.beyondcorp.appconnectors.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aLgoogle/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto\x1a\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&beyondcorp.googleapis.com/AppConnector\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\"\x99\x01\n\x19ListAppConnectorsResponse\x12N\n\x0e\x61pp_connectors\x18\x01 \x03(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"V\n\x16GetAppConnectorRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\"\x83\x02\n\x19\x43reateAppConnectorRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&beyondcorp.googleapis.com/AppConnector\x12\x1d\n\x10\x61pp_connector_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12R\n\rapp_connector\x18\x03 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnectorB\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\"\xda\x01\n\x19UpdateAppConnectorRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12R\n\rapp_connector\x18\x02 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnectorB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8e\x01\n\x19\x44\x65leteAppConnectorRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x01\n\x13ReportStatusRequest\x12\x45\n\rapp_connector\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\x12R\n\rresource_info\x18\x02 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.ResourceInfoB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xcb\x07\n\x0c\x41ppConnector\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\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\x12W\n\x06labels\x18\x04 \x03(\x0b\x32\x42.google.cloud.beyondcorp.appconnectors.v1.AppConnector.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12P\n\x05state\x18\x07 \x01(\x0e\x32<.google.cloud.beyondcorp.appconnectors.v1.AppConnector.StateB\x03\xe0\x41\x03\x12\x61\n\x0eprincipal_info\x18\x08 \x01(\x0b\x32\x44.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfoB\x03\xe0\x41\x02\x12R\n\rresource_info\x18\x0b \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.ResourceInfoB\x03\xe0\x41\x01\x1a\xa8\x01\n\rPrincipalInfo\x12n\n\x0fservice_account\x18\x01 \x01(\x0b\x32S.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccountH\x00\x1a\x1f\n\x0eServiceAccount\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\x06\n\x04type\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\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05:r\xea\x41o\n&beyondcorp.googleapis.com/AppConnector\x12\x45projects/{project}/locations/{location}/appConnectors/{app_connector}\"\x8c\x02\n\x1d\x41ppConnectorOperationMetadata\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\xde\x0c\n\x14\x41ppConnectorsService\x12\xe0\x01\n\x11ListAppConnectors\x12\x42.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest\x1a\x43.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/appConnectors\x12\xcd\x01\n\x0fGetAppConnector\x12@.google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest\x1a\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnector\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/appConnectors/*}\x12\x9b\x02\n\x12\x43reateAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41%parent,app_connector,app_connector_id\x82\xd3\xe4\x93\x02\x42\"1/v1/{parent=projects/*/locations/*}/appConnectors:\rapp_connector\x12\x9d\x02\n\x12UpdateAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x19\x61pp_connector,update_mask\x82\xd3\xe4\x93\x02P2?/v1/{app_connector.name=projects/*/locations/*/appConnectors/*}:\rapp_connector\x12\xf3\x01\n\x12\x44\x65leteAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41\x36\n\x15google.protobuf.Empty\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/appConnectors/*}\x12\x8f\x02\n\x0cReportStatus\x12=.google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x1b\x61pp_connector,resource_info\x82\xd3\xe4\x93\x02L\"G/v1/{app_connector=projects/*/locations/*/appConnectors/*}:reportStatus:\x01*\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa4\x02\n,com.google.cloud.beyondcorp.appconnectors.v1B\x19\x41ppConnectorsServiceProtoP\x01ZRcloud.google.com/go/beyondcorp/appconnectors/apiv1/appconnectorspb;appconnectorspb\xaa\x02(Google.Cloud.BeyondCorp.AppConnectors.V1\xca\x02(Google\\Cloud\\BeyondCorp\\AppConnectors\\V1\xea\x02,Google::Cloud::BeyondCorp::AppConnectors::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - ListAppConnectorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest").msgclass - ListAppConnectorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsResponse").msgclass - GetAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest").msgclass - CreateAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest").msgclass - UpdateAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest").msgclass - DeleteAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest").msgclass - ReportStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest").msgclass - AppConnector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector").msgclass - AppConnector::PrincipalInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo").msgclass - AppConnector::PrincipalInfo::ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccount").msgclass - AppConnector::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.State").enummodule - AppConnectorOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnectorOperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb deleted file mode 100644 index dfa57a816cd2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb +++ /dev/null @@ -1,70 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto for package 'Google.Cloud.BeyondCorp.AppConnectors.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/beyondcorp/appconnectors/v1/app_connectors_service_pb' - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - module AppConnectorsService - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectorsService exposes the following resource: - # - # * AppConnectors, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. - # - # The AppConnectorsService provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnectors. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService' - - # Lists AppConnectors in a given project and location. - rpc :ListAppConnectors, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse - # Gets details of a single AppConnector. - rpc :GetAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector - # Creates a new AppConnector in a given project and location. - rpc :CreateAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single AppConnector. - rpc :UpdateAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, ::Google::Longrunning::Operation - # Deletes a single AppConnector. - rpc :DeleteAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, ::Google::Longrunning::Operation - # Report status for a given connector. - rpc :ReportStatus, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb deleted file mode 100644 index d3fe1da19670..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/appconnectors/v1/resource_info.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/any_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\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-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb deleted file mode 100644 index 01f0871d5362..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.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 Cloud - module BeyondCorp - module AppConnectors - module V1 - # AppConnectorInstanceConfig defines the instance config of a AppConnector. - # @!attribute [rw] sequence_number - # @return [::Integer] - # Required. A monotonically increasing number generated and maintained - # by the API provider. Every time a config changes in the backend, the - # sequenceNumber should be bumped up to reflect the change. - # @!attribute [rw] instance_config - # @return [::Google::Protobuf::Any] - # The SLM instance agent configuration. - # @!attribute [rw] notification_config - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::NotificationConfig] - # NotificationConfig defines the notification mechanism that the remote - # instance should subscribe to in order to receive notification. - # @!attribute [rw] image_config - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ImageConfig] - # ImageConfig defines the GCR images to run for the remote agent's control - # plane. - class AppConnectorInstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NotificationConfig defines the mechanisms to notify instance agent. - # @!attribute [rw] pubsub_notification - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::NotificationConfig::CloudPubSubNotificationConfig] - # Cloud Pub/Sub Configuration to receive notifications. - class NotificationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration for Pub/Sub messaging for the AppConnector. - # @!attribute [rw] pubsub_subscription - # @return [::String] - # The Pub/Sub subscription the AppConnector uses to receive notifications. - class CloudPubSubNotificationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # ImageConfig defines the control plane images to run. - # @!attribute [rw] target_image - # @return [::String] - # The initial image the remote agent will attempt to run for the control - # plane. - # @!attribute [rw] stable_image - # @return [::String] - # The stable image that the remote agent will fallback to if the target image - # fails. - class ImageConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb deleted file mode 100644 index ec8d597ea2e1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb +++ /dev/null @@ -1,341 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - # Request message for BeyondCorp.ListAppConnectors. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AppConnector location using the form: - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous - # ListAppConnectorsRequest, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter specifying constraints of a list operation. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - class ListAppConnectorsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BeyondCorp.ListAppConnectors. - # @!attribute [rw] app_connectors - # @return [::Array<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] - # A list of BeyondCorp AppConnectors in the project. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations that could not be reached. - class ListAppConnectorsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.GetAppConnector. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp AppConnector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - class GetAppConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.CreateAppConnector. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource project name of the AppConnector location using the - # form: `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] app_connector_id - # @return [::String] - # Optional. User-settable AppConnector resource ID. - # - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @!attribute [rw] app_connector - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] - # Required. A BeyondCorp AppConnector 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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class CreateAppConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.UpdateAppConnector. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. The elements of the repeated paths field may only include these - # fields from [BeyondCorp.AppConnector]: - # * `labels` - # * `display_name` - # @!attribute [rw] app_connector - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] - # Required. AppConnector message with updated fields. Only supported fields - # specified in update_mask are updated. - # @!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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class UpdateAppConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.DeleteAppConnector. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp AppConnector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - # @!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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class DeleteAppConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request report the connector status. - # @!attribute [rw] app_connector - # @return [::String] - # Required. BeyondCorp Connector name using the form: - # `projects/{project_id}/locations/{location_id}/connectors/{connector}` - # @!attribute [rw] resource_info - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo] - # Required. Resource info of the connector. - # @!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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class ReportStatusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A BeyondCorp connector resource that represents an application facing - # component deployed proximal to and with direct access to the application - # instances. It is used to establish connectivity between the remote enterprise - # environment and GCP. It initiates connections to the applications and can - # proxy the data from users over the connection. - # @!attribute [rw] name - # @return [::String] - # Required. Unique resource name of the AppConnector. - # The name is ignored when creating a AppConnector. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was last modified. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # @!attribute [rw] display_name - # @return [::String] - # Optional. An arbitrary user-provided name for the AppConnector. Cannot - # exceed 64 characters. - # @!attribute [r] uid - # @return [::String] - # Output only. A unique identifier for the instance generated by the - # system. - # @!attribute [r] state - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::State] - # Output only. The current state of the AppConnector. - # @!attribute [rw] principal_info - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::PrincipalInfo] - # Required. Principal information about the Identity of the AppConnector. - # @!attribute [rw] resource_info - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo] - # Optional. Resource info of the connector. - class AppConnector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # PrincipalInfo represents an Identity oneof. - # @!attribute [rw] service_account - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::PrincipalInfo::ServiceAccount] - # A GCP service account. - class PrincipalInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # ServiceAccount represents a GCP service account. - # @!attribute [rw] email - # @return [::String] - # Email address of the service account. - class ServiceAccount - 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 - - # Represents the different states of a AppConnector. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # AppConnector is being created. - CREATING = 1 - - # AppConnector has been created. - CREATED = 2 - - # AppConnector's configuration is being updated. - UPDATING = 3 - - # AppConnector is being deleted. - DELETING = 4 - - # AppConnector is down and may be restored in the future. - # This happens when CCFE sends ProjectState = OFF. - DOWN = 5 - end - 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 AppConnectorOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb deleted file mode 100644 index 044fddd4161e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb +++ /dev/null @@ -1,78 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - # ResourceInfo represents the information/status of an app connector resource. - # Such as: - # - remote_agent - # - container - # - runtime - # - appgateway - # - appconnector - # - appconnection - # - tunnel - # - logagent - # @!attribute [rw] id - # @return [::String] - # Required. Unique Id for the resource. - # @!attribute [rw] status - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::HealthStatus] - # Overall health status. Overall status is derived based on the status of - # each sub level resources. - # @!attribute [rw] resource - # @return [::Google::Protobuf::Any] - # Specific details for the resource. This is for internal use only. - # @!attribute [rw] time - # @return [::Google::Protobuf::Timestamp] - # The timestamp to collect the info. It is suggested to be set by - # the topmost level resource only. - # @!attribute [rw] sub - # @return [::Array<::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo>] - # List of Info for the sub level resources. - class ResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # HealthStatus represents the health status. - module HealthStatus - # Health status is unknown: not initialized or failed to retrieve. - HEALTH_STATUS_UNSPECIFIED = 0 - - # The resource is healthy. - HEALTHY = 1 - - # The resource is unhealthy. - UNHEALTHY = 2 - - # The resource is unresponsive. - UNRESPONSIVE = 3 - - # Some sub-resources are UNHEALTHY. - DEGRADED = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile deleted file mode 100644 index 43e9ab898138..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1", path: "../" -else - gem "google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb deleted file mode 100644 index 70f0d140058b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.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 beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the create_app_connector call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector. -# -def create_app_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new - - # Call the create_app_connector method. - result = client.create_app_connector request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb deleted file mode 100644 index b3a1d87b3402..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.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 beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the delete_app_connector call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector. -# -def delete_app_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new - - # Call the delete_app_connector method. - result = client.delete_app_connector request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb deleted file mode 100644 index 1edebaac1f69..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the get_app_connector call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector. -# -def get_app_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new - - # Call the get_app_connector method. - result = client.get_app_connector request - - # The returned object is of type Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. - p result -end -# [END beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb deleted file mode 100644 index 259b2f32126e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.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 beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the list_app_connectors call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors. -# -def list_app_connectors - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new - - # Call the list_app_connectors method. - result = client.list_app_connectors request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. - p item - end -end -# [END beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb deleted file mode 100644 index fb94bff32e92..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.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 beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the report_status call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status. -# -def report_status - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new - - # Call the report_status method. - result = client.report_status request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb deleted file mode 100644 index cccaafa23d82..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.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 beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the update_app_connector call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector. -# -def update_app_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new - - # Call the update_app_connector method. - result = client.update_app_connector request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json deleted file mode 100644 index 0eee27e39078..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-beyond_corp-app_connectors-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.beyondcorp.appconnectors.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync", - "title": "Snippet for the list_app_connectors call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors.", - "file": "app_connectors_service/list_app_connectors.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_app_connectors", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "ListAppConnectors", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ListAppConnectors", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync", - "title": "Snippet for the get_app_connector call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector.", - "file": "app_connectors_service/get_app_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_app_connector", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "GetAppConnector", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.GetAppConnector", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync", - "title": "Snippet for the create_app_connector call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector.", - "file": "app_connectors_service/create_app_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_app_connector", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "CreateAppConnector", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.CreateAppConnector", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync", - "title": "Snippet for the update_app_connector call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector.", - "file": "app_connectors_service/update_app_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_app_connector", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "UpdateAppConnector", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.UpdateAppConnector", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync", - "title": "Snippet for the delete_app_connector call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector.", - "file": "app_connectors_service/delete_app_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_app_connector", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "DeleteAppConnector", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.DeleteAppConnector", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync", - "title": "Snippet for the report_status call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status.", - "file": "app_connectors_service/report_status.rb", - "language": "RUBY", - "client_method": { - "short_name": "report_status", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "ReportStatus", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ReportStatus", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "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-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb deleted file mode 100644 index e42ccbf0dca8..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_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/beyondcorp/appconnectors/v1/app_connectors_service_pb" -require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" - -class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb deleted file mode 100644 index ccd8bc1d885a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" - -class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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_app_connector_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_connector_path project: "value0", location: "value1", app_connector: "value2" - assert_equal "projects/value0/locations/value1/appConnectors/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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb deleted file mode 100644 index 777295b263b9..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb +++ /dev/null @@ -1,523 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" - -class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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_app_connectors - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_app_connectors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_app_connectors, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, 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_app_connectors_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_app_connectors({ 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_app_connectors 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_app_connectors ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.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_app_connectors({ 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_app_connectors(::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.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_app_connectors_client_stub.call_rpc_count - end - end - - def test_get_app_connector - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_app_connector, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_app_connector_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_app_connector({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_app_connector name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_app_connector({ 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_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new(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_app_connector_client_stub.call_rpc_count - end - end - - def test_create_app_connector - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - app_connector_id = "hello world" - app_connector = {} - request_id = "hello world" - validate_only = true - - create_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_app_connector, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["app_connector_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector), request["app_connector"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_app_connector_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_app_connector({ parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_app_connector parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new(parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_app_connector({ parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new(parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_app_connector_client_stub.call_rpc_count - end - end - - def test_update_app_connector - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - app_connector = {} - request_id = "hello world" - validate_only = true - - update_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_app_connector, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector), request["app_connector"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_app_connector_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_app_connector({ update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_app_connector update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new(update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_app_connector({ update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new(update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_app_connector_client_stub.call_rpc_count - end - end - - def test_delete_app_connector - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - validate_only = true - - delete_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_app_connector, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_app_connector_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_app_connector({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_app_connector name: name, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_app_connector({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_app_connector_client_stub.call_rpc_count - end - end - - def test_report_status - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - app_connector = "hello world" - resource_info = {} - request_id = "hello world" - validate_only = true - - report_status_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :report_status, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, request - assert_equal "hello world", request["app_connector"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo), request["resource_info"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, report_status_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.report_status({ app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.report_status app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.report_status ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new(app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.report_status({ app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.report_status(::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new(app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, report_status_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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::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::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-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-beyond_corp-app_gateways-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json deleted file mode 100644 index a3c9b3754a0a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "beyondcorp.googleapis.com", - "api_shortname": "beyondcorp", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_gateways-v1/latest", - "distribution_name": "google-cloud-beyond_corp-app_gateways-v1", - "is_cloud": true, - "language": "ruby", - "name": "beyondcorp", - "name_pretty": "BeyondCorp AppGateways V1 API", - "product_documentation": "https://cloud.google.com/beyondcorp/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml deleted file mode 100644 index 3c939b74dcc9..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts deleted file mode 100644 index 63cdf671ee4a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BeyondCorp AppGateways 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-beyond_corp-app_gateways-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md deleted file mode 100644 index 7b47d23a035b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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/beyond_corp/app_gateways/v1" - -client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/beyond_corp/app_gateways/v1" - -::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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-beyond_corp-app_gateways-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/beyond_corp/app_gateways/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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-beyond_corp-app_gateways-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md deleted file mode 100644 index 14377edd1df6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the BeyondCorp AppGateways V1 API - -Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BeyondCorp AppGateways V1 API. Most users should consider using -the main client gem, -[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-beyond_corp-app_gateways-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/beyondcorp.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/beyond_corp/app_gateways/v1" - -client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new -request = ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new # (request fields as keyword arguments...) -response = client.list_app_gateways request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_gateways-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/beyondcorp/) -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/beyond_corp/app_gateways/v1" -require "logger" - -client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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-beyond_corp`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-beyond_corp-app_gateways-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-beyond_corp`. -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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile deleted file mode 100644 index d8cc75327511..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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/beyond_corp/app_gateways/v1/app_gateways_service/credentials" - ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-beyond_corp-app_gateways-v1" - header "google-cloud-beyond_corp-app_gateways-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-beyond_corp-app_gateways-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json deleted file mode 100644 index 4d35336a7930..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.beyondcorp.appgateways.v1", - "libraryPackage": "::Google::Cloud::BeyondCorp::AppGateways::V1", - "services": { - "AppGatewaysService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client", - "rpcs": { - "ListAppGateways": { - "methods": [ - "list_app_gateways" - ] - }, - "GetAppGateway": { - "methods": [ - "get_app_gateway" - ] - }, - "CreateAppGateway": { - "methods": [ - "create_app_gateway" - ] - }, - "DeleteAppGateway": { - "methods": [ - "delete_app_gateway" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec deleted file mode 100644 index 06cb22acafd6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/beyond_corp/app_gateways/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-beyond_corp-app_gateways-v1" - gem.version = Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." - gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." - 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-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb deleted file mode 100644 index ea08e44ab15a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-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/beyond_corp/app_gateways/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb deleted file mode 100644 index 735979b372cd..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" -require "google/cloud/beyond_corp/app_gateways/v1/version" - -module Google - module Cloud - module BeyondCorp - module AppGateways - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_gateways/v1" - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/beyond_corp/app_gateways/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb deleted file mode 100644 index 2c44fc4c710b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.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! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/beyond_corp/app_gateways/v1/version" - -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client" - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - ## - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppGatewaysService exposes the following resources: - # - # * AppGateways, named as follows: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. - # - # The AppGatewaysService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppGateways. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - module AppGatewaysService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "app_gateways_service", "helpers.rb" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb deleted file mode 100644 index 3ca0ea7ef22f..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb +++ /dev/null @@ -1,899 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/beyondcorp/appgateways/v1/app_gateways_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - module AppGatewaysService - ## - # Client for the AppGatewaysService service. - # - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppGatewaysService exposes the following resources: - # - # * AppGateways, named as follows: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. - # - # The AppGatewaysService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppGateways. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_gateways_service_stub - - ## - # Configure the AppGatewaysService Client class. - # - # See {::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppGatewaysService clients - # ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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", "BeyondCorp", "AppGateways", "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 AppGatewaysService 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::BeyondCorp::AppGateways::V1::AppGatewaysService::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 - @app_gateways_service_stub.universe_domain - end - - ## - # Create a new AppGatewaysService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppGatewaysService 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/beyondcorp/appgateways/v1/app_gateways_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 - - @app_gateways_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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 - ) - - @app_gateways_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 = @app_gateways_service_stub.endpoint - config.universe_domain = @app_gateways_service_stub.universe_domain - config.logger = @app_gateways_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 = @app_gateways_service_stub.endpoint - config.universe_domain = @app_gateways_service_stub.universe_domain - config.logger = @app_gateways_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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 - @app_gateways_service_stub.logger - end - - # Service calls - - ## - # Lists AppGateways in a given project and location. - # - # @overload list_app_gateways(request, options = nil) - # Pass arguments to `list_app_gateways` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_app_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_app_gateways` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 AppGateway location using the form: - # `projects/{project_id}/locations/{location_id}` - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous - # ListAppGatewaysRequest, if any. - # @param filter [::String] - # Optional. A filter specifying constraints of a list operation. - # @param order_by [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new - # - # # Call the list_app_gateways method. - # result = client.list_app_gateways request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. - # p item - # end - # - def list_app_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_app_gateways.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_app_gateways.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_app_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_gateways_service_stub.call_rpc :list_app_gateways, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_gateways_service_stub, :list_app_gateways, request, response, 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 AppGateway. - # - # @overload get_app_gateway(request, options = nil) - # Pass arguments to `get_app_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_app_gateway(name: nil) - # Pass arguments to `get_app_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp AppGateway name using the form: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new - # - # # Call the get_app_gateway method. - # result = client.get_app_gateway request - # - # # The returned object is of type Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. - # p result - # - def get_app_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_app_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_app_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_app_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_gateways_service_stub.call_rpc :get_app_gateway, request, 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 AppGateway in a given project and location. - # - # @overload create_app_gateway(request, options = nil) - # Pass arguments to `create_app_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_app_gateway(parent: nil, app_gateway_id: nil, app_gateway: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_app_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 project name of the AppGateway location using the - # form: `projects/{project_id}/locations/{location_id}` - # @param app_gateway_id [::String] - # Optional. User-settable AppGateway resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @param app_gateway [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway, ::Hash] - # Required. A BeyondCorp AppGateway 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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new - # - # # Call the create_app_gateway method. - # result = client.create_app_gateway request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_app_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest - - # Converts hash and nil to 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_app_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_app_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_app_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_gateways_service_stub.call_rpc :create_app_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 AppGateway. - # - # @overload delete_app_gateway(request, options = nil) - # Pass arguments to `delete_app_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_app_gateway(name: nil, request_id: nil, validate_only: nil) - # Pass arguments to `delete_app_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp AppGateway name using the form: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - # @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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new - # - # # Call the delete_app_gateway method. - # result = client.delete_app_gateway request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_app_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest - - # Converts hash and nil to 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_app_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_app_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_app_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_gateways_service_stub.call_rpc :delete_app_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 AppGatewaysService API. - # - # This class represents the configuration for AppGatewaysService, - # providing control 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::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_app_gateways to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_gateways.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_gateways.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::BeyondCorp::AppGateways::V1::AppGatewaysService::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 = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::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 AppGatewaysService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_app_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_app_gateways - ## - # RPC-specific configuration for `get_app_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_app_gateway - ## - # RPC-specific configuration for `create_app_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_app_gateway - ## - # RPC-specific configuration for `delete_app_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_app_gateway - - # @private - def initialize parent_rpcs = nil - list_app_gateways_config = parent_rpcs.list_app_gateways if parent_rpcs.respond_to? :list_app_gateways - @list_app_gateways = ::Gapic::Config::Method.new list_app_gateways_config - get_app_gateway_config = parent_rpcs.get_app_gateway if parent_rpcs.respond_to? :get_app_gateway - @get_app_gateway = ::Gapic::Config::Method.new get_app_gateway_config - create_app_gateway_config = parent_rpcs.create_app_gateway if parent_rpcs.respond_to? :create_app_gateway - @create_app_gateway = ::Gapic::Config::Method.new create_app_gateway_config - delete_app_gateway_config = parent_rpcs.delete_app_gateway if parent_rpcs.respond_to? :delete_app_gateway - @delete_app_gateway = ::Gapic::Config::Method.new delete_app_gateway_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb deleted file mode 100644 index 26871bd26e4d..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - module AppGatewaysService - # Credentials for the AppGatewaysService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb deleted file mode 100644 index 0ca22508a12e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_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 BeyondCorp - module AppGateways - module V1 - module AppGatewaysService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppGatewaysService 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 AppGatewaysService 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::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::BeyondCorp::AppGateways::V1::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 = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::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-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb deleted file mode 100644 index 820a03051f4e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - module AppGatewaysService - # Path helper methods for the AppGatewaysService API. - module Paths - ## - # Create a fully-qualified AppGateway resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/appGateways/{app_gateway}` - # - # @param project [String] - # @param location [String] - # @param app_gateway [String] - # - # @return [::String] - def app_gateway_path project:, location:, app_gateway: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/appGateways/#{app_gateway}" - 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-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb deleted file mode 100644 index 58c711433662..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/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 BeyondCorp - module AppGateways - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb deleted file mode 100644 index 8ffa165f3267..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/appgateways/v1/app_gateways_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/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nAgoogle/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto\x12&google.cloud.beyondcorp.appgateways.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\x01\n\x16ListAppGatewaysRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$beyondcorp.googleapis.com/AppGateway\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\"\x91\x01\n\x17ListAppGatewaysResponse\x12H\n\x0c\x61pp_gateways\x18\x01 \x03(\x0b\x32\x32.google.cloud.beyondcorp.appgateways.v1.AppGateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"R\n\x14GetAppGatewayRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\"\xf7\x01\n\x17\x43reateAppGatewayRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$beyondcorp.googleapis.com/AppGateway\x12\x1b\n\x0e\x61pp_gateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12L\n\x0b\x61pp_gateway\x18\x03 \x01(\x0b\x32\x32.google.cloud.beyondcorp.appgateways.v1.AppGatewayB\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\"\x8a\x01\n\x17\x44\x65leteAppGatewayRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xaa\x08\n\nAppGateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12S\n\x06labels\x18\x04 \x03(\x0b\x32>.google.cloud.beyondcorp.appgateways.v1.AppGateway.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12J\n\x04type\x18\x07 \x01(\x0e\x32\x37.google.cloud.beyondcorp.appgateways.v1.AppGateway.TypeB\x03\xe0\x41\x02\x12L\n\x05state\x18\x08 \x01(\x0e\x32\x38.google.cloud.beyondcorp.appgateways.v1.AppGateway.StateB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12j\n\x15\x61llocated_connections\x18\n \x03(\x0b\x32\x46.google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnectionB\x03\xe0\x41\x03\x12S\n\thost_type\x18\x0b \x01(\x0e\x32;.google.cloud.beyondcorp.appgateways.v1.AppGateway.HostTypeB\x03\xe0\x41\x02\x1a\x46\n\x13\x41llocatedConnection\x12\x14\n\x07psc_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cingress_port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tTCP_PROXY\x10\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05\";\n\x08HostType\x12\x19\n\x15HOST_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_REGIONAL_MIG\x10\x01:l\xea\x41i\n$beyondcorp.googleapis.com/AppGateway\x12\x41projects/{project}/locations/{location}/appGateways/{app_gateway}\"\x8a\x02\n\x1b\x41ppGatewayOperationMetadata\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\xf6\x07\n\x12\x41ppGatewaysService\x12\xd4\x01\n\x0fListAppGateways\x12>.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest\x1a?.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/appGateways\x12\xc1\x01\n\rGetAppGateway\x12<.google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest\x1a\x32.google.cloud.beyondcorp.appgateways.v1.AppGateway\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/appGateways/*}\x12\x89\x02\n\x10\x43reateAppGateway\x12?.google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41)\n\nAppGateway\x12\x1b\x41ppGatewayOperationMetadata\xda\x41!parent,app_gateway,app_gateway_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/appGateways:\x0b\x61pp_gateway\x12\xe9\x01\n\x10\x44\x65leteAppGateway\x12?.google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x34\n\x15google.protobuf.Empty\x12\x1b\x41ppGatewayOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/appGateways/*}\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x94\x02\n*com.google.cloud.beyondcorp.appgateways.v1B\x17\x41ppGatewaysServiceProtoP\x01ZLcloud.google.com/go/beyondcorp/appgateways/apiv1/appgatewayspb;appgatewayspb\xaa\x02&Google.Cloud.BeyondCorp.AppGateways.V1\xca\x02&Google\\Cloud\\BeyondCorp\\AppGateways\\V1\xea\x02*Google::Cloud::BeyondCorp::AppGateways::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - ListAppGatewaysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest").msgclass - ListAppGatewaysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysResponse").msgclass - GetAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest").msgclass - CreateAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest").msgclass - DeleteAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest").msgclass - AppGateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway").msgclass - AppGateway::AllocatedConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection").msgclass - AppGateway::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.Type").enummodule - AppGateway::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.State").enummodule - AppGateway::HostType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType").enummodule - AppGatewayOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGatewayOperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb deleted file mode 100644 index d3df1c0984d4..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto for package 'Google.Cloud.BeyondCorp.AppGateways.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/beyondcorp/appgateways/v1/app_gateways_service_pb' - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - module AppGatewaysService - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppGatewaysService exposes the following resources: - # - # * AppGateways, named as follows: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. - # - # The AppGatewaysService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppGateways. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.beyondcorp.appgateways.v1.AppGatewaysService' - - # Lists AppGateways in a given project and location. - rpc :ListAppGateways, ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse - # Gets details of a single AppGateway. - rpc :GetAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway - # Creates a new AppGateway in a given project and location. - rpc :CreateAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, ::Google::Longrunning::Operation - # Deletes a single AppGateway. - rpc :DeleteAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md deleted file mode 100644 index ff3f6683cb37..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BeyondCorp AppGateways 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-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb deleted file mode 100644 index 94e62975802d..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb +++ /dev/null @@ -1,291 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - # Request message for BeyondCorp.ListAppGateways. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AppGateway location using the form: - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous - # ListAppGatewaysRequest, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter specifying constraints of a list operation. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - class ListAppGatewaysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BeyondCorp.ListAppGateways. - # @!attribute [rw] app_gateways - # @return [::Array<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] - # A list of BeyondCorp AppGateways in the project. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations that could not be reached. - class ListAppGatewaysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.GetAppGateway. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp AppGateway name using the form: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - class GetAppGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.CreateAppGateway. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource project name of the AppGateway location using the - # form: `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] app_gateway_id - # @return [::String] - # Optional. User-settable AppGateway resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @!attribute [rw] app_gateway - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] - # Required. A BeyondCorp AppGateway 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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class CreateAppGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.DeleteAppGateway. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp AppGateway name using the form: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - # @!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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class DeleteAppGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway - # to a remote application. It creates all the necessary GCP components needed - # for creating a BeyondCorp protected AppGateway. Multiple connectors can be - # authorised for a single AppGateway. - # @!attribute [rw] name - # @return [::String] - # Required. Unique resource name of the AppGateway. - # The name is ignored when creating an AppGateway. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was last modified. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # @!attribute [rw] display_name - # @return [::String] - # Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed - # 64 characters. - # @!attribute [r] uid - # @return [::String] - # Output only. A unique identifier for the instance generated by the - # system. - # @!attribute [rw] type - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::Type] - # Required. The type of network connectivity used by the AppGateway. - # @!attribute [r] state - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::State] - # Output only. The current state of the AppGateway. - # @!attribute [r] uri - # @return [::String] - # Output only. Server-defined URI for this resource. - # @!attribute [r] allocated_connections - # @return [::Array<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::AllocatedConnection>] - # Output only. A list of connections allocated for the Gateway - # @!attribute [rw] host_type - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::HostType] - # Required. The type of hosting used by the AppGateway. - class AppGateway - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Allocated connection of the AppGateway. - # @!attribute [rw] psc_uri - # @return [::String] - # Required. The PSC uri of an allocated connection - # @!attribute [rw] ingress_port - # @return [::Integer] - # Required. The ingress port of an allocated connection - class AllocatedConnection - 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 - - # Enum containing list of all possible network connectivity options - # supported by BeyondCorp AppGateway. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # TCP Proxy based BeyondCorp Connection. API will default to this if unset. - TCP_PROXY = 1 - end - - # Represents the different states of an AppGateway. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # AppGateway is being created. - CREATING = 1 - - # AppGateway has been created. - CREATED = 2 - - # AppGateway's configuration is being updated. - UPDATING = 3 - - # AppGateway is being deleted. - DELETING = 4 - - # AppGateway is down and may be restored in the future. - # This happens when CCFE sends ProjectState = OFF. - DOWN = 5 - end - - # Enum containing list of all possible host types supported by BeyondCorp - # Connection. - module HostType - # Default value. This value is unused. - HOST_TYPE_UNSPECIFIED = 0 - - # AppGateway hosted in a GCP regional managed instance group. - GCP_REGIONAL_MIG = 1 - end - 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 AppGatewayOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile deleted file mode 100644 index 885230800eb1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1", path: "../" -else - gem "google-cloud-beyond_corp-app_gateways-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-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb deleted file mode 100644 index d219a1bc69bf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.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 beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] -require "google/cloud/beyond_corp/app_gateways/v1" - -## -# Snippet for the create_app_gateway call in the AppGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway. -# -def create_app_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new - - # Call the create_app_gateway method. - result = client.create_app_gateway request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb deleted file mode 100644 index f68a23b0f94b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.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 beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] -require "google/cloud/beyond_corp/app_gateways/v1" - -## -# Snippet for the delete_app_gateway call in the AppGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway. -# -def delete_app_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new - - # Call the delete_app_gateway method. - result = client.delete_app_gateway request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb deleted file mode 100644 index a733a0e2c1ab..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] -require "google/cloud/beyond_corp/app_gateways/v1" - -## -# Snippet for the get_app_gateway call in the AppGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway. -# -def get_app_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new - - # Call the get_app_gateway method. - result = client.get_app_gateway request - - # The returned object is of type Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. - p result -end -# [END beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb deleted file mode 100644 index 5f5e6577f4a7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.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 beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] -require "google/cloud/beyond_corp/app_gateways/v1" - -## -# Snippet for the list_app_gateways call in the AppGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways. -# -def list_app_gateways - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new - - # Call the list_app_gateways method. - result = client.list_app_gateways request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. - p item - end -end -# [END beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json deleted file mode 100644 index 8a34973ba430..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-beyond_corp-app_gateways-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.beyondcorp.appgateways.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync", - "title": "Snippet for the list_app_gateways call in the AppGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways.", - "file": "app_gateways_service/list_app_gateways.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_app_gateways", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse", - "client": { - "short_name": "AppGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" - }, - "method": { - "short_name": "ListAppGateways", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.ListAppGateways", - "service": { - "short_name": "AppGatewaysService", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync", - "title": "Snippet for the get_app_gateway call in the AppGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway.", - "file": "app_gateways_service/get_app_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_app_gateway", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway", - "client": { - "short_name": "AppGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" - }, - "method": { - "short_name": "GetAppGateway", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.GetAppGateway", - "service": { - "short_name": "AppGatewaysService", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync", - "title": "Snippet for the create_app_gateway call in the AppGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway.", - "file": "app_gateways_service/create_app_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_app_gateway", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" - }, - "method": { - "short_name": "CreateAppGateway", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.CreateAppGateway", - "service": { - "short_name": "AppGatewaysService", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync", - "title": "Snippet for the delete_app_gateway call in the AppGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway.", - "file": "app_gateways_service/delete_app_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_app_gateway", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" - }, - "method": { - "short_name": "DeleteAppGateway", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.DeleteAppGateway", - "service": { - "short_name": "AppGatewaysService", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" - } - } - }, - "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-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb deleted file mode 100644 index cb69006d8cf2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_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/beyondcorp/appgateways/v1/app_gateways_service_pb" -require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" - -class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb deleted file mode 100644 index e122fab5a1b2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" - -class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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_app_gateway_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_gateway_path project: "value0", location: "value1", app_gateway: "value2" - assert_equal "projects/value0/locations/value1/appGateways/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::BeyondCorp::AppGateways::V1::AppGatewaysService::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-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb deleted file mode 100644 index b9f624cfdb32..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb +++ /dev/null @@ -1,385 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/beyondcorp/appgateways/v1/app_gateways_service_pb" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" - -class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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_app_gateways - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_app_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_app_gateways, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, 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_app_gateways_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_app_gateways({ 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_app_gateways 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_app_gateways ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.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_app_gateways({ 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_app_gateways(::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.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_app_gateways_client_stub.call_rpc_count - end - end - - def test_get_app_gateway - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_app_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_app_gateway_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_app_gateway({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_app_gateway name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_app_gateway({ 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_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new(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_app_gateway_client_stub.call_rpc_count - end - end - - def test_create_app_gateway - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - app_gateway_id = "hello world" - app_gateway = {} - request_id = "hello world" - validate_only = true - - create_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_app_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["app_gateway_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway), request["app_gateway"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_app_gateway_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_app_gateway({ parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_app_gateway parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new(parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_app_gateway({ parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new(parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_app_gateway_client_stub.call_rpc_count - end - end - - def test_delete_app_gateway - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - validate_only = true - - delete_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_app_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_app_gateway_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_app_gateway({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_app_gateway name: name, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_app_gateway({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_app_gateway_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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::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::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-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-beyond_corp-client_gateways-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json deleted file mode 100644 index c457c36b7285..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "beyondcorp.googleapis.com", - "api_shortname": "beyondcorp", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest", - "distribution_name": "google-cloud-beyond_corp-client_gateways-v1", - "is_cloud": true, - "language": "ruby", - "name": "beyondcorp", - "name_pretty": "BeyondCorp ClientGateways V1 API", - "product_documentation": "https://cloud.google.com/beyondcorp/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-client_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml deleted file mode 100644 index 2d6e3497728d..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts deleted file mode 100644 index 631aaf95922e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BeyondCorp ClientGateways 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-beyond_corp-client_gateways-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md deleted file mode 100644 index 531d6dc3f6d5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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/beyond_corp/client_gateways/v1" - -client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/beyond_corp/client_gateways/v1" - -::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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-beyond_corp-client_gateways-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/beyond_corp/client_gateways/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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-beyond_corp-client_gateways-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md deleted file mode 100644 index fe954d4cccff..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the BeyondCorp ClientGateways V1 API - -Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BeyondCorp ClientGateways V1 API. Most users should consider using -the main client gem, -[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-beyond_corp-client_gateways-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/beyondcorp.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/beyond_corp/client_gateways/v1" - -client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new -request = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new # (request fields as keyword arguments...) -response = client.list_client_gateways request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/beyondcorp/) -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/beyond_corp/client_gateways/v1" -require "logger" - -client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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-beyond_corp`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-beyond_corp-client_gateways-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-beyond_corp`. -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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile deleted file mode 100644 index 7797016444d0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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/beyond_corp/client_gateways/v1/client_gateways_service/credentials" - ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-beyond_corp-client_gateways-v1" - header "google-cloud-beyond_corp-client_gateways-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-beyond_corp-client_gateways-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json deleted file mode 100644 index adefe2e55503..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.beyondcorp.clientgateways.v1", - "libraryPackage": "::Google::Cloud::BeyondCorp::ClientGateways::V1", - "services": { - "ClientGatewaysService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client", - "rpcs": { - "ListClientGateways": { - "methods": [ - "list_client_gateways" - ] - }, - "GetClientGateway": { - "methods": [ - "get_client_gateway" - ] - }, - "CreateClientGateway": { - "methods": [ - "create_client_gateway" - ] - }, - "DeleteClientGateway": { - "methods": [ - "delete_client_gateway" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec deleted file mode 100644 index 06a7318bb3d9..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/beyond_corp/client_gateways/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-beyond_corp-client_gateways-v1" - gem.version = Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-client_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." - gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." - 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-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb deleted file mode 100644 index 8df80233c89e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-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/beyond_corp/client_gateways/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb deleted file mode 100644 index c271d92c8367..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" -require "google/cloud/beyond_corp/client_gateways/v1/version" - -module Google - module Cloud - module BeyondCorp - module ClientGateways - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/client_gateways/v1" - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/beyond_corp/client_gateways/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb deleted file mode 100644 index 56ca51678808..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_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/beyond_corp/client_gateways/v1/version" - -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client" - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - ## - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The ClientGatewaysService exposes the following resources: - # - # * Client Gateways, named as follows: - # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - module ClientGatewaysService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "client_gateways_service", "helpers.rb" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb deleted file mode 100644 index 94bf30c36760..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb +++ /dev/null @@ -1,884 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/beyondcorp/clientgateways/v1/client_gateways_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - module ClientGatewaysService - ## - # Client for the ClientGatewaysService service. - # - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The ClientGatewaysService exposes the following resources: - # - # * Client Gateways, named as follows: - # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :client_gateways_service_stub - - ## - # Configure the ClientGatewaysService Client class. - # - # See {::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ClientGatewaysService clients - # ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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", "BeyondCorp", "ClientGateways", "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 ClientGatewaysService 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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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 - @client_gateways_service_stub.universe_domain - end - - ## - # Create a new ClientGatewaysService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ClientGatewaysService 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/beyondcorp/clientgateways/v1/client_gateways_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 - - @client_gateways_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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 - ) - - @client_gateways_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 = @client_gateways_service_stub.endpoint - config.universe_domain = @client_gateways_service_stub.universe_domain - config.logger = @client_gateways_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 = @client_gateways_service_stub.endpoint - config.universe_domain = @client_gateways_service_stub.universe_domain - config.logger = @client_gateways_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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 - @client_gateways_service_stub.logger - end - - # Service calls - - ## - # Lists ClientGateways in a given project and location. - # - # @overload list_client_gateways(request, options = nil) - # Pass arguments to `list_client_gateways` via a request object, either of type - # {::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_client_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_client_gateways` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 ListClientGatewaysRequest. - # @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. 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::BeyondCorp::ClientGateways::V1::ClientGateway>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/client_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new - # - # # Call the list_client_gateways method. - # result = client.list_client_gateways request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. - # p item - # end - # - def list_client_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_client_gateways.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_client_gateways.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_client_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @client_gateways_service_stub.call_rpc :list_client_gateways, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @client_gateways_service_stub, :list_client_gateways, request, response, 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 ClientGateway. - # - # @overload get_client_gateway(request, options = nil) - # Pass arguments to `get_client_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_client_gateway(name: nil) - # Pass arguments to `get_client_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::BeyondCorp::ClientGateways::V1::ClientGateway] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/client_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new - # - # # Call the get_client_gateway method. - # result = client.get_client_gateway request - # - # # The returned object is of type Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. - # p result - # - def get_client_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_client_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_client_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_client_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @client_gateways_service_stub.call_rpc :get_client_gateway, request, 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 ClientGateway in a given project and location. - # - # @overload create_client_gateway(request, options = nil) - # Pass arguments to `create_client_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_client_gateway(parent: nil, client_gateway_id: nil, client_gateway: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_client_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 client_gateway_id [::String] - # Optional. User-settable client gateway resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @param client_gateway [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway, ::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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/client_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new - # - # # Call the create_client_gateway method. - # result = client.create_client_gateway request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_client_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest - - # Converts hash and nil to 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_client_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_client_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_client_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @client_gateways_service_stub.call_rpc :create_client_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 ClientGateway. - # - # @overload delete_client_gateway(request, options = nil) - # Pass arguments to `delete_client_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_client_gateway(name: nil, request_id: nil, validate_only: nil) - # Pass arguments to `delete_client_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 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). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/client_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new - # - # # Call the delete_client_gateway method. - # result = client.delete_client_gateway request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_client_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest - - # Converts hash and nil to 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_client_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_client_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_client_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @client_gateways_service_stub.call_rpc :delete_client_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 ClientGatewaysService API. - # - # This class represents the configuration for ClientGatewaysService, - # providing control 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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_client_gateways to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_client_gateways.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_client_gateways.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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 = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::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 ClientGatewaysService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of 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_client_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_client_gateways - ## - # RPC-specific configuration for `get_client_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_client_gateway - ## - # RPC-specific configuration for `create_client_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_client_gateway - ## - # RPC-specific configuration for `delete_client_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_client_gateway - - # @private - def initialize parent_rpcs = nil - list_client_gateways_config = parent_rpcs.list_client_gateways if parent_rpcs.respond_to? :list_client_gateways - @list_client_gateways = ::Gapic::Config::Method.new list_client_gateways_config - get_client_gateway_config = parent_rpcs.get_client_gateway if parent_rpcs.respond_to? :get_client_gateway - @get_client_gateway = ::Gapic::Config::Method.new get_client_gateway_config - create_client_gateway_config = parent_rpcs.create_client_gateway if parent_rpcs.respond_to? :create_client_gateway - @create_client_gateway = ::Gapic::Config::Method.new create_client_gateway_config - delete_client_gateway_config = parent_rpcs.delete_client_gateway if parent_rpcs.respond_to? :delete_client_gateway - @delete_client_gateway = ::Gapic::Config::Method.new delete_client_gateway_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb deleted file mode 100644 index 3fce6bd8e91e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - module ClientGatewaysService - # Credentials for the ClientGatewaysService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb deleted file mode 100644 index 082176491bbe..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_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 BeyondCorp - module ClientGateways - module V1 - module ClientGatewaysService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ClientGatewaysService 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 ClientGatewaysService 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::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::BeyondCorp::ClientGateways::V1::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 = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::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-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb deleted file mode 100644 index e1051c10e318..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - module ClientGatewaysService - # Path helper methods for the ClientGatewaysService API. - module Paths - ## - # Create a fully-qualified ClientGateway resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/clientGateways/{client_gateway}` - # - # @param project [String] - # @param location [String] - # @param client_gateway [String] - # - # @return [::String] - def client_gateway_path project:, location:, client_gateway: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/clientGateways/#{client_gateway}" - 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-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb deleted file mode 100644 index 8e4f4f6207b9..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/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 BeyondCorp - module ClientGateways - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb deleted file mode 100644 index 48725cc2cbcd..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/clientgateways/v1/client_gateways_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/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nGgoogle/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto\x12)google.cloud.beyondcorp.clientgateways.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\"\xfd\x03\n\rClientGateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\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\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.beyondcorp.clientgateways.v1.ClientGateway.StateB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18\x63lient_connector_service\x18\x06 \x01(\tB\x03\xe0\x41\x03\"j\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0c\n\x08UPDATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05\x12\t\n\x05\x45RROR\x10\x06:u\xea\x41r\n\'beyondcorp.googleapis.com/ClientGateway\x12Gprojects/{project}/locations/{location}/clientGateways/{client_gateway}\"\xb9\x01\n\x19ListClientGatewaysRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/ClientGateway\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\"\x9d\x01\n\x1aListClientGatewaysResponse\x12Q\n\x0f\x63lient_gateways\x18\x01 \x03(\x0b\x32\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x17GetClientGatewayRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/ClientGateway\"\x89\x02\n\x1a\x43reateClientGatewayRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/ClientGateway\x12\x1e\n\x11\x63lient_gateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x63lient_gateway\x18\x03 \x01(\x0b\x32\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGatewayB\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\"\x90\x01\n\x1a\x44\x65leteClientGatewayRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/ClientGateway\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x8d\x02\n\x1e\x43lientGatewayOperationMetadata\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\xc7\x08\n\x15\x43lientGatewaysService\x12\xe6\x01\n\x12ListClientGateways\x12\x44.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest\x1a\x45.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/clientGateways\x12\xd3\x01\n\x10GetClientGateway\x12\x42.google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest\x1a\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGateway\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/clientGateways/*}\x12\xa4\x02\n\x13\x43reateClientGateway\x12\x45.google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41/\n\rClientGateway\x12\x1e\x43lientGatewayOperationMetadata\xda\x41\'parent,client_gateway,client_gateway_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/clientGateways:\x0e\x63lient_gateway\x12\xf8\x01\n\x13\x44\x65leteClientGateway\x12\x45.google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x37\n\x15google.protobuf.Empty\x12\x1e\x43lientGatewayOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/clientGateways/*}\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xac\x02\n-com.google.cloud.beyondcorp.clientgateways.v1B\x1a\x43lientGatewaysServiceProtoP\x01ZUcloud.google.com/go/beyondcorp/clientgateways/apiv1/clientgatewayspb;clientgatewayspb\xaa\x02)Google.Cloud.BeyondCorp.ClientGateways.V1\xca\x02)Google\\Cloud\\BeyondCorp\\ClientGateways\\V1\xea\x02-Google::Cloud::BeyondCorp::ClientGateways::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - ClientGateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGateway").msgclass - ClientGateway::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State").enummodule - ListClientGatewaysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest").msgclass - ListClientGatewaysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse").msgclass - GetClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest").msgclass - CreateClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest").msgclass - DeleteClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest").msgclass - ClientGatewayOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGatewayOperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb deleted file mode 100644 index 95cc1f1b36c5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto for package 'Google.Cloud.BeyondCorp.ClientGateways.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/beyondcorp/clientgateways/v1/client_gateways_service_pb' - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - module ClientGatewaysService - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The ClientGatewaysService exposes the following resources: - # - # * Client Gateways, named as follows: - # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService' - - # Lists ClientGateways in a given project and location. - rpc :ListClientGateways, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse - # Gets details of a single ClientGateway. - rpc :GetClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway - # Creates a new ClientGateway in a given project and location. - rpc :CreateClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, ::Google::Longrunning::Operation - # Deletes a single ClientGateway. - rpc :DeleteClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md deleted file mode 100644 index 2aa673a2c9ee..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BeyondCorp ClientGateways 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-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb deleted file mode 100644 index a78c841fea07..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb +++ /dev/null @@ -1,221 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - # Message describing ClientGateway object. - # @!attribute [rw] name - # @return [::String] - # Required. name of resource. The name is ignored during creation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Create time stamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Update time stamp. - # @!attribute [r] state - # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway::State] - # Output only. The operational state of the gateway. - # @!attribute [r] id - # @return [::String] - # Output only. A unique identifier for the instance generated by the system. - # @!attribute [r] client_connector_service - # @return [::String] - # Output only. The client connector service name that the client gateway is - # associated to. Client Connector Services, named as follows: - # `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. - class ClientGateway - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the different states of a gateway. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # Gateway is being created. - CREATING = 1 - - # Gateway is being updated. - UPDATING = 2 - - # Gateway is being deleted. - DELETING = 3 - - # Gateway is running. - RUNNING = 4 - - # Gateway is down and may be restored in the future. - # This happens when CCFE sends ProjectState = OFF. - DOWN = 5 - - # ClientGateway encountered an error and is in indeterministic state. - ERROR = 6 - end - end - - # Message for requesting list of ClientGateways. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListClientGatewaysRequest. - # @!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. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListClientGatewaysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing ClientGateways. - # @!attribute [rw] client_gateways - # @return [::Array<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>] - # The list of ClientGateway. - # @!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 ListClientGatewaysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a ClientGateway. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - class GetClientGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a ClientGateway. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] client_gateway_id - # @return [::String] - # Optional. User-settable client gateway resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @!attribute [rw] client_gateway - # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway] - # 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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class CreateClientGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a ClientGateway - # @!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 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class DeleteClientGatewayRequest - 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 been cancelled successfully - # 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 ClientGatewayOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile deleted file mode 100644 index d1f6da5a786b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1", path: "../" -else - gem "google-cloud-beyond_corp-client_gateways-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-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb deleted file mode 100644 index 2ab90c3ca3f0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.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 beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] -require "google/cloud/beyond_corp/client_gateways/v1" - -## -# Snippet for the create_client_gateway call in the ClientGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway. -# -def create_client_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new - - # Call the create_client_gateway method. - result = client.create_client_gateway request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb deleted file mode 100644 index b7bb4a3cbfbe..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.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 beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] -require "google/cloud/beyond_corp/client_gateways/v1" - -## -# Snippet for the delete_client_gateway call in the ClientGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway. -# -def delete_client_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new - - # Call the delete_client_gateway method. - result = client.delete_client_gateway request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb deleted file mode 100644 index c4c652903450..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] -require "google/cloud/beyond_corp/client_gateways/v1" - -## -# Snippet for the get_client_gateway call in the ClientGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway. -# -def get_client_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new - - # Call the get_client_gateway method. - result = client.get_client_gateway request - - # The returned object is of type Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. - p result -end -# [END beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb deleted file mode 100644 index 129dd2041739..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.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 beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] -require "google/cloud/beyond_corp/client_gateways/v1" - -## -# Snippet for the list_client_gateways call in the ClientGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways. -# -def list_client_gateways - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new - - # Call the list_client_gateways method. - result = client.list_client_gateways request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. - p item - end -end -# [END beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json deleted file mode 100644 index e3f0d79256e7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-beyond_corp-client_gateways-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.beyondcorp.clientgateways.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync", - "title": "Snippet for the list_client_gateways call in the ClientGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways.", - "file": "client_gateways_service/list_client_gateways.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_client_gateways", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse", - "client": { - "short_name": "ClientGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" - }, - "method": { - "short_name": "ListClientGateways", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.ListClientGateways", - "service": { - "short_name": "ClientGatewaysService", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync", - "title": "Snippet for the get_client_gateway call in the ClientGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway.", - "file": "client_gateways_service/get_client_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_client_gateway", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway", - "client": { - "short_name": "ClientGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" - }, - "method": { - "short_name": "GetClientGateway", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.GetClientGateway", - "service": { - "short_name": "ClientGatewaysService", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync", - "title": "Snippet for the create_client_gateway call in the ClientGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway.", - "file": "client_gateways_service/create_client_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_client_gateway", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ClientGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" - }, - "method": { - "short_name": "CreateClientGateway", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.CreateClientGateway", - "service": { - "short_name": "ClientGatewaysService", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync", - "title": "Snippet for the delete_client_gateway call in the ClientGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway.", - "file": "client_gateways_service/delete_client_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_client_gateway", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ClientGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" - }, - "method": { - "short_name": "DeleteClientGateway", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.DeleteClientGateway", - "service": { - "short_name": "ClientGatewaysService", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" - } - } - }, - "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-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb deleted file mode 100644 index 6800c3abb49c..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_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/beyondcorp/clientgateways/v1/client_gateways_service_pb" -require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" - -class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb deleted file mode 100644 index 07d42d2a5895..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" - -class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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_client_gateway_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.client_gateway_path project: "value0", location: "value1", client_gateway: "value2" - assert_equal "projects/value0/locations/value1/clientGateways/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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb deleted file mode 100644 index bac47122b4d0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb +++ /dev/null @@ -1,385 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/beyondcorp/clientgateways/v1/client_gateways_service_pb" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" - -class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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_client_gateways - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_client_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_client_gateways, name - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, 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_client_gateways_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_client_gateways({ 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_client_gateways 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_client_gateways ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.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_client_gateways({ 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_client_gateways(::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.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_client_gateways_client_stub.call_rpc_count - end - end - - def test_get_client_gateway - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_client_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_client_gateway_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_client_gateway({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_client_gateway name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_client_gateway({ 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_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new(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_client_gateway_client_stub.call_rpc_count - end - end - - def test_create_client_gateway - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - client_gateway_id = "hello world" - client_gateway = {} - request_id = "hello world" - validate_only = true - - create_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_client_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["client_gateway_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway), request["client_gateway"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_client_gateway_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_client_gateway({ parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_client_gateway parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new(parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_client_gateway({ parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new(parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_client_gateway_client_stub.call_rpc_count - end - end - - def test_delete_client_gateway - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - validate_only = true - - delete_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_client_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_client_gateway_client_stub do - # Create client - c = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_client_gateway({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_client_gateway name: name, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_client_gateway({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_client_gateway_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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::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::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-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-bigquery-analytics_hub-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json deleted file mode 100644 index 3411b1f1a8d4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "analyticshub.googleapis.com", - "api_shortname": "analyticshub", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/latest", - "distribution_name": "google-cloud-bigquery-analytics_hub-v1", - "is_cloud": true, - "language": "ruby", - "name": "analyticshub", - "name_pretty": "Analytics Hub V1 API", - "product_documentation": "https://cloud.google.com/bigquery/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. Note that google-cloud-bigquery-analytics_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-analytics_hub instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml deleted file mode 100644 index 2f4c3e44583c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-analytics_hub-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-bigquery-analytics_hub-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts deleted file mode 100644 index ebe913609764..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Analytics Hub V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md deleted file mode 100644 index 1f50655d512b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-analytics_hub-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-bigquery-analytics_hub-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/bigquery/analytics_hub/v1" - -client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/analytics_hub/v1" - -::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-bigquery-analytics_hub-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/bigquery/analytics_hub/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md deleted file mode 100644 index 1caa91058c4b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Analytics Hub V1 API - -Exchange data and analytics assets securely and efficiently. - -Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Analytics Hub V1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-analytics_hub](https://rubygems.org/gems/google-cloud-bigquery-analytics_hub). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-analytics_hub-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/analyticshub.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/analytics_hub/v1" - -client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new -request = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new # (request fields as keyword arguments...) -response = client.list_data_exchanges request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/docs) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/bigquery/analytics_hub/v1" -require "logger" - -client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.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-bigquery-analytics_hub`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-analytics_hub-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-bigquery-analytics_hub`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-bigquery-analytics_hub-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile deleted file mode 100644 index 8e449aebabe6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-bigquery-analytics_hub-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-analytics_hub-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-analytics_hub-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-analytics_hub-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bigquery-analytics_hub-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-analytics_hub-v1" - header "google-cloud-bigquery-analytics_hub-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-analytics_hub-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-analytics_hub-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-analytics_hub-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-analytics_hub-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json deleted file mode 100644 index e7a68c8e3121..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.analyticshub.v1", - "libraryPackage": "::Google::Cloud::Bigquery::AnalyticsHub::V1", - "services": { - "AnalyticsHubService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client", - "rpcs": { - "ListDataExchanges": { - "methods": [ - "list_data_exchanges" - ] - }, - "ListOrgDataExchanges": { - "methods": [ - "list_org_data_exchanges" - ] - }, - "GetDataExchange": { - "methods": [ - "get_data_exchange" - ] - }, - "CreateDataExchange": { - "methods": [ - "create_data_exchange" - ] - }, - "UpdateDataExchange": { - "methods": [ - "update_data_exchange" - ] - }, - "DeleteDataExchange": { - "methods": [ - "delete_data_exchange" - ] - }, - "ListListings": { - "methods": [ - "list_listings" - ] - }, - "GetListing": { - "methods": [ - "get_listing" - ] - }, - "CreateListing": { - "methods": [ - "create_listing" - ] - }, - "UpdateListing": { - "methods": [ - "update_listing" - ] - }, - "DeleteListing": { - "methods": [ - "delete_listing" - ] - }, - "SubscribeListing": { - "methods": [ - "subscribe_listing" - ] - }, - "SubscribeDataExchange": { - "methods": [ - "subscribe_data_exchange" - ] - }, - "RefreshSubscription": { - "methods": [ - "refresh_subscription" - ] - }, - "GetSubscription": { - "methods": [ - "get_subscription" - ] - }, - "ListSubscriptions": { - "methods": [ - "list_subscriptions" - ] - }, - "ListSharedResourceSubscriptions": { - "methods": [ - "list_shared_resource_subscriptions" - ] - }, - "RevokeSubscription": { - "methods": [ - "revoke_subscription" - ] - }, - "DeleteSubscription": { - "methods": [ - "delete_subscription" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "CreateQueryTemplate": { - "methods": [ - "create_query_template" - ] - }, - "GetQueryTemplate": { - "methods": [ - "get_query_template" - ] - }, - "ListQueryTemplates": { - "methods": [ - "list_query_templates" - ] - }, - "UpdateQueryTemplate": { - "methods": [ - "update_query_template" - ] - }, - "DeleteQueryTemplate": { - "methods": [ - "delete_query_template" - ] - }, - "SubmitQueryTemplate": { - "methods": [ - "submit_query_template" - ] - }, - "ApproveQueryTemplate": { - "methods": [ - "approve_query_template" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec deleted file mode 100644 index bd8a6a00031d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/analytics_hub/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-analytics_hub-v1" - gem.version = Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. Note that google-cloud-bigquery-analytics_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-analytics_hub instead. See the readme for more details." - gem.summary = "Exchange data and analytics assets securely and efficiently." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.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-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb deleted file mode 100644 index deca319c25cf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/bigquery/analytics_hub/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb deleted file mode 100644 index b6966426b9a3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" -require "google/cloud/bigquery/analytics_hub/v1/version" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/analytics_hub/v1" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/analytics_hub/v1" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/bigquery/analytics_hub/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb deleted file mode 100644 index 7454ae504b54..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/analytics_hub/v1/version" - -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - ## - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - module AnalyticsHubService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "analytics_hub_service", "helpers.rb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb deleted file mode 100644 index 31225b25b7ce..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb +++ /dev/null @@ -1,3312 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - ## - # Client for the AnalyticsHubService service. - # - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :analytics_hub_service_stub - - ## - # Configure the AnalyticsHubService Client class. - # - # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AnalyticsHubService clients - # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "AnalyticsHub", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AnalyticsHubService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @analytics_hub_service_stub.universe_domain - end - - ## - # Create a new AnalyticsHubService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AnalyticsHubService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/bigquery/analyticshub/v1/analyticshub_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 - - @analytics_hub_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @analytics_hub_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @analytics_hub_service_stub.logger - end - - # Service calls - - ## - # Lists all data exchanges in a given project and location. - # - # @overload list_data_exchanges(request, options = nil) - # Pass arguments to `list_data_exchanges` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_exchanges(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the data exchanges. - # e.g. `projects/myproject/locations/us`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new - # - # # Call the list_data_exchanges method. - # result = client.list_data_exchanges request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p item - # end - # - def list_data_exchanges request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_exchanges.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_exchanges.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_data_exchanges, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all data exchanges from projects in a given organization and - # location. - # - # @overload list_org_data_exchanges(request, options = nil) - # Pass arguments to `list_org_data_exchanges` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_org_data_exchanges(organization: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization [::String] - # Required. The organization resource path of the projects containing - # DataExchanges. e.g. `organizations/myorg/locations/us`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new - # - # # Call the list_org_data_exchanges method. - # result = client.list_org_data_exchanges request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p item - # end - # - def list_org_data_exchanges request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_org_data_exchanges.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.organization - header_params["organization"] = request.organization - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_org_data_exchanges.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_org_data_exchanges, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a data exchange. - # - # @overload get_data_exchange(request, options = nil) - # Pass arguments to `get_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_exchange(name: nil) - # Pass arguments to `get_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the data exchange. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new - # - # # Call the get_data_exchange method. - # result = client.get_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def get_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new data exchange. - # - # @overload create_data_exchange(request, options = nil) - # Pass arguments to `create_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil) - # Pass arguments to `create_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the data exchange. - # e.g. `projects/myproject/locations/us`. - # @param data_exchange_id [::String] - # Required. The ID of the data exchange. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] - # Required. The data exchange to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new - # - # # Call the create_data_exchange method. - # result = client.create_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def create_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :create_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing data exchange. - # - # @overload update_data_exchange(request, options = nil) - # Pass arguments to `update_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_exchange(update_mask: nil, data_exchange: nil) - # Pass arguments to `update_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask specifies the fields to update in the data exchange - # resource. The fields specified in the - # `updateMask` are relative to the resource and are not a full request. - # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] - # Required. The data exchange to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new - # - # # Call the update_data_exchange method. - # result = client.update_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def update_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_exchange&.name - header_params["data_exchange.name"] = request.data_exchange.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :update_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing data exchange. - # - # @overload delete_data_exchange(request, options = nil) - # Pass arguments to `delete_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_exchange(name: nil) - # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The full name of the data exchange resource that you want to - # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new - # - # # Call the delete_data_exchange method. - # result = client.delete_data_exchange request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :delete_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all listings in a given project and location. - # - # @overload list_listings(request, options = nil) - # Pass arguments to `list_listings` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_listings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_listings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new - # - # # Call the list_listings method. - # result = client.list_listings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p item - # end - # - def list_listings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_listings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_listings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_listings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_listings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a listing. - # - # @overload get_listing(request, options = nil) - # Pass arguments to `get_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_listing(name: nil) - # Pass arguments to `get_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new - # - # # Call the get_listing method. - # result = client.get_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def get_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new listing. - # - # @overload create_listing(request, options = nil) - # Pass arguments to `create_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_listing(parent: nil, listing_id: nil, listing: nil) - # Pass arguments to `create_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param listing_id [::String] - # Required. The ID of the listing to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] - # Required. The listing to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new - # - # # Call the create_listing method. - # result = client.create_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def create_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :create_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing listing. - # - # @overload update_listing(request, options = nil) - # Pass arguments to `update_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_listing(update_mask: nil, listing: nil) - # Pass arguments to `update_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask specifies the fields to update in the listing - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] - # Required. The listing to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new - # - # # Call the update_listing method. - # result = client.update_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def update_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.listing&.name - header_params["listing.name"] = request.listing.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :update_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a listing. - # - # @overload delete_listing(request, options = nil) - # Pass arguments to `delete_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_listing(name: nil, delete_commercial: nil) - # Pass arguments to `delete_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the listing to delete. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # @param delete_commercial [::Boolean] - # Optional. If the listing is commercial then this field must be set to true, - # otherwise a failure is thrown. This acts as a safety guard to avoid - # deleting commercial listings accidentally. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new - # - # # Call the delete_listing method. - # result = client.delete_listing request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :delete_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Subscribes to a listing. - # - # Currently, with Analytics Hub, you can create listings that - # reference only BigQuery datasets. - # Upon subscription to a listing for a BigQuery dataset, Analytics Hub - # creates a linked dataset in the subscriber's project. - # - # @overload subscribe_listing(request, options = nil) - # Pass arguments to `subscribe_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload subscribe_listing(destination_dataset: nil, destination_pubsub_subscription: nil, name: nil) - # Pass arguments to `subscribe_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] - # Input only. BigQuery destination dataset to create for the subscriber. - # - # Note: The following parameters are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. 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 destination_pubsub_subscription [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription, ::Hash] - # Input only. Destination Pub/Sub subscription to create for the - # subscriber. - # - # Note: The following parameters are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. 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 name [::String] - # Required. Resource name of the listing that you want to subscribe to. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new - # - # # Call the subscribe_listing method. - # result = client.subscribe_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. - # p result - # - def subscribe_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.subscribe_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.subscribe_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :subscribe_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Subscription to a Data Clean Room. This is a - # long-running operation as it will create one or more linked datasets. - # Throws a Bad Request error if the Data Exchange does not contain any - # listings. - # - # @overload subscribe_data_exchange(request, options = nil) - # Pass arguments to `subscribe_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload subscribe_data_exchange(name: nil, destination: nil, destination_dataset: nil, subscription: nil, subscriber_contact: nil) - # Pass arguments to `subscribe_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Data Exchange. - # e.g. `projects/publisherproject/locations/us/dataExchanges/123` - # @param destination [::String] - # Required. The parent resource path of the Subscription. - # e.g. `projects/subscriberproject/locations/us` - # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] - # Optional. BigQuery destination dataset to create for the subscriber. - # @param subscription [::String] - # Required. Name of the subscription to create. - # e.g. `subscription1` - # @param subscriber_contact [::String] - # Email of the subscriber. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new - # - # # Call the subscribe_data_exchange method. - # result = client.subscribe_data_exchange request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def subscribe_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.subscribe_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.subscribe_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.subscribe_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :subscribe_data_exchange, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Refreshes a Subscription to a Data Exchange. A Data Exchange can become - # stale when a publisher adds or removes data. This is a long-running - # operation as it may create many linked datasets. - # - # @overload refresh_subscription(request, options = nil) - # Pass arguments to `refresh_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload refresh_subscription(name: nil) - # Pass arguments to `refresh_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Subscription to refresh. - # e.g. `projects/subscriberproject/locations/us/subscriptions/123` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new - # - # # Call the refresh_subscription method. - # result = client.refresh_subscription request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def refresh_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.refresh_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.refresh_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.refresh_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :refresh_subscription, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 details of a Subscription. - # - # @overload get_subscription(request, options = nil) - # Pass arguments to `get_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_subscription(name: nil) - # Pass arguments to `get_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription. - # e.g. projects/123/locations/us/subscriptions/456 - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new - # - # # Call the get_subscription method. - # result = client.get_subscription request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p result - # - def get_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_subscription, request, 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 subscriptions in a given project and location. - # - # @overload list_subscriptions(request, options = nil) - # Pass arguments to `list_subscriptions` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_subscriptions(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the subscription. - # e.g. projects/myproject/locations/us - # @param filter [::String] - # An expression for filtering the results of the request. Eligible - # fields for filtering are: - # - # + `listing` - # + `data_exchange` - # - # Alternatively, a literal wrapped in double quotes may be provided. - # This will be checked for an exact match against both fields above. - # - # In all cases, the full Data Exchange or Listing resource name must - # be provided. Some example of using filters: - # - # + data_exchange="projects/myproject/locations/us/dataExchanges/123" - # + listing="projects/123/locations/us/dataExchanges/456/listings/789" - # + "projects/myproject/locations/us/dataExchanges/123" - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. - # @param page_token [::String] - # Page token, returned by a previous call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new - # - # # Call the list_subscriptions method. - # result = client.list_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p item - # end - # - def list_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_subscriptions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_subscriptions, request, response, 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 subscriptions on a given Data Exchange or Listing. - # - # @overload list_shared_resource_subscriptions(request, options = nil) - # Pass arguments to `list_shared_resource_subscriptions` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_shared_resource_subscriptions(resource: nil, include_deleted_subscriptions: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_shared_resource_subscriptions` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the requested target. This resource may be - # either a Listing or a DataExchange. e.g. - # projects/123/locations/us/dataExchanges/456 OR e.g. - # projects/123/locations/us/dataExchanges/456/listings/789 - # @param include_deleted_subscriptions [::Boolean] - # If selected, includes deleted subscriptions in the response - # (up to 63 days after deletion). - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. - # @param page_token [::String] - # Page token, returned by a previous call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new - # - # # Call the list_shared_resource_subscriptions method. - # result = client.list_shared_resource_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p item - # end - # - def list_shared_resource_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_shared_resource_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-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.list_shared_resource_subscriptions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_shared_resource_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_shared_resource_subscriptions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_shared_resource_subscriptions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Revokes a given subscription. - # - # @overload revoke_subscription(request, options = nil) - # Pass arguments to `revoke_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_subscription(name: nil, revoke_commercial: nil) - # Pass arguments to `revoke_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription to revoke. - # e.g. projects/123/locations/us/subscriptions/456 - # @param revoke_commercial [::Boolean] - # Optional. If the subscription is commercial then this field must be set to - # true, otherwise a failure is thrown. This acts as a safety guard to avoid - # revoking commercial subscriptions accidentally. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new - # - # # Call the revoke_subscription method. - # result = client.revoke_subscription request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. - # p result - # - def revoke_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest - - # Converts hash and nil to 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_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.revoke_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :revoke_subscription, request, 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 subscription. - # - # @overload delete_subscription(request, options = nil) - # Pass arguments to `delete_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_subscription(name: nil) - # Pass arguments to `delete_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription to delete. - # e.g. projects/123/locations/us/subscriptions/456 - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new - # - # # Call the delete_subscription method. - # result = client.delete_subscription request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest - - # Converts hash and nil to 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_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :delete_subscription, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 IAM policy. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new QueryTemplate - # - # @overload create_query_template(request, options = nil) - # Pass arguments to `create_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_query_template(parent: nil, query_template_id: nil, query_template: nil) - # Pass arguments to `create_query_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 parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. - # @param query_template_id [::String] - # Required. The ID of the QueryTemplate to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] - # Required. The QueryTemplate to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new - # - # # Call the create_query_template method. - # result = client.create_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def create_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest - - # Converts hash and nil to 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_query_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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :create_query_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 - - ## - # Gets a QueryTemplate - # - # @overload get_query_template(request, options = nil) - # Pass arguments to `get_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_query_template(name: nil) - # Pass arguments to `get_query_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 parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new - # - # # Call the get_query_template method. - # result = client.get_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def get_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_query_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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_query_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 all QueryTemplates in a given project and location. - # - # @overload list_query_templates(request, options = nil) - # Pass arguments to `list_query_templates` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_query_templates(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_query_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 parent resource path of the QueryTemplates. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response - # page. Leverage the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Optional. Page token, returned by a previous call, to request the next page - # of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new - # - # # Call the list_query_templates method. - # result = client.list_query_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::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p item - # end - # - def list_query_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_query_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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_query_templates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_query_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_query_templates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_query_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 - - ## - # Updates an existing QueryTemplate - # - # @overload update_query_template(request, options = nil) - # Pass arguments to `update_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_query_template(update_mask: nil, query_template: nil) - # Pass arguments to `update_query_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask specifies the fields to update in the query template - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] - # Required. The QueryTemplate to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new - # - # # Call the update_query_template method. - # result = client.update_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def update_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest - - # Converts hash and nil to 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_query_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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.query_template&.name - header_params["query_template.name"] = request.query_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_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :update_query_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 - - ## - # Deletes a query template. - # - # @overload delete_query_template(request, options = nil) - # Pass arguments to `delete_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_query_template(name: nil) - # Pass arguments to `delete_query_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 path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new - # - # # Call the delete_query_template method. - # result = client.delete_query_template request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest - - # Converts hash and nil to 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_query_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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :delete_query_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 - - ## - # Submits a query template for approval. - # - # @overload submit_query_template(request, options = nil) - # Pass arguments to `submit_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_query_template(name: nil) - # Pass arguments to `submit_query_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 path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new - # - # # Call the submit_query_template method. - # result = client.submit_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def submit_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest - - # Converts hash and nil to 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_query_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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.submit_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :submit_query_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 - - ## - # Approves a query template. - # - # @overload approve_query_template(request, options = nil) - # Pass arguments to `approve_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload approve_query_template(name: nil) - # Pass arguments to `approve_query_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 path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new - # - # # Call the approve_query_template method. - # result = client.approve_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def approve_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.approve_query_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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.approve_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.approve_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :approve_query_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 - - ## - # Configuration class for the AnalyticsHubService API. - # - # This class represents the configuration for AnalyticsHubService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_data_exchanges to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_exchanges.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_exchanges.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "analyticshub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AnalyticsHubService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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_data_exchanges` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_exchanges - ## - # RPC-specific configuration for `list_org_data_exchanges` - # @return [::Gapic::Config::Method] - # - attr_reader :list_org_data_exchanges - ## - # RPC-specific configuration for `get_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_exchange - ## - # RPC-specific configuration for `create_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_exchange - ## - # RPC-specific configuration for `update_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_exchange - ## - # RPC-specific configuration for `delete_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_exchange - ## - # RPC-specific configuration for `list_listings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_listings - ## - # RPC-specific configuration for `get_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :get_listing - ## - # RPC-specific configuration for `create_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :create_listing - ## - # RPC-specific configuration for `update_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :update_listing - ## - # RPC-specific configuration for `delete_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_listing - ## - # RPC-specific configuration for `subscribe_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :subscribe_listing - ## - # RPC-specific configuration for `subscribe_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :subscribe_data_exchange - ## - # RPC-specific configuration for `refresh_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :refresh_subscription - ## - # RPC-specific configuration for `get_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :get_subscription - ## - # RPC-specific configuration for `list_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_subscriptions - ## - # RPC-specific configuration for `list_shared_resource_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_shared_resource_subscriptions - ## - # RPC-specific configuration for `revoke_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :revoke_subscription - ## - # RPC-specific configuration for `delete_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_subscription - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `create_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_query_template - ## - # RPC-specific configuration for `get_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_query_template - ## - # RPC-specific configuration for `list_query_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_query_templates - ## - # RPC-specific configuration for `update_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :update_query_template - ## - # RPC-specific configuration for `delete_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_query_template - ## - # RPC-specific configuration for `submit_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_query_template - ## - # RPC-specific configuration for `approve_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :approve_query_template - - # @private - def initialize parent_rpcs = nil - list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges - @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config - list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges - @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config - get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange - @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config - create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange - @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config - update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange - @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config - delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange - @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config - list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings - @list_listings = ::Gapic::Config::Method.new list_listings_config - get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing - @get_listing = ::Gapic::Config::Method.new get_listing_config - create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing - @create_listing = ::Gapic::Config::Method.new create_listing_config - update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing - @update_listing = ::Gapic::Config::Method.new update_listing_config - delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing - @delete_listing = ::Gapic::Config::Method.new delete_listing_config - subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing - @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config - subscribe_data_exchange_config = parent_rpcs.subscribe_data_exchange if parent_rpcs.respond_to? :subscribe_data_exchange - @subscribe_data_exchange = ::Gapic::Config::Method.new subscribe_data_exchange_config - refresh_subscription_config = parent_rpcs.refresh_subscription if parent_rpcs.respond_to? :refresh_subscription - @refresh_subscription = ::Gapic::Config::Method.new refresh_subscription_config - get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription - @get_subscription = ::Gapic::Config::Method.new get_subscription_config - list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions - @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config - list_shared_resource_subscriptions_config = parent_rpcs.list_shared_resource_subscriptions if parent_rpcs.respond_to? :list_shared_resource_subscriptions - @list_shared_resource_subscriptions = ::Gapic::Config::Method.new list_shared_resource_subscriptions_config - revoke_subscription_config = parent_rpcs.revoke_subscription if parent_rpcs.respond_to? :revoke_subscription - @revoke_subscription = ::Gapic::Config::Method.new revoke_subscription_config - delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription - @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - create_query_template_config = parent_rpcs.create_query_template if parent_rpcs.respond_to? :create_query_template - @create_query_template = ::Gapic::Config::Method.new create_query_template_config - get_query_template_config = parent_rpcs.get_query_template if parent_rpcs.respond_to? :get_query_template - @get_query_template = ::Gapic::Config::Method.new get_query_template_config - list_query_templates_config = parent_rpcs.list_query_templates if parent_rpcs.respond_to? :list_query_templates - @list_query_templates = ::Gapic::Config::Method.new list_query_templates_config - update_query_template_config = parent_rpcs.update_query_template if parent_rpcs.respond_to? :update_query_template - @update_query_template = ::Gapic::Config::Method.new update_query_template_config - delete_query_template_config = parent_rpcs.delete_query_template if parent_rpcs.respond_to? :delete_query_template - @delete_query_template = ::Gapic::Config::Method.new delete_query_template_config - submit_query_template_config = parent_rpcs.submit_query_template if parent_rpcs.respond_to? :submit_query_template - @submit_query_template = ::Gapic::Config::Method.new submit_query_template_config - approve_query_template_config = parent_rpcs.approve_query_template if parent_rpcs.respond_to? :approve_query_template - @approve_query_template = ::Gapic::Config::Method.new approve_query_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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb deleted file mode 100644 index e332f7d1ae56..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - # Credentials for the AnalyticsHubService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb deleted file mode 100644 index b71c5314e7d9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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 Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AnalyticsHubService 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 AnalyticsHubService 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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Bigquery::AnalyticsHub::V1::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 = "analyticshub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the 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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb deleted file mode 100644 index b65b9b2e215e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.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 Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - # Path helper methods for the AnalyticsHubService API. - module Paths - ## - # Create a fully-qualified DataExchange resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}` - # - # @param project [String] - # @param location [String] - # @param data_exchange [String] - # - # @return [::String] - def data_exchange_path project:, location:, data_exchange: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}` - # - # @param project [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}" - end - - ## - # Create a fully-qualified Listing resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}` - # - # @param project [String] - # @param location [String] - # @param data_exchange [String] - # @param listing [String] - # - # @return [::String] - def listing_path project:, location:, data_exchange:, listing: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "data_exchange cannot contain /" if data_exchange.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}/listings/#{listing}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified ManagedService resource string. - # - # The resource will be in the following format: - # - # `services/{service}` - # - # @param service [String] - # - # @return [::String] - def managed_service_path service: - "services/#{service}" - end - - ## - # Create a fully-qualified QueryTemplate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}/queryTemplates/{query_template}` - # - # @param project [String] - # @param location [String] - # @param data_exchange [String] - # @param query_template [String] - # - # @return [::String] - def query_template_path project:, location:, data_exchange:, query_template: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "data_exchange cannot contain /" if data_exchange.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}/queryTemplates/#{query_template}" - end - - ## - # Create a fully-qualified Routine resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}/routines/{routine}` - # - # @param project [String] - # @param dataset [String] - # @param routine [String] - # - # @return [::String] - def routine_path project:, dataset:, routine: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}/routines/#{routine}" - end - - ## - # Create a fully-qualified Subscription resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/subscriptions/{subscription}` - # - # @param project [String] - # @param location [String] - # @param subscription [String] - # - # @return [::String] - def subscription_path project:, location:, subscription: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/subscriptions/#{subscription}" - end - - ## - # Create a fully-qualified Table resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}/tables/{table}` - # - # @param project [String] - # @param dataset [String] - # @param table [String] - # - # @return [::String] - def table_path project:, dataset:, table: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}/tables/#{table}" - end - - ## - # 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 -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb deleted file mode 100644 index e28b43473888..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/analytics_hub/v1/version" - -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - ## - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - module AnalyticsHubService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb deleted file mode 100644 index e10fc4ef219f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb +++ /dev/null @@ -1,3066 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - module Rest - ## - # REST client for the AnalyticsHubService service. - # - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :analytics_hub_service_stub - - ## - # Configure the AnalyticsHubService Client class. - # - # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AnalyticsHubService clients - # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "AnalyticsHub", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AnalyticsHubService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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 - @analytics_hub_service_stub.universe_domain - end - - ## - # Create a new AnalyticsHubService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AnalyticsHubService 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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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 - - @analytics_hub_service_stub = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @analytics_hub_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @analytics_hub_service_stub.logger - end - - # Service calls - - ## - # Lists all data exchanges in a given project and location. - # - # @overload list_data_exchanges(request, options = nil) - # Pass arguments to `list_data_exchanges` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_exchanges(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the data exchanges. - # e.g. `projects/myproject/locations/us`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new - # - # # Call the list_data_exchanges method. - # result = client.list_data_exchanges request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p item - # end - # - def list_data_exchanges request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_exchanges.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_exchanges.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_data_exchanges request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, "data_exchanges", request, result, 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 data exchanges from projects in a given organization and - # location. - # - # @overload list_org_data_exchanges(request, options = nil) - # Pass arguments to `list_org_data_exchanges` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_org_data_exchanges(organization: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization [::String] - # Required. The organization resource path of the projects containing - # DataExchanges. e.g. `organizations/myorg/locations/us`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new - # - # # Call the list_org_data_exchanges method. - # result = client.list_org_data_exchanges request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p item - # end - # - def list_org_data_exchanges request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_org_data_exchanges.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_org_data_exchanges.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_org_data_exchanges request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, "data_exchanges", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a data exchange. - # - # @overload get_data_exchange(request, options = nil) - # Pass arguments to `get_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_exchange(name: nil) - # Pass arguments to `get_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the data exchange. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new - # - # # Call the get_data_exchange method. - # result = client.get_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def get_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.get_data_exchange request, 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 data exchange. - # - # @overload create_data_exchange(request, options = nil) - # Pass arguments to `create_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil) - # Pass arguments to `create_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the data exchange. - # e.g. `projects/myproject/locations/us`. - # @param data_exchange_id [::String] - # Required. The ID of the data exchange. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] - # Required. The data exchange to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new - # - # # Call the create_data_exchange method. - # result = client.create_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def create_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.create_data_exchange request, 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 data exchange. - # - # @overload update_data_exchange(request, options = nil) - # Pass arguments to `update_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_exchange(update_mask: nil, data_exchange: nil) - # Pass arguments to `update_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask specifies the fields to update in the data exchange - # resource. The fields specified in the - # `updateMask` are relative to the resource and are not a full request. - # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] - # Required. The data exchange to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new - # - # # Call the update_data_exchange method. - # result = client.update_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def update_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_exchange.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.update_data_exchange request, 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 data exchange. - # - # @overload delete_data_exchange(request, options = nil) - # Pass arguments to `delete_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_exchange(name: nil) - # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The full name of the data exchange resource that you want to - # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new - # - # # Call the delete_data_exchange method. - # result = client.delete_data_exchange request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.delete_data_exchange request, 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 listings in a given project and location. - # - # @overload list_listings(request, options = nil) - # Pass arguments to `list_listings` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_listings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_listings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new - # - # # Call the list_listings method. - # result = client.list_listings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p item - # end - # - def list_listings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_listings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_listings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_listings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_listings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, "listings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a listing. - # - # @overload get_listing(request, options = nil) - # Pass arguments to `get_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_listing(name: nil) - # Pass arguments to `get_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new - # - # # Call the get_listing method. - # result = client.get_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def get_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_listing.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.get_listing request, 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 listing. - # - # @overload create_listing(request, options = nil) - # Pass arguments to `create_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_listing(parent: nil, listing_id: nil, listing: nil) - # Pass arguments to `create_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param listing_id [::String] - # Required. The ID of the listing to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] - # Required. The listing to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new - # - # # Call the create_listing method. - # result = client.create_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def create_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_listing.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.create_listing request, 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 listing. - # - # @overload update_listing(request, options = nil) - # Pass arguments to `update_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_listing(update_mask: nil, listing: nil) - # Pass arguments to `update_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask specifies the fields to update in the listing - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] - # Required. The listing to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new - # - # # Call the update_listing method. - # result = client.update_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def update_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_listing.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.update_listing request, 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 listing. - # - # @overload delete_listing(request, options = nil) - # Pass arguments to `delete_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_listing(name: nil, delete_commercial: nil) - # Pass arguments to `delete_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the listing to delete. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # @param delete_commercial [::Boolean] - # Optional. If the listing is commercial then this field must be set to true, - # otherwise a failure is thrown. This acts as a safety guard to avoid - # deleting commercial listings accidentally. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new - # - # # Call the delete_listing method. - # result = client.delete_listing request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_listing.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.delete_listing request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Subscribes to a listing. - # - # Currently, with Analytics Hub, you can create listings that - # reference only BigQuery datasets. - # Upon subscription to a listing for a BigQuery dataset, Analytics Hub - # creates a linked dataset in the subscriber's project. - # - # @overload subscribe_listing(request, options = nil) - # Pass arguments to `subscribe_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload subscribe_listing(destination_dataset: nil, destination_pubsub_subscription: nil, name: nil) - # Pass arguments to `subscribe_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] - # Input only. BigQuery destination dataset to create for the subscriber. - # - # Note: The following parameters are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. 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 destination_pubsub_subscription [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription, ::Hash] - # Input only. Destination Pub/Sub subscription to create for the - # subscriber. - # - # Note: The following parameters are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. 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 name [::String] - # Required. Resource name of the listing that you want to subscribe to. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new - # - # # Call the subscribe_listing method. - # result = client.subscribe_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. - # p result - # - def subscribe_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.subscribe_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.subscribe_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.subscribe_listing request, 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 Subscription to a Data Clean Room. This is a - # long-running operation as it will create one or more linked datasets. - # Throws a Bad Request error if the Data Exchange does not contain any - # listings. - # - # @overload subscribe_data_exchange(request, options = nil) - # Pass arguments to `subscribe_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload subscribe_data_exchange(name: nil, destination: nil, destination_dataset: nil, subscription: nil, subscriber_contact: nil) - # Pass arguments to `subscribe_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Data Exchange. - # e.g. `projects/publisherproject/locations/us/dataExchanges/123` - # @param destination [::String] - # Required. The parent resource path of the Subscription. - # e.g. `projects/subscriberproject/locations/us` - # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] - # Optional. BigQuery destination dataset to create for the subscriber. - # @param subscription [::String] - # Required. Name of the subscription to create. - # e.g. `subscription1` - # @param subscriber_contact [::String] - # Email of the subscriber. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new - # - # # Call the subscribe_data_exchange method. - # result = client.subscribe_data_exchange request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def subscribe_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.subscribe_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.subscribe_data_exchange.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.subscribe_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.subscribe_data_exchange request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Refreshes a Subscription to a Data Exchange. A Data Exchange can become - # stale when a publisher adds or removes data. This is a long-running - # operation as it may create many linked datasets. - # - # @overload refresh_subscription(request, options = nil) - # Pass arguments to `refresh_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload refresh_subscription(name: nil) - # Pass arguments to `refresh_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Subscription to refresh. - # e.g. `projects/subscriberproject/locations/us/subscriptions/123` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new - # - # # Call the refresh_subscription method. - # result = client.refresh_subscription request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def refresh_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.refresh_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.refresh_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.refresh_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.refresh_subscription request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a Subscription. - # - # @overload get_subscription(request, options = nil) - # Pass arguments to `get_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_subscription(name: nil) - # Pass arguments to `get_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription. - # e.g. projects/123/locations/us/subscriptions/456 - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new - # - # # Call the get_subscription method. - # result = client.get_subscription request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p result - # - def get_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.get_subscription request, 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 subscriptions in a given project and location. - # - # @overload list_subscriptions(request, options = nil) - # Pass arguments to `list_subscriptions` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_subscriptions(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the subscription. - # e.g. projects/myproject/locations/us - # @param filter [::String] - # An expression for filtering the results of the request. Eligible - # fields for filtering are: - # - # + `listing` - # + `data_exchange` - # - # Alternatively, a literal wrapped in double quotes may be provided. - # This will be checked for an exact match against both fields above. - # - # In all cases, the full Data Exchange or Listing resource name must - # be provided. Some example of using filters: - # - # + data_exchange="projects/myproject/locations/us/dataExchanges/123" - # + listing="projects/123/locations/us/dataExchanges/456/listings/789" - # + "projects/myproject/locations/us/dataExchanges/123" - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. - # @param page_token [::String] - # Page token, returned by a previous call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new - # - # # Call the list_subscriptions method. - # result = client.list_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p item - # end - # - def list_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_subscriptions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_subscriptions, "subscriptions", request, result, 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 subscriptions on a given Data Exchange or Listing. - # - # @overload list_shared_resource_subscriptions(request, options = nil) - # Pass arguments to `list_shared_resource_subscriptions` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_shared_resource_subscriptions(resource: nil, include_deleted_subscriptions: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_shared_resource_subscriptions` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the requested target. This resource may be - # either a Listing or a DataExchange. e.g. - # projects/123/locations/us/dataExchanges/456 OR e.g. - # projects/123/locations/us/dataExchanges/456/listings/789 - # @param include_deleted_subscriptions [::Boolean] - # If selected, includes deleted subscriptions in the response - # (up to 63 days after deletion). - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. - # @param page_token [::String] - # Page token, returned by a previous call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new - # - # # Call the list_shared_resource_subscriptions method. - # result = client.list_shared_resource_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p item - # end - # - def list_shared_resource_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_shared_resource_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_shared_resource_subscriptions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_shared_resource_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_shared_resource_subscriptions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_shared_resource_subscriptions, "shared_resource_subscriptions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Revokes a given subscription. - # - # @overload revoke_subscription(request, options = nil) - # Pass arguments to `revoke_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_subscription(name: nil, revoke_commercial: nil) - # Pass arguments to `revoke_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription to revoke. - # e.g. projects/123/locations/us/subscriptions/456 - # @param revoke_commercial [::Boolean] - # Optional. If the subscription is commercial then this field must be set to - # true, otherwise a failure is thrown. This acts as a safety guard to avoid - # revoking commercial subscriptions accidentally. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new - # - # # Call the revoke_subscription method. - # result = client.revoke_subscription request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. - # p result - # - def revoke_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest - - # Converts hash and nil to an 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_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.revoke_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.revoke_subscription request, 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 subscription. - # - # @overload delete_subscription(request, options = nil) - # Pass arguments to `delete_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_subscription(name: nil) - # Pass arguments to `delete_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription to delete. - # e.g. projects/123/locations/us/subscriptions/456 - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new - # - # # Call the delete_subscription method. - # result = client.delete_subscription request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest - - # Converts hash and nil to an 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_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.delete_subscription request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @analytics_hub_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. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @analytics_hub_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @analytics_hub_service_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new QueryTemplate - # - # @overload create_query_template(request, options = nil) - # Pass arguments to `create_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_query_template(parent: nil, query_template_id: nil, query_template: nil) - # Pass arguments to `create_query_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 parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. - # @param query_template_id [::String] - # Required. The ID of the QueryTemplate to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] - # Required. The QueryTemplate to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new - # - # # Call the create_query_template method. - # result = client.create_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def create_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest - - # Converts hash and nil to an 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_query_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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.create_query_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 - - ## - # Gets a QueryTemplate - # - # @overload get_query_template(request, options = nil) - # Pass arguments to `get_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_query_template(name: nil) - # Pass arguments to `get_query_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 parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new - # - # # Call the get_query_template method. - # result = client.get_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def get_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_query_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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.get_query_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 all QueryTemplates in a given project and location. - # - # @overload list_query_templates(request, options = nil) - # Pass arguments to `list_query_templates` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_query_templates(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_query_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 parent resource path of the QueryTemplates. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response - # page. Leverage the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Optional. Page token, returned by a previous call, to request the next page - # of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new - # - # # Call the list_query_templates method. - # result = client.list_query_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::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p item - # end - # - def list_query_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_query_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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_query_templates.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_query_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_query_templates request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_query_templates, "query_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 - - ## - # Updates an existing QueryTemplate - # - # @overload update_query_template(request, options = nil) - # Pass arguments to `update_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_query_template(update_mask: nil, query_template: nil) - # Pass arguments to `update_query_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask specifies the fields to update in the query template - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] - # Required. The QueryTemplate to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new - # - # # Call the update_query_template method. - # result = client.update_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def update_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest - - # Converts hash and nil to an 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_query_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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.update_query_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 - - ## - # Deletes a query template. - # - # @overload delete_query_template(request, options = nil) - # Pass arguments to `delete_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_query_template(name: nil) - # Pass arguments to `delete_query_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 path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new - # - # # Call the delete_query_template method. - # result = client.delete_query_template request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest - - # Converts hash and nil to an 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_query_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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.delete_query_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 - - ## - # Submits a query template for approval. - # - # @overload submit_query_template(request, options = nil) - # Pass arguments to `submit_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_query_template(name: nil) - # Pass arguments to `submit_query_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 path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new - # - # # Call the submit_query_template method. - # result = client.submit_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def submit_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest - - # Converts hash and nil to an 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_query_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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.submit_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.submit_query_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 - - ## - # Approves a query template. - # - # @overload approve_query_template(request, options = nil) - # Pass arguments to `approve_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload approve_query_template(name: nil) - # Pass arguments to `approve_query_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 path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new - # - # # Call the approve_query_template method. - # result = client.approve_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def approve_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.approve_query_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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.approve_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.approve_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.approve_query_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 - - ## - # Configuration class for the AnalyticsHubService REST API. - # - # This class represents the configuration for AnalyticsHubService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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_data_exchanges to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_exchanges.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_exchanges.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`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 = "analyticshub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - 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 AnalyticsHubService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental 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_data_exchanges` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_exchanges - ## - # RPC-specific configuration for `list_org_data_exchanges` - # @return [::Gapic::Config::Method] - # - attr_reader :list_org_data_exchanges - ## - # RPC-specific configuration for `get_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_exchange - ## - # RPC-specific configuration for `create_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_exchange - ## - # RPC-specific configuration for `update_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_exchange - ## - # RPC-specific configuration for `delete_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_exchange - ## - # RPC-specific configuration for `list_listings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_listings - ## - # RPC-specific configuration for `get_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :get_listing - ## - # RPC-specific configuration for `create_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :create_listing - ## - # RPC-specific configuration for `update_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :update_listing - ## - # RPC-specific configuration for `delete_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_listing - ## - # RPC-specific configuration for `subscribe_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :subscribe_listing - ## - # RPC-specific configuration for `subscribe_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :subscribe_data_exchange - ## - # RPC-specific configuration for `refresh_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :refresh_subscription - ## - # RPC-specific configuration for `get_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :get_subscription - ## - # RPC-specific configuration for `list_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_subscriptions - ## - # RPC-specific configuration for `list_shared_resource_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_shared_resource_subscriptions - ## - # RPC-specific configuration for `revoke_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :revoke_subscription - ## - # RPC-specific configuration for `delete_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_subscription - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `create_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_query_template - ## - # RPC-specific configuration for `get_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_query_template - ## - # RPC-specific configuration for `list_query_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_query_templates - ## - # RPC-specific configuration for `update_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :update_query_template - ## - # RPC-specific configuration for `delete_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_query_template - ## - # RPC-specific configuration for `submit_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_query_template - ## - # RPC-specific configuration for `approve_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :approve_query_template - - # @private - def initialize parent_rpcs = nil - list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges - @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config - list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges - @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config - get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange - @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config - create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange - @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config - update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange - @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config - delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange - @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config - list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings - @list_listings = ::Gapic::Config::Method.new list_listings_config - get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing - @get_listing = ::Gapic::Config::Method.new get_listing_config - create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing - @create_listing = ::Gapic::Config::Method.new create_listing_config - update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing - @update_listing = ::Gapic::Config::Method.new update_listing_config - delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing - @delete_listing = ::Gapic::Config::Method.new delete_listing_config - subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing - @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config - subscribe_data_exchange_config = parent_rpcs.subscribe_data_exchange if parent_rpcs.respond_to? :subscribe_data_exchange - @subscribe_data_exchange = ::Gapic::Config::Method.new subscribe_data_exchange_config - refresh_subscription_config = parent_rpcs.refresh_subscription if parent_rpcs.respond_to? :refresh_subscription - @refresh_subscription = ::Gapic::Config::Method.new refresh_subscription_config - get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription - @get_subscription = ::Gapic::Config::Method.new get_subscription_config - list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions - @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config - list_shared_resource_subscriptions_config = parent_rpcs.list_shared_resource_subscriptions if parent_rpcs.respond_to? :list_shared_resource_subscriptions - @list_shared_resource_subscriptions = ::Gapic::Config::Method.new list_shared_resource_subscriptions_config - revoke_subscription_config = parent_rpcs.revoke_subscription if parent_rpcs.respond_to? :revoke_subscription - @revoke_subscription = ::Gapic::Config::Method.new revoke_subscription_config - delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription - @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - create_query_template_config = parent_rpcs.create_query_template if parent_rpcs.respond_to? :create_query_template - @create_query_template = ::Gapic::Config::Method.new create_query_template_config - get_query_template_config = parent_rpcs.get_query_template if parent_rpcs.respond_to? :get_query_template - @get_query_template = ::Gapic::Config::Method.new get_query_template_config - list_query_templates_config = parent_rpcs.list_query_templates if parent_rpcs.respond_to? :list_query_templates - @list_query_templates = ::Gapic::Config::Method.new list_query_templates_config - update_query_template_config = parent_rpcs.update_query_template if parent_rpcs.respond_to? :update_query_template - @update_query_template = ::Gapic::Config::Method.new update_query_template_config - delete_query_template_config = parent_rpcs.delete_query_template if parent_rpcs.respond_to? :delete_query_template - @delete_query_template = ::Gapic::Config::Method.new delete_query_template_config - submit_query_template_config = parent_rpcs.submit_query_template if parent_rpcs.respond_to? :submit_query_template - @submit_query_template = ::Gapic::Config::Method.new submit_query_template_config - approve_query_template_config = parent_rpcs.approve_query_template if parent_rpcs.respond_to? :approve_query_template - @approve_query_template = ::Gapic::Config::Method.new approve_query_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-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb deleted file mode 100644 index 65ac6b2da261..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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 Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AnalyticsHubService 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 AnalyticsHubService 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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "analyticshub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - 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 -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb deleted file mode 100644 index eb7052b18758..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb +++ /dev/null @@ -1,1914 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - module Rest - ## - # REST service stub for the AnalyticsHubService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: false, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_data_exchanges REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse] - # A result object deserialized from the server's reply - def list_data_exchanges request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_exchanges_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_exchanges", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.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_org_data_exchanges REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse] - # A result object deserialized from the server's reply - def list_org_data_exchanges request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_org_data_exchanges_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_org_data_exchanges", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # A result object deserialized from the server's reply - def get_data_exchange request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_exchange_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_exchange", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # A result object deserialized from the server's reply - def create_data_exchange request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_exchange_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_data_exchange", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # A result object deserialized from the server's reply - def update_data_exchange request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_exchange_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_exchange", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_data_exchange request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_exchange_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_data_exchange", - 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_listings REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse] - # A result object deserialized from the server's reply - def list_listings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_listings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_listings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # A result object deserialized from the server's reply - def get_listing request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_listing_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_listing", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.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_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # A result object deserialized from the server's reply - def create_listing request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_listing_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_listing", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.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_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # A result object deserialized from the server's reply - def update_listing request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_listing_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_listing", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.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_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_listing request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_listing_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_listing", - 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 subscribe_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # A result object deserialized from the server's reply - def subscribe_listing request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_listing_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "subscribe_listing", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the subscribe_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def subscribe_data_exchange request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_data_exchange_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "subscribe_data_exchange", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the refresh_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def refresh_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_refresh_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "refresh_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # A result object deserialized from the server's reply - def get_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.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_subscriptions REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse] - # A result object deserialized from the server's reply - def list_subscriptions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_subscriptions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_subscriptions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.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_shared_resource_subscriptions REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse] - # A result object deserialized from the server's reply - def list_shared_resource_subscriptions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_shared_resource_subscriptions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_shared_resource_subscriptions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.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_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # A result object deserialized from the server's reply - def revoke_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_revoke_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.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_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # A result object deserialized from the server's reply - def create_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_query_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_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # A result object deserialized from the server's reply - def get_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_query_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_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.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_query_templates REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse] - # A result object deserialized from the server's reply - def list_query_templates request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_query_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_query_templates", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.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_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # A result object deserialized from the server's reply - def update_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_query_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_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.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_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_query_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_query_template", - 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 submit_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # A result object deserialized from the server's reply - def submit_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_submit_query_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: "submit_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the approve_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # A result object deserialized from the server's reply - def approve_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_approve_query_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: "approve_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.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_data_exchanges REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_exchanges_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataExchanges", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_org_data_exchanges REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_org_data_exchanges_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{organization}/dataExchanges", - matches: [ - ["organization", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_exchange_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_exchange_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataExchanges", - body: "data_exchange", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_exchange_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_exchange.name}", - body: "data_exchange", - matches: [ - ["data_exchange.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_exchange_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_listings REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_listings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/listings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_listing_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest] - # 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_listing_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/listings", - body: "listing", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest] - # 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_listing_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{listing.name}", - body: "listing", - matches: [ - ["listing.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest] - # 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_listing_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the subscribe_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_subscribe_listing_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:subscribe", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the subscribe_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_subscribe_data_exchange_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:subscribe", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the refresh_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_refresh_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:refresh", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_subscriptions REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_subscriptions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/subscriptions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_shared_resource_subscriptions REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_shared_resource_subscriptions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:listSubscriptions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:listSubscriptions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the revoke_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest] - # 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_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:revoke", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest] - # 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_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest] - # 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_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/queryTemplates", - body: "query_template", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_query_templates REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_query_templates_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/queryTemplates", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest] - # 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_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{query_template.name}", - body: "query_template", - matches: [ - ["query_template.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest] - # 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_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the submit_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest] - # 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_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:submit", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the approve_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_approve_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:approve", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb deleted file mode 100644 index 956e85f4e541..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" -require "google/cloud/bigquery/analytics_hub/v1/version" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/analytics_hub/v1/rest" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb deleted file mode 100644 index e4441834988c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb deleted file mode 100644 index 15eaaf36c9dd..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/bigquery/analyticshub/v1/pubsub_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/protobuf/wrappers_pb' - - -descriptor_data = "\n8google/cloud/bigquery/analyticshub/v1/analyticshub.proto\x12%google.cloud.bigquery.analyticshub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/bigquery/analyticshub/v1/pubsub.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\x1egoogle/protobuf/wrappers.proto\"\xe9\x04\n\x0c\x44\x61taExchange\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlisting_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01\x12h\n\x1asharing_environment_config\x18\x08 \x01(\x0b\x32?.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfigB\x03\xe0\x41\x01\x12V\n\x0e\x64iscovery_type\x18\t \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.DiscoveryTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x35\n#log_linked_dataset_query_user_email\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01:t\xea\x41q\n(analyticshub.googleapis.com/DataExchange\x12\x45projects/{project}/locations/{location}/dataExchanges/{data_exchange}B\x11\n\x0f_discovery_typeB&\n$_log_linked_dataset_query_user_email\"\xb7\x05\n\rQueryTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08proposer\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12N\n\x05state\x18\x06 \x01(\x0e\x32:.google.cloud.bigquery.analyticshub.v1.QueryTemplate.StateB\x03\xe0\x41\x03\x12\x44\n\x07routine\x18\x07 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.RoutineB\x03\xe0\x41\x01\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\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44RAFTED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x0c\n\x08\x41PPROVED\x10\x04:\xb5\x01\xea\x41\xb1\x01\n)analyticshub.googleapis.com/QueryTemplate\x12\x65projects/{project}/locations/{location}/dataExchanges/{data_exchange}/queryTemplates/{query_template}*\x0equeryTemplates2\rqueryTemplate\"\xc6\x01\n\x07Routine\x12U\n\x0croutine_type\x18\x01 \x01(\x0e\x32:.google.cloud.bigquery.analyticshub.v1.Routine.RoutineTypeB\x03\xe0\x41\x02\x12\x1c\n\x0f\x64\x65\x66inition_body\x18\x02 \x01(\tB\x03\xe0\x41\x01\"F\n\x0bRoutineType\x12\x1c\n\x18ROUTINE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15TABLE_VALUED_FUNCTION\x10\x01\"\xd1\x01\n\x1a\x43reateQueryTemplateRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x1e\n\x11query_template_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x0equery_template\x18\x03 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplateB\x03\xe0\x41\x02\"Z\n\x17GetQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"\x8e\x01\n\x19ListQueryTemplatesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\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\"\x84\x01\n\x1aListQueryTemplatesResponse\x12M\n\x0fquery_templates\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa5\x01\n\x1aUpdateQueryTemplateRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12Q\n\x0equery_template\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplateB\x03\xe0\x41\x02\"]\n\x1a\x44\x65leteQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"]\n\x1aSubmitQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"^\n\x1b\x41pproveQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"\x94\x04\n\x18SharingEnvironmentConfig\x12x\n\x17\x64\x65\x66\x61ult_exchange_config\x18\x01 \x01(\x0b\x32U.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfigH\x00\x12p\n\x13\x64\x63r_exchange_config\x18\x02 \x01(\x0b\x32Q.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfigH\x00\x1a\x17\n\x15\x44\x65\x66\x61ultExchangeConfig\x1a\xe3\x01\n\x11\x44\x63rExchangeConfig\x12>\n,single_selected_resource_sharing_restriction\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x35\n#single_linked_dataset_per_cleanroom\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42/\n-_single_selected_resource_sharing_restrictionB&\n$_single_linked_dataset_per_cleanroomB\r\n\x0b\x65nvironment\"?\n\x0c\x44\x61taProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"<\n\tPublisher\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"O\n\x1b\x44\x65stinationDatasetReference\x12\x17\n\ndataset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xac\x03\n\x12\x44\x65stinationDataset\x12\x62\n\x11\x64\x61taset_reference\x18\x01 \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceB\x03\xe0\x41\x02\x12\x38\n\rfriendly_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12\x36\n\x0b\x64\x65scription\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12Z\n\x06labels\x18\x04 \x03(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.DestinationDataset.LabelsEntryB\x03\xe0\x41\x01\x12\x15\n\x08location\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11replica_locations\x18\x06 \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\x1d\x44\x65stinationPubSubSubscription\x12[\n\x13pubsub_subscription\x18\x01 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.PubSubSubscriptionB\x03\xe0\x41\x02\"\x87!\n\x07Listing\x12`\n\x10\x62igquery_dataset\x18\x06 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceH\x00\x12X\n\x0cpubsub_topic\x18\x10 \x01(\x0b\x32@.google.cloud.bigquery.analyticshub.v1.Listing.PubSubTopicSourceH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12H\n\x05state\x18\x07 \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.Listing.StateB\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12O\n\rdata_provider\x18\t \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataProviderB\x03\xe0\x41\x01\x12P\n\ncategories\x18\n \x03(\x0e\x32\x37.google.cloud.bigquery.analyticshub.v1.Listing.CategoryB\x03\xe0\x41\x01\x12H\n\tpublisher\x18\x0b \x01(\x0b\x32\x30.google.cloud.bigquery.analyticshub.v1.PublisherB\x03\xe0\x41\x01\x12\x1b\n\x0erequest_access\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12l\n\x18restricted_export_config\x18\r \x01(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfigB\x03\xe0\x41\x01\x12\x62\n\x17stored_procedure_config\x18\x14 \x01(\x0b\x32<.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfigB\x03\xe0\x41\x01\x12V\n\x0e\x64iscovery_type\x18\x0e \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.DiscoveryTypeB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12U\n\rresource_type\x18\x0f \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.SharedResourceTypeB\x03\xe0\x41\x03\x12`\n\x0f\x63ommercial_info\x18\x11 \x01(\x0b\x32=.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfoB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x35\n#log_linked_dataset_query_user_email\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x61llow_only_metadata_sharing\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x1a\x84\n\n\x15\x42igQueryDatasetSource\x12\x38\n\x07\x64\x61taset\x18\x01 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x62igquery.googleapis.com/Dataset\x12v\n\x12selected_resources\x18\x02 \x03(\x0b\x32U.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResourceB\x03\xe0\x41\x01\x12\x82\x01\n\x18restricted_export_policy\x18\x03 \x01(\x0b\x32[.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicyB\x03\xe0\x41\x01\x12\x1e\n\x11replica_locations\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12m\n\x12\x65\x66\x66\x65\x63tive_replicas\x18\x06 \x03(\x0b\x32L.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.ReplicaB\x03\xe0\x41\x03\x1a\x92\x01\n\x10SelectedResource\x12\x36\n\x05table\x18\x01 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/TableH\x00\x12:\n\x07routine\x18\x02 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x62igquery.googleapis.com/RoutineH\x00\x42\n\n\x08resource\x1a\xd1\x01\n\x16RestrictedExportPolicy\x12\x30\n\x07\x65nabled\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12\x45\n\x1crestrict_direct_table_access\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12>\n\x15restrict_query_result\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x1a\xbb\x03\n\x07Replica\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12u\n\rreplica_state\x18\x02 \x01(\x0e\x32Y.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.ReplicaStateB\x03\xe0\x41\x03\x12z\n\rprimary_state\x18\x03 \x01(\x0e\x32Y.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.PrimaryStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\"P\n\x0cReplicaState\x12\x1d\n\x19REPLICA_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cREADY_TO_USE\x10\x01\x12\x0f\n\x0bUNAVAILABLE\x10\x02\"B\n\x0cPrimaryState\x12\x1d\n\x19PRIMARY_STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fPRIMARY_REPLICA\x10\x01\x42\x10\n\x0e_primary_state\x1ak\n\x11PubSubTopicSource\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\"\n\x15\x64\x61ta_affinity_regions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a}\n\x16RestrictedExportConfig\x12\x14\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1crestrict_direct_table_access\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12\"\n\x15restrict_query_result\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x94\x04\n\x0e\x43ommercialInfo\x12}\n\x11\x63loud_marketplace\x18\x01 \x01(\x0b\x32X.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfoB\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\xec\x02\n\x1aGoogleCloudMarketplaceInfo\x12M\n\x07service\x18\x01 \x01(\tB7\xe0\x41\x03\xfa\x41\x31\n/servicemanagement.googleapis.com/ManagedServiceH\x00\x88\x01\x01\x12\x8c\x01\n\x10\x63ommercial_state\x18\x03 \x01(\x0e\x32h.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo.CommercialStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\"O\n\x0f\x43ommercialState\x12 \n\x1c\x43OMMERCIAL_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nONBOARDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x42\n\n\x08_serviceB\x13\n\x11_commercial_stateB\x14\n\x12_cloud_marketplace\"*\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\"\xd9\x04\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43\x41TEGORY_OTHERS\x10\x01\x12&\n\"CATEGORY_ADVERTISING_AND_MARKETING\x10\x02\x12\x15\n\x11\x43\x41TEGORY_COMMERCE\x10\x03\x12$\n CATEGORY_CLIMATE_AND_ENVIRONMENT\x10\x04\x12\x19\n\x15\x43\x41TEGORY_DEMOGRAPHICS\x10\x05\x12\x16\n\x12\x43\x41TEGORY_ECONOMICS\x10\x06\x12\x16\n\x12\x43\x41TEGORY_EDUCATION\x10\x07\x12\x13\n\x0f\x43\x41TEGORY_ENERGY\x10\x08\x12\x16\n\x12\x43\x41TEGORY_FINANCIAL\x10\t\x12\x13\n\x0f\x43\x41TEGORY_GAMING\x10\n\x12\x17\n\x13\x43\x41TEGORY_GEOSPATIAL\x10\x0b\x12(\n$CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE\x10\x0c\x12\x12\n\x0e\x43\x41TEGORY_MEDIA\x10\r\x12\x1a\n\x16\x43\x41TEGORY_PUBLIC_SECTOR\x10\x0e\x12\x13\n\x0f\x43\x41TEGORY_RETAIL\x10\x0f\x12\x13\n\x0f\x43\x41TEGORY_SPORTS\x10\x10\x12!\n\x1d\x43\x41TEGORY_SCIENCE_AND_RESEARCH\x10\x11\x12)\n%CATEGORY_TRANSPORTATION_AND_LOGISTICS\x10\x12\x12\x1f\n\x1b\x43\x41TEGORY_TRAVEL_AND_TOURISM\x10\x13\x12 \n\x1c\x43\x41TEGORY_GOOGLE_EARTH_ENGINE\x10\x14:\x82\x01\xea\x41\x7f\n#analyticshub.googleapis.com/Listing\x12Xprojects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}B\x08\n\x06sourceB\x11\n\x0f_discovery_typeB\x12\n\x10_commercial_infoB&\n$_log_linked_dataset_query_user_emailB\x1e\n\x1c_allow_only_metadata_sharing\"\xfd\x01\n\x15StoredProcedureConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12}\n\x1e\x61llowed_stored_procedure_types\x18\x02 \x03(\x0e\x32P.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureTypeB\x03\xe0\x41\x03\"O\n\x13StoredProcedureType\x12%\n!STORED_PROCEDURE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSQL_PROCEDURE\x10\x01\"\x98\r\n\x0cSubscription\x12\x16\n\x07listing\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1c\n\rdata_exchange\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rcreation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_modify_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19organization_display_name\x18\n \x01(\tB\x03\xe0\x41\x03\x12M\n\x05state\x18\x07 \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.Subscription.StateB\x03\xe0\x41\x03\x12j\n\x12linked_dataset_map\x18\x08 \x03(\x0b\x32I.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedDatasetMapEntryB\x03\xe0\x41\x03\x12\x1f\n\x12subscriber_contact\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x61\n\x10linked_resources\x18\x0b \x03(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResourceB\x03\xe0\x41\x03\x12U\n\rresource_type\x18\x0c \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.SharedResourceTypeB\x03\xe0\x41\x03\x12`\n\x0f\x63ommercial_info\x18\r \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfoB\x03\xe0\x41\x03\x12\x35\n#log_linked_dataset_query_user_email\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12[\n\x13\x64\x65stination_dataset\x18\x0f \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x01\x1a}\n\x0eLinkedResource\x12\x1d\n\x0elinked_dataset\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x12)\n\x1alinked_pubsub_subscription\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x14\n\x07listing\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42\x0b\n\treference\x1a\xf8\x01\n\x0e\x43ommercialInfo\x12}\n\x11\x63loud_marketplace\x18\x01 \x01(\x0b\x32].google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo.GoogleCloudMarketplaceInfoB\x03\xe0\x41\x03\x1ag\n\x1aGoogleCloudMarketplaceInfo\x12I\n\x05order\x18\x01 \x01(\tB:\xfa\x41\x37\n5cloudcommerceconsumerprocurement.googleapis.com/Order\x1a{\n\x15LinkedDatasetMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource:\x02\x38\x01\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATE_ACTIVE\x10\x01\x12\x0f\n\x0bSTATE_STALE\x10\x02\x12\x12\n\x0eSTATE_INACTIVE\x10\x03:s\xea\x41p\n(analyticshub.googleapis.com/Subscription\x12\x44projects/{project}/locations/{location}/subscriptions/{subscription}B\x0f\n\rresource_nameB&\n$_log_linked_dataset_query_user_email\"\x83\x01\n\x18ListDataExchangesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/DataExchange\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x19ListDataExchangesResponse\x12K\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x1bListOrgDataExchangesRequest\x12\x19\n\x0corganization\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1cListOrgDataExchangesResponse\x12K\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x16GetDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"\xcd\x01\n\x19\x43reateDataExchangeRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/DataExchange\x12\x1d\n\x10\x64\x61ta_exchange_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\rdata_exchange\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchangeB\x03\xe0\x41\x02\"\xa2\x01\n\x19UpdateDataExchangeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12O\n\rdata_exchange\x18\x02 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchangeB\x03\xe0\x41\x02\"[\n\x19\x44\x65leteDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"~\n\x13ListListingsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"q\n\x14ListListingsResponse\x12@\n\x08listings\x18\x01 \x03(\x0b\x32..google.cloud.bigquery.analyticshub.v1.Listing\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x11GetListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\"\xb7\x01\n\x14\x43reateListingRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x17\n\nlisting_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x07listing\x18\x03 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.ListingB\x03\xe0\x41\x02\"\x92\x01\n\x14UpdateListingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\x07listing\x18\x02 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.ListingB\x03\xe0\x41\x02\"q\n\x14\x44\x65leteListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\x12\x1e\n\x11\x64\x65lete_commercial\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x02\n\x17SubscribeListingRequest\x12]\n\x13\x64\x65stination_dataset\x18\x03 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x04H\x00\x12t\n\x1f\x64\x65stination_pubsub_subscription\x18\x05 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.DestinationPubSubSubscriptionB\x03\xe0\x41\x04H\x00\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/ListingB\r\n\x0b\x64\x65stination\"e\n\x18SubscribeListingResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"\xb2\x02\n\x1cSubscribeDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12>\n\x0b\x64\x65stination\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12[\n\x13\x64\x65stination_dataset\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x01\x12\x19\n\x0csubscription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x12subscriber_contact\x18\x03 \x01(\t\"j\n\x1dSubscribeDataExchangeResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"\\\n\x1aRefreshSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"h\n\x1bRefreshSubscriptionResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"X\n\x16GetSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"\x93\x01\n\x18ListSubscriptionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/Subscription\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\"\x80\x01\n\x19ListSubscriptionsResponse\x12J\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x93\x01\n&ListSharedResourceSubscriptionsRequest\x12\x1b\n\x08resource\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12%\n\x1dinclude_deleted_subscriptions\x18\x02 \x01(\x08\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x9e\x01\n\'ListSharedResourceSubscriptionsResponse\x12Z\n\x1dshared_resource_subscriptions\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"{\n\x19RevokeSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\x12\x1e\n\x11revoke_commercial\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x1c\n\x1aRevokeSubscriptionResponse\"[\n\x19\x44\x65leteSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"\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*f\n\rDiscoveryType\x12\x1e\n\x1a\x44ISCOVERY_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x44ISCOVERY_TYPE_PRIVATE\x10\x01\x12\x19\n\x15\x44ISCOVERY_TYPE_PUBLIC\x10\x02*b\n\x12SharedResourceType\x12$\n SHARED_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42IGQUERY_DATASET\x10\x01\x12\x10\n\x0cPUBSUB_TOPIC\x10\x02\x32\x80\x38\n\x13\x41nalyticsHubService\x12\xda\x01\n\x11ListDataExchanges\x12?.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest\x1a@.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/dataExchanges\x12\xf4\x01\n\x14ListOrgDataExchanges\x12\x42.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest\x1a\x43.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse\"S\xda\x41\x0corganization\x82\xd3\xe4\x93\x02>\x12\x12\x12*.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest\x1a?.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\"F/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe:\x01*\x12\x80\x02\n\x15SubscribeDataExchange\x12\x43.google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x32\n\x1dSubscribeDataExchangeResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/locations/*/dataExchanges/*}:subscribe:\x01*\x12\xf7\x01\n\x13RefreshSubscription\x12\x41.google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x30\n\x1bRefreshSubscriptionResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v1/{name=projects/*/locations/*/subscriptions/*}:refresh:\x01*\x12\xc7\x01\n\x0fGetSubscription\x12=.google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest\x1a\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/subscriptions/*}\x12\xda\x01\n\x11ListSubscriptions\x12?.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest\x1a@.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/subscriptions\x12\xf4\x02\n\x1fListSharedResourceSubscriptions\x12M.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest\x1aN.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsResponse\"\xb1\x01\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x9f\x01\x12G/v1/{resource=projects/*/locations/*/dataExchanges/*}:listSubscriptionsZT\x12R/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:listSubscriptions\x12\xe5\x01\n\x12RevokeSubscription\x12@.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest\x1a\x41.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionResponse\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v1/{name=projects/*/locations/*/subscriptions/*}:revoke:\x01*\x12\xe4\x01\n\x12\x44\x65leteSubscription\x12@.google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/subscriptions/*}\x12\xb7\x02\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xeb\x01\x82\xd3\xe4\x93\x02\xe4\x01\"B/v1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy:\x01*ZR\"M/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy:\x01*ZG\"B/v1/{resource=projects/*/locations/*/subscriptions/*}:getIamPolicy:\x01*\x12\xb7\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xeb\x01\x82\xd3\xe4\x93\x02\xe4\x01\"B/v1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy:\x01*ZR\"M/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy:\x01*ZG\"B/v1/{resource=projects/*/locations/*/subscriptions/*}:setIamPolicy:\x01*\x12\x9a\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xae\x01\x82\xd3\xe4\x93\x02\xa7\x01\"H/v1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions:\x01*ZX\"S/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions:\x01*\x12\x95\x02\n\x13\x43reateQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.CreateQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\x84\x01\xda\x41\'parent,query_template,query_template_id\x82\xd3\xe4\x93\x02T\"B/v1/{parent=projects/*/locations/*/dataExchanges/*}/queryTemplates:\x0equery_template\x12\xdb\x01\n\x10GetQueryTemplate\x12>.google.cloud.bigquery.analyticshub.v1.GetQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}\x12\xee\x01\n\x12ListQueryTemplates\x12@.google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesRequest\x1a\x41.google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/dataExchanges/*}/queryTemplates\x12\x97\x02\n\x13UpdateQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.UpdateQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\x86\x01\xda\x41\x1aquery_template,update_mask\x82\xd3\xe4\x93\x02\x63\x32Q/v1/{query_template.name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:\x0equery_template\x12\xc3\x01\n\x13\x44\x65leteQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.DeleteQueryTemplateRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}\x12\xeb\x01\n\x13SubmitQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.SubmitQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\"I/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:submit:\x01*\x12\xee\x01\n\x14\x41pproveQueryTemplate\x12\x42.google.cloud.bigquery.analyticshub.v1.ApproveQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\"J/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:approve:\x01*\x1ax\xca\x41\x1b\x61nalyticshub.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xf4\x05\n)com.google.cloud.bigquery.analyticshub.v1B\x11\x41nalyticsHubProtoP\x01ZMcloud.google.com/go/bigquery/analyticshub/apiv1/analyticshubpb;analyticshubpb\xaa\x02%Google.Cloud.BigQuery.AnalyticsHub.V1\xca\x02%Google\\Cloud\\BigQuery\\AnalyticsHub\\V1\xea\x02)Google::Cloud::Bigquery::AnalyticsHub::V1\xea\x41H\n\x1f\x62igquery.googleapis.com/Dataset\x12%projects/{project}/datasets/{dataset}\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\xea\x41[\n\x1f\x62igquery.googleapis.com/Routine\x12\x38projects/{project}/datasets/{dataset}/routines/{routine}\xea\x41\x45\n/servicemanagement.googleapis.com/ManagedService\x12\x12services/{service}\xea\x41Z\n5cloudcommerceconsumerprocurement.googleapis.com/Order\x12!projects/{project}/orders/{order}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - DataExchange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DataExchange").msgclass - QueryTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.QueryTemplate").msgclass - QueryTemplate::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.QueryTemplate.State").enummodule - Routine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Routine").msgclass - Routine::RoutineType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Routine.RoutineType").enummodule - CreateQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateQueryTemplateRequest").msgclass - GetQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetQueryTemplateRequest").msgclass - ListQueryTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesRequest").msgclass - ListQueryTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesResponse").msgclass - UpdateQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateQueryTemplateRequest").msgclass - DeleteQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteQueryTemplateRequest").msgclass - SubmitQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubmitQueryTemplateRequest").msgclass - ApproveQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ApproveQueryTemplateRequest").msgclass - SharingEnvironmentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig").msgclass - SharingEnvironmentConfig::DefaultExchangeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfig").msgclass - SharingEnvironmentConfig::DcrExchangeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfig").msgclass - DataProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DataProvider").msgclass - Publisher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Publisher").msgclass - DestinationDatasetReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference").msgclass - DestinationDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationDataset").msgclass - DestinationPubSubSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationPubSubSubscription").msgclass - Listing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing").msgclass - Listing::BigQueryDatasetSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource").msgclass - Listing::BigQueryDatasetSource::SelectedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource").msgclass - Listing::BigQueryDatasetSource::RestrictedExportPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy").msgclass - Listing::BigQueryDatasetSource::Replica = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica").msgclass - Listing::BigQueryDatasetSource::Replica::ReplicaState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.ReplicaState").enummodule - Listing::BigQueryDatasetSource::Replica::PrimaryState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.PrimaryState").enummodule - Listing::PubSubTopicSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.PubSubTopicSource").msgclass - Listing::RestrictedExportConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig").msgclass - Listing::CommercialInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo").msgclass - Listing::CommercialInfo::GoogleCloudMarketplaceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo").msgclass - Listing::CommercialInfo::GoogleCloudMarketplaceInfo::CommercialState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo.CommercialState").enummodule - Listing::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.State").enummodule - Listing::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.Category").enummodule - StoredProcedureConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig").msgclass - StoredProcedureConfig::StoredProcedureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureType").enummodule - Subscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription").msgclass - Subscription::LinkedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource").msgclass - Subscription::CommercialInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo").msgclass - Subscription::CommercialInfo::GoogleCloudMarketplaceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo.GoogleCloudMarketplaceInfo").msgclass - Subscription::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.State").enummodule - ListDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest").msgclass - ListDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse").msgclass - ListOrgDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest").msgclass - ListOrgDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse").msgclass - GetDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest").msgclass - CreateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest").msgclass - UpdateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest").msgclass - DeleteDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest").msgclass - ListListingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListListingsRequest").msgclass - ListListingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListListingsResponse").msgclass - GetListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetListingRequest").msgclass - CreateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateListingRequest").msgclass - UpdateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateListingRequest").msgclass - DeleteListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteListingRequest").msgclass - SubscribeListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest").msgclass - SubscribeListingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse").msgclass - SubscribeDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest").msgclass - SubscribeDataExchangeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeResponse").msgclass - RefreshSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest").msgclass - RefreshSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionResponse").msgclass - GetSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest").msgclass - ListSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest").msgclass - ListSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSubscriptionsResponse").msgclass - ListSharedResourceSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest").msgclass - ListSharedResourceSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsResponse").msgclass - RevokeSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest").msgclass - RevokeSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionResponse").msgclass - DeleteSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.OperationMetadata").msgclass - DiscoveryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DiscoveryType").enummodule - SharedResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharedResourceType").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb deleted file mode 100644 index 4b03fbc5f859..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb +++ /dev/null @@ -1,119 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto for package 'Google.Cloud.Bigquery.AnalyticsHub.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/bigquery/analyticshub/v1/analyticshub_pb' - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.analyticshub.v1.AnalyticsHubService' - - # Lists all data exchanges in a given project and location. - rpc :ListDataExchanges, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse - # Lists all data exchanges from projects in a given organization and - # location. - rpc :ListOrgDataExchanges, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse - # Gets the details of a data exchange. - rpc :GetDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange - # Creates a new data exchange. - rpc :CreateDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange - # Updates an existing data exchange. - rpc :UpdateDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange - # Deletes an existing data exchange. - rpc :DeleteDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Google::Protobuf::Empty - # Lists all listings in a given project and location. - rpc :ListListings, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse - # Gets the details of a listing. - rpc :GetListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing - # Creates a new listing. - rpc :CreateListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing - # Updates an existing listing. - rpc :UpdateListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing - # Deletes a listing. - rpc :DeleteListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Google::Protobuf::Empty - # Subscribes to a listing. - # - # Currently, with Analytics Hub, you can create listings that - # reference only BigQuery datasets. - # Upon subscription to a listing for a BigQuery dataset, Analytics Hub - # creates a linked dataset in the subscriber's project. - rpc :SubscribeListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse - # Creates a Subscription to a Data Clean Room. This is a - # long-running operation as it will create one or more linked datasets. - # Throws a Bad Request error if the Data Exchange does not contain any - # listings. - rpc :SubscribeDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Google::Longrunning::Operation - # Refreshes a Subscription to a Data Exchange. A Data Exchange can become - # stale when a publisher adds or removes data. This is a long-running - # operation as it may create many linked datasets. - rpc :RefreshSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Google::Longrunning::Operation - # Gets the details of a Subscription. - rpc :GetSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription - # Lists all subscriptions in a given project and location. - rpc :ListSubscriptions, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse - # Lists all subscriptions on a given Data Exchange or Listing. - rpc :ListSharedResourceSubscriptions, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse - # Revokes a given subscription. - rpc :RevokeSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse - # Deletes a subscription. - rpc :DeleteSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Google::Longrunning::Operation - # Gets the IAM policy. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the IAM policy. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the permissions that a caller has. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Creates a new QueryTemplate - rpc :CreateQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate - # Gets a QueryTemplate - rpc :GetQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate - # Lists all QueryTemplates in a given project and location. - rpc :ListQueryTemplates, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse - # Updates an existing QueryTemplate - rpc :UpdateQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate - # Deletes a query template. - rpc :DeleteQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Google::Protobuf::Empty - # Submits a query template for approval. - rpc :SubmitQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate - # Approves a query template. - rpc :ApproveQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb deleted file mode 100644 index f72ac6bfc9fc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/analyticshub/v1/pubsub.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n2google/cloud/bigquery/analyticshub/v1/pubsub.proto\x12%google.cloud.bigquery.analyticshub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\"\xa1\t\n\x12PubSubSubscription\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x0bpush_config\x18\x04 \x01(\x0b\x32\x31.google.cloud.bigquery.analyticshub.v1.PushConfigB\x03\xe0\x41\x01\x12S\n\x0f\x62igquery_config\x18\x12 \x01(\x0b\x32\x35.google.cloud.bigquery.analyticshub.v1.BigQueryConfigB\x03\xe0\x41\x01\x12\\\n\x14\x63loud_storage_config\x18\x16 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.CloudStorageConfigB\x03\xe0\x41\x01\x12!\n\x14\x61\x63k_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x15retain_acked_messages\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12Z\n\x06labels\x18\t \x03(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.PubSubSubscription.LabelsEntryB\x03\xe0\x41\x01\x12$\n\x17\x65nable_message_ordering\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12W\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.ExpirationPolicyB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12X\n\x12\x64\x65\x61\x64_letter_policy\x18\r \x01(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.DeadLetterPolicyB\x03\xe0\x41\x01\x12M\n\x0cretry_policy\x18\x0e \x01(\x0b\x32\x32.google.cloud.bigquery.analyticshub.v1.RetryPolicyB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65tached\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_exactly_once_delivery\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12X\n\x12message_transforms\x18\x19 \x03(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.MessageTransformB\x03\xe0\x41\x01\x12\\\n\x04tags\x18\x1a \x03(\x0b\x32\x43.google.cloud.bigquery.analyticshub.v1.PubSubSubscription.TagsEntryB\t\xe0\x41\x04\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\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x7f\n\x0bRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"V\n\x10\x44\x65\x61\x64LetterPolicy\x12\x1e\n\x11\x64\x65\x61\x64_letter_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15max_delivery_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"?\n\x10\x45xpirationPolicy\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xee\x04\n\nPushConfig\x12V\n\noidc_token\x18\x03 \x01(\x0b\x32;.google.cloud.bigquery.analyticshub.v1.PushConfig.OidcTokenB\x03\xe0\x41\x01H\x00\x12^\n\x0epubsub_wrapper\x18\x04 \x01(\x0b\x32?.google.cloud.bigquery.analyticshub.v1.PushConfig.PubsubWrapperB\x03\xe0\x41\x01H\x01\x12V\n\nno_wrapper\x18\x05 \x01(\x0b\x32;.google.cloud.bigquery.analyticshub.v1.PushConfig.NoWrapperB\x03\xe0\x41\x01H\x01\x12\x1a\n\rpush_endpoint\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12Z\n\nattributes\x18\x02 \x03(\x0b\x32\x41.google.cloud.bigquery.analyticshub.v1.PushConfig.AttributesEntryB\x03\xe0\x41\x01\x1a\x46\n\tOidcToken\x12\"\n\x15service_account_email\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61udience\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x0f\n\rPubsubWrapper\x1a(\n\tNoWrapper\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15\x61uthentication_methodB\t\n\x07wrapper\"\xc5\x01\n\x0e\x42igQueryConfig\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0ewrite_metadata\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13\x64rop_unknown_fields\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_table_schema\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xc6\x04\n\x12\x43loudStorageConfig\x12`\n\x0btext_config\x18\x04 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.TextConfigB\x03\xe0\x41\x01H\x00\x12`\n\x0b\x61vro_config\x18\x05 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.AvroConfigB\x03\xe0\x41\x01H\x00\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x66ilename_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66ilename_suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x66ilename_datetime_format\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0cmax_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tmax_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1a\x0c\n\nTextConfig\x1aH\n\nAvroConfig\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0f\n\routput_format\"\xa3\x01\n\x10MessageTransform\x12S\n\x0ejavascript_udf\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.JavaScriptUDFB\x03\xe0\x41\x01H\x00\x12\x16\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0b\n\ttransform\">\n\rJavaScriptUDF\x12\x1a\n\rfunction_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x85\x02\n)com.google.cloud.bigquery.analyticshub.v1B\x0bPubsubProtoP\x01ZMcloud.google.com/go/bigquery/analyticshub/apiv1/analyticshubpb;analyticshubpb\xaa\x02%Google.Cloud.BigQuery.AnalyticsHub.V1\xca\x02%Google\\Cloud\\BigQuery\\AnalyticsHub\\V1\xea\x02)Google::Cloud::Bigquery::AnalyticsHub::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - PubSubSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PubSubSubscription").msgclass - RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RetryPolicy").msgclass - DeadLetterPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeadLetterPolicy").msgclass - ExpirationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ExpirationPolicy").msgclass - PushConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig").msgclass - PushConfig::OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.OidcToken").msgclass - PushConfig::PubsubWrapper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.PubsubWrapper").msgclass - PushConfig::NoWrapper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.NoWrapper").msgclass - BigQueryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.BigQueryConfig").msgclass - CloudStorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig").msgclass - CloudStorageConfig::TextConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.TextConfig").msgclass - CloudStorageConfig::AvroConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.AvroConfig").msgclass - MessageTransform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.MessageTransform").msgclass - JavaScriptUDF = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.JavaScriptUDF").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md deleted file mode 100644 index 99ecfbc53cb9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Analytics Hub V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb deleted file mode 100644 index 981ea58df2f8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb +++ /dev/null @@ -1,1364 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - # A data exchange is a container that lets you share data. Along with the - # descriptive information about the data exchange, it contains listings that - # reference shared datasets. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the data exchange. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @!attribute [rw] display_name - # @return [::String] - # Required. Human-readable display name of the data exchange. The display - # name must contain only Unicode letters, numbers (0-9), underscores (_), - # dashes (-), spaces ( ), ampersands (&) and must not start or end with - # spaces. Default value is an empty string. Max length: 63 bytes. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the data exchange. The description must not - # contain Unicode non-characters as well as C0 and C1 control codes except - # tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). - # Default value is an empty string. - # Max length: 2000 bytes. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the primary point of contact of the data - # exchange. Max Length: 1000 bytes. - # @!attribute [rw] documentation - # @return [::String] - # Optional. Documentation describing the data exchange. - # @!attribute [r] listing_count - # @return [::Integer] - # Output only. Number of listings contained in the data exchange. - # @!attribute [rw] icon - # @return [::String] - # Optional. Base64 encoded image representing the data exchange. Max - # Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API - # only performs validation on size of the encoded data. Note: For byte - # fields, the content of the fields are base64-encoded (which increases the - # size of the data by 33-36%) when using JSON on the wire. - # @!attribute [rw] sharing_environment_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig] - # Optional. Configurable data sharing environment option for a data exchange. - # @!attribute [rw] discovery_type - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DiscoveryType] - # Optional. Type of discovery on the discovery page for all the listings - # under this exchange. Updating this field also updates (overwrites) the - # discovery_type field for all the listings under this exchange. - # @!attribute [rw] log_linked_dataset_query_user_email - # @return [::Boolean] - # Optional. By default, false. - # If true, the DataExchange has an email sharing mandate enabled. - class DataExchange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A query template is a container for sharing table-valued functions defined by - # contributors in a data clean room. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the QueryTemplate. - # e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/456` - # @!attribute [rw] display_name - # @return [::String] - # Required. Human-readable display name of the QueryTemplate. The display - # name must contain only Unicode letters, numbers (0-9), underscores (_), - # dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. - # Default value is an empty string. Max length: 63 bytes. - # @!attribute [rw] description - # @return [::String] - # Optional. Short description of the QueryTemplate. The description must not - # contain Unicode non-characters and C0 and C1 control codes except tabs - # (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default - # value is an empty string. Max length: 2000 bytes. - # @!attribute [rw] proposer - # @return [::String] - # Optional. Will be deprecated. - # Email or URL of the primary point of contact of the QueryTemplate. - # Max Length: 1000 bytes. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the primary point of contact of the - # QueryTemplate. Max Length: 1000 bytes. - # @!attribute [rw] documentation - # @return [::String] - # Optional. Documentation describing the QueryTemplate. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate::State] - # Output only. The QueryTemplate lifecycle state. - # @!attribute [rw] routine - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Routine] - # Optional. The routine associated with the QueryTemplate. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the QueryTemplate was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the QueryTemplate was last modified. - class QueryTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The QueryTemplate lifecycle state. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The QueryTemplate is in draft state. - DRAFTED = 1 - - # The QueryTemplate is in pending state. - PENDING = 2 - - # The QueryTemplate is in deleted state. - DELETED = 3 - - # The QueryTemplate is in approved state. - APPROVED = 4 - end - end - - # Represents a bigquery routine. - # @!attribute [rw] routine_type - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Routine::RoutineType] - # Required. The type of routine. - # @!attribute [rw] definition_body - # @return [::String] - # Optional. The definition body of the routine. - class Routine - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the type of a given routine. - module RoutineType - # Default value. - ROUTINE_TYPE_UNSPECIFIED = 0 - - # Non-built-in persistent TVF. - TABLE_VALUED_FUNCTION = 1 - end - end - - # Message for creating a QueryTemplate. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. - # @!attribute [rw] query_template_id - # @return [::String] - # Required. The ID of the QueryTemplate to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @!attribute [rw] query_template - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # Required. The QueryTemplate to create. - class CreateQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a QueryTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. The parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - class GetQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the list of QueryTemplates. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the QueryTemplates. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return in a single response - # page. Leverage the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token, returned by a previous call, to request the next page - # of results. - class ListQueryTemplatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the list of QueryTemplates. - # @!attribute [rw] query_templates - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] - # The list of QueryTemplates. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListQueryTemplatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a QueryTemplate. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask specifies the fields to update in the query template - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @!attribute [rw] query_template - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # Required. The QueryTemplate to update. - class UpdateQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a QueryTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - class DeleteQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for submitting a QueryTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - class SubmitQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for approving a QueryTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - class ApproveQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sharing environment is a behavior model for sharing data within a - # data exchange. This option is configurable for a data exchange. - # @!attribute [rw] default_exchange_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig::DefaultExchangeConfig] - # Default Analytics Hub data exchange, used for secured data sharing. - # - # Note: The following fields are mutually exclusive: `default_exchange_config`, `dcr_exchange_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] dcr_exchange_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig::DcrExchangeConfig] - # Data Clean Room (DCR), used for privacy-safe and secured data sharing. - # - # Note: The following fields are mutually exclusive: `dcr_exchange_config`, `default_exchange_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SharingEnvironmentConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Default Analytics Hub data exchange, used for secured data sharing. - class DefaultExchangeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Data Clean Room (DCR), used for privacy-safe and secured data sharing. - # @!attribute [r] single_selected_resource_sharing_restriction - # @return [::Boolean] - # Output only. If True, this DCR restricts the contributors to sharing - # only a single resource in a Listing. And no two resources should have the - # same IDs. So if a contributor adds a view with a conflicting name, the - # CreateListing API will reject the request. if False, the data contributor - # can publish an entire dataset (as before). This is not configurable, and - # by default, all new DCRs will have the restriction set to True. - # @!attribute [r] single_linked_dataset_per_cleanroom - # @return [::Boolean] - # Output only. If True, when subscribing to this DCR, it will create only - # one linked dataset containing all resources shared within the - # cleanroom. If False, when subscribing to this DCR, it will - # create 1 linked dataset per listing. This is not configurable, and by - # default, all new DCRs will have the restriction set to True. - class DcrExchangeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Contains details of the data provider. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the data provider. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the data provider. - # Max Length: 1000 bytes. - class DataProvider - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains details of the listing publisher. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the listing publisher. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the listing publisher. - # Max Length: 1000 bytes. - class Publisher - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] dataset_id - # @return [::String] - # Required. A unique ID for this dataset, without the project name. The ID - # must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - # The maximum length is 1,024 characters. - # @!attribute [rw] project_id - # @return [::String] - # Required. The ID of the project containing this dataset. - class DestinationDatasetReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the destination bigquery dataset. - # @!attribute [rw] dataset_reference - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDatasetReference] - # Required. A reference that identifies the destination dataset. - # @!attribute [rw] friendly_name - # @return [::Google::Protobuf::StringValue] - # Optional. A descriptive name for the dataset. - # @!attribute [rw] description - # @return [::Google::Protobuf::StringValue] - # Optional. A user-friendly description of the dataset. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels associated with this dataset. You can use these - # to organize and group your datasets. - # You can set this property when inserting or updating a dataset. - # See https://cloud.google.com/resource-manager/docs/creating-managing-labels - # for more information. - # @!attribute [rw] location - # @return [::String] - # Required. The geographic location where the dataset should reside. See - # https://cloud.google.com/bigquery/docs/locations for supported - # locations. - # @!attribute [rw] replica_locations - # @return [::Array<::String>] - # Optional. The geographic locations where the dataset should be replicated. - # See [BigQuery locations](https://cloud.google.com/bigquery/docs/locations) - # for supported locations. - class DestinationDataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Defines the destination Pub/Sub subscription. - # @!attribute [rw] pubsub_subscription - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PubSubSubscription] - # Required. Destination Pub/Sub subscription resource. - class DestinationPubSubSubscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A listing is what gets published into a data exchange that a subscriber can - # subscribe to. It contains a reference to the data source along with - # descriptive information that will help subscribers find and subscribe the - # data. - # @!attribute [rw] bigquery_dataset - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource] - # Shared dataset i.e. BigQuery dataset source. - # - # Note: The following fields are mutually exclusive: `bigquery_dataset`, `pubsub_topic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pubsub_topic - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::PubSubTopicSource] - # Pub/Sub topic source. - # - # Note: The following fields are mutually exclusive: `pubsub_topic`, `bigquery_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456` - # @!attribute [rw] display_name - # @return [::String] - # Required. Human-readable display name of the listing. The display name must - # contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - # spaces ( ), ampersands (&) and can't start or end with spaces. Default - # value is an empty string. Max length: 63 bytes. - # @!attribute [rw] description - # @return [::String] - # Optional. Short description of the listing. The description must not - # contain Unicode non-characters and C0 and C1 control codes except tabs - # (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default - # value is an empty string. Max length: 2000 bytes. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the primary point of contact of the listing. - # Max Length: 1000 bytes. - # @!attribute [rw] documentation - # @return [::String] - # Optional. Documentation describing the listing. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::State] - # Output only. Current state of the listing. - # @!attribute [rw] icon - # @return [::String] - # Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - # Expected image dimensions are 512x512 pixels, however the API only - # performs validation on size of the encoded data. - # Note: For byte fields, the contents of the field are base64-encoded (which - # increases the size of the data by 33-36%) when using JSON on the wire. - # @!attribute [rw] data_provider - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataProvider] - # Optional. Details of the data provider who owns the source data. - # @!attribute [rw] categories - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::Category>] - # Optional. Categories of the listing. Up to five categories are allowed. - # @!attribute [rw] publisher - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Publisher] - # Optional. Details of the publisher who owns the listing and who can share - # the source data. - # @!attribute [rw] request_access - # @return [::String] - # Optional. Email or URL of the request access of the listing. - # Subscribers can use this reference to request access. - # Max Length: 1000 bytes. - # @!attribute [rw] restricted_export_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::RestrictedExportConfig] - # Optional. If set, restricted export configuration will be propagated and - # enforced on the linked dataset. - # @!attribute [rw] stored_procedure_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::StoredProcedureConfig] - # Optional. If set, stored procedure configuration will be propagated and - # enforced on the linked dataset. - # @!attribute [rw] discovery_type - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DiscoveryType] - # Optional. Type of discovery of the listing on the discovery page. - # @!attribute [r] resource_type - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharedResourceType] - # Output only. Listing shared asset type. - # @!attribute [r] commercial_info - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo] - # Output only. Commercial info contains the information about the commercial - # data products associated with the listing. - # @!attribute [rw] log_linked_dataset_query_user_email - # @return [::Boolean] - # Optional. By default, false. - # If true, the Listing has an email sharing mandate enabled. - # @!attribute [rw] allow_only_metadata_sharing - # @return [::Boolean] - # Optional. If true, the listing is only available to get the resource - # metadata. Listing is non subscribable. - class Listing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A reference to a shared dataset. It is an existing BigQuery dataset with a - # collection of objects such as tables and views that you want to share - # with subscribers. - # When subscriber's subscribe to a listing, Analytics Hub creates a linked - # dataset in - # the subscriber's project. A Linked dataset is an opaque, read-only BigQuery - # dataset that serves as a _symbolic link_ to a shared dataset. - # @!attribute [rw] dataset - # @return [::String] - # Optional. Resource name of the dataset source for this listing. - # e.g. `projects/myproject/datasets/123` - # @!attribute [rw] selected_resources - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::SelectedResource>] - # Optional. Resource in this dataset that is selectively shared. - # This field is required for data clean room exchanges. - # @!attribute [rw] restricted_export_policy - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::RestrictedExportPolicy] - # Optional. If set, restricted export policy will be propagated and - # enforced on the linked dataset. - # @!attribute [rw] replica_locations - # @return [::Array<::String>] - # Optional. A list of regions where the publisher has created shared - # dataset replicas. - # @!attribute [r] effective_replicas - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica>] - # Output only. Server-owned effective state of replicas. - # Contains both primary and secondary replicas. - # Each replica includes a system-computed (output-only) state and primary - # designation. - class BigQueryDatasetSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Resource in this dataset that is selectively shared. - # @!attribute [rw] table - # @return [::String] - # Optional. Format: - # For table: - # `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` - # Example:"projects/test_project/datasets/test_dataset/tables/test_table" - # - # Note: The following fields are mutually exclusive: `table`, `routine`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] routine - # @return [::String] - # Optional. Format: - # For routine: - # `projects/{projectId}/datasets/{datasetId}/routines/{routineId}` - # Example:"projects/test_project/datasets/test_dataset/routines/test_routine" - # - # Note: The following fields are mutually exclusive: `routine`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SelectedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Restricted export policy used to configure restricted export on linked - # dataset. - # @!attribute [rw] enabled - # @return [::Google::Protobuf::BoolValue] - # Optional. If true, enable restricted export. - # @!attribute [rw] restrict_direct_table_access - # @return [::Google::Protobuf::BoolValue] - # Optional. If true, restrict direct table access (read - # api/tabledata.list) on linked table. - # @!attribute [rw] restrict_query_result - # @return [::Google::Protobuf::BoolValue] - # Optional. If true, restrict export of query result derived from - # restricted linked dataset table. - class RestrictedExportPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the state of a replica of a shared dataset. - # It includes the geographic location of the replica and - # system-computed, output-only fields indicating its replication state and - # whether it is the primary replica. - # @!attribute [r] location - # @return [::String] - # Output only. The geographic location where the replica resides. See - # [BigQuery locations](https://cloud.google.com/bigquery/docs/locations) - # for supported locations. Eg. "us-central1". - # @!attribute [r] replica_state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica::ReplicaState] - # Output only. Assigned by Analytics Hub based on real BigQuery - # replication state. - # @!attribute [r] primary_state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica::PrimaryState] - # Output only. Indicates that this replica is the primary replica. - class Replica - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Replica state of the shared dataset. - module ReplicaState - # Default value. This value is unused. - REPLICA_STATE_UNSPECIFIED = 0 - - # The replica is backfilled and ready to use. - READY_TO_USE = 1 - - # The replica is unavailable, does not exist, or has not been - # backfilled yet. - UNAVAILABLE = 2 - end - - # Primary state of the replica. Set only for the primary replica. - module PrimaryState - # Default value. This value is unused. - PRIMARY_STATE_UNSPECIFIED = 0 - - # The replica is the primary replica. - PRIMARY_REPLICA = 1 - end - end - end - - # Pub/Sub topic source. - # @!attribute [rw] topic - # @return [::String] - # Required. Resource name of the Pub/Sub topic source for this listing. - # e.g. projects/myproject/topics/topicId - # @!attribute [rw] data_affinity_regions - # @return [::Array<::String>] - # Optional. Region hint on where the data might be published. Data affinity - # regions are modifiable. See https://cloud.google.com/about/locations for - # full listing of possible Cloud regions. - class PubSubTopicSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Restricted export config, used to configure restricted export on linked - # dataset. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. If true, enable restricted export. - # @!attribute [r] restrict_direct_table_access - # @return [::Boolean] - # Output only. If true, restrict direct table access(read - # api/tabledata.list) on linked table. - # @!attribute [rw] restrict_query_result - # @return [::Boolean] - # Optional. If true, restrict export of query result derived from - # restricted linked dataset table. - class RestrictedExportConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Commercial info contains the information about the commercial data products - # associated with the listing. - # @!attribute [r] cloud_marketplace - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo::GoogleCloudMarketplaceInfo] - # Output only. Details of the Marketplace Data Product associated with the - # Listing. - class CommercialInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the details of the Marketplace Data Product associated with the - # Listing. - # @!attribute [r] service - # @return [::String] - # Output only. Resource name of the commercial service associated with - # the Marketplace Data Product. e.g. example.com - # @!attribute [r] commercial_state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo::GoogleCloudMarketplaceInfo::CommercialState] - # Output only. Commercial state of the Marketplace Data Product. - class GoogleCloudMarketplaceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates whether this commercial access is currently active. - module CommercialState - # Commercialization is incomplete and cannot be used. - COMMERCIAL_STATE_UNSPECIFIED = 0 - - # Commercialization has been initialized. - ONBOARDING = 1 - - # Commercialization is complete and available for use. - ACTIVE = 2 - end - end - end - - # State of the listing. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # Subscribable state. Users with dataexchange.listings.subscribe permission - # can subscribe to this listing. - ACTIVE = 1 - end - - # Listing categories. - module Category - CATEGORY_UNSPECIFIED = 0 - - CATEGORY_OTHERS = 1 - - CATEGORY_ADVERTISING_AND_MARKETING = 2 - - CATEGORY_COMMERCE = 3 - - CATEGORY_CLIMATE_AND_ENVIRONMENT = 4 - - CATEGORY_DEMOGRAPHICS = 5 - - CATEGORY_ECONOMICS = 6 - - CATEGORY_EDUCATION = 7 - - CATEGORY_ENERGY = 8 - - CATEGORY_FINANCIAL = 9 - - CATEGORY_GAMING = 10 - - CATEGORY_GEOSPATIAL = 11 - - CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12 - - CATEGORY_MEDIA = 13 - - CATEGORY_PUBLIC_SECTOR = 14 - - CATEGORY_RETAIL = 15 - - CATEGORY_SPORTS = 16 - - CATEGORY_SCIENCE_AND_RESEARCH = 17 - - CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18 - - CATEGORY_TRAVEL_AND_TOURISM = 19 - - CATEGORY_GOOGLE_EARTH_ENGINE = 20 - end - end - - # Stored procedure configuration, used to configure stored procedure sharing - # on linked dataset. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. If true, enable sharing of stored procedure. - # @!attribute [r] allowed_stored_procedure_types - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::StoredProcedureConfig::StoredProcedureType>] - # Output only. Types of stored procedure supported to share. - class StoredProcedureConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum to specify the type of stored procedure to share. - module StoredProcedureType - # Default value. This value is unused. - STORED_PROCEDURE_TYPE_UNSPECIFIED = 0 - - # SQL stored procedure. - SQL_PROCEDURE = 1 - end - end - - # A subscription represents a subscribers' access to a particular set of - # published data. It contains references to associated listings, - # data exchanges, and linked datasets. - # @!attribute [r] listing - # @return [::String] - # Output only. Resource name of the source Listing. - # e.g. projects/123/locations/us/dataExchanges/456/listings/789 - # - # Note: The following fields are mutually exclusive: `listing`, `data_exchange`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_exchange - # @return [::String] - # Output only. Resource name of the source Data Exchange. - # e.g. projects/123/locations/us/dataExchanges/456 - # - # Note: The following fields are mutually exclusive: `data_exchange`, `listing`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the subscription. - # e.g. `projects/myproject/locations/us/subscriptions/123`. - # @!attribute [r] creation_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the subscription was created. - # @!attribute [r] last_modify_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the subscription was last modified. - # @!attribute [r] organization_id - # @return [::String] - # Output only. Organization of the project this subscription belongs to. - # @!attribute [r] organization_display_name - # @return [::String] - # Output only. Display name of the project of this subscription. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::State] - # Output only. Current state of the subscription. - # @!attribute [r] linked_dataset_map - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource}] - # Output only. Map of listing resource names to associated linked resource, - # e.g. projects/123/locations/us/dataExchanges/456/listings/789 - # -> - # projects/123/datasets/my_dataset - # - # For listing-level subscriptions, this is a map of size 1. - # Only contains values if state == STATE_ACTIVE. - # @!attribute [r] subscriber_contact - # @return [::String] - # Output only. Email of the subscriber. - # @!attribute [r] linked_resources - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource>] - # Output only. Linked resources created in the subscription. Only contains - # values if state = STATE_ACTIVE. - # @!attribute [r] resource_type - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharedResourceType] - # Output only. Listing shared asset type. - # @!attribute [r] commercial_info - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::CommercialInfo] - # Output only. This is set if this is a commercial subscription i.e. if this - # subscription was created from subscribing to a commercial listing. - # @!attribute [r] log_linked_dataset_query_user_email - # @return [::Boolean] - # Output only. By default, false. - # If true, the Subscriber agreed to the email sharing mandate - # that is enabled for DataExchange/Listing. - # @!attribute [rw] destination_dataset - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] - # Optional. BigQuery destination dataset to create for the subscriber. - class Subscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reference to a linked resource tracked by this Subscription. - # @!attribute [r] linked_dataset - # @return [::String] - # Output only. Name of the linked dataset, e.g. - # projects/subscriberproject/datasets/linked_dataset - # - # Note: The following fields are mutually exclusive: `linked_dataset`, `linked_pubsub_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] linked_pubsub_subscription - # @return [::String] - # Output only. Name of the Pub/Sub subscription, e.g. - # projects/subscriberproject/subscriptions/subscriptions/sub_id - # - # Note: The following fields are mutually exclusive: `linked_pubsub_subscription`, `linked_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] listing - # @return [::String] - # Output only. Listing for which linked resource is created. - class LinkedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Commercial info metadata for this subscription. - # @!attribute [r] cloud_marketplace - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::CommercialInfo::GoogleCloudMarketplaceInfo] - # Output only. This is set when the subscription is commercialised via - # Cloud Marketplace. - class CommercialInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Cloud Marketplace commercial metadata for this subscription. - # @!attribute [rw] order - # @return [::String] - # Resource name of the Marketplace Order. - class GoogleCloudMarketplaceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource] - class LinkedDatasetMapEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State of the subscription. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # This subscription is active and the data is accessible. - STATE_ACTIVE = 1 - - # The data referenced by this subscription is out of date and should be - # refreshed. This can happen when a data provider adds or removes datasets. - STATE_STALE = 2 - - # This subscription has been cancelled or revoked and the data is no longer - # accessible. - STATE_INACTIVE = 3 - end - end - - # Message for requesting the list of data exchanges. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the data exchanges. - # e.g. `projects/myproject/locations/us`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call, to request the next page of - # results. - class ListDataExchangesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the list of data exchanges. - # @!attribute [rw] data_exchanges - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # The list of data exchanges. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListDataExchangesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the list of data exchanges from projects in an - # organization and location. - # @!attribute [rw] organization - # @return [::String] - # Required. The organization resource path of the projects containing - # DataExchanges. e.g. `organizations/myorg/locations/us`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call, to request the next page of - # results. - class ListOrgDataExchangesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing data exchanges in an organization and - # location. - # @!attribute [rw] data_exchanges - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # The list of data exchanges. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListOrgDataExchangesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a data exchange. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data exchange. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - class GetDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a data exchange. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the data exchange. - # e.g. `projects/myproject/locations/us`. - # @!attribute [rw] data_exchange_id - # @return [::String] - # Required. The ID of the data exchange. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @!attribute [rw] data_exchange - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # Required. The data exchange to create. - class CreateDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a data exchange. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask specifies the fields to update in the data exchange - # resource. The fields specified in the - # `updateMask` are relative to the resource and are not a full request. - # @!attribute [rw] data_exchange - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # Required. The data exchange to update. - class UpdateDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a data exchange. - # @!attribute [rw] name - # @return [::String] - # Required. The full name of the data exchange resource that you want to - # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. - class DeleteDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the list of listings. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call, to request the next page of - # results. - class ListListingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the list of Listings. - # @!attribute [rw] listings - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] - # The list of Listing. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListListingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a listing. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - class GetListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a listing. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @!attribute [rw] listing_id - # @return [::String] - # Required. The ID of the listing to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @!attribute [rw] listing - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # Required. The listing to create. - class CreateListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a Listing. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask specifies the fields to update in the listing - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @!attribute [rw] listing - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # Required. The listing to update. - class UpdateListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a listing. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the listing to delete. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # @!attribute [rw] delete_commercial - # @return [::Boolean] - # Optional. If the listing is commercial then this field must be set to true, - # otherwise a failure is thrown. This acts as a safety guard to avoid - # deleting commercial listings accidentally. - class DeleteListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for subscribing to a listing. - # @!attribute [rw] destination_dataset - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] - # Input only. BigQuery destination dataset to create for the subscriber. - # - # Note: The following fields are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] destination_pubsub_subscription - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription] - # Input only. Destination Pub/Sub subscription to create for the - # subscriber. - # - # Note: The following fields are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the listing that you want to subscribe to. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - class SubscribeListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response when you subscribe to a listing. - # @!attribute [rw] subscription - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # Subscription object created from this subscribe action. - class SubscribeListingResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for subscribing to a Data Exchange. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the Data Exchange. - # e.g. `projects/publisherproject/locations/us/dataExchanges/123` - # @!attribute [rw] destination - # @return [::String] - # Required. The parent resource path of the Subscription. - # e.g. `projects/subscriberproject/locations/us` - # @!attribute [rw] destination_dataset - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] - # Optional. BigQuery destination dataset to create for the subscriber. - # @!attribute [rw] subscription - # @return [::String] - # Required. Name of the subscription to create. - # e.g. `subscription1` - # @!attribute [rw] subscriber_contact - # @return [::String] - # Email of the subscriber. - class SubscribeDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response when you subscribe to a Data Exchange. - # @!attribute [rw] subscription - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # Subscription object created from this subscribe action. - class SubscribeDataExchangeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for refreshing a subscription. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the Subscription to refresh. - # e.g. `projects/subscriberproject/locations/us/subscriptions/123` - class RefreshSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response when you refresh a subscription. - # @!attribute [rw] subscription - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # The refreshed subscription resource. - class RefreshSubscriptionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a subscription. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the subscription. - # e.g. projects/123/locations/us/subscriptions/456 - class GetSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for listing subscriptions. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the subscription. - # e.g. projects/myproject/locations/us - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. Eligible - # fields for filtering are: - # - # + `listing` - # + `data_exchange` - # - # Alternatively, a literal wrapped in double quotes may be provided. - # This will be checked for an exact match against both fields above. - # - # In all cases, the full Data Exchange or Listing resource name must - # be provided. Some example of using filters: - # - # + data_exchange="projects/myproject/locations/us/dataExchanges/123" - # + listing="projects/123/locations/us/dataExchanges/456/listings/789" - # + "projects/myproject/locations/us/dataExchanges/123" - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call. - class ListSubscriptionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the listing of subscriptions. - # @!attribute [rw] subscriptions - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # The list of subscriptions. - # @!attribute [rw] next_page_token - # @return [::String] - # Next page token. - class ListSubscriptionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for listing subscriptions of a shared resource. - # @!attribute [rw] resource - # @return [::String] - # Required. Resource name of the requested target. This resource may be - # either a Listing or a DataExchange. e.g. - # projects/123/locations/us/dataExchanges/456 OR e.g. - # projects/123/locations/us/dataExchanges/456/listings/789 - # @!attribute [rw] include_deleted_subscriptions - # @return [::Boolean] - # If selected, includes deleted subscriptions in the response - # (up to 63 days after deletion). - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call. - class ListSharedResourceSubscriptionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the listing of shared resource subscriptions. - # @!attribute [rw] shared_resource_subscriptions - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # The list of subscriptions. - # @!attribute [rw] next_page_token - # @return [::String] - # Next page token. - class ListSharedResourceSubscriptionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for revoking a subscription. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the subscription to revoke. - # e.g. projects/123/locations/us/subscriptions/456 - # @!attribute [rw] revoke_commercial - # @return [::Boolean] - # Optional. If the subscription is commercial then this field must be set to - # true, otherwise a failure is thrown. This acts as a safety guard to avoid - # revoking commercial subscriptions accidentally. - class RevokeSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response when you revoke a subscription. - # Empty for now. - class RevokeSubscriptionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a subscription. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the subscription to delete. - # e.g. projects/123/locations/us/subscriptions/456 - class DeleteSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of a long-running operation in Analytics Hub. - # @!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 - - # Specifies the type of discovery on the discovery page. Note that - # this does not control the visibility of the exchange/listing which is - # defined by IAM permission. - module DiscoveryType - # Unspecified. Defaults to DISCOVERY_TYPE_PRIVATE. - DISCOVERY_TYPE_UNSPECIFIED = 0 - - # The Data exchange/listing can be discovered in the 'Private' results - # list. - DISCOVERY_TYPE_PRIVATE = 1 - - # The Data exchange/listing can be discovered in the 'Public' results - # list. - DISCOVERY_TYPE_PUBLIC = 2 - end - - # The underlying shared asset type shared in a listing by a publisher. - module SharedResourceType - # Not specified. - SHARED_RESOURCE_TYPE_UNSPECIFIED = 0 - - # BigQuery Dataset Asset. - BIGQUERY_DATASET = 1 - - # Pub/Sub Topic Asset. - PUBSUB_TOPIC = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb deleted file mode 100644 index e75b3b67c28e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb +++ /dev/null @@ -1,559 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - # Defines the destination Pub/Sub subscription. - # If none of `push_config`, `bigquery_config`, `cloud_storage_config`, - # `pubsub_export_config`, or `pubsublite_export_config` - # is set, then the subscriber will pull and ack messages using API methods. At - # most one of these fields may be set. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the subscription. - # Format is `projects/{project}/subscriptions/{sub}`. - # @!attribute [rw] push_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig] - # Optional. If push delivery is used with this subscription, this field is - # used to configure it. - # @!attribute [rw] bigquery_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::BigQueryConfig] - # Optional. If delivery to BigQuery is used with this subscription, this - # field is used to configure it. - # @!attribute [rw] cloud_storage_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig] - # Optional. If delivery to Google Cloud Storage is used with this - # subscription, this field is used to configure it. - # @!attribute [rw] ack_deadline_seconds - # @return [::Integer] - # Optional. The approximate amount of time (on a best-effort basis) Pub/Sub - # waits for the subscriber to acknowledge receipt before resending the - # message. In the interval after the message is delivered and before it is - # acknowledged, it is considered to be _outstanding_. During that time - # period, the message will not be redelivered (on a best-effort basis). - # - # For pull subscriptions, this value is used as the initial value for the ack - # deadline. To override this value for a given message, call - # `ModifyAckDeadline` with the corresponding `ack_id` if using - # non-streaming pull or send the `ack_id` in a - # `StreamingModifyAckDeadlineRequest` if using streaming pull. - # The minimum custom deadline you can specify is 10 seconds. - # The maximum custom deadline you can specify is 600 seconds (10 minutes). - # If this parameter is 0, a default value of 10 seconds is used. - # - # For push delivery, this value is also used to set the request timeout for - # the call to the push endpoint. - # - # If the subscriber never acknowledges the message, the Pub/Sub - # system will eventually redeliver the message. - # @!attribute [rw] retain_acked_messages - # @return [::Boolean] - # Optional. Indicates whether to retain acknowledged messages. If true, then - # messages are not expunged from the subscription's backlog, even if they are - # acknowledged, until they fall out of the `message_retention_duration` - # window. This must be true if you would like to [`Seek` to a timestamp] - # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in - # the past to replay previously-acknowledged messages. - # @!attribute [rw] message_retention_duration - # @return [::Google::Protobuf::Duration] - # Optional. How long to retain unacknowledged messages in the subscription's - # backlog, from the moment a message is published. If `retain_acked_messages` - # is true, then this also configures the retention of acknowledged messages, - # and thus configures how far back in time a `Seek` can be done. Defaults to - # 7 days. Cannot be more than 31 days or less than 10 minutes. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. See [Creating and managing - # labels](https://cloud.google.com/pubsub/docs/labels). - # @!attribute [rw] enable_message_ordering - # @return [::Boolean] - # Optional. If true, messages published with the same `ordering_key` in - # `PubsubMessage` will be delivered to the subscribers in the order in which - # they are received by the Pub/Sub system. Otherwise, they may be delivered - # in any order. - # @!attribute [rw] expiration_policy - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ExpirationPolicy] - # Optional. A policy that specifies the conditions for this subscription's - # expiration. A subscription is considered active as long as any connected - # subscriber is successfully consuming messages from the subscription or is - # issuing operations on the subscription. If `expiration_policy` is not set, - # a *default policy* with `ttl` of 31 days will be used. The minimum allowed - # value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set, - # but `expiration_policy.ttl` is not set, the subscription never expires. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression written in the Pub/Sub [filter - # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, - # then only `PubsubMessage`s whose `attributes` field matches the filter are - # delivered on this subscription. If empty, then no messages are filtered - # out. - # @!attribute [rw] dead_letter_policy - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeadLetterPolicy] - # Optional. A policy that specifies the conditions for dead lettering - # messages in this subscription. If dead_letter_policy is not set, dead - # lettering is disabled. - # - # The Pub/Sub service account associated with this subscriptions's - # parent project (i.e., - # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have - # permission to Acknowledge() messages on this subscription. - # @!attribute [rw] retry_policy - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RetryPolicy] - # Optional. A policy that specifies how Pub/Sub retries message delivery for - # this subscription. - # - # If not set, the default retry policy is applied. This generally implies - # that messages will be retried as soon as possible for healthy subscribers. - # RetryPolicy will be triggered on NACKs or acknowledgement deadline - # exceeded events for a given message. - # @!attribute [rw] detached - # @return [::Boolean] - # Optional. Indicates whether the subscription is detached from its topic. - # Detached subscriptions don't receive messages from their topic and don't - # retain any backlog. `Pull` and `StreamingPull` requests will return - # FAILED_PRECONDITION. If the subscription is a push subscription, pushes to - # the endpoint will not be made. - # @!attribute [rw] enable_exactly_once_delivery - # @return [::Boolean] - # Optional. If true, Pub/Sub provides the following guarantees for the - # delivery of a message with a given value of `message_id` on this - # subscription: - # - # * The message sent to a subscriber is guaranteed not to be resent - # before the message's acknowledgement deadline expires. - # * An acknowledged message will not be resent to a subscriber. - # - # Note that subscribers may still receive multiple copies of a message - # when `enable_exactly_once_delivery` is true if the message was published - # multiple times by a publisher client. These copies are considered distinct - # by Pub/Sub and have distinct `message_id` values. - # @!attribute [rw] message_transforms - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::MessageTransform>] - # Optional. Transforms to be applied to messages before they are delivered to - # subscribers. Transforms are applied in the order specified. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tag keys/values directly bound to this - # resource. For example: - # "123/environment": "production", - # "123/costCenter": "marketing" - class PubSubSubscription - 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 TagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A policy that specifies how Pub/Sub retries message delivery. - # - # Retry delay will be exponential based on provided minimum and maximum - # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. - # - # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded - # events for a given message. - # - # Retry Policy is implemented on a best effort basis. At times, the delay - # between consecutive deliveries may not match the configuration. That is, - # delay can be more or less than configured backoff. - # @!attribute [rw] minimum_backoff - # @return [::Google::Protobuf::Duration] - # Optional. The minimum delay between consecutive deliveries of a given - # message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. - # @!attribute [rw] maximum_backoff - # @return [::Google::Protobuf::Duration] - # Optional. The maximum delay between consecutive deliveries of a given - # message. Value should be between 0 and 600 seconds. Defaults to 600 - # seconds. - class RetryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dead lettering is done on a best effort basis. The same message might be - # dead lettered multiple times. - # - # If validation on any of the fields fails at subscription creation/updation, - # the create/update subscription request will fail. - # @!attribute [rw] dead_letter_topic - # @return [::String] - # Optional. The name of the topic to which dead letter messages should be - # published. Format is `projects/{project}/topics/{topic}`.The Pub/Sub - # service account associated with the enclosing subscription's parent project - # (i.e., service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must - # have permission to Publish() to this topic. - # - # The operation will fail if the topic does not exist. - # Users should ensure that there is a subscription attached to this topic - # since messages published to a topic with no subscriptions are lost. - # @!attribute [rw] max_delivery_attempts - # @return [::Integer] - # Optional. The maximum number of delivery attempts for any message. The - # value must be between 5 and 100. - # - # The number of delivery attempts is defined as 1 + (the sum of number of - # NACKs and number of times the acknowledgement deadline has been exceeded - # for the message). - # - # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that - # client libraries may automatically extend ack_deadlines. - # - # This field will be honored on a best effort basis. - # - # If this parameter is 0, a default value of 5 is used. - class DeadLetterPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A policy that specifies the conditions for resource expiration (i.e., - # automatic resource deletion). - # @!attribute [rw] ttl - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the "time-to-live" duration for an associated resource. - # The resource expires if it is not active for a period of `ttl`. The - # definition of "activity" depends on the type of the associated resource. - # The minimum and maximum allowed values for `ttl` depend on the type of the - # associated resource, as well. If `ttl` is not set, the associated resource - # never expires. - class ExpirationPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a push delivery endpoint. - # @!attribute [rw] oidc_token - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::OidcToken] - # Optional. If specified, Pub/Sub will generate and attach an OIDC JWT - # token as an `Authorization` header in the HTTP request for every pushed - # message. - # @!attribute [rw] pubsub_wrapper - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::PubsubWrapper] - # Optional. When set, the payload to the push endpoint is in the form of - # the JSON representation of a PubsubMessage - # (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). - # - # Note: The following fields are mutually exclusive: `pubsub_wrapper`, `no_wrapper`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] no_wrapper - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::NoWrapper] - # Optional. When set, the payload to the push endpoint is not wrapped. - # - # Note: The following fields are mutually exclusive: `no_wrapper`, `pubsub_wrapper`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] push_endpoint - # @return [::String] - # Optional. A URL locating the endpoint to which messages should be pushed. - # For example, a Webhook endpoint might use `https://example.com/push`. - # @!attribute [rw] attributes - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Endpoint configuration attributes that can be used to control - # different aspects of the message delivery. - # - # The only currently supported attribute is `x-goog-version`, which you can - # use to change the format of the pushed message. This attribute - # indicates the version of the data expected by the endpoint. This - # controls the shape of the pushed message (i.e., its fields and metadata). - # - # If not present during the `CreateSubscription` call, it will default to - # the version of the Pub/Sub API used to make such call. If not present in a - # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` - # calls will always return a valid version, even if the subscription was - # created without this attribute. - # - # The only supported values for the `x-goog-version` attribute are: - # - # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. - # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. - # - # For example: - # `attributes { "x-goog-version": "v1" }` - class PushConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains information needed for generating an - # [OpenID Connect - # token](https://developers.google.com/identity/protocols/OpenIDConnect). - # @!attribute [rw] service_account_email - # @return [::String] - # Optional. [Service account - # email](https://cloud.google.com/iam/docs/service-accounts) - # used for generating the OIDC token. For more information - # on setting up authentication, see - # [Push subscriptions](https://cloud.google.com/pubsub/docs/push). - # @!attribute [rw] audience - # @return [::String] - # Optional. Audience to be used when generating OIDC token. The audience - # claim identifies the recipients that the JWT is intended for. The - # audience value is a single case-sensitive string. Having multiple values - # (array) for the audience field is not supported. More info about the OIDC - # JWT token audience here: - # https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, - # the Push endpoint URL will be used. - class OidcToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The payload to the push endpoint is in the form of the JSON representation - # of a PubsubMessage - # (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). - class PubsubWrapper - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sets the `data` field as the HTTP body for delivery. - # @!attribute [rw] write_metadata - # @return [::Boolean] - # Optional. When true, writes the Pub/Sub message metadata to - # `x-goog-pubsub-:` headers of the HTTP request. Writes the - # Pub/Sub message attributes to `:` headers of the HTTP request. - class NoWrapper - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AttributesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for a BigQuery subscription. - # @!attribute [rw] table - # @return [::String] - # Optional. The name of the table to which to write data, of the form - # \\{projectId}.\\{datasetId}.\\{tableId} - # @!attribute [rw] use_topic_schema - # @return [::Boolean] - # Optional. When true, use the topic's schema as the columns to write to in - # BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be - # enabled at the same time. - # @!attribute [rw] write_metadata - # @return [::Boolean] - # Optional. When true, write the subscription name, message_id, publish_time, - # attributes, and ordering_key to additional columns in the table. The - # subscription name, message_id, and publish_time fields are put in their own - # columns while all other message properties (other than data) are written to - # a JSON object in the attributes column. - # @!attribute [rw] drop_unknown_fields - # @return [::Boolean] - # Optional. When true and use_topic_schema is true, any fields that are a - # part of the topic schema that are not part of the BigQuery table schema are - # dropped when writing to BigQuery. Otherwise, the schemas must be kept in - # sync and any messages with extra fields are not written and remain in the - # subscription's backlog. - # @!attribute [rw] use_table_schema - # @return [::Boolean] - # Optional. When true, use the BigQuery table's schema as the columns to - # write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be - # enabled at the same time. - # @!attribute [rw] service_account_email - # @return [::String] - # Optional. The service account to use to write to BigQuery. The subscription - # creator or updater that specifies this field must have - # `iam.serviceAccounts.actAs` permission on the service account. If not - # specified, the Pub/Sub [service - # agent](https://cloud.google.com/iam/docs/service-agents), - # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. - class BigQueryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a Cloud Storage subscription. - # @!attribute [rw] text_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig::TextConfig] - # Optional. If set, message data will be written to Cloud Storage in text - # format. - # - # Note: The following fields are mutually exclusive: `text_config`, `avro_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] avro_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig::AvroConfig] - # Optional. If set, message data will be written to Cloud Storage in Avro - # format. - # - # Note: The following fields are mutually exclusive: `avro_config`, `text_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bucket - # @return [::String] - # Required. User-provided name for the Cloud Storage bucket. - # The bucket must be created by the user. The bucket name must be without - # any prefix like "gs://". See the [bucket naming - # requirements] (https://cloud.google.com/storage/docs/buckets#naming). - # @!attribute [rw] filename_prefix - # @return [::String] - # Optional. User-provided prefix for Cloud Storage filename. See the [object - # naming requirements](https://cloud.google.com/storage/docs/objects#naming). - # @!attribute [rw] filename_suffix - # @return [::String] - # Optional. User-provided suffix for Cloud Storage filename. See the [object - # naming requirements](https://cloud.google.com/storage/docs/objects#naming). - # Must not end in "/". - # @!attribute [rw] filename_datetime_format - # @return [::String] - # Optional. User-provided format string specifying how to represent datetimes - # in Cloud Storage filenames. See the [datetime format - # guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names). - # @!attribute [rw] max_duration - # @return [::Google::Protobuf::Duration] - # Optional. File batching settings. - # If no max_duration setting is specified, a max_duration of 5 minutes will - # be set by default. max_duration is required regardless of whether other - # file batching settings are specified. - # - # The maximum duration that can elapse before a new Cloud Storage file is - # created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed - # the subscription's acknowledgement deadline. - # @!attribute [rw] max_bytes - # @return [::Integer] - # Optional. The maximum bytes that can be written to a Cloud Storage file - # before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may - # be exceeded in cases where messages are larger than the limit. - # @!attribute [rw] max_messages - # @return [::Integer] - # Optional. The maximum number of messages that can be written to a Cloud - # Storage file before a new file is created. Min 1000 messages. - # @!attribute [rw] service_account_email - # @return [::String] - # Optional. The service account to use to write to Cloud Storage. The - # subscription creator or updater that specifies this field must have - # `iam.serviceAccounts.actAs` permission on the service account. If not - # specified, the Pub/Sub - # [service agent](https://cloud.google.com/iam/docs/service-agents), - # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. - class CloudStorageConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for writing message data in text format. - # Message payloads will be written to files as raw text, separated by a - # newline. - class TextConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for writing message data in Avro format. - # Message payloads and metadata will be written to files as an Avro binary. - # @!attribute [rw] write_metadata - # @return [::Boolean] - # Optional. When true, write the subscription name, message_id, - # publish_time, attributes, and ordering_key as additional fields in the - # output. The subscription name, message_id, and publish_time fields are - # put in their own fields while all other message properties other than - # data (for example, an ordering_key, if present) are added as entries in - # the attributes map. - # @!attribute [rw] use_topic_schema - # @return [::Boolean] - # Optional. When true, the output Cloud Storage file will be serialized - # using the topic schema, if it exists. - class AvroConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # All supported message transforms types. - # @!attribute [rw] javascript_udf - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::JavaScriptUDF] - # Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's - # are specified on a resource, each must have a unique `function_name`. - # @!attribute [rw] enabled - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Optional. This field is deprecated, use the `disabled` field to disable - # transforms. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. If true, the transform is disabled and will not be applied to - # messages. Defaults to `false`. - class MessageTransform - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # User-defined JavaScript function that can transform or filter a Pub/Sub - # message. - # @!attribute [rw] function_name - # @return [::String] - # Required. Name of the JavasScript function that should applied to Pub/Sub - # messages. - # @!attribute [rw] code - # @return [::String] - # Required. JavaScript code that contains a function `function_name` with the - # below signature: - # - # ``` - # /** - # * Transforms a Pub/Sub message. - # - # * @return \\{(Object)>|null)} - To - # * filter a message, return `null`. To transform a message return a map - # * with the following keys: - # * - (required) 'data' : \\{string} - # * - (optional) 'attributes' : \\{Object} - # * Returning empty `attributes` will remove all attributes from the - # * message. - # * - # * @param \\{(Object)>} Pub/Sub - # * message. Keys: - # * - (required) 'data' : \\{string} - # * - (required) 'attributes' : \\{Object} - # * - # * @param \\{Object} metadata - Pub/Sub message metadata. - # * Keys: - # * - (required) 'message_id' : \\{string} - # * - (optional) 'publish_time': \\{string} YYYY-MM-DDTHH:MM:SSZ format - # * - (optional) 'ordering_key': \\{string} - # */ - # - # function (message, metadata) { - # } - # ``` - class JavaScriptUDF - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-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-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile deleted file mode 100644 index cf511377acd7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-bigquery-analytics_hub-v1", path: "../" -else - gem "google-cloud-bigquery-analytics_hub-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb deleted file mode 100644 index 0a39e6316666..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_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 analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the approve_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template. -# -def approve_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new - - # Call the approve_query_template method. - result = client.approve_query_template request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb deleted file mode 100644 index 2a8628d7604c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the create_data_exchange call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange. -# -def create_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new - - # Call the create_data_exchange method. - result = client.create_data_exchange request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb deleted file mode 100644 index d1a606f4b1cd..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the create_listing call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing. -# -def create_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new - - # Call the create_listing method. - result = client.create_listing request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb deleted file mode 100644 index 9c25b4f508b6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_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 analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the create_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template. -# -def create_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new - - # Call the create_query_template method. - result = client.create_query_template request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb deleted file mode 100644 index 5952012c10af..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the delete_data_exchange call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange. -# -def delete_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new - - # Call the delete_data_exchange method. - result = client.delete_data_exchange request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb deleted file mode 100644 index f649ca2e5739..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the delete_listing call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing. -# -def delete_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new - - # Call the delete_listing method. - result = client.delete_listing request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb deleted file mode 100644 index ade5d81b6792..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_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 analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the delete_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template. -# -def delete_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new - - # Call the delete_query_template method. - result = client.delete_query_template request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb deleted file mode 100644 index be4fcc5a0ef2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.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 analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the delete_subscription call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription. -# -def delete_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new - - # Call the delete_subscription method. - result = client.delete_subscription request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb deleted file mode 100644 index 7c5f0f889dca..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the get_data_exchange call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange. -# -def get_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new - - # Call the get_data_exchange method. - result = client.get_data_exchange request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb deleted file mode 100644 index 41e6e64e7742..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the get_iam_policy call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb deleted file mode 100644 index 6bf1cd0ebe75..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_GetListing_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the get_listing call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing. -# -def get_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new - - # Call the get_listing method. - result = client.get_listing request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_GetListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb deleted file mode 100644 index 94f813894a65..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_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 analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the get_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template. -# -def get_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new - - # Call the get_query_template method. - result = client.get_query_template request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb deleted file mode 100644 index 1f80e69970ce..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the get_subscription call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription. -# -def get_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new - - # Call the get_subscription method. - result = client.get_subscription request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb deleted file mode 100644 index 1fcb44b39af1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_data_exchanges call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges. -# -def list_data_exchanges - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new - - # Call the list_data_exchanges method. - result = client.list_data_exchanges request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb deleted file mode 100644 index 0a7a606ae5f4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListListings_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_listings call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings. -# -def list_listings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new - - # Call the list_listings method. - result = client.list_listings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListListings_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb deleted file mode 100644 index b6f2cb9a9187..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_org_data_exchanges call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges. -# -def list_org_data_exchanges - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new - - # Call the list_org_data_exchanges method. - result = client.list_org_data_exchanges request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb deleted file mode 100644 index 485a075ad969..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_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 analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_query_templates call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates. -# -def list_query_templates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new - - # Call the list_query_templates method. - result = client.list_query_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::Bigquery::AnalyticsHub::V1::QueryTemplate. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb deleted file mode 100644 index eb88901d590b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_shared_resource_subscriptions call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions. -# -def list_shared_resource_subscriptions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new - - # Call the list_shared_resource_subscriptions method. - result = client.list_shared_resource_subscriptions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb deleted file mode 100644 index 83a559cfd40e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_subscriptions call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions. -# -def list_subscriptions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new - - # Call the list_subscriptions method. - result = client.list_subscriptions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb deleted file mode 100644 index 6f0d8291ad7a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.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 analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the refresh_subscription call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription. -# -def refresh_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new - - # Call the refresh_subscription method. - result = client.refresh_subscription request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb deleted file mode 100644 index 79f5d7d7fd2e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the revoke_subscription call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription. -# -def revoke_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new - - # Call the revoke_subscription method. - result = client.revoke_subscription request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb deleted file mode 100644 index e90e15b23996..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the set_iam_policy call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb deleted file mode 100644 index 0853f509ac77..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_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 analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the submit_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template. -# -def submit_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new - - # Call the submit_query_template method. - result = client.submit_query_template request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb deleted file mode 100644 index 4b8d255e1cb0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.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 analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the subscribe_data_exchange call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange. -# -def subscribe_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new - - # Call the subscribe_data_exchange method. - result = client.subscribe_data_exchange request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb deleted file mode 100644 index 9d570b4f1d94..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the subscribe_listing call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing. -# -def subscribe_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new - - # Call the subscribe_listing method. - result = client.subscribe_listing request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb deleted file mode 100644 index 8d57f424d123..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the test_iam_permissions call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb deleted file mode 100644 index 8736361663e5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the update_data_exchange call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange. -# -def update_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new - - # Call the update_data_exchange method. - result = client.update_data_exchange request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb deleted file mode 100644 index 8c5f1849b359..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the update_listing call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing. -# -def update_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new - - # Call the update_listing method. - result = client.update_listing request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb deleted file mode 100644 index 880478732dd5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_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 analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the update_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template. -# -def update_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new - - # Call the update_query_template method. - result = client.update_query_template request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json deleted file mode 100644 index d27ae7dab1ab..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json +++ /dev/null @@ -1,1175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-analytics_hub-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.analyticshub.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync", - "title": "Snippet for the list_data_exchanges call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges.", - "file": "analytics_hub_service/list_data_exchanges.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_exchanges", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListDataExchanges", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListDataExchanges", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync", - "title": "Snippet for the list_org_data_exchanges call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges.", - "file": "analytics_hub_service/list_org_data_exchanges.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_org_data_exchanges", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListOrgDataExchanges", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListOrgDataExchanges", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync", - "title": "Snippet for the get_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange.", - "file": "analytics_hub_service/get_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_exchange", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetDataExchange", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync", - "title": "Snippet for the create_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange.", - "file": "analytics_hub_service/create_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_exchange", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "CreateDataExchange", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync", - "title": "Snippet for the update_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange.", - "file": "analytics_hub_service/update_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_exchange", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "UpdateDataExchange", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync", - "title": "Snippet for the delete_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange.", - "file": "analytics_hub_service/delete_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_exchange", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "DeleteDataExchange", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListListings_sync", - "title": "Snippet for the list_listings call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings.", - "file": "analytics_hub_service/list_listings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_listings", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListListings", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListListings", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetListing_sync", - "title": "Snippet for the get_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing.", - "file": "analytics_hub_service/get_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_listing", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetListing", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync", - "title": "Snippet for the create_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing.", - "file": "analytics_hub_service/create_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_listing", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "CreateListing", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync", - "title": "Snippet for the update_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing.", - "file": "analytics_hub_service/update_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_listing", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "UpdateListing", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync", - "title": "Snippet for the delete_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing.", - "file": "analytics_hub_service/delete_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_listing", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "DeleteListing", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync", - "title": "Snippet for the subscribe_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing.", - "file": "analytics_hub_service/subscribe_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "subscribe_listing", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "SubscribeListing", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubscribeListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync", - "title": "Snippet for the subscribe_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange.", - "file": "analytics_hub_service/subscribe_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "subscribe_data_exchange", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "SubscribeDataExchange", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubscribeDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync", - "title": "Snippet for the refresh_subscription call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription.", - "file": "analytics_hub_service/refresh_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "refresh_subscription", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "RefreshSubscription", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.RefreshSubscription", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync", - "title": "Snippet for the get_subscription call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription.", - "file": "analytics_hub_service/get_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_subscription", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetSubscription", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetSubscription", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync", - "title": "Snippet for the list_subscriptions call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions.", - "file": "analytics_hub_service/list_subscriptions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_subscriptions", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListSubscriptions", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListSubscriptions", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync", - "title": "Snippet for the list_shared_resource_subscriptions call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions.", - "file": "analytics_hub_service/list_shared_resource_subscriptions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_shared_resource_subscriptions", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListSharedResourceSubscriptions", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListSharedResourceSubscriptions", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync", - "title": "Snippet for the revoke_subscription call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription.", - "file": "analytics_hub_service/revoke_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "revoke_subscription", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "RevokeSubscription", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.RevokeSubscription", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync", - "title": "Snippet for the delete_subscription call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription.", - "file": "analytics_hub_service/delete_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_subscription", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "DeleteSubscription", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteSubscription", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy.", - "file": "analytics_hub_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetIamPolicy", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy.", - "file": "analytics_hub_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SetIamPolicy", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions.", - "file": "analytics_hub_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.TestIamPermissions", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync", - "title": "Snippet for the create_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template.", - "file": "analytics_hub_service/create_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "CreateQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync", - "title": "Snippet for the get_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template.", - "file": "analytics_hub_service/get_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync", - "title": "Snippet for the list_query_templates call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates.", - "file": "analytics_hub_service/list_query_templates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_query_templates", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListQueryTemplates", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListQueryTemplates", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync", - "title": "Snippet for the update_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template.", - "file": "analytics_hub_service/update_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "UpdateQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync", - "title": "Snippet for the delete_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template.", - "file": "analytics_hub_service/delete_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "DeleteQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync", - "title": "Snippet for the submit_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template.", - "file": "analytics_hub_service/submit_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "submit_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "SubmitQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubmitQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync", - "title": "Snippet for the approve_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template.", - "file": "analytics_hub_service/approve_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "approve_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ApproveQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ApproveQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb deleted file mode 100644 index dc1543dc3010..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_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/bigquery/analyticshub/v1/analyticshub_pb" -require "google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" - -class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb deleted file mode 100644 index bda4e477568d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb +++ /dev/null @@ -1,163 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" - -class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_data_exchange_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_exchange_path project: "value0", location: "value1", data_exchange: "value2" - assert_equal "projects/value0/locations/value1/dataExchanges/value2", path - end - end - - def test_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", dataset: "value1" - assert_equal "projects/value0/datasets/value1", path - end - end - - def test_listing_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.listing_path project: "value0", location: "value1", data_exchange: "value2", listing: "value3" - assert_equal "projects/value0/locations/value1/dataExchanges/value2/listings/value3", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_managed_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.managed_service_path service: "value0" - assert_equal "services/value0", path - end - end - - def test_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.query_template_path project: "value0", location: "value1", data_exchange: "value2", query_template: "value3" - assert_equal "projects/value0/locations/value1/dataExchanges/value2/queryTemplates/value3", path - end - end - - def test_routine_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.routine_path project: "value0", dataset: "value1", routine: "value2" - assert_equal "projects/value0/datasets/value1/routines/value2", path - end - end - - def test_subscription_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.subscription_path project: "value0", location: "value1", subscription: "value2" - assert_equal "projects/value0/locations/value1/subscriptions/value2", path - end - end - - def test_table_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_path project: "value0", dataset: "value1", table: "value2" - assert_equal "projects/value0/datasets/value1/tables/value2", path - end - end - - def test_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb deleted file mode 100644 index 17161e9f3671..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb +++ /dev/null @@ -1,1699 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" - - -class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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_data_exchanges - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.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_data_exchanges_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_data_exchanges_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_exchanges_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_data_exchanges({ 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_data_exchanges 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_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.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_data_exchanges({ 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_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.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_data_exchanges_client_stub.call_count - end - end - end - - def test_list_org_data_exchanges - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - organization = "hello world" - page_size = 42 - page_token = "hello world" - - list_org_data_exchanges_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_org_data_exchanges_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_org_data_exchanges_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_org_data_exchanges organization: organization, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_org_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, 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_org_data_exchanges({ organization: organization, 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_org_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, 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_org_data_exchanges_client_stub.call_count - end - end - end - - def test_get_data_exchange - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_data_exchange_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_exchange_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_data_exchange({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_data_exchange name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_data_exchange({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_exchange_client_stub.call_count - end - end - end - - def test_create_data_exchange - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_exchange_id = "hello world" - data_exchange = {} - - create_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_data_exchange_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_exchange_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_data_exchange parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_exchange_client_stub.call_count - end - end - end - - def test_update_data_exchange - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_exchange = {} - - update_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_data_exchange_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_exchange_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_data_exchange update_mask: update_mask, data_exchange: data_exchange do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_exchange_client_stub.call_count - end - end - end - - def test_delete_data_exchange - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_data_exchange_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_exchange_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_data_exchange({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_data_exchange name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_data_exchange({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_exchange_client_stub.call_count - end - end - end - - def test_list_listings - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.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_listings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_listings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_listings_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_listings({ 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_listings 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_listings ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.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_listings({ 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_listings(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.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_listings_client_stub.call_count - end - end - end - - def test_get_listing - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_listing_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_listing_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_listing({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_listing name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_listing({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_listing_client_stub.call_count - end - end - end - - def test_create_listing - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - listing_id = "hello world" - listing = {} - - create_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_listing_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_listing_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_listing({ parent: parent, listing_id: listing_id, listing: listing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_listing parent: parent, listing_id: listing_id, listing: listing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_listing({ parent: parent, listing_id: listing_id, listing: listing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_listing_client_stub.call_count - end - end - end - - def test_update_listing - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - listing = {} - - update_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_listing_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_listing_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_listing({ update_mask: update_mask, listing: listing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_listing update_mask: update_mask, listing: listing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_listing({ update_mask: update_mask, listing: listing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_listing_client_stub.call_count - end - end - end - - def test_delete_listing - # 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_commercial = true - - delete_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_listing_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_listing_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_listing({ name: name, delete_commercial: delete_commercial }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_listing name: name, delete_commercial: delete_commercial do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_listing({ name: name, delete_commercial: delete_commercial }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_listing_client_stub.call_count - end - end - end - - def test_subscribe_listing - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - destination_dataset = {} - name = "hello world" - - subscribe_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_subscribe_listing_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, subscribe_listing_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.subscribe_listing({ destination_dataset: destination_dataset, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.subscribe_listing destination_dataset: destination_dataset, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.subscribe_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.subscribe_listing({ destination_dataset: destination_dataset, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.subscribe_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, subscribe_listing_client_stub.call_count - end - end - end - - def test_subscribe_data_exchange - # Create test objects. - 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" - destination = "hello world" - destination_dataset = {} - subscription = "hello world" - subscriber_contact = "hello world" - - subscribe_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_subscribe_data_exchange_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, subscribe_data_exchange_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.subscribe_data_exchange name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.subscribe_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.subscribe_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, subscribe_data_exchange_client_stub.call_count - end - end - end - - def test_refresh_subscription - # Create test objects. - 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" - - refresh_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_refresh_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, refresh_subscription_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.refresh_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.refresh_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.refresh_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.refresh_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.refresh_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, refresh_subscription_client_stub.call_count - end - end - end - - def test_get_subscription - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_subscription_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_subscription_client_stub.call_count - end - end - end - - def test_list_subscriptions - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.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_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_subscriptions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_subscriptions_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_subscriptions({ 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_subscriptions 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_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.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_subscriptions({ 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_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.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_subscriptions_client_stub.call_count - end - end - end - - def test_list_shared_resource_subscriptions - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - include_deleted_subscriptions = true - page_size = 42 - page_token = "hello world" - - list_shared_resource_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_shared_resource_subscriptions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_shared_resource_subscriptions_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_shared_resource_subscriptions resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_shared_resource_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, 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_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, 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_shared_resource_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, 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_shared_resource_subscriptions_client_stub.call_count - end - end - end - - def test_revoke_subscription - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revoke_commercial = true - - revoke_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_revoke_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, revoke_subscription_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.revoke_subscription name: name, revoke_commercial: revoke_commercial do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.revoke_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.revoke_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, revoke_subscription_client_stub.call_count - end - end - end - - def test_delete_subscription - # Create test objects. - 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_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_subscription_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_subscription_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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_query_template - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query_template_id = "hello world" - query_template = {} - - create_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_query_template parent: parent, query_template_id: query_template_id, query_template: query_template do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_query_template_client_stub.call_count - end - end - end - - def test_get_query_template - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_query_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_query_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_query_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_query_template_client_stub.call_count - end - end - end - - def test_list_query_templates - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.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_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_query_templates_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_query_templates_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_query_templates({ 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_query_templates 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_query_templates ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.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_query_templates({ 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_query_templates(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.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_query_templates_client_stub.call_count - end - end - end - - def test_update_query_template - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - query_template = {} - - update_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_query_template({ update_mask: update_mask, query_template: query_template }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_query_template update_mask: update_mask, query_template: query_template do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_query_template({ update_mask: update_mask, query_template: query_template }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_query_template_client_stub.call_count - end - end - end - - def test_delete_query_template - # 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_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_query_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_query_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_query_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_query_template_client_stub.call_count - end - end - end - - def test_submit_query_template - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - submit_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_submit_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, submit_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.submit_query_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.submit_query_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.submit_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.submit_query_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.submit_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, submit_query_template_client_stub.call_count - end - end - end - - def test_approve_query_template - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - approve_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_approve_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, approve_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.approve_query_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.approve_query_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.approve_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.approve_query_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.approve_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, approve_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb deleted file mode 100644 index 717c81a3d52c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb +++ /dev/null @@ -1,1914 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" - -class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_data_exchanges - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_exchanges, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_exchanges_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_data_exchanges parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_exchanges_client_stub.call_rpc_count - end - end - - def test_list_org_data_exchanges - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - organization = "hello world" - page_size = 42 - page_token = "hello world" - - list_org_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_org_data_exchanges, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, request - assert_equal "hello world", request["organization"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_org_data_exchanges_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_org_data_exchanges organization: organization, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_org_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_org_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_org_data_exchanges_client_stub.call_rpc_count - end - end - - def test_get_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_exchange_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_data_exchange({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_data_exchange name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_data_exchange({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_exchange_client_stub.call_rpc_count - end - end - - def test_create_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_exchange_id = "hello world" - data_exchange = {} - - create_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_exchange_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange), request["data_exchange"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_exchange_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_data_exchange parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_exchange_client_stub.call_rpc_count - end - end - - def test_update_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_exchange = {} - - update_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange), request["data_exchange"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_exchange_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_data_exchange update_mask: update_mask, data_exchange: data_exchange do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_exchange_client_stub.call_rpc_count - end - end - - def test_delete_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_exchange_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_data_exchange({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_data_exchange name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_data_exchange({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_exchange_client_stub.call_rpc_count - end - end - - def test_list_listings - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_listings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_listings, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_listings_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_listings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_listings parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_listings ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_listings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_listings(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_listings_client_stub.call_rpc_count - end - end - - def test_get_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_listing, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_listing_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_listing({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_listing name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_listing({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_listing_client_stub.call_rpc_count - end - end - - def test_create_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - listing_id = "hello world" - listing = {} - - create_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_listing, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["listing_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing), request["listing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_listing_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_listing({ parent: parent, listing_id: listing_id, listing: listing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_listing parent: parent, listing_id: listing_id, listing: listing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_listing({ parent: parent, listing_id: listing_id, listing: listing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_listing_client_stub.call_rpc_count - end - end - - def test_update_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - listing = {} - - update_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_listing, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing), request["listing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_listing_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_listing({ update_mask: update_mask, listing: listing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_listing update_mask: update_mask, listing: listing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_listing({ update_mask: update_mask, listing: listing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_listing_client_stub.call_rpc_count - end - end - - def test_delete_listing - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delete_commercial = true - - delete_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_listing, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["delete_commercial"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_listing_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_listing({ name: name, delete_commercial: delete_commercial }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_listing name: name, delete_commercial: delete_commercial do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_listing({ name: name, delete_commercial: delete_commercial }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_listing_client_stub.call_rpc_count - end - end - - def test_subscribe_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - destination_dataset = {} - name = "hello world" - - subscribe_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :subscribe_listing, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset), request["destination_dataset"] - assert_equal :destination_dataset, request.destination - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, subscribe_listing_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.subscribe_listing({ destination_dataset: destination_dataset, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.subscribe_listing destination_dataset: destination_dataset, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.subscribe_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.subscribe_listing({ destination_dataset: destination_dataset, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.subscribe_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, subscribe_listing_client_stub.call_rpc_count - end - end - - def test_subscribe_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - destination = "hello world" - destination_dataset = {} - subscription = "hello world" - subscriber_contact = "hello world" - - subscribe_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :subscribe_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["destination"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset), request["destination_dataset"] - assert_equal "hello world", request["subscription"] - assert_equal "hello world", request["subscriber_contact"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, subscribe_data_exchange_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }) do |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.subscribe_data_exchange name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact do |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.subscribe_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact) do |response, operation| - 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.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }, grpc_options) do |response, operation| - 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.subscribe_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, subscribe_data_exchange_client_stub.call_rpc_count - end - end - - def test_refresh_subscription - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - refresh_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :refresh_subscription, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, refresh_subscription_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.refresh_subscription({ 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.refresh_subscription 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.refresh_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.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.refresh_subscription({ 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.refresh_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.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, refresh_subscription_client_stub.call_rpc_count - end - end - - def test_get_subscription - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_subscription, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_subscription_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_subscription({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_subscription name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_subscription({ 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_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(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_subscription_client_stub.call_rpc_count - end - end - - def test_list_subscriptions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_subscriptions, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, 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_subscriptions_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_subscriptions({ 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_subscriptions 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_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.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_subscriptions({ 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_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.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_subscriptions_client_stub.call_rpc_count - end - end - - def test_list_shared_resource_subscriptions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - include_deleted_subscriptions = true - page_size = 42 - page_token = "hello world" - - list_shared_resource_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_shared_resource_subscriptions, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal true, request["include_deleted_subscriptions"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_shared_resource_subscriptions_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: 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_shared_resource_subscriptions resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: 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_shared_resource_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: 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_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_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_shared_resource_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_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_shared_resource_subscriptions_client_stub.call_rpc_count - end - end - - def test_revoke_subscription - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revoke_commercial = true - - revoke_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :revoke_subscription, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["revoke_commercial"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, revoke_subscription_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.revoke_subscription name: name, revoke_commercial: revoke_commercial do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.revoke_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.revoke_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, revoke_subscription_client_stub.call_rpc_count - end - end - - def test_delete_subscription - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_subscription, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_subscription_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_subscription({ 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_subscription 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_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.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_subscription({ 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_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.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_subscription_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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_query_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query_template_id = "hello world" - query_template = {} - - create_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query_template_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate), request["query_template"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_query_template parent: parent, query_template_id: query_template_id, query_template: query_template do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_query_template_client_stub.call_rpc_count - end - end - - def test_get_query_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_query_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_query_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_query_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_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(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_query_template_client_stub.call_rpc_count - end - end - - def test_list_query_templates - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_query_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_query_templates, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, 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_query_templates_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_query_templates({ parent: parent, page_size: page_size, page_token: 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_query_templates parent: parent, page_size: page_size, page_token: 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_query_templates ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.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_query_templates({ 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_query_templates(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.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_query_templates_client_stub.call_rpc_count - end - end - - def test_update_query_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - query_template = {} - - update_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate), request["query_template"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_query_template({ update_mask: update_mask, query_template: query_template }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_query_template update_mask: update_mask, query_template: query_template do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_query_template({ update_mask: update_mask, query_template: query_template }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_query_template_client_stub.call_rpc_count - end - end - - def test_delete_query_template - # 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_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_query_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_query_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_query_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.delete_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(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_query_template_client_stub.call_rpc_count - end - end - - def test_submit_query_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - submit_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :submit_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, submit_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.submit_query_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.submit_query_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.submit_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.submit_query_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.submit_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, submit_query_template_client_stub.call_rpc_count - end - end - - def test_approve_query_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - approve_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :approve_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, approve_query_template_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.approve_query_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.approve_query_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.approve_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.approve_query_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.approve_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, approve_query_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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::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::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-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-bigquery-data_transfer-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json deleted file mode 100644 index 682905e95539..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "bigquerydatatransfer.googleapis.com", - "api_shortname": "bigquerydatatransfer", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_transfer-v1/latest", - "distribution_name": "google-cloud-bigquery-data_transfer-v1", - "is_cloud": true, - "language": "ruby", - "name": "bigquerydatatransfer", - "name_pretty": "BigQuery Data Transfer Service V1 API", - "product_documentation": "https://cloud.google.com/bigquery/transfer", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. Note that google-cloud-bigquery-data_transfer-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_transfer instead. See the readme for more details.", - "ruby-cloud-env-prefix": "DATA_TRANSFER", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/transfer", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml deleted file mode 100644 index 6f5635fddf0e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-data_transfer-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-bigquery-data_transfer-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts deleted file mode 100644 index 304c3609fa4b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Data Transfer Service V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md deleted file mode 100644 index 4740aa501122..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-data_transfer-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-bigquery-data_transfer-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/bigquery/data_transfer/v1" - -client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/data_transfer/v1" - -::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-bigquery-data_transfer-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/bigquery/data_transfer/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md deleted file mode 100644 index b0f8075cecec..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Data Transfer Service V1 API - -Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis. - -Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Data Transfer Service V1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-data_transfer](https://rubygems.org/gems/google-cloud-bigquery-data_transfer). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-data_transfer-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/bigquerydatatransfer.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/data_transfer/v1" - -client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new -request = ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new # (request fields as keyword arguments...) -response = client.get_data_source request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_transfer-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/transfer) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/bigquery/data_transfer/v1" -require "logger" - -client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.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-bigquery-data_transfer`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-data_transfer-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-bigquery-data_transfer`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-bigquery-data_transfer-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile deleted file mode 100644 index 0be31481319e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile +++ /dev/null @@ -1,168 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-bigquery-data_transfer-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["DATA_TRANSFER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["DATA_TRANSFER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["DATA_TRANSFER_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or DATA_TRANSFER_TEST_PROJECT=test123 DATA_TRANSFER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["DATA_TRANSFER_PROJECT"] = project - ENV["DATA_TRANSFER_TEST_PROJECT"] = project - ENV["DATA_TRANSFER_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-data_transfer-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-data_transfer-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-data_transfer-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bigquery-data_transfer-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-data_transfer-v1" - header "google-cloud-bigquery-data_transfer-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-data_transfer-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-data_transfer-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-data_transfer-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-data_transfer-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json deleted file mode 100644 index 7ae4ebcd10a5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.datatransfer.v1", - "libraryPackage": "::Google::Cloud::Bigquery::DataTransfer::V1", - "services": { - "DataTransferService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client", - "rpcs": { - "GetDataSource": { - "methods": [ - "get_data_source" - ] - }, - "ListDataSources": { - "methods": [ - "list_data_sources" - ] - }, - "CreateTransferConfig": { - "methods": [ - "create_transfer_config" - ] - }, - "UpdateTransferConfig": { - "methods": [ - "update_transfer_config" - ] - }, - "DeleteTransferConfig": { - "methods": [ - "delete_transfer_config" - ] - }, - "GetTransferConfig": { - "methods": [ - "get_transfer_config" - ] - }, - "ListTransferConfigs": { - "methods": [ - "list_transfer_configs" - ] - }, - "ScheduleTransferRuns": { - "methods": [ - "schedule_transfer_runs" - ] - }, - "StartManualTransferRuns": { - "methods": [ - "start_manual_transfer_runs" - ] - }, - "GetTransferRun": { - "methods": [ - "get_transfer_run" - ] - }, - "DeleteTransferRun": { - "methods": [ - "delete_transfer_run" - ] - }, - "ListTransferRuns": { - "methods": [ - "list_transfer_runs" - ] - }, - "ListTransferLogs": { - "methods": [ - "list_transfer_logs" - ] - }, - "CheckValidCreds": { - "methods": [ - "check_valid_creds" - ] - }, - "EnrollDataSources": { - "methods": [ - "enroll_data_sources" - ] - }, - "UnenrollDataSources": { - "methods": [ - "unenroll_data_sources" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec deleted file mode 100644 index cae36345fcbd..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/data_transfer/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-data_transfer-v1" - gem.version = Google::Cloud::Bigquery::DataTransfer::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. Note that google-cloud-bigquery-data_transfer-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_transfer instead. See the readme for more details." - gem.summary = "Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.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-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb deleted file mode 100644 index 78206ec74e36..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/bigquery/data_transfer/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb deleted file mode 100644 index 3d075d750da4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" -require "google/cloud/bigquery/data_transfer/v1/version" - -module Google - module Cloud - module Bigquery - module DataTransfer - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/data_transfer/v1" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/data_transfer/v1" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/bigquery/data_transfer/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb deleted file mode 100644 index 40a072a3828e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module Bigquery - module DataTransfer - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/bigquery/data_transfer/v1/rest" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "DataTransfer"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb deleted file mode 100644 index 6800f1bff3af..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/data_transfer/v1/version" - -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/client" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - ## - # This API allows users to manage their data transfers into BigQuery. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - module DataTransferService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_transfer_service", "helpers.rb" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb deleted file mode 100644 index f854007058a8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb +++ /dev/null @@ -1,2172 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" -require "google/cloud/location" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - ## - # Client for the DataTransferService service. - # - # This API allows users to manage their data transfers into BigQuery. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatatransfer.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_transfer_service_stub - - ## - # Configure the DataTransferService Client class. - # - # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTransferService clients - # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "DataTransfer", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_data_source.timeout = 20.0 - default_config.rpcs.get_data_source.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_data_sources.timeout = 20.0 - default_config.rpcs.list_data_sources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_transfer_config.timeout = 30.0 - - default_config.rpcs.update_transfer_config.timeout = 30.0 - - default_config.rpcs.delete_transfer_config.timeout = 20.0 - default_config.rpcs.delete_transfer_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_transfer_config.timeout = 20.0 - default_config.rpcs.get_transfer_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_configs.timeout = 20.0 - default_config.rpcs.list_transfer_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.schedule_transfer_runs.timeout = 30.0 - - default_config.rpcs.get_transfer_run.timeout = 20.0 - default_config.rpcs.get_transfer_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_transfer_run.timeout = 20.0 - default_config.rpcs.delete_transfer_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_runs.timeout = 20.0 - default_config.rpcs.list_transfer_runs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_logs.timeout = 20.0 - default_config.rpcs.list_transfer_logs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.check_valid_creds.timeout = 20.0 - default_config.rpcs.check_valid_creds.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTransferService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_transfer_service_stub.universe_domain - end - - ## - # Create a new DataTransferService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTransferService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @data_transfer_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @data_transfer_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_transfer_service_stub.endpoint - config.universe_domain = @data_transfer_service_stub.universe_domain - config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_transfer_service_stub.logger - end - - # Service calls - - ## - # Retrieves a supported data source and returns its settings. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :get_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists supported data sources and returns their settings. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The BigQuery project id for which data sources should be - # returned. Must be in the form: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListDataSourcesRequest` list results. For multiple-page - # results, `ListDataSourcesResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_data_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new data transfer configuration. - # - # @overload create_transfer_config(request, options = nil) - # Pass arguments to `create_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil) - # Pass arguments to `create_transfer_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The BigQuery project id where the transfer configuration should - # be created. Must be in the format - # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If - # specified location and location of the destination bigquery dataset do not - # match - the request will fail. - # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] - # Required. Data transfer configuration to create. - # @param authorization_code [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-              #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @param version_info [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-              #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @param service_account_name [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new - # - # # Call the create_transfer_config method. - # result = client.create_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def create_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_transfer_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_transfer_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :create_transfer_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a data transfer configuration. - # All fields must be set, even if they are not updated. - # - # @overload update_transfer_config(request, options = nil) - # Pass arguments to `update_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil) - # Pass arguments to `update_transfer_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] - # Required. Data transfer configuration to create. - # @param authorization_code [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-              #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Required list of fields to be updated in this request. - # @param version_info [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-              #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @param service_account_name [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new - # - # # Call the update_transfer_config method. - # result = client.update_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def update_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_transfer_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.transfer_config&.name - header_params["transfer_config.name"] = request.transfer_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_transfer_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :update_transfer_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a data transfer configuration, including any associated transfer - # runs and logs. - # - # @overload delete_transfer_config(request, options = nil) - # Pass arguments to `delete_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_transfer_config(name: nil) - # Pass arguments to `delete_transfer_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new - # - # # Call the delete_transfer_config method. - # result = client.delete_transfer_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_transfer_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_transfer_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :delete_transfer_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about a data transfer config. - # - # @overload get_transfer_config(request, options = nil) - # Pass arguments to `get_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_transfer_config(name: nil) - # Pass arguments to `get_transfer_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new - # - # # Call the get_transfer_config method. - # result = client.get_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def get_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_transfer_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_transfer_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :get_transfer_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about all transfer configs owned by a project in the - # specified location. - # - # @overload list_transfer_configs(request, options = nil) - # Pass arguments to `list_transfer_configs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_transfer_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The BigQuery project id for which transfer configs - # should be returned: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @param data_source_ids [::Array<::String>] - # When specified, only configurations of requested data sources are returned. - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransfersRequest` list results. For multiple-page - # results, `ListTransfersResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new - # - # # Call the list_transfer_configs method. - # result = client.list_transfer_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p item - # end - # - def list_transfer_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_transfer_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_transfer_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_transfer_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :list_transfer_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates transfer runs for a time range [start_time, end_time]. - # For each date - or whatever granularity the data source supports - in the - # range, one transfer run is created. - # Note that runs are created per UTC time in the time range. - # DEPRECATED: use StartManualTransferRuns instead. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload schedule_transfer_runs(request, options = nil) - # Pass arguments to `schedule_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) - # Pass arguments to `schedule_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. Start time of the range of transfer runs. For example, - # `"2017-05-25T00:00:00+00:00"`. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. End time of the range of transfer runs. For example, - # `"2017-05-30T00:00:00+00:00"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new - # - # # Call the schedule_transfer_runs method. - # result = client.schedule_transfer_runs request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. - # p result - # - def schedule_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.schedule_transfer_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.schedule_transfer_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.schedule_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :schedule_transfer_runs, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Start manual transfer runs to be executed now with schedule_time equal to - # current time. The transfer runs can be created for a time range where the - # run_time is between start_time (inclusive) and end_time (exclusive), or for - # a specific run_time. - # - # @overload start_manual_transfer_runs(request, options = nil) - # Pass arguments to `start_manual_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil) - # Pass arguments to `start_manual_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param requested_time_range [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange, ::Hash] - # A time_range start and end timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_time_range must be a past time and cannot include future time - # values. - # - # Note: The following parameters are mutually exclusive: `requested_time_range`, `requested_run_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param requested_run_time [::Google::Protobuf::Timestamp, ::Hash] - # A run_time timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_run_time must be a past time and cannot include future time - # values. - # - # Note: The following parameters are mutually exclusive: `requested_run_time`, `requested_time_range`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new - # - # # Call the start_manual_transfer_runs method. - # result = client.start_manual_transfer_runs request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. - # p result - # - def start_manual_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.start_manual_transfer_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.start_manual_transfer_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_manual_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :start_manual_transfer_runs, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about the particular transfer run. - # - # @overload get_transfer_run(request, options = nil) - # Pass arguments to `get_transfer_run` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_transfer_run(name: nil) - # Pass arguments to `get_transfer_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new - # - # # Call the get_transfer_run method. - # result = client.get_transfer_run request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. - # p result - # - def get_transfer_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_transfer_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_transfer_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_transfer_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :get_transfer_run, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified transfer run. - # - # @overload delete_transfer_run(request, options = nil) - # Pass arguments to `delete_transfer_run` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_transfer_run(name: nil) - # Pass arguments to `delete_transfer_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new - # - # # Call the delete_transfer_run method. - # result = client.delete_transfer_run request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_transfer_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_transfer_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_transfer_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_transfer_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :delete_transfer_run, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about running and completed transfer runs. - # - # @overload list_transfer_runs(request, options = nil) - # Pass arguments to `list_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) - # Pass arguments to `list_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of transfer configuration for which transfer runs should be - # retrieved. Format of transfer configuration resource name is: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param states [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] - # When specified, only transfer runs with requested states are returned. - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferRunsRequest` list results. For multiple-page - # results, `ListTransferRunsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @param run_attempt [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] - # Indicates how run attempts are to be pulled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new - # - # # Call the list_transfer_runs method. - # result = client.list_transfer_runs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. - # p item - # end - # - def list_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_transfer_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_transfer_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :list_transfer_runs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_runs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns log messages for the transfer run. - # - # @overload list_transfer_logs(request, options = nil) - # Pass arguments to `list_transfer_logs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) - # Pass arguments to `list_transfer_logs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Transfer run name in the form: - # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferLogsRequest` list results. For multiple-page - # results, `ListTransferLogsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @param message_types [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] - # Message types to return. If not populated - INFO, WARNING and ERROR - # messages are returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new - # - # # Call the list_transfer_logs method. - # result = client.list_transfer_logs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage. - # p item - # end - # - def list_transfer_logs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_transfer_logs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_transfer_logs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_transfer_logs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :list_transfer_logs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_logs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns true if valid credentials exist for the given data source and - # requesting user. - # - # @overload check_valid_creds(request, options = nil) - # Pass arguments to `check_valid_creds` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload check_valid_creds(name: nil) - # Pass arguments to `check_valid_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The data source in the form: - # `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new - # - # # Call the check_valid_creds method. - # result = client.check_valid_creds request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. - # p result - # - def check_valid_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.check_valid_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.check_valid_creds.timeout, - metadata: metadata, - retry_policy: @config.rpcs.check_valid_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :check_valid_creds, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enroll data sources in a user project. This allows users to create transfer - # configurations for these data sources. They will also appear in the - # ListDataSources RPC and as such, will appear in the - # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents - # can be found in the public guide for - # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and - # [Data Transfer - # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). - # - # @overload enroll_data_sources(request, options = nil) - # Pass arguments to `enroll_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enroll_data_sources(name: nil, data_source_ids: nil) - # Pass arguments to `enroll_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @param data_source_ids [::Array<::String>] - # Data sources that are enrolled. It is required to provide at least one - # data source id. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new - # - # # Call the enroll_data_sources method. - # result = client.enroll_data_sources request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def enroll_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enroll_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.enroll_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enroll_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :enroll_data_sources, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unenroll data sources in a user project. This allows users to remove - # transfer configurations for these data sources. They will no longer appear - # in the ListDataSources RPC and will also no longer appear in the [BigQuery - # UI](https://console.cloud.google.com/bigquery). Data transfers - # configurations of unenrolled data sources will not be scheduled. - # - # @overload unenroll_data_sources(request, options = nil) - # Pass arguments to `unenroll_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload unenroll_data_sources(name: nil, data_source_ids: nil) - # Pass arguments to `unenroll_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @param data_source_ids [::Array<::String>] - # Data sources that are unenrolled. It is required to provide at least one - # data source id. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new - # - # # Call the unenroll_data_sources method. - # result = client.unenroll_data_sources request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def unenroll_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.unenroll_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.unenroll_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.unenroll_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :unenroll_data_sources, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataTransferService API. - # - # This class represents the configuration for DataTransferService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_data_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "bigquerydatatransfer.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DataTransferService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `create_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_transfer_config - ## - # RPC-specific configuration for `update_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_transfer_config - ## - # RPC-specific configuration for `delete_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_transfer_config - ## - # RPC-specific configuration for `get_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_transfer_config - ## - # RPC-specific configuration for `list_transfer_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_configs - ## - # RPC-specific configuration for `schedule_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :schedule_transfer_runs - ## - # RPC-specific configuration for `start_manual_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :start_manual_transfer_runs - ## - # RPC-specific configuration for `get_transfer_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_transfer_run - ## - # RPC-specific configuration for `delete_transfer_run` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_transfer_run - ## - # RPC-specific configuration for `list_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_runs - ## - # RPC-specific configuration for `list_transfer_logs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_logs - ## - # RPC-specific configuration for `check_valid_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :check_valid_creds - ## - # RPC-specific configuration for `enroll_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :enroll_data_sources - ## - # RPC-specific configuration for `unenroll_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :unenroll_data_sources - - # @private - def initialize parent_rpcs = nil - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - create_transfer_config_config = parent_rpcs.create_transfer_config if parent_rpcs.respond_to? :create_transfer_config - @create_transfer_config = ::Gapic::Config::Method.new create_transfer_config_config - update_transfer_config_config = parent_rpcs.update_transfer_config if parent_rpcs.respond_to? :update_transfer_config - @update_transfer_config = ::Gapic::Config::Method.new update_transfer_config_config - delete_transfer_config_config = parent_rpcs.delete_transfer_config if parent_rpcs.respond_to? :delete_transfer_config - @delete_transfer_config = ::Gapic::Config::Method.new delete_transfer_config_config - get_transfer_config_config = parent_rpcs.get_transfer_config if parent_rpcs.respond_to? :get_transfer_config - @get_transfer_config = ::Gapic::Config::Method.new get_transfer_config_config - list_transfer_configs_config = parent_rpcs.list_transfer_configs if parent_rpcs.respond_to? :list_transfer_configs - @list_transfer_configs = ::Gapic::Config::Method.new list_transfer_configs_config - schedule_transfer_runs_config = parent_rpcs.schedule_transfer_runs if parent_rpcs.respond_to? :schedule_transfer_runs - @schedule_transfer_runs = ::Gapic::Config::Method.new schedule_transfer_runs_config - start_manual_transfer_runs_config = parent_rpcs.start_manual_transfer_runs if parent_rpcs.respond_to? :start_manual_transfer_runs - @start_manual_transfer_runs = ::Gapic::Config::Method.new start_manual_transfer_runs_config - get_transfer_run_config = parent_rpcs.get_transfer_run if parent_rpcs.respond_to? :get_transfer_run - @get_transfer_run = ::Gapic::Config::Method.new get_transfer_run_config - delete_transfer_run_config = parent_rpcs.delete_transfer_run if parent_rpcs.respond_to? :delete_transfer_run - @delete_transfer_run = ::Gapic::Config::Method.new delete_transfer_run_config - list_transfer_runs_config = parent_rpcs.list_transfer_runs if parent_rpcs.respond_to? :list_transfer_runs - @list_transfer_runs = ::Gapic::Config::Method.new list_transfer_runs_config - list_transfer_logs_config = parent_rpcs.list_transfer_logs if parent_rpcs.respond_to? :list_transfer_logs - @list_transfer_logs = ::Gapic::Config::Method.new list_transfer_logs_config - check_valid_creds_config = parent_rpcs.check_valid_creds if parent_rpcs.respond_to? :check_valid_creds - @check_valid_creds = ::Gapic::Config::Method.new check_valid_creds_config - enroll_data_sources_config = parent_rpcs.enroll_data_sources if parent_rpcs.respond_to? :enroll_data_sources - @enroll_data_sources = ::Gapic::Config::Method.new enroll_data_sources_config - unenroll_data_sources_config = parent_rpcs.unenroll_data_sources if parent_rpcs.respond_to? :unenroll_data_sources - @unenroll_data_sources = ::Gapic::Config::Method.new unenroll_data_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb deleted file mode 100644 index bc7f9b48f764..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - # Credentials for the DataTransferService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "DATA_TRANSFER_CREDENTIALS", - "DATA_TRANSFER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "DATA_TRANSFER_CREDENTIALS_JSON", - "DATA_TRANSFER_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb deleted file mode 100644 index ad6b7baec0f5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb +++ /dev/null @@ -1,193 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - # Path helper methods for the DataTransferService API. - module Paths - ## - # Create a fully-qualified DataSource resource string. - # - # @overload data_source_path(project:, data_source:) - # The resource will be in the following format: - # - # `projects/{project}/dataSources/{data_source}` - # - # @param project [String] - # @param data_source [String] - # - # @overload data_source_path(project:, location:, data_source:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataSources/{data_source}` - # - # @param project [String] - # @param location [String] - # @param data_source [String] - # - # @return [::String] - def data_source_path **args - resources = { - "data_source:project" => (proc do |project:, data_source:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/dataSources/#{data_source}" - end), - "data_source:location:project" => (proc do |project:, location:, data_source:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataSources/#{data_source}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified Run resource string. - # - # @overload run_path(project:, transfer_config:, run:) - # The resource will be in the following format: - # - # `projects/{project}/transferConfigs/{transfer_config}/runs/{run}` - # - # @param project [String] - # @param transfer_config [String] - # @param run [String] - # - # @overload run_path(project:, location:, transfer_config:, run:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}` - # - # @param project [String] - # @param location [String] - # @param transfer_config [String] - # @param run [String] - # - # @return [::String] - def run_path **args - resources = { - "project:run:transfer_config" => (proc do |project:, transfer_config:, run:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "transfer_config cannot contain /" if transfer_config.to_s.include? "/" - - "projects/#{project}/transferConfigs/#{transfer_config}/runs/#{run}" - end), - "location:project:run:transfer_config" => (proc do |project:, location:, transfer_config:, run:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "transfer_config cannot contain /" if transfer_config.to_s.include? "/" - - "projects/#{project}/locations/#{location}/transferConfigs/#{transfer_config}/runs/#{run}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified TransferConfig resource string. - # - # @overload transfer_config_path(project:, transfer_config:) - # The resource will be in the following format: - # - # `projects/{project}/transferConfigs/{transfer_config}` - # - # @param project [String] - # @param transfer_config [String] - # - # @overload transfer_config_path(project:, location:, transfer_config:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/transferConfigs/{transfer_config}` - # - # @param project [String] - # @param location [String] - # @param transfer_config [String] - # - # @return [::String] - def transfer_config_path **args - resources = { - "project:transfer_config" => (proc do |project:, transfer_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/transferConfigs/#{transfer_config}" - end), - "location:project:transfer_config" => (proc do |project:, location:, transfer_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/transferConfigs/#{transfer_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb deleted file mode 100644 index 542bca69647b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/data_transfer/v1/version" -require "google/cloud/bigquery/data_transfer/v1/bindings_override" - -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - ## - # This API allows users to manage their data transfers into BigQuery. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - module DataTransferService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb deleted file mode 100644 index 182ea44165f5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb +++ /dev/null @@ -1,2023 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - module Rest - ## - # REST client for the DataTransferService service. - # - # This API allows users to manage their data transfers into BigQuery. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatatransfer.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_transfer_service_stub - - ## - # Configure the DataTransferService Client class. - # - # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTransferService clients - # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "DataTransfer", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_data_source.timeout = 20.0 - default_config.rpcs.get_data_source.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_data_sources.timeout = 20.0 - default_config.rpcs.list_data_sources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_transfer_config.timeout = 30.0 - - default_config.rpcs.update_transfer_config.timeout = 30.0 - - default_config.rpcs.delete_transfer_config.timeout = 20.0 - default_config.rpcs.delete_transfer_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_transfer_config.timeout = 20.0 - default_config.rpcs.get_transfer_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_configs.timeout = 20.0 - default_config.rpcs.list_transfer_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.schedule_transfer_runs.timeout = 30.0 - - default_config.rpcs.get_transfer_run.timeout = 20.0 - default_config.rpcs.get_transfer_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_transfer_run.timeout = 20.0 - default_config.rpcs.delete_transfer_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_runs.timeout = 20.0 - default_config.rpcs.list_transfer_runs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_logs.timeout = 20.0 - default_config.rpcs.list_transfer_logs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.check_valid_creds.timeout = 20.0 - default_config.rpcs.check_valid_creds.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTransferService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_transfer_service_stub.universe_domain - end - - ## - # Create a new DataTransferService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTransferService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @data_transfer_service_stub = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_transfer_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_transfer_service_stub.endpoint - config.universe_domain = @data_transfer_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_transfer_service_stub.logger - end - - # Service calls - - ## - # Retrieves a supported data source and returns its settings. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.get_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists supported data sources and returns their settings. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The BigQuery project id for which data sources should be - # returned. Must be in the form: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListDataSourcesRequest` list results. For multiple-page - # results, `ListDataSourcesResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.list_data_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_data_sources, "data_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new data transfer configuration. - # - # @overload create_transfer_config(request, options = nil) - # Pass arguments to `create_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil) - # Pass arguments to `create_transfer_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The BigQuery project id where the transfer configuration should - # be created. Must be in the format - # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If - # specified location and location of the destination bigquery dataset do not - # match - the request will fail. - # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] - # Required. Data transfer configuration to create. - # @param authorization_code [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-                #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @param version_info [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-                #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @param service_account_name [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new - # - # # Call the create_transfer_config method. - # result = client.create_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def create_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_transfer_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_transfer_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.create_transfer_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a data transfer configuration. - # All fields must be set, even if they are not updated. - # - # @overload update_transfer_config(request, options = nil) - # Pass arguments to `update_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil) - # Pass arguments to `update_transfer_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] - # Required. Data transfer configuration to create. - # @param authorization_code [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-                #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Required list of fields to be updated in this request. - # @param version_info [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-                #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @param service_account_name [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new - # - # # Call the update_transfer_config method. - # result = client.update_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def update_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_transfer_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_transfer_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.update_transfer_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a data transfer configuration, including any associated transfer - # runs and logs. - # - # @overload delete_transfer_config(request, options = nil) - # Pass arguments to `delete_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_transfer_config(name: nil) - # Pass arguments to `delete_transfer_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new - # - # # Call the delete_transfer_config method. - # result = client.delete_transfer_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_transfer_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_transfer_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.delete_transfer_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about a data transfer config. - # - # @overload get_transfer_config(request, options = nil) - # Pass arguments to `get_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_transfer_config(name: nil) - # Pass arguments to `get_transfer_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new - # - # # Call the get_transfer_config method. - # result = client.get_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def get_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_transfer_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_transfer_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.get_transfer_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about all transfer configs owned by a project in the - # specified location. - # - # @overload list_transfer_configs(request, options = nil) - # Pass arguments to `list_transfer_configs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_transfer_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The BigQuery project id for which transfer configs - # should be returned: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @param data_source_ids [::Array<::String>] - # When specified, only configurations of requested data sources are returned. - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransfersRequest` list results. For multiple-page - # results, `ListTransfersResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new - # - # # Call the list_transfer_configs method. - # result = client.list_transfer_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p item - # end - # - def list_transfer_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_transfer_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_transfer_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_transfer_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.list_transfer_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_configs, "transfer_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates transfer runs for a time range [start_time, end_time]. - # For each date - or whatever granularity the data source supports - in the - # range, one transfer run is created. - # Note that runs are created per UTC time in the time range. - # DEPRECATED: use StartManualTransferRuns instead. - # - # @overload schedule_transfer_runs(request, options = nil) - # Pass arguments to `schedule_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) - # Pass arguments to `schedule_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. Start time of the range of transfer runs. For example, - # `"2017-05-25T00:00:00+00:00"`. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. End time of the range of transfer runs. For example, - # `"2017-05-30T00:00:00+00:00"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new - # - # # Call the schedule_transfer_runs method. - # result = client.schedule_transfer_runs request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. - # p result - # - def schedule_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.schedule_transfer_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.schedule_transfer_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.schedule_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.schedule_transfer_runs request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Start manual transfer runs to be executed now with schedule_time equal to - # current time. The transfer runs can be created for a time range where the - # run_time is between start_time (inclusive) and end_time (exclusive), or for - # a specific run_time. - # - # @overload start_manual_transfer_runs(request, options = nil) - # Pass arguments to `start_manual_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil) - # Pass arguments to `start_manual_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param requested_time_range [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange, ::Hash] - # A time_range start and end timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_time_range must be a past time and cannot include future time - # values. - # - # Note: The following parameters are mutually exclusive: `requested_time_range`, `requested_run_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param requested_run_time [::Google::Protobuf::Timestamp, ::Hash] - # A run_time timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_run_time must be a past time and cannot include future time - # values. - # - # Note: The following parameters are mutually exclusive: `requested_run_time`, `requested_time_range`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new - # - # # Call the start_manual_transfer_runs method. - # result = client.start_manual_transfer_runs request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. - # p result - # - def start_manual_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.start_manual_transfer_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.start_manual_transfer_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_manual_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.start_manual_transfer_runs request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about the particular transfer run. - # - # @overload get_transfer_run(request, options = nil) - # Pass arguments to `get_transfer_run` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_transfer_run(name: nil) - # Pass arguments to `get_transfer_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new - # - # # Call the get_transfer_run method. - # result = client.get_transfer_run request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. - # p result - # - def get_transfer_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_transfer_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_transfer_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_transfer_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.get_transfer_run request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified transfer run. - # - # @overload delete_transfer_run(request, options = nil) - # Pass arguments to `delete_transfer_run` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_transfer_run(name: nil) - # Pass arguments to `delete_transfer_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new - # - # # Call the delete_transfer_run method. - # result = client.delete_transfer_run request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_transfer_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_transfer_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_transfer_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_transfer_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.delete_transfer_run request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about running and completed transfer runs. - # - # @overload list_transfer_runs(request, options = nil) - # Pass arguments to `list_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) - # Pass arguments to `list_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of transfer configuration for which transfer runs should be - # retrieved. Format of transfer configuration resource name is: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param states [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] - # When specified, only transfer runs with requested states are returned. - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferRunsRequest` list results. For multiple-page - # results, `ListTransferRunsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @param run_attempt [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] - # Indicates how run attempts are to be pulled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new - # - # # Call the list_transfer_runs method. - # result = client.list_transfer_runs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. - # p item - # end - # - def list_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_transfer_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_transfer_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.list_transfer_runs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_runs, "transfer_runs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns log messages for the transfer run. - # - # @overload list_transfer_logs(request, options = nil) - # Pass arguments to `list_transfer_logs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) - # Pass arguments to `list_transfer_logs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Transfer run name in the form: - # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferLogsRequest` list results. For multiple-page - # results, `ListTransferLogsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @param message_types [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] - # Message types to return. If not populated - INFO, WARNING and ERROR - # messages are returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new - # - # # Call the list_transfer_logs method. - # result = client.list_transfer_logs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage. - # p item - # end - # - def list_transfer_logs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_transfer_logs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_transfer_logs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_transfer_logs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.list_transfer_logs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_logs, "transfer_messages", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns true if valid credentials exist for the given data source and - # requesting user. - # - # @overload check_valid_creds(request, options = nil) - # Pass arguments to `check_valid_creds` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload check_valid_creds(name: nil) - # Pass arguments to `check_valid_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The data source in the form: - # `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new - # - # # Call the check_valid_creds method. - # result = client.check_valid_creds request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. - # p result - # - def check_valid_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.check_valid_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.check_valid_creds.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.check_valid_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.check_valid_creds request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enroll data sources in a user project. This allows users to create transfer - # configurations for these data sources. They will also appear in the - # ListDataSources RPC and as such, will appear in the - # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents - # can be found in the public guide for - # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and - # [Data Transfer - # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). - # - # @overload enroll_data_sources(request, options = nil) - # Pass arguments to `enroll_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enroll_data_sources(name: nil, data_source_ids: nil) - # Pass arguments to `enroll_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @param data_source_ids [::Array<::String>] - # Data sources that are enrolled. It is required to provide at least one - # data source id. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new - # - # # Call the enroll_data_sources method. - # result = client.enroll_data_sources request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def enroll_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enroll_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enroll_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enroll_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.enroll_data_sources request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unenroll data sources in a user project. This allows users to remove - # transfer configurations for these data sources. They will no longer appear - # in the ListDataSources RPC and will also no longer appear in the [BigQuery - # UI](https://console.cloud.google.com/bigquery). Data transfers - # configurations of unenrolled data sources will not be scheduled. - # - # @overload unenroll_data_sources(request, options = nil) - # Pass arguments to `unenroll_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload unenroll_data_sources(name: nil, data_source_ids: nil) - # Pass arguments to `unenroll_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @param data_source_ids [::Array<::String>] - # Data sources that are unenrolled. It is required to provide at least one - # data source id. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new - # - # # Call the unenroll_data_sources method. - # result = client.unenroll_data_sources request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def unenroll_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.unenroll_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.unenroll_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.unenroll_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.unenroll_data_sources request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataTransferService REST API. - # - # This class represents the configuration for DataTransferService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_data_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "bigquerydatatransfer.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DataTransferService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `create_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_transfer_config - ## - # RPC-specific configuration for `update_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_transfer_config - ## - # RPC-specific configuration for `delete_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_transfer_config - ## - # RPC-specific configuration for `get_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_transfer_config - ## - # RPC-specific configuration for `list_transfer_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_configs - ## - # RPC-specific configuration for `schedule_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :schedule_transfer_runs - ## - # RPC-specific configuration for `start_manual_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :start_manual_transfer_runs - ## - # RPC-specific configuration for `get_transfer_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_transfer_run - ## - # RPC-specific configuration for `delete_transfer_run` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_transfer_run - ## - # RPC-specific configuration for `list_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_runs - ## - # RPC-specific configuration for `list_transfer_logs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_logs - ## - # RPC-specific configuration for `check_valid_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :check_valid_creds - ## - # RPC-specific configuration for `enroll_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :enroll_data_sources - ## - # RPC-specific configuration for `unenroll_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :unenroll_data_sources - - # @private - def initialize parent_rpcs = nil - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - create_transfer_config_config = parent_rpcs.create_transfer_config if parent_rpcs.respond_to? :create_transfer_config - @create_transfer_config = ::Gapic::Config::Method.new create_transfer_config_config - update_transfer_config_config = parent_rpcs.update_transfer_config if parent_rpcs.respond_to? :update_transfer_config - @update_transfer_config = ::Gapic::Config::Method.new update_transfer_config_config - delete_transfer_config_config = parent_rpcs.delete_transfer_config if parent_rpcs.respond_to? :delete_transfer_config - @delete_transfer_config = ::Gapic::Config::Method.new delete_transfer_config_config - get_transfer_config_config = parent_rpcs.get_transfer_config if parent_rpcs.respond_to? :get_transfer_config - @get_transfer_config = ::Gapic::Config::Method.new get_transfer_config_config - list_transfer_configs_config = parent_rpcs.list_transfer_configs if parent_rpcs.respond_to? :list_transfer_configs - @list_transfer_configs = ::Gapic::Config::Method.new list_transfer_configs_config - schedule_transfer_runs_config = parent_rpcs.schedule_transfer_runs if parent_rpcs.respond_to? :schedule_transfer_runs - @schedule_transfer_runs = ::Gapic::Config::Method.new schedule_transfer_runs_config - start_manual_transfer_runs_config = parent_rpcs.start_manual_transfer_runs if parent_rpcs.respond_to? :start_manual_transfer_runs - @start_manual_transfer_runs = ::Gapic::Config::Method.new start_manual_transfer_runs_config - get_transfer_run_config = parent_rpcs.get_transfer_run if parent_rpcs.respond_to? :get_transfer_run - @get_transfer_run = ::Gapic::Config::Method.new get_transfer_run_config - delete_transfer_run_config = parent_rpcs.delete_transfer_run if parent_rpcs.respond_to? :delete_transfer_run - @delete_transfer_run = ::Gapic::Config::Method.new delete_transfer_run_config - list_transfer_runs_config = parent_rpcs.list_transfer_runs if parent_rpcs.respond_to? :list_transfer_runs - @list_transfer_runs = ::Gapic::Config::Method.new list_transfer_runs_config - list_transfer_logs_config = parent_rpcs.list_transfer_logs if parent_rpcs.respond_to? :list_transfer_logs - @list_transfer_logs = ::Gapic::Config::Method.new list_transfer_logs_config - check_valid_creds_config = parent_rpcs.check_valid_creds if parent_rpcs.respond_to? :check_valid_creds - @check_valid_creds = ::Gapic::Config::Method.new check_valid_creds_config - enroll_data_sources_config = parent_rpcs.enroll_data_sources if parent_rpcs.respond_to? :enroll_data_sources - @enroll_data_sources = ::Gapic::Config::Method.new enroll_data_sources_config - unenroll_data_sources_config = parent_rpcs.unenroll_data_sources if parent_rpcs.respond_to? :unenroll_data_sources - @unenroll_data_sources = ::Gapic::Config::Method.new unenroll_data_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb deleted file mode 100644 index 0683fbfed415..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb +++ /dev/null @@ -1,1177 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - module Rest - ## - # REST service stub for the DataTransferService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_data_source REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # A result object deserialized from the server's reply - def get_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse] - # A result object deserialized from the server's reply - def list_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # A result object deserialized from the server's reply - def create_transfer_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_transfer_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_transfer_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # A result object deserialized from the server's reply - def update_transfer_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_transfer_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_transfer_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_transfer_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_transfer_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_transfer_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # A result object deserialized from the server's reply - def get_transfer_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_transfer_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_transfer_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_transfer_configs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse] - # A result object deserialized from the server's reply - def list_transfer_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_transfer_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the schedule_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # A result object deserialized from the server's reply - def schedule_transfer_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_schedule_transfer_runs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "schedule_transfer_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the start_manual_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # A result object deserialized from the server's reply - def start_manual_transfer_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_manual_transfer_runs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "start_manual_transfer_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_transfer_run REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # A result object deserialized from the server's reply - def get_transfer_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_transfer_run_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_transfer_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_transfer_run REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_transfer_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_transfer_run_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_transfer_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse] - # A result object deserialized from the server's reply - def list_transfer_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_runs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_transfer_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_transfer_logs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse] - # A result object deserialized from the server's reply - def list_transfer_logs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_logs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_transfer_logs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the check_valid_creds REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # A result object deserialized from the server's reply - def check_valid_creds request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_check_valid_creds_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "check_valid_creds", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enroll_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def enroll_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enroll_data_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enroll_data_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the unenroll_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def unenroll_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_unenroll_data_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "unenroll_data_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_source REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSources", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSources", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_transfer_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/transferConfigs", - body: "transfer_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/transferConfigs", - body: "transfer_config", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_transfer_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{transfer_config.name}", - body: "transfer_config", - matches: [ - ["transfer_config.name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{transfer_config.name}", - body: "transfer_config", - matches: [ - ["transfer_config.name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_transfer_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_transfer_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_transfer_configs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_transfer_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/transferConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/transferConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the schedule_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_schedule_transfer_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:scheduleRuns", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:scheduleRuns", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_manual_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_manual_transfer_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:startManualRuns", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:startManualRuns", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_transfer_run REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_transfer_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_transfer_run REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_transfer_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_transfer_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/runs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/runs", - matches: [ - ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_transfer_logs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_transfer_logs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/transferLogs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/transferLogs", - matches: [ - ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the check_valid_creds REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_check_valid_creds_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:checkValidCreds", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:checkValidCreds", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enroll_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enroll_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:enrollDataSources", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:enrollDataSources", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the unenroll_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_unenroll_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:unenrollDataSources", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb deleted file mode 100644 index f6e1e405ec02..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" -require "google/cloud/bigquery/data_transfer/v1/bindings_override" -require "google/cloud/bigquery/data_transfer/v1/version" - -module Google - module Cloud - module Bigquery - module DataTransfer - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/data_transfer/v1/rest" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb deleted file mode 100644 index 048f745f46a1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb deleted file mode 100644 index 2e3350ee7636..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/bigquery/datatransfer/v1/transfer_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n8google/cloud/bigquery/datatransfer/v1/datatransfer.proto\x12%google.cloud.bigquery.datatransfer.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/bigquery/datatransfer/v1/transfer.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x8f\x05\n\x13\x44\x61taSourceParameter\x12\x10\n\x08param_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12M\n\x04type\x18\x04 \x01(\x0e\x32?.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type\x12\x10\n\x08required\x18\x05 \x01(\x08\x12\x10\n\x08repeated\x18\x06 \x01(\x08\x12\x18\n\x10validation_regex\x18\x07 \x01(\t\x12\x16\n\x0e\x61llowed_values\x18\x08 \x03(\t\x12/\n\tmin_value\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\tmax_value\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12J\n\x06\x66ields\x18\x0b \x03(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.DataSourceParameter\x12\x1e\n\x16validation_description\x18\x0c \x01(\t\x12\x1b\n\x13validation_help_url\x18\r \x01(\t\x12\x11\n\timmutable\x18\x0e \x01(\x08\x12\x0f\n\x07recurse\x18\x0f \x01(\x08\x12\x12\n\ndeprecated\x18\x14 \x01(\x08\"s\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\n\n\x06RECORD\x10\x05\x12\r\n\tPLUS_PAGE\x10\x06\x12\x08\n\x04LIST\x10\x07\"\x9c\t\n\nDataSource\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x0e\x64\x61ta_source_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x11\n\tclient_id\x18\x05 \x01(\t\x12\x0e\n\x06scopes\x18\x06 \x03(\t\x12N\n\rtransfer_type\x18\x07 \x01(\x0e\x32\x33.google.cloud.bigquery.datatransfer.v1.TransferTypeB\x02\x18\x01\x12\'\n\x1bsupports_multiple_transfers\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1f\n\x17update_deadline_seconds\x18\t \x01(\x05\x12\x18\n\x10\x64\x65\x66\x61ult_schedule\x18\n \x01(\t\x12 \n\x18supports_custom_schedule\x18\x0b \x01(\x08\x12N\n\nparameters\x18\x0c \x03(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.DataSourceParameter\x12\x10\n\x08help_url\x18\r \x01(\t\x12_\n\x12\x61uthorization_type\x18\x0e \x01(\x0e\x32\x43.google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType\x12\\\n\x11\x64\x61ta_refresh_type\x18\x0f \x01(\x0e\x32\x41.google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType\x12(\n default_data_refresh_window_days\x18\x10 \x01(\x05\x12\x1c\n\x14manual_runs_disabled\x18\x11 \x01(\x08\x12<\n\x19minimum_schedule_interval\x18\x12 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8a\x01\n\x11\x41uthorizationType\x12\"\n\x1e\x41UTHORIZATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41UTHORIZATION_CODE\x10\x01\x12\"\n\x1eGOOGLE_PLUS_AUTHORIZATION_CODE\x10\x02\x12\x15\n\x11\x46IRST_PARTY_OAUTH\x10\x03\"c\n\x0f\x44\x61taRefreshType\x12!\n\x1d\x44\x41TA_REFRESH_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSLIDING_WINDOW\x10\x01\x12\x19\n\x15\x43USTOM_SLIDING_WINDOW\x10\x02:\xa5\x01\xea\x41\xa1\x01\n.bigquerydatatransfer.googleapis.com/DataSource\x12,projects/{project}/dataSources/{data_source}\x12\x41projects/{project}/locations/{location}/dataSources/{data_source}\"\\\n\x14GetDataSourceRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigquerydatatransfer.googleapis.com/DataSource\"\x87\x01\n\x16ListDataSourcesRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigquerydatatransfer.googleapis.com/DataSource\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"\x80\x01\n\x17ListDataSourcesResponse\x12G\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.datatransfer.v1.DataSource\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x92\x02\n\x1b\x43reateTransferConfigRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32\x62igquerydatatransfer.googleapis.com/TransferConfig\x12S\n\x0ftransfer_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x02\x12\x1e\n\x12\x61uthorization_code\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x0cversion_info\x18\x05 \x01(\t\x12\x1c\n\x14service_account_name\x18\x06 \x01(\t\"\xfc\x01\n\x1bUpdateTransferConfigRequest\x12S\n\x0ftransfer_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x02\x12\x1e\n\x12\x61uthorization_code\x18\x03 \x01(\tB\x02\x18\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x14\n\x0cversion_info\x18\x05 \x01(\t\x12\x1c\n\x14service_account_name\x18\x06 \x01(\t\"d\n\x18GetTransferConfigRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\"g\n\x1b\x44\x65leteTransferConfigRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\"V\n\x15GetTransferRunRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\"Y\n\x18\x44\x65leteTransferRunRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\"\xa8\x01\n\x1aListTransferConfigsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32\x62igquerydatatransfer.googleapis.com/TransferConfig\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"\x91\x01\n\x1bListTransferConfigsResponse\x12T\n\x10transfer_configs\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xde\x02\n\x17ListTransferRunsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'bigquerydatatransfer.googleapis.com/Run\x12\x44\n\x06states\x18\x02 \x03(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferState\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12^\n\x0brun_attempt\x18\x05 \x01(\x0e\x32I.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt\"5\n\nRunAttempt\x12\x1b\n\x17RUN_ATTEMPT_UNSPECIFIED\x10\x00\x12\n\n\x06LATEST\x10\x01\"\x88\x01\n\x18ListTransferRunsResponse\x12N\n\rtransfer_runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRunB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xe0\x01\n\x17ListTransferLogsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12]\n\rmessage_types\x18\x06 \x03(\x0e\x32\x46.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity\"\x90\x01\n\x18ListTransferLogsResponse\x12V\n\x11transfer_messages\x18\x01 \x03(\x0b\x32\x36.google.cloud.bigquery.datatransfer.v1.TransferMessageB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"^\n\x16\x43heckValidCredsRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigquerydatatransfer.googleapis.com/DataSource\"2\n\x17\x43heckValidCredsResponse\x12\x17\n\x0fhas_valid_creds\x18\x01 \x01(\x08\"\xd1\x01\n\x1bScheduleTransferRunsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"`\n\x1cScheduleTransferRunsResponse\x12@\n\x04runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"\x8a\x03\n\x1eStartManualTransferRunsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12o\n\x14requested_time_range\x18\x03 \x01(\x0b\x32O.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRangeH\x00\x12\x38\n\x12requested_run_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x1ai\n\tTimeRange\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\n\x04time\"c\n\x1fStartManualTransferRunsResponse\x12@\n\x04runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"F\n\x18\x45nrollDataSourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t\"H\n\x1aUnenrollDataSourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t2\xd5\"\n\x13\x44\x61taTransferService\x12\xe6\x01\n\rGetDataSource\x12;.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest\x1a\x31.google.cloud.bigquery.datatransfer.v1.DataSource\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X\x12//v1/{name=projects/*/locations/*/dataSources/*}Z%\x12#/v1/{name=projects/*/dataSources/*}\x12\xf9\x01\n\x0fListDataSources\x12=.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest\x1a>.google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse\"g\xda\x41\x06parent\x82\xd3\xe4\x93\x02X\x12//v1/{parent=projects/*/locations/*}/dataSourcesZ%\x12#/v1/{parent=projects/*}/dataSources\x12\xb6\x02\n\x14\x43reateTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"\xa2\x01\xda\x41\x16parent,transfer_config\x82\xd3\xe4\x93\x02\x82\x01\"3/v1/{parent=projects/*/locations/*}/transferConfigs:\x0ftransfer_configZ:\"\'/v1/{parent=projects/*}/transferConfigs:\x0ftransfer_config\x12\xdb\x02\n\x14UpdateTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"\xc7\x01\xda\x41\x1btransfer_config,update_mask\x82\xd3\xe4\x93\x02\xa2\x01\x32\x43/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}:\x0ftransfer_configZJ27/v1/{transfer_config.name=projects/*/transferConfigs/*}:\x0ftransfer_config\x12\xe1\x01\n\x14\x44\x65leteTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest\x1a\x16.google.protobuf.Empty\"m\xda\x41\x04name\x82\xd3\xe4\x93\x02`*3/v1/{name=projects/*/locations/*/transferConfigs/*}Z)*\'/v1/{name=projects/*/transferConfigs/*}\x12\xfa\x01\n\x11GetTransferConfig\x12?.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"m\xda\x41\x04name\x82\xd3\xe4\x93\x02`\x12\x33/v1/{name=projects/*/locations/*/transferConfigs/*}Z)\x12\'/v1/{name=projects/*/transferConfigs/*}\x12\x8d\x02\n\x13ListTransferConfigs\x12\x41.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest\x1a\x42.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse\"o\xda\x41\x06parent\x82\xd3\xe4\x93\x02`\x12\x33/v1/{parent=projects/*/locations/*}/transferConfigsZ)\x12\'/v1/{parent=projects/*}/transferConfigs\x12\xcd\x02\n\x14ScheduleTransferRuns\x12\x42.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest\x1a\x43.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse\"\xab\x01\x88\x02\x01\xda\x41\x1aparent,start_time,end_time\x82\xd3\xe4\x93\x02\x84\x01\"B/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns:\x01*Z;\"6/v1/{parent=projects/*/transferConfigs/*}:scheduleRuns:\x01*\x12\xbc\x02\n\x17StartManualTransferRuns\x12\x45.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest\x1a\x46.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse\"\x91\x01\x82\xd3\xe4\x93\x02\x8a\x01\"E/v1/{parent=projects/*/locations/*/transferConfigs/*}:startManualRuns:\x01*Z>\"9/v1/{parent=projects/*/transferConfigs/*}:startManualRuns:\x01*\x12\xff\x01\n\x0eGetTransferRun\x12<.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest\x1a\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"{\xda\x41\x04name\x82\xd3\xe4\x93\x02n\x12:/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}Z0\x12./v1/{name=projects/*/transferConfigs/*/runs/*}\x12\xe9\x01\n\x11\x44\x65leteTransferRun\x12?.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest\x1a\x16.google.protobuf.Empty\"{\xda\x41\x04name\x82\xd3\xe4\x93\x02n*:/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}Z0*./v1/{name=projects/*/transferConfigs/*/runs/*}\x12\x92\x02\n\x10ListTransferRuns\x12>.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest\x1a?.google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse\"}\xda\x41\x06parent\x82\xd3\xe4\x93\x02n\x12:/v1/{parent=projects/*/locations/*/transferConfigs/*}/runsZ0\x12./v1/{parent=projects/*/transferConfigs/*}/runs\x12\xb2\x02\n\x10ListTransferLogs\x12>.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest\x1a?.google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse\"\x9c\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8c\x01\x12I/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/transferLogsZ?\x12=/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs\x12\x9e\x02\n\x0f\x43heckValidCreds\x12=.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest\x1a>.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse\"\x8b\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02~\"?/v1/{name=projects/*/locations/*/dataSources/*}:checkValidCreds:\x01*Z8\"3/v1/{name=projects/*/dataSources/*}:checkValidCreds:\x01*\x12\xda\x01\n\x11\x45nrollDataSources\x12?.google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest\x1a\x16.google.protobuf.Empty\"l\x82\xd3\xe4\x93\x02\x66\"3/v1/{name=projects/*/locations/*}:enrollDataSources:\x01*Z,\"\'/v1/{name=projects/*}:enrollDataSources:\x01*\x12\xb2\x01\n\x13UnenrollDataSources\x12\x41.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest\x1a\x16.google.protobuf.Empty\"@\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*}:unenrollDataSources:\x01*\x1aW\xca\x41#bigquerydatatransfer.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8b\x02\n)com.google.cloud.bigquery.datatransfer.v1B\x11\x44\x61taTransferProtoP\x01ZMcloud.google.com/go/bigquery/datatransfer/apiv1/datatransferpb;datatransferpb\xaa\x02%Google.Cloud.BigQuery.DataTransfer.V1\xca\x02%Google\\Cloud\\BigQuery\\DataTransfer\\V1\xea\x02)Google::Cloud::Bigquery::DataTransfer::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - DataSourceParameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSourceParameter").msgclass - DataSourceParameter::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type").enummodule - DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource").msgclass - DataSource::AuthorizationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType").enummodule - DataSource::DataRefreshType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType").enummodule - GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest").msgclass - ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest").msgclass - ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse").msgclass - CreateTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest").msgclass - UpdateTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest").msgclass - GetTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest").msgclass - DeleteTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest").msgclass - GetTransferRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest").msgclass - DeleteTransferRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest").msgclass - ListTransferConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest").msgclass - ListTransferConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse").msgclass - ListTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest").msgclass - ListTransferRunsRequest::RunAttempt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt").enummodule - ListTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse").msgclass - ListTransferLogsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest").msgclass - ListTransferLogsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse").msgclass - CheckValidCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest").msgclass - CheckValidCredsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse").msgclass - ScheduleTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest").msgclass - ScheduleTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse").msgclass - StartManualTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest").msgclass - StartManualTransferRunsRequest::TimeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange").msgclass - StartManualTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse").msgclass - EnrollDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest").msgclass - UnenrollDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb deleted file mode 100644 index 87f710bad15b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb +++ /dev/null @@ -1,99 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto for package 'Google.Cloud.Bigquery.DataTransfer.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/bigquery/datatransfer/v1/datatransfer_pb' - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - # This API allows users to manage their data transfers into BigQuery. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.datatransfer.v1.DataTransferService' - - # Retrieves a supported data source and returns its settings. - rpc :GetDataSource, ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource - # Lists supported data sources and returns their settings. - rpc :ListDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse - # Creates a new data transfer configuration. - rpc :CreateTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig - # Updates a data transfer configuration. - # All fields must be set, even if they are not updated. - rpc :UpdateTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig - # Deletes a data transfer configuration, including any associated transfer - # runs and logs. - rpc :DeleteTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Google::Protobuf::Empty - # Returns information about a data transfer config. - rpc :GetTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig - # Returns information about all transfer configs owned by a project in the - # specified location. - rpc :ListTransferConfigs, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse - # Creates transfer runs for a time range [start_time, end_time]. - # For each date - or whatever granularity the data source supports - in the - # range, one transfer run is created. - # Note that runs are created per UTC time in the time range. - # DEPRECATED: use StartManualTransferRuns instead. - rpc :ScheduleTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse - # Start manual transfer runs to be executed now with schedule_time equal to - # current time. The transfer runs can be created for a time range where the - # run_time is between start_time (inclusive) and end_time (exclusive), or for - # a specific run_time. - rpc :StartManualTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse - # Returns information about the particular transfer run. - rpc :GetTransferRun, ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun - # Deletes the specified transfer run. - rpc :DeleteTransferRun, ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Google::Protobuf::Empty - # Returns information about running and completed transfer runs. - rpc :ListTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse - # Returns log messages for the transfer run. - rpc :ListTransferLogs, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse - # Returns true if valid credentials exist for the given data source and - # requesting user. - rpc :CheckValidCreds, ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse - # Enroll data sources in a user project. This allows users to create transfer - # configurations for these data sources. They will also appear in the - # ListDataSources RPC and as such, will appear in the - # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents - # can be found in the public guide for - # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and - # [Data Transfer - # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). - rpc :EnrollDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Google::Protobuf::Empty - # Unenroll data sources in a user project. This allows users to remove - # transfer configurations for these data sources. They will no longer appear - # in the ListDataSources RPC and will also no longer appear in the [BigQuery - # UI](https://console.cloud.google.com/bigquery). Data transfers - # configurations of unenrolled data sources will not be scheduled. - rpc :UnenrollDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb deleted file mode 100644 index 6e1bfea6e14f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/datatransfer/v1/transfer.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n4google/cloud/bigquery/datatransfer/v1/transfer.proto\x12%google.cloud.bigquery.datatransfer.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"0\n\x10\x45mailPreferences\x12\x1c\n\x14\x65nable_failure_email\x18\x01 \x01(\x08\"\x90\x01\n\x0fScheduleOptions\x12\x1f\n\x17\x64isable_auto_scheduling\x18\x03 \x01(\x08\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa7\x02\n\x11ScheduleOptionsV2\x12W\n\x13time_based_schedule\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.datatransfer.v1.TimeBasedScheduleH\x00\x12P\n\x0fmanual_schedule\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.ManualScheduleH\x00\x12[\n\x15\x65vent_driven_schedule\x18\x03 \x01(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.EventDrivenScheduleH\x00\x42\n\n\x08schedule\"\x83\x01\n\x11TimeBasedSchedule\x12\x10\n\x08schedule\x18\x01 \x01(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x10\n\x0eManualSchedule\"2\n\x13\x45ventDrivenSchedule\x12\x1b\n\x13pubsub_subscription\x18\x01 \x01(\t\"(\n\x08UserInfo\x12\x12\n\x05\x65mail\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_email\"\x9b\t\n\x0eTransferConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12 \n\x16\x64\x65stination_dataset_id\x18\x02 \x01(\tH\x00\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x16\n\x0e\x64\x61ta_source_id\x18\x05 \x01(\t\x12\'\n\x06params\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08schedule\x18\x07 \x01(\t\x12P\n\x10schedule_options\x18\x18 \x01(\x0b\x32\x36.google.cloud.bigquery.datatransfer.v1.ScheduleOptions\x12U\n\x13schedule_options_v2\x18\x1f \x01(\x0b\x32\x38.google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2\x12 \n\x18\x64\x61ta_refresh_window_days\x18\x0c \x01(\x05\x12\x10\n\x08\x64isabled\x18\r \x01(\x08\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rnext_run_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x05state\x18\n \x01(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferStateB\x03\xe0\x41\x03\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\x12\x1b\n\x0e\x64\x61taset_region\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12!\n\x19notification_pubsub_topic\x18\x0f \x01(\t\x12R\n\x11\x65mail_preferences\x18\x12 \x01(\x0b\x32\x37.google.cloud.bigquery.datatransfer.v1.EmailPreferences\x12M\n\nowner_info\x18\x1b \x01(\x0b\x32/.google.cloud.bigquery.datatransfer.v1.UserInfoB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12`\n\x18\x65ncryption_configuration\x18\x1c \x01(\x0b\x32>.google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration\x12&\n\x05\x65rror\x18 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03:\xb9\x01\xea\x41\xb5\x01\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12\x34projects/{project}/transferConfigs/{transfer_config}\x12Iprojects/{project}/locations/{location}/transferConfigs/{transfer_config}B\r\n\x0b\x64\x65stinationB\r\n\x0b_owner_info\"M\n\x17\x45ncryptionConfiguration\x12\x32\n\x0ckms_key_name\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValue\"\xff\x06\n\x0bTransferRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x31\n\rschedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08run_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12(\n\x0c\x65rror_status\x18\x15 \x01(\x0b\x32\x12.google.rpc.Status\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12,\n\x06params\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12%\n\x16\x64\x65stination_dataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1b\n\x0e\x64\x61ta_source_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x43\n\x05state\x18\x08 \x01(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferState\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\x12\x15\n\x08schedule\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12&\n\x19notification_pubsub_topic\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12W\n\x11\x65mail_preferences\x18\x19 \x01(\x0b\x32\x37.google.cloud.bigquery.datatransfer.v1.EmailPreferencesB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n\'bigquerydatatransfer.googleapis.com/Run\x12?projects/{project}/transferConfigs/{transfer_config}/runs/{run}\x12Tprojects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}B\r\n\x0b\x64\x65stination\"\x8a\x02\n\x0fTransferMessage\x12\x30\n\x0cmessage_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x08severity\x18\x02 \x01(\x0e\x32\x46.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity\x12\x14\n\x0cmessage_text\x18\x03 \x01(\t\"U\n\x0fMessageSeverity\x12 \n\x1cMESSAGE_SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03*K\n\x0cTransferType\x12\x1d\n\x19TRANSFER_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41TCH\x10\x01\x12\r\n\tSTREAMING\x10\x02\x1a\x02\x18\x01*s\n\rTransferState\x12\x1e\n\x1aTRANSFER_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\r\n\tCANCELLED\x10\x06\x42\x8f\x02\n)com.google.cloud.bigquery.datatransfer.v1B\rTransferProtoP\x01ZMcloud.google.com/go/bigquery/datatransfer/apiv1/datatransferpb;datatransferpb\xa2\x02\x05GCBDT\xaa\x02%Google.Cloud.BigQuery.DataTransfer.V1\xca\x02%Google\\Cloud\\BigQuery\\DataTransfer\\V1\xea\x02)Google::Cloud::Bigquery::DataTransfer::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EmailPreferences").msgclass - ScheduleOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleOptions").msgclass - ScheduleOptionsV2 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2").msgclass - TimeBasedSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TimeBasedSchedule").msgclass - ManualSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ManualSchedule").msgclass - EventDrivenSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule").msgclass - UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UserInfo").msgclass - TransferConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferConfig").msgclass - EncryptionConfiguration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration").msgclass - TransferRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferRun").msgclass - TransferMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferMessage").msgclass - TransferMessage::MessageSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity").enummodule - TransferType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferType").enummodule - TransferState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferState").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md deleted file mode 100644 index 614f3cdea732..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Data Transfer Service V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb deleted file mode 100644 index 8aee7c146a1f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb +++ /dev/null @@ -1,726 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - # A parameter used to define custom fields in a data source definition. - # @!attribute [rw] param_id - # @return [::String] - # Parameter identifier. - # @!attribute [rw] display_name - # @return [::String] - # Parameter display name in the user interface. - # @!attribute [rw] description - # @return [::String] - # Parameter description. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter::Type] - # Parameter type. - # @!attribute [rw] required - # @return [::Boolean] - # Is parameter required. - # @!attribute [rw] repeated - # @return [::Boolean] - # Deprecated. This field has no effect. - # @!attribute [rw] validation_regex - # @return [::String] - # Regular expression which can be used for parameter validation. - # @!attribute [rw] allowed_values - # @return [::Array<::String>] - # All possible values for the parameter. - # @!attribute [rw] min_value - # @return [::Google::Protobuf::DoubleValue] - # For integer and double values specifies minimum allowed value. - # @!attribute [rw] max_value - # @return [::Google::Protobuf::DoubleValue] - # For integer and double values specifies maximum allowed value. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>] - # Deprecated. This field has no effect. - # @!attribute [rw] validation_description - # @return [::String] - # Description of the requirements for this field, in case the user input does - # not fulfill the regex pattern or min/max values. - # @!attribute [rw] validation_help_url - # @return [::String] - # URL to a help document to further explain the naming requirements. - # @!attribute [rw] immutable - # @return [::Boolean] - # Cannot be changed after initial creation. - # @!attribute [rw] recurse - # @return [::Boolean] - # Deprecated. This field has no effect. - # @!attribute [rw] deprecated - # @return [::Boolean] - # If true, it should not be used in new transfers, and it should not be - # visible to users. - class DataSourceParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Parameter type. - module Type - # Type unspecified. - TYPE_UNSPECIFIED = 0 - - # String parameter. - STRING = 1 - - # Integer parameter (64-bits). - # Will be serialized to json as string. - INTEGER = 2 - - # Double precision floating point parameter. - DOUBLE = 3 - - # Boolean parameter. - BOOLEAN = 4 - - # Deprecated. This field has no effect. - RECORD = 5 - - # Page ID for a Google+ Page. - PLUS_PAGE = 6 - - # List of strings parameter. - LIST = 7 - end - end - - # Defines the properties and custom parameters for a data source. - # @!attribute [r] name - # @return [::String] - # Output only. Data source resource name. - # @!attribute [rw] data_source_id - # @return [::String] - # Data source id. - # @!attribute [rw] display_name - # @return [::String] - # User friendly data source name. - # @!attribute [rw] description - # @return [::String] - # User friendly data source description string. - # @!attribute [rw] client_id - # @return [::String] - # Data source client id which should be used to receive refresh token. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # Api auth scopes for which refresh token needs to be obtained. These are - # scopes needed by a data source to prepare data and ingest them into - # BigQuery, e.g., https://www.googleapis.com/auth/bigquery - # @!attribute [rw] transfer_type - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferType] - # Deprecated. This field has no effect. - # @!attribute [rw] supports_multiple_transfers - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Deprecated. This field has no effect. - # @!attribute [rw] update_deadline_seconds - # @return [::Integer] - # The number of seconds to wait for an update from the data source - # before the Data Transfer Service marks the transfer as FAILED. - # @!attribute [rw] default_schedule - # @return [::String] - # Default data transfer schedule. - # Examples of valid schedules include: - # `1st,3rd monday of month 15:30`, - # `every wed,fri of jan,jun 13:15`, and - # `first sunday of quarter 00:00`. - # @!attribute [rw] supports_custom_schedule - # @return [::Boolean] - # Specifies whether the data source supports a user defined schedule, or - # operates on the default schedule. - # When set to `true`, user can override default schedule. - # @!attribute [rw] parameters - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>] - # Data source parameters. - # @!attribute [rw] help_url - # @return [::String] - # Url for the help document for this data source. - # @!attribute [rw] authorization_type - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource::AuthorizationType] - # Indicates the type of authorization. - # @!attribute [rw] data_refresh_type - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource::DataRefreshType] - # Specifies whether the data source supports automatic data refresh for the - # past few days, and how it's supported. - # For some data sources, data might not be complete until a few days later, - # so it's useful to refresh data automatically. - # @!attribute [rw] default_data_refresh_window_days - # @return [::Integer] - # Default data refresh window on days. - # Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. - # @!attribute [rw] manual_runs_disabled - # @return [::Boolean] - # Disables backfilling and manual run scheduling - # for the data source. - # @!attribute [rw] minimum_schedule_interval - # @return [::Google::Protobuf::Duration] - # The minimum interval for scheduler to schedule runs. - class DataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of authorization needed for this data source. - module AuthorizationType - # Type unspecified. - AUTHORIZATION_TYPE_UNSPECIFIED = 0 - - # Use OAuth 2 authorization codes that can be exchanged - # for a refresh token on the backend. - AUTHORIZATION_CODE = 1 - - # Return an authorization code for a given Google+ page that can then be - # exchanged for a refresh token on the backend. - GOOGLE_PLUS_AUTHORIZATION_CODE = 2 - - # Use First Party OAuth. - FIRST_PARTY_OAUTH = 3 - end - - # Represents how the data source supports data auto refresh. - module DataRefreshType - # The data source won't support data auto refresh, which is default value. - DATA_REFRESH_TYPE_UNSPECIFIED = 0 - - # The data source supports data auto refresh, and runs will be scheduled - # for the past few days. Does not allow custom values to be set for each - # transfer config. - SLIDING_WINDOW = 1 - - # The data source supports data auto refresh, and runs will be scheduled - # for the past few days. Allows custom values to be set for each transfer - # config. - CUSTOM_SLIDING_WINDOW = 2 - end - end - - # A request to get data source info. - # @!attribute [rw] name - # @return [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` - class GetDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list supported data sources and their data transfer settings. - # @!attribute [rw] parent - # @return [::String] - # Required. The BigQuery project id for which data sources should be - # returned. Must be in the form: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] page_token - # @return [::String] - # Pagination token, which can be used to request a specific page - # of `ListDataSourcesRequest` list results. For multiple-page - # results, `ListDataSourcesResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - class ListDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Returns list of supported data sources and their metadata. - # @!attribute [rw] data_sources - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] - # List of supported data sources and their transfer settings. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The next-pagination token. For multiple-page list results, - # this token can be used as the - # `ListDataSourcesRequest.page_token` - # to request the next page of list results. - class ListDataSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a data transfer configuration. If new credentials are - # needed for this transfer configuration, authorization info must be provided. - # If authorization info is provided, the transfer configuration will be - # associated with the user id corresponding to the authorization info. - # Otherwise, the transfer configuration will be associated with the calling - # user. - # - # When using a cross project service account for creating a transfer config, - # you must enable cross project service account usage. For more information, - # see [Disable attachment of service accounts to resources in other - # projects](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts#disable_cross_project_service_accounts). - # @!attribute [rw] parent - # @return [::String] - # Required. The BigQuery project id where the transfer configuration should - # be created. Must be in the format - # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If - # specified location and location of the destination bigquery dataset do not - # match - the request will fail. - # @!attribute [rw] transfer_config - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # Required. Data transfer configuration to create. - # @!attribute [rw] authorization_code - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-          #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @!attribute [rw] version_info - # @return [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-          #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @!attribute [rw] service_account_name - # @return [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - class CreateTransferConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a transfer configuration. To update the user id of the - # transfer configuration, authorization info needs to be provided. - # - # When using a cross project service account for updating a transfer config, - # you must enable cross project service account usage. For more information, - # see [Disable attachment of service accounts to resources in other - # projects](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts#disable_cross_project_service_accounts). - # @!attribute [rw] transfer_config - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # Required. Data transfer configuration to create. - # @!attribute [rw] authorization_code - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-          #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Required list of fields to be updated in this request. - # @!attribute [rw] version_info - # @return [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-          #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @!attribute [rw] service_account_name - # @return [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - class UpdateTransferConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get data transfer information. - # @!attribute [rw] name - # @return [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - class GetTransferConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete data transfer information. All associated transfer runs - # and log messages will be deleted as well. - # @!attribute [rw] name - # @return [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - class DeleteTransferConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get data transfer run information. - # @!attribute [rw] name - # @return [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - class GetTransferRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete data transfer run information. - # @!attribute [rw] name - # @return [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - class DeleteTransferRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list data transfers configured for a BigQuery project. - # @!attribute [rw] parent - # @return [::String] - # Required. The BigQuery project id for which transfer configs - # should be returned: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] data_source_ids - # @return [::Array<::String>] - # When specified, only configurations of requested data sources are returned. - # @!attribute [rw] page_token - # @return [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransfersRequest` list results. For multiple-page - # results, `ListTransfersResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - class ListTransferConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The returned list of pipelines in the project. - # @!attribute [r] transfer_configs - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] - # Output only. The stored pipeline transfer configurations. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The next-pagination token. For multiple-page list results, - # this token can be used as the - # `ListTransferConfigsRequest.page_token` - # to request the next page of list results. - class ListTransferConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list data transfer runs. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of transfer configuration for which transfer runs should be - # retrieved. Format of transfer configuration resource name is: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @!attribute [rw] states - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] - # When specified, only transfer runs with requested states are returned. - # @!attribute [rw] page_token - # @return [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferRunsRequest` list results. For multiple-page - # results, `ListTransferRunsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @!attribute [rw] run_attempt - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] - # Indicates how run attempts are to be pulled. - class ListTransferRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents which runs should be pulled. - module RunAttempt - # All runs should be returned. - RUN_ATTEMPT_UNSPECIFIED = 0 - - # Only latest run per day should be returned. - LATEST = 1 - end - end - - # The returned list of pipelines in the project. - # @!attribute [r] transfer_runs - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # Output only. The stored pipeline transfer runs. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The next-pagination token. For multiple-page list results, - # this token can be used as the - # `ListTransferRunsRequest.page_token` - # to request the next page of list results. - class ListTransferRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get user facing log messages associated with data transfer run. - # @!attribute [rw] parent - # @return [::String] - # Required. Transfer run name in the form: - # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # @!attribute [rw] page_token - # @return [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferLogsRequest` list results. For multiple-page - # results, `ListTransferLogsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @!attribute [rw] message_types - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] - # Message types to return. If not populated - INFO, WARNING and ERROR - # messages are returned. - class ListTransferLogsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The returned list transfer run messages. - # @!attribute [r] transfer_messages - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] - # Output only. The stored pipeline transfer messages. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The next-pagination token. For multiple-page list results, - # this token can be used as the - # `GetTransferRunLogRequest.page_token` - # to request the next page of list results. - class ListTransferLogsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to determine whether the user has valid credentials. This method - # is used to limit the number of OAuth popups in the user interface. The - # user id is inferred from the API call context. - # If the data source has the Google+ authorization type, this method - # returns false, as it cannot be determined whether the credentials are - # already valid merely based on the user id. - # @!attribute [rw] name - # @return [::String] - # Required. The data source in the form: - # `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. - class CheckValidCredsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response indicating whether the credentials exist and are valid. - # @!attribute [rw] has_valid_creds - # @return [::Boolean] - # If set to `true`, the credentials exist and are valid. - class CheckValidCredsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to schedule transfer runs for a time range. - # @!attribute [rw] parent - # @return [::String] - # Required. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. Start time of the range of transfer runs. For example, - # `"2017-05-25T00:00:00+00:00"`. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. End time of the range of transfer runs. For example, - # `"2017-05-30T00:00:00+00:00"`. - class ScheduleTransferRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to schedule transfer runs for a time range. - # @!attribute [rw] runs - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # The transfer runs that were scheduled. - class ScheduleTransferRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to start manual transfer runs. - # @!attribute [rw] parent - # @return [::String] - # Required. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @!attribute [rw] requested_time_range - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange] - # A time_range start and end timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_time_range must be a past time and cannot include future time - # values. - # - # Note: The following fields are mutually exclusive: `requested_time_range`, `requested_run_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] requested_run_time - # @return [::Google::Protobuf::Timestamp] - # A run_time timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_run_time must be a past time and cannot include future time - # values. - # - # Note: The following fields are mutually exclusive: `requested_run_time`, `requested_time_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class StartManualTransferRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A specification for a time range, this will request transfer runs with - # run_time between start_time (inclusive) and end_time (exclusive). - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Start time of the range of transfer runs. For example, - # `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than - # the end_time. Creates transfer runs where run_time is in the range - # between start_time (inclusive) and end_time (exclusive). - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # End time of the range of transfer runs. For example, - # `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. - # Creates transfer runs where run_time is in the range between start_time - # (inclusive) and end_time (exclusive). - class TimeRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A response to start manual transfer runs. - # @!attribute [rw] runs - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # The transfer runs that were created. - class StartManualTransferRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to enroll a set of data sources so they are visible in the - # BigQuery UI's `Transfer` tab. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @!attribute [rw] data_source_ids - # @return [::Array<::String>] - # Data sources that are enrolled. It is required to provide at least one - # data source id. - class EnrollDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to unenroll a set of data sources so they are no longer visible in - # the BigQuery UI's `Transfer` tab. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @!attribute [rw] data_source_ids - # @return [::Array<::String>] - # Data sources that are unenrolled. It is required to provide at least one - # data source id. - class UnenrollDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb deleted file mode 100644 index f655c166e495..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb +++ /dev/null @@ -1,411 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - # Represents preferences for sending email notifications for transfer run - # events. - # @!attribute [rw] enable_failure_email - # @return [::Boolean] - # If true, email notifications will be sent on transfer run failures. - class EmailPreferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options customizing the data transfer schedule. - # @!attribute [rw] disable_auto_scheduling - # @return [::Boolean] - # If true, automatic scheduling of data transfer runs for this configuration - # will be disabled. The runs can be started on ad-hoc basis using - # StartManualTransferRuns API. When automatic scheduling is disabled, the - # TransferConfig.schedule field will be ignored. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Specifies time to start scheduling transfer runs. The first run will be - # scheduled at or after the start time according to a recurrence pattern - # defined in the schedule string. The start time can be changed at any - # moment. The time when a data transfer can be triggered manually is not - # limited by this option. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Defines time to stop scheduling transfer runs. A transfer run cannot be - # scheduled at or after the end time. The end time can be changed at any - # moment. The time when a data transfer can be triggered manually is not - # limited by this option. - class ScheduleOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # V2 options customizing different types of data transfer schedule. - # This field supports existing time-based and manual transfer schedule. Also - # supports Event-Driven transfer schedule. ScheduleOptionsV2 cannot be used - # together with ScheduleOptions/Schedule. - # @!attribute [rw] time_based_schedule - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TimeBasedSchedule] - # Time based transfer schedule options. This is the default schedule - # option. - # - # Note: The following fields are mutually exclusive: `time_based_schedule`, `manual_schedule`, `event_driven_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] manual_schedule - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ManualSchedule] - # Manual transfer schedule. If set, the transfer run will not be - # auto-scheduled by the system, unless the client invokes - # StartManualTransferRuns. This is equivalent to - # disable_auto_scheduling = true. - # - # Note: The following fields are mutually exclusive: `manual_schedule`, `time_based_schedule`, `event_driven_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] event_driven_schedule - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EventDrivenSchedule] - # Event driven transfer schedule options. If set, the transfer will be - # scheduled upon events arrial. - # - # Note: The following fields are mutually exclusive: `event_driven_schedule`, `time_based_schedule`, `manual_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ScheduleOptionsV2 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options customizing the time based transfer schedule. - # Options are migrated from the original ScheduleOptions message. - # @!attribute [rw] schedule - # @return [::String] - # Data transfer schedule. - # If the data source does not support a custom schedule, this should be - # empty. If it is empty, the default value for the data source will be used. - # The specified times are in UTC. - # Examples of valid format: - # `1st,3rd monday of month 15:30`, - # `every wed,fri of jan,jun 13:15`, and - # `first sunday of quarter 00:00`. - # See more explanation about the format here: - # https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - # - # NOTE: The minimum interval time between recurring transfers depends on the - # data source; refer to the documentation for your data source. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Specifies time to start scheduling transfer runs. The first run will be - # scheduled at or after the start time according to a recurrence pattern - # defined in the schedule string. The start time can be changed at any - # moment. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Defines time to stop scheduling transfer runs. A transfer run cannot be - # scheduled at or after the end time. The end time can be changed at any - # moment. - class TimeBasedSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options customizing manual transfers schedule. - class ManualSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options customizing EventDriven transfers schedule. - # @!attribute [rw] pubsub_subscription - # @return [::String] - # Pub/Sub subscription name used to receive events. - # Only Google Cloud Storage data source support this option. - # Format: projects/\\{project}/subscriptions/\\{subscription} - class EventDrivenSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about a user. - # @!attribute [rw] email - # @return [::String] - # E-mail address of the user. - class UserInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a data transfer configuration. A transfer configuration - # contains all metadata needed to perform a data transfer. For example, - # `destination_dataset_id` specifies where data should be stored. - # When a new transfer configuration is created, the specified - # `destination_dataset_id` is created when needed and shared with the - # appropriate data source service account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the transfer config. - # Transfer config names have the form either - # `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or - # `projects/{project_id}/transferConfigs/{config_id}`, - # where `config_id` is usually a UUID, even though it is not - # guaranteed or required. The name is ignored when creating a transfer - # config. - # @!attribute [rw] destination_dataset_id - # @return [::String] - # The BigQuery target dataset id. - # @!attribute [rw] display_name - # @return [::String] - # User specified display name for the data transfer. - # @!attribute [rw] data_source_id - # @return [::String] - # Data source ID. This cannot be changed once data transfer is created. The - # full list of available data source IDs can be returned through an API call: - # https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list - # @!attribute [rw] params - # @return [::Google::Protobuf::Struct] - # Parameters specific to each data source. For more information see the - # bq tab in the 'Setting up a data transfer' section for each data source. - # For example the parameters for Cloud Storage transfers are listed here: - # https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - # @!attribute [rw] schedule - # @return [::String] - # Data transfer schedule. - # If the data source does not support a custom schedule, this should be - # empty. If it is empty, the default value for the data source will be used. - # The specified times are in UTC. - # Examples of valid format: - # `1st,3rd monday of month 15:30`, - # `every wed,fri of jan,jun 13:15`, and - # `first sunday of quarter 00:00`. - # See more explanation about the format here: - # https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - # - # NOTE: The minimum interval time between recurring transfers depends on the - # data source; refer to the documentation for your data source. - # @!attribute [rw] schedule_options - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleOptions] - # Options customizing the data transfer schedule. - # @!attribute [rw] schedule_options_v2 - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleOptionsV2] - # Options customizing different types of data transfer schedule. - # This field replaces "schedule" and "schedule_options" fields. - # ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. - # @!attribute [rw] data_refresh_window_days - # @return [::Integer] - # The number of days to look back to automatically refresh the data. - # For example, if `data_refresh_window_days = 10`, then every day - # BigQuery reingests data for [today-10, today-1], rather than ingesting data - # for just [today-1]. - # Only valid if the data source supports the feature. Set the value to 0 - # to use the default value. - # @!attribute [rw] disabled - # @return [::Boolean] - # Is this config disabled. When set to true, no runs will be scheduled for - # this transfer config. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Data transfer modification time. Ignored by server on input. - # @!attribute [r] next_run_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Next time when data transfer will run. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferState] - # Output only. State of the most recently updated transfer run. - # @!attribute [rw] user_id - # @return [::Integer] - # Deprecated. Unique ID of the user on whose behalf transfer is done. - # @!attribute [r] dataset_region - # @return [::String] - # Output only. Region in which BigQuery dataset is located. - # @!attribute [rw] notification_pubsub_topic - # @return [::String] - # Pub/Sub topic where notifications will be sent after transfer runs - # associated with this transfer config finish. - # - # The format for specifying a pubsub topic is: - # `projects/{project_id}/topics/{topic_id}` - # @!attribute [rw] email_preferences - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EmailPreferences] - # Email notifications will be sent according to these preferences - # to the email address of the user who owns this transfer config. - # @!attribute [r] owner_info - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::UserInfo] - # Output only. Information about the user whose credentials are used to - # transfer data. Populated only for `transferConfigs.get` requests. In case - # the user information is not available, this field will not be populated. - # @!attribute [rw] encryption_configuration - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EncryptionConfiguration] - # The encryption configuration part. Currently, it is only used for the - # optional KMS key name. The BigQuery service account of your project must be - # granted permissions to use the key. Read methods will return the key name - # applied in effect. Write methods will apply the key if it is present, or - # otherwise try to apply project default keys if it is absent. - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. Error code with detailed information about reason of the - # latest config failure. - class TransferConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the encryption configuration for a transfer. - # @!attribute [rw] kms_key_name - # @return [::Google::Protobuf::StringValue] - # The name of the KMS key used for encrypting BigQuery data. - class EncryptionConfiguration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a data transfer run. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the transfer run. - # Transfer run names have the form - # `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. - # The name is ignored when creating a transfer run. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # Minimum time after which a transfer run can be started. - # @!attribute [rw] run_time - # @return [::Google::Protobuf::Timestamp] - # For batch transfer runs, specifies the date and time of the data should be - # ingested. - # @!attribute [rw] error_status - # @return [::Google::Rpc::Status] - # Status of the transfer run. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when transfer run was started. - # Parameter ignored by server for input requests. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when transfer run ended. - # Parameter ignored by server for input requests. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last time the data transfer run state was updated. - # @!attribute [r] params - # @return [::Google::Protobuf::Struct] - # Output only. Parameters specific to each data source. For more information - # see the bq tab in the 'Setting up a data transfer' section for each data - # source. For example the parameters for Cloud Storage transfers are listed - # here: - # https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - # @!attribute [r] destination_dataset_id - # @return [::String] - # Output only. The BigQuery target dataset id. - # @!attribute [r] data_source_id - # @return [::String] - # Output only. Data source id. - # @!attribute [rw] state - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferState] - # Data transfer run state. Ignored for input requests. - # @!attribute [rw] user_id - # @return [::Integer] - # Deprecated. Unique ID of the user on whose behalf transfer is done. - # @!attribute [r] schedule - # @return [::String] - # Output only. Describes the schedule of this transfer run if it was - # created as part of a regular schedule. For batch transfer runs that are - # scheduled manually, this is empty. - # NOTE: the system might choose to delay the schedule depending on the - # current load, so `schedule_time` doesn't always match this. - # @!attribute [r] notification_pubsub_topic - # @return [::String] - # Output only. Pub/Sub topic where a notification will be sent after this - # transfer run finishes. - # - # The format for specifying a pubsub topic is: - # `projects/{project_id}/topics/{topic_id}` - # @!attribute [r] email_preferences - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EmailPreferences] - # Output only. Email notifications will be sent according to these - # preferences to the email address of the user who owns the transfer config - # this run was derived from. - class TransferRun - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a user facing message for a particular data transfer run. - # @!attribute [rw] message_time - # @return [::Google::Protobuf::Timestamp] - # Time when message was logged. - # @!attribute [rw] severity - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity] - # Message severity. - # @!attribute [rw] message_text - # @return [::String] - # Message text. - class TransferMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents data transfer user facing message severity. - module MessageSeverity - # No severity specified. - MESSAGE_SEVERITY_UNSPECIFIED = 0 - - # Informational message. - INFO = 1 - - # Warning message. - WARNING = 2 - - # Error message. - ERROR = 3 - end - end - - # DEPRECATED. Represents data transfer type. - # @deprecated This enum is deprecated and may be removed in the next major version update. - module TransferType - # Invalid or Unknown transfer type placeholder. - TRANSFER_TYPE_UNSPECIFIED = 0 - - # Batch data transfer. - BATCH = 1 - - # Streaming data transfer. Streaming data source currently doesn't - # support multiple transfer configs per project. - STREAMING = 2 - end - - # Represents data transfer run state. - module TransferState - # State placeholder (0). - TRANSFER_STATE_UNSPECIFIED = 0 - - # Data transfer is scheduled and is waiting to be picked up by - # data transfer backend (2). - PENDING = 2 - - # Data transfer is in progress (3). - RUNNING = 3 - - # Data transfer completed successfully (4). - SUCCEEDED = 4 - - # Data transfer failed (5). - FAILED = 5 - - # Data transfer is cancelled (6). - CANCELLED = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile deleted file mode 100644 index f317b2ca6a31..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-bigquery-data_transfer-v1", path: "../" -else - gem "google-cloud-bigquery-data_transfer-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb deleted file mode 100644 index c280cada5a84..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the check_valid_creds call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds. -# -def check_valid_creds - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new - - # Call the check_valid_creds method. - result = client.check_valid_creds request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb deleted file mode 100644 index 8d85ed804920..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the create_transfer_config call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config. -# -def create_transfer_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new - - # Call the create_transfer_config method. - result = client.create_transfer_config request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb deleted file mode 100644 index 5b85f2a09133..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the delete_transfer_config call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config. -# -def delete_transfer_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new - - # Call the delete_transfer_config method. - result = client.delete_transfer_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb deleted file mode 100644 index 96cbd5325d48..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the delete_transfer_run call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run. -# -def delete_transfer_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new - - # Call the delete_transfer_run method. - result = client.delete_transfer_run request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb deleted file mode 100644 index 0aa1d48f390c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the enroll_data_sources call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources. -# -def enroll_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new - - # Call the enroll_data_sources method. - result = client.enroll_data_sources request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb deleted file mode 100644 index 0883819624a5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the get_data_source call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source. -# -def get_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new - - # Call the get_data_source method. - result = client.get_data_source request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb deleted file mode 100644 index 0a34e0c405ac..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the get_transfer_config call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config. -# -def get_transfer_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new - - # Call the get_transfer_config method. - result = client.get_transfer_config request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb deleted file mode 100644 index 76369885f83e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the get_transfer_run call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run. -# -def get_transfer_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new - - # Call the get_transfer_run method. - result = client.get_transfer_run request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb deleted file mode 100644 index 5d17514eec9d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the list_data_sources call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources. -# -def list_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new - - # Call the list_data_sources method. - result = client.list_data_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource. - p item - end -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb deleted file mode 100644 index 1d837326d842..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the list_transfer_configs call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs. -# -def list_transfer_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new - - # Call the list_transfer_configs method. - result = client.list_transfer_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - p item - end -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb deleted file mode 100644 index 5b6589ed7c49..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the list_transfer_logs call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs. -# -def list_transfer_logs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new - - # Call the list_transfer_logs method. - result = client.list_transfer_logs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage. - p item - end -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb deleted file mode 100644 index 7bdea24c0b01..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the list_transfer_runs call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs. -# -def list_transfer_runs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new - - # Call the list_transfer_runs method. - result = client.list_transfer_runs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. - p item - end -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb deleted file mode 100644 index 0f581bd7b3d2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the schedule_transfer_runs call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs. -# -def schedule_transfer_runs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new - - # Call the schedule_transfer_runs method. - result = client.schedule_transfer_runs request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb deleted file mode 100644 index 5eae9585a6dc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the start_manual_transfer_runs call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs. -# -def start_manual_transfer_runs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new - - # Call the start_manual_transfer_runs method. - result = client.start_manual_transfer_runs request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb deleted file mode 100644 index 0f13ef52ede7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the unenroll_data_sources call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources. -# -def unenroll_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new - - # Call the unenroll_data_sources method. - result = client.unenroll_data_sources request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb deleted file mode 100644 index 78cd53878f8c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the update_transfer_config call in the DataTransferService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config. -# -def update_transfer_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new - - # Call the update_transfer_config method. - result = client.update_transfer_config request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json deleted file mode 100644 index c079afe66ffd..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json +++ /dev/null @@ -1,655 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-data_transfer-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.datatransfer.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync", - "title": "Snippet for the get_data_source call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source.", - "file": "data_transfer_service/get_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_source", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::DataSource", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "GetDataSource", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetDataSource", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync", - "title": "Snippet for the list_data_sources call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources.", - "file": "data_transfer_service/list_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_sources", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "ListDataSources", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListDataSources", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync", - "title": "Snippet for the create_transfer_config call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config.", - "file": "data_transfer_service/create_transfer_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_transfer_config", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "CreateTransferConfig", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.CreateTransferConfig", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync", - "title": "Snippet for the update_transfer_config call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config.", - "file": "data_transfer_service/update_transfer_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_transfer_config", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "UpdateTransferConfig", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.UpdateTransferConfig", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync", - "title": "Snippet for the delete_transfer_config call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config.", - "file": "data_transfer_service/delete_transfer_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_transfer_config", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "DeleteTransferConfig", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferConfig", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync", - "title": "Snippet for the get_transfer_config call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config.", - "file": "data_transfer_service/get_transfer_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_transfer_config", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "GetTransferConfig", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferConfig", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync", - "title": "Snippet for the list_transfer_configs call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs.", - "file": "data_transfer_service/list_transfer_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_transfer_configs", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "ListTransferConfigs", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferConfigs", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync", - "title": "Snippet for the schedule_transfer_runs call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs.", - "file": "data_transfer_service/schedule_transfer_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "schedule_transfer_runs", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "ScheduleTransferRuns", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ScheduleTransferRuns", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync", - "title": "Snippet for the start_manual_transfer_runs call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs.", - "file": "data_transfer_service/start_manual_transfer_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_manual_transfer_runs", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "StartManualTransferRuns", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.StartManualTransferRuns", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync", - "title": "Snippet for the get_transfer_run call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run.", - "file": "data_transfer_service/get_transfer_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_transfer_run", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "GetTransferRun", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferRun", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync", - "title": "Snippet for the delete_transfer_run call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run.", - "file": "data_transfer_service/delete_transfer_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_transfer_run", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "DeleteTransferRun", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferRun", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync", - "title": "Snippet for the list_transfer_runs call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs.", - "file": "data_transfer_service/list_transfer_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_transfer_runs", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "ListTransferRuns", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferRuns", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync", - "title": "Snippet for the list_transfer_logs call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs.", - "file": "data_transfer_service/list_transfer_logs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_transfer_logs", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "ListTransferLogs", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferLogs", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync", - "title": "Snippet for the check_valid_creds call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds.", - "file": "data_transfer_service/check_valid_creds.rb", - "language": "RUBY", - "client_method": { - "short_name": "check_valid_creds", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "CheckValidCreds", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.CheckValidCreds", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync", - "title": "Snippet for the enroll_data_sources call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources.", - "file": "data_transfer_service/enroll_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "enroll_data_sources", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "EnrollDataSources", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.EnrollDataSources", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync", - "title": "Snippet for the unenroll_data_sources call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources.", - "file": "data_transfer_service/unenroll_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "unenroll_data_sources", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "UnenrollDataSources", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.UnenrollDataSources", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb deleted file mode 100644 index 5d878393639f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb +++ /dev/null @@ -1,112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" - -class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_data_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_source_path project: "value0", data_source: "value1" - assert_equal "projects/value0/dataSources/value1", path - - path = client.data_source_path project: "value0", location: "value1", data_source: "value2" - assert_equal "projects/value0/locations/value1/dataSources/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_run_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.run_path project: "value0", transfer_config: "value1", run: "value2" - assert_equal "projects/value0/transferConfigs/value1/runs/value2", path - - path = client.run_path project: "value0", location: "value1", transfer_config: "value2", run: "value3" - assert_equal "projects/value0/locations/value1/transferConfigs/value2/runs/value3", path - end - end - - def test_transfer_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.transfer_config_path project: "value0", transfer_config: "value1" - assert_equal "projects/value0/transferConfigs/value1", path - - path = client.transfer_config_path project: "value0", location: "value1", transfer_config: "value2" - assert_equal "projects/value0/locations/value1/transferConfigs/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb deleted file mode 100644 index 361722fbe258..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb +++ /dev/null @@ -1,988 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" - - -class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_data_source - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_data_source ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_data_source(::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_count - end - end - end - - def test_list_data_sources - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_data_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_data_sources parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_data_sources({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_sources_client_stub.call_count - end - end - end - - def test_create_transfer_config - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - transfer_config = {} - authorization_code = "hello world" - version_info = "hello world" - service_account_name = "hello world" - - create_transfer_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_create_transfer_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_transfer_config_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_transfer_config parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_transfer_config_client_stub.call_count - end - end - end - - def test_update_transfer_config - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - transfer_config = {} - authorization_code = "hello world" - update_mask = {} - version_info = "hello world" - service_account_name = "hello world" - - update_transfer_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_update_transfer_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_transfer_config_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_transfer_config transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_transfer_config_client_stub.call_count - end - end - end - - def test_delete_transfer_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_transfer_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_delete_transfer_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_transfer_config_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_transfer_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_transfer_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_transfer_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_transfer_config_client_stub.call_count - end - end - end - - def test_get_transfer_config - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_transfer_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_transfer_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_transfer_config_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_transfer_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_transfer_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_transfer_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_transfer_config_client_stub.call_count - end - end - end - - def test_list_transfer_configs - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_source_ids = ["hello world"] - page_token = "hello world" - page_size = 42 - - list_transfer_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_transfer_configs_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_transfer_configs parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_transfer_configs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_transfer_configs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_transfer_configs_client_stub.call_count - end - end - end - - def test_schedule_transfer_runs - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - start_time = {} - end_time = {} - - schedule_transfer_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_schedule_transfer_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, schedule_transfer_runs_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.schedule_transfer_runs parent: parent, start_time: start_time, end_time: end_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.schedule_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.schedule_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, schedule_transfer_runs_client_stub.call_count - end - end - end - - def test_start_manual_transfer_runs - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requested_time_range = {} - - start_manual_transfer_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_start_manual_transfer_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_manual_transfer_runs_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.start_manual_transfer_runs parent: parent, requested_time_range: requested_time_range do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.start_manual_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.start_manual_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_manual_transfer_runs_client_stub.call_count - end - end - end - - def test_get_transfer_run - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_transfer_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_transfer_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_transfer_run_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_transfer_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_transfer_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_transfer_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_transfer_run_client_stub.call_count - end - end - end - - def test_delete_transfer_run - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_transfer_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_delete_transfer_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_transfer_run_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_transfer_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_transfer_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_transfer_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_transfer_run_client_stub.call_count - end - end - end - - def test_list_transfer_runs - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - states = [:TRANSFER_STATE_UNSPECIFIED] - page_token = "hello world" - page_size = 42 - run_attempt = :RUN_ATTEMPT_UNSPECIFIED - - list_transfer_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_transfer_runs_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_transfer_runs parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_transfer_runs_client_stub.call_count - end - end - end - - def test_list_transfer_logs - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - message_types = [:MESSAGE_SEVERITY_UNSPECIFIED] - - list_transfer_logs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_logs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_transfer_logs_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_transfer_logs parent: parent, page_token: page_token, page_size: page_size, message_types: message_types do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_transfer_logs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_transfer_logs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_transfer_logs_client_stub.call_count - end - end - end - - def test_check_valid_creds - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - check_valid_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_check_valid_creds_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, check_valid_creds_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.check_valid_creds({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.check_valid_creds name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.check_valid_creds ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.check_valid_creds({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.check_valid_creds(::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, check_valid_creds_client_stub.call_count - end - end - end - - def test_enroll_data_sources - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - data_source_ids = ["hello world"] - - enroll_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_enroll_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enroll_data_sources_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.enroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.enroll_data_sources name: name, data_source_ids: data_source_ids do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.enroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.enroll_data_sources({ name: name, data_source_ids: data_source_ids }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.enroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enroll_data_sources_client_stub.call_count - end - end - end - - def test_unenroll_data_sources - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - data_source_ids = ["hello world"] - - unenroll_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_unenroll_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, unenroll_data_sources_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.unenroll_data_sources name: name, data_source_ids: data_source_ids do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.unenroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.unenroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, unenroll_data_sources_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb deleted file mode 100644 index 6cfbc0d06bce..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb +++ /dev/null @@ -1,1103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" - -class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_data_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_source, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_source_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_data_source ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_data_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_data_source(::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_rpc_count - end - end - - def test_list_data_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_sources, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_sources_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_data_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_data_sources parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_data_sources({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_sources_client_stub.call_rpc_count - end - end - - def test_create_transfer_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - transfer_config = {} - authorization_code = "hello world" - version_info = "hello world" - service_account_name = "hello world" - - create_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_transfer_config, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig), request["transfer_config"] - assert_equal "hello world", request["authorization_code"] - assert_equal "hello world", request["version_info"] - assert_equal "hello world", request["service_account_name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_transfer_config_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_transfer_config parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_transfer_config_client_stub.call_rpc_count - end - end - - def test_update_transfer_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - transfer_config = {} - authorization_code = "hello world" - update_mask = {} - version_info = "hello world" - service_account_name = "hello world" - - update_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_transfer_config, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig), request["transfer_config"] - assert_equal "hello world", request["authorization_code"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["version_info"] - assert_equal "hello world", request["service_account_name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_transfer_config_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_transfer_config transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_transfer_config_client_stub.call_rpc_count - end - end - - def test_delete_transfer_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_transfer_config, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_transfer_config_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_transfer_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_transfer_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_transfer_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_transfer_config_client_stub.call_rpc_count - end - end - - def test_get_transfer_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_transfer_config, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_transfer_config_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_transfer_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_transfer_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_transfer_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_transfer_config_client_stub.call_rpc_count - end - end - - def test_list_transfer_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_source_ids = ["hello world"] - page_token = "hello world" - page_size = 42 - - list_transfer_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_transfer_configs, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["data_source_ids"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_transfer_configs_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_transfer_configs parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_transfer_configs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_transfer_configs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_transfer_configs_client_stub.call_rpc_count - end - end - - def test_schedule_transfer_runs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - start_time = {} - end_time = {} - - schedule_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :schedule_transfer_runs, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, schedule_transfer_runs_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.schedule_transfer_runs parent: parent, start_time: start_time, end_time: end_time do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.schedule_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.schedule_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, schedule_transfer_runs_client_stub.call_rpc_count - end - end - - def test_start_manual_transfer_runs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requested_time_range = {} - - start_manual_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_manual_transfer_runs, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange), request["requested_time_range"] - assert_equal :requested_time_range, request.time - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_manual_transfer_runs_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.start_manual_transfer_runs parent: parent, requested_time_range: requested_time_range do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.start_manual_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.start_manual_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, start_manual_transfer_runs_client_stub.call_rpc_count - end - end - - def test_get_transfer_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_transfer_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_transfer_run, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_transfer_run_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_transfer_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_transfer_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_transfer_run({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_transfer_run_client_stub.call_rpc_count - end - end - - def test_delete_transfer_run - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_transfer_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_transfer_run, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_transfer_run_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_transfer_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_transfer_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_transfer_run({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_transfer_run_client_stub.call_rpc_count - end - end - - def test_list_transfer_runs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - states = [:TRANSFER_STATE_UNSPECIFIED] - page_token = "hello world" - page_size = 42 - run_attempt = :RUN_ATTEMPT_UNSPECIFIED - - list_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_transfer_runs, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, request - assert_equal "hello world", request["parent"] - assert_equal [:TRANSFER_STATE_UNSPECIFIED], request["states"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal :RUN_ATTEMPT_UNSPECIFIED, request["run_attempt"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_transfer_runs_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_transfer_runs parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_transfer_runs_client_stub.call_rpc_count - end - end - - def test_list_transfer_logs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - message_types = [:MESSAGE_SEVERITY_UNSPECIFIED] - - list_transfer_logs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_transfer_logs, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal [:MESSAGE_SEVERITY_UNSPECIFIED], request["message_types"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_transfer_logs_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_transfer_logs parent: parent, page_token: page_token, page_size: page_size, message_types: message_types do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_transfer_logs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_transfer_logs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_transfer_logs_client_stub.call_rpc_count - end - end - - def test_check_valid_creds - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - check_valid_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :check_valid_creds, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, check_valid_creds_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.check_valid_creds({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.check_valid_creds name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.check_valid_creds ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.check_valid_creds({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.check_valid_creds(::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, check_valid_creds_client_stub.call_rpc_count - end - end - - def test_enroll_data_sources - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - data_source_ids = ["hello world"] - - enroll_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enroll_data_sources, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["data_source_ids"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enroll_data_sources_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.enroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.enroll_data_sources name: name, data_source_ids: data_source_ids do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.enroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.enroll_data_sources({ name: name, data_source_ids: data_source_ids }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.enroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enroll_data_sources_client_stub.call_rpc_count - end - end - - def test_unenroll_data_sources - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - data_source_ids = ["hello world"] - - unenroll_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :unenroll_data_sources, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["data_source_ids"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, unenroll_data_sources_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.unenroll_data_sources name: name, data_source_ids: data_source_ids do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.unenroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.unenroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, unenroll_data_sources_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-migration-v2/.gitignore b/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-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-bigquery-migration-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json deleted file mode 100644 index 519979303a46..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "bigquerymigration.googleapis.com", - "api_shortname": "bigquerymigration", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest", - "distribution_name": "google-cloud-bigquery-migration-v2", - "is_cloud": true, - "language": "ruby", - "name": "bigquerymigration", - "name_pretty": "BigQuery Migration V2 API", - "product_documentation": "https://cloud.google.com/bigquery/docs/migration-intro", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/migration-intro", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml deleted file mode 100644 index 57be07ac546b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-migration-v2.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-bigquery-migration-v2.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts b/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts deleted file mode 100644 index e1a4dd51c1ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Migration V2 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md deleted file mode 100644 index 49431cec3789..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-migration-v2 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-bigquery-migration-v2 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/bigquery/migration/v2" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/migration/v2" - -::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-bigquery-migration-v2 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/bigquery/migration/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-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-bigquery-migration-v2/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md deleted file mode 100644 index e5d5fbcb7669..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Migration V2 API - -The migration service, exposing apis for migration jobs operations, and agent management. - -The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Migration V2 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-migration](https://rubygems.org/gems/google-cloud-bigquery-migration). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-migration-v2 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/bigquerymigration.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/migration/v2" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new -request = ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new # (request fields as keyword arguments...) -response = client.create_migration_workflow request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/docs/migration-intro) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/bigquery/migration/v2" -require "logger" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.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-bigquery-migration`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-migration-v2`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-bigquery-migration`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-bigquery-migration-v2`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile deleted file mode 100644 index 22b1470bce3b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-bigquery-migration-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/migration/v2/migration_service/credentials" - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-migration-v2 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-migration-v2 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-migration-v2 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bigquery-migration-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-migration-v2" - header "google-cloud-bigquery-migration-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-migration-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-migration-v2 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-migration-v2 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-migration-v2 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json deleted file mode 100644 index da3bd8bcce33..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.migration.v2", - "libraryPackage": "::Google::Cloud::Bigquery::Migration::V2", - "services": { - "MigrationService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client", - "rpcs": { - "CreateMigrationWorkflow": { - "methods": [ - "create_migration_workflow" - ] - }, - "GetMigrationWorkflow": { - "methods": [ - "get_migration_workflow" - ] - }, - "ListMigrationWorkflows": { - "methods": [ - "list_migration_workflows" - ] - }, - "DeleteMigrationWorkflow": { - "methods": [ - "delete_migration_workflow" - ] - }, - "StartMigrationWorkflow": { - "methods": [ - "start_migration_workflow" - ] - }, - "GetMigrationSubtask": { - "methods": [ - "get_migration_subtask" - ] - }, - "ListMigrationSubtasks": { - "methods": [ - "list_migration_subtasks" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec b/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec deleted file mode 100644 index 8549c9fb4ab2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/migration/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-migration-v2" - gem.version = Google::Cloud::Bigquery::Migration::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details." - gem.summary = "The migration service, exposing apis for migration jobs operations, and agent management." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb deleted file mode 100644 index c91652afe47e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/bigquery/migration/v2" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb deleted file mode 100644 index a9ad338b1127..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/migration/v2/migration_service" -require "google/cloud/bigquery/migration/v2/version" - -module Google - module Cloud - module Bigquery - module Migration - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/migration/v2" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/migration/v2" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module V2 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/bigquery/migration/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb deleted file mode 100644 index 3cc37a0c122d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/assessment_task.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n8google/cloud/bigquery/migration/v2/assessment_task.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xf6\x01\n\x15\x41ssessmentTaskDetails\x12\x17\n\ninput_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_dataset\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0equerylogs_path\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12]\n\x0e\x66\x65\x61ture_handle\x18\x06 \x01(\x0b\x32;.google.cloud.bigquery.migration.v2.AssessmentFeatureHandleB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_feature_handle\"\\\n\x17\x41ssessmentFeatureHandle\x12\'\n\x15\x61\x64\x64_shareable_dataset\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x18\n\x16_add_shareable_datasetB\xcf\x01\n&com.google.cloud.bigquery.migration.v2B\x13\x41ssessmentTaskProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - AssessmentTaskDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AssessmentTaskDetails").msgclass - AssessmentFeatureHandle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AssessmentFeatureHandle").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb deleted file mode 100644 index 64ad22c7c8c2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/migration_entities.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/bigquery/migration/v2/assessment_task_pb' -require 'google/cloud/bigquery/migration/v2/migration_error_details_pb' -require 'google/cloud/bigquery/migration/v2/migration_metrics_pb' -require 'google/cloud/bigquery/migration/v2/translation_config_pb' -require 'google/cloud/bigquery/migration/v2/translation_details_pb' -require 'google/cloud/bigquery/migration/v2/translation_usability_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/error_details_pb' - - -descriptor_data = "\n;google/cloud/bigquery/migration/v2/migration_entities.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/bigquery/migration/v2/assessment_task.proto\x1a@google/cloud/bigquery/migration/v2/migration_error_details.proto\x1a:google/cloud/bigquery/migration/v2/migration_metrics.proto\x1a;google/cloud/bigquery/migration/v2/translation_config.proto\x1agoogle/cloud/bigquery/migration/v2/translation_usability.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/rpc/error_details.proto\"\x80\x05\n\x11MigrationWorkflow\x12\x17\n\x04name\x18\x01 \x01(\tB\t\xe0\x41\x03\xe0\x41\x05\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12O\n\x05tasks\x18\x02 \x03(\x0b\x32@.google.cloud.bigquery.migration.v2.MigrationWorkflow.TasksEntry\x12O\n\x05state\x18\x03 \x01(\x0e\x32;.google.cloud.bigquery.migration.v2.MigrationWorkflow.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a_\n\nTasksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.MigrationTask:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\r\n\tCOMPLETED\x10\x04:u\xea\x41r\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\n\x06points\x18\x04 \x03(\x0b\x32).google.cloud.bigquery.migration.v2.PointB\x03\xe0\x41\x02\"\x8a\x01\n\x05Point\x12\x42\n\x08interval\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.TimeInterval\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.bigquery.migration.v2.TypedValue\"v\n\x0cTimeInterval\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xaa\x01\n\nTypedValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x36\n\x12\x64istribution_value\x18\x05 \x01(\x0b\x32\x18.google.api.DistributionH\x00\x42\x07\n\x05valueB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationMetricsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TimeSeries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeSeries").msgclass - Point = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Point").msgclass - TimeInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeInterval").msgclass - TypedValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TypedValue").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb deleted file mode 100644 index 2d48893a2487..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/migration/v2/version" - -require "google/cloud/bigquery/migration/v2/migration_service/credentials" -require "google/cloud/bigquery/migration/v2/migration_service/paths" -require "google/cloud/bigquery/migration/v2/migration_service/client" -require "google/cloud/bigquery/migration/v2/migration_service/rest" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - ## - # Service to handle EDW migrations. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/migration/v2/migration_service" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/migration/v2/migration_service/rest" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module MigrationService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "migration_service", "helpers.rb" -require "google/cloud/bigquery/migration/v2/migration_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb deleted file mode 100644 index 13235e1d3d21..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb +++ /dev/null @@ -1,1103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/migration/v2/migration_service_pb" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - ## - # Client for the MigrationService service. - # - # Service to handle EDW migrations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :migration_service_stub - - ## - # Configure the MigrationService Client class. - # - # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MigrationService clients - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "Migration", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_migration_workflow.timeout = 60.0 - - default_config.rpcs.get_migration_workflow.timeout = 60.0 - default_config.rpcs.get_migration_workflow.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_migration_workflows.timeout = 60.0 - default_config.rpcs.list_migration_workflows.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_migration_workflow.timeout = 60.0 - - default_config.rpcs.start_migration_workflow.timeout = 60.0 - default_config.rpcs.start_migration_workflow.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the MigrationService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @migration_service_stub.universe_domain - end - - ## - # Create a new MigrationService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MigrationService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/bigquery/migration/v2/migration_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @migration_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @migration_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @migration_service_stub.logger - end - - # Service calls - - ## - # Creates a migration workflow. - # - # @overload create_migration_workflow(request, options = nil) - # Pass arguments to `create_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_migration_workflow(parent: nil, migration_workflow: nil) - # Pass arguments to `create_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project to which this migration workflow belongs. - # Example: `projects/foo/locations/bar` - # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] - # Required. The migration workflow to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new - # - # # Call the create_migration_workflow method. - # result = client.create_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def create_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :create_migration_workflow, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a previously created migration workflow. - # - # @overload get_migration_workflow(request, options = nil) - # Pass arguments to `get_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_migration_workflow(name: nil, read_mask: nil) - # Pass arguments to `get_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new - # - # # Call the get_migration_workflow method. - # result = client.get_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def get_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :get_migration_workflow, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously created migration workflow. - # - # @overload list_migration_workflows(request, options = nil) - # Pass arguments to `list_migration_workflows` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_migration_workflows` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location of the migration workflows to list. - # Example: `projects/123/locations/us` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # @param page_size [::Integer] - # The maximum number of migration workflows to return. The service may return - # fewer than this number. - # @param page_token [::String] - # A page token, received from previous `ListMigrationWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationWorkflows` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new - # - # # Call the list_migration_workflows method. - # result = client.list_migration_workflows request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p item - # end - # - def list_migration_workflows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_migration_workflows.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_migration_workflows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_migration_workflows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :list_migration_workflows, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a migration workflow by name. - # - # @overload delete_migration_workflow(request, options = nil) - # Pass arguments to `delete_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_migration_workflow(name: nil) - # Pass arguments to `delete_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new - # - # # Call the delete_migration_workflow method. - # result = client.delete_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :delete_migration_workflow, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts a previously created migration workflow. I.e., the state transitions - # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - # An error will be signaled if the state is anything other than DRAFT or - # RUNNING. - # - # @overload start_migration_workflow(request, options = nil) - # Pass arguments to `start_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_migration_workflow(name: nil) - # Pass arguments to `start_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new - # - # # Call the start_migration_workflow method. - # result = client.start_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def start_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.start_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.start_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :start_migration_workflow, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a previously created migration subtask. - # - # @overload get_migration_subtask(request, options = nil) - # Pass arguments to `get_migration_subtask` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_migration_subtask(name: nil, read_mask: nil) - # Pass arguments to `get_migration_subtask` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The unique identifier for the migration subtask. - # Example: `projects/123/locations/us/workflows/1234/subtasks/543` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new - # - # # Call the get_migration_subtask method. - # result = client.get_migration_subtask request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - # p result - # - def get_migration_subtask request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_migration_subtask.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_migration_subtask.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_migration_subtask.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :get_migration_subtask, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously created migration subtasks. - # - # @overload list_migration_subtasks(request, options = nil) - # Pass arguments to `list_migration_subtasks` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_migration_subtasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The migration task of the subtasks to list. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # @param page_size [::Integer] - # Optional. The maximum number of migration tasks to return. The service may - # return fewer than this number. - # @param page_token [::String] - # Optional. A page token, received from previous `ListMigrationSubtasks` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationSubtasks` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. The filter to apply. This can be used to get the subtasks of a - # specific tasks in a workflow, e.g. `migration_task = "ab012"` where - # `"ab012"` is the task ID (not the name in the named map). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new - # - # # Call the list_migration_subtasks method. - # result = client.list_migration_subtasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - # p item - # end - # - def list_migration_subtasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_migration_subtasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_migration_subtasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_migration_subtasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :list_migration_subtasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MigrationService API. - # - # This class represents the configuration for MigrationService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_migration_workflow to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "bigquerymigration.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the MigrationService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :create_migration_workflow - ## - # RPC-specific configuration for `get_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_workflow - ## - # RPC-specific configuration for `list_migration_workflows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_workflows - ## - # RPC-specific configuration for `delete_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_migration_workflow - ## - # RPC-specific configuration for `start_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :start_migration_workflow - ## - # RPC-specific configuration for `get_migration_subtask` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_subtask - ## - # RPC-specific configuration for `list_migration_subtasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_subtasks - - # @private - def initialize parent_rpcs = nil - create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow - @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config - get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow - @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config - list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows - @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config - delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow - @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config - start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow - @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config - get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask - @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config - list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks - @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb deleted file mode 100644 index db5d89803933..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - # Credentials for the MigrationService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb deleted file mode 100644 index 21bfeb2669a0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb +++ /dev/null @@ -1,92 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - # Path helper methods for the MigrationService API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified MigrationSubtask resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}` - # - # @param project [String] - # @param location [String] - # @param workflow [String] - # @param subtask [String] - # - # @return [::String] - def migration_subtask_path project:, location:, workflow:, subtask: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "workflow cannot contain /" if workflow.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workflows/#{workflow}/subtasks/#{subtask}" - end - - ## - # Create a fully-qualified MigrationWorkflow resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workflows/{workflow}` - # - # @param project [String] - # @param location [String] - # @param workflow [String] - # - # @return [::String] - def migration_workflow_path project:, location:, workflow: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workflows/#{workflow}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb deleted file mode 100644 index d298ae4f0452..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/migration/v2/version" - -require "google/cloud/bigquery/migration/v2/migration_service/credentials" -require "google/cloud/bigquery/migration/v2/migration_service/paths" -require "google/cloud/bigquery/migration/v2/migration_service/rest/client" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - ## - # Service to handle EDW migrations. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/migration/v2/migration_service/rest" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module MigrationService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/migration/v2/migration_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb deleted file mode 100644 index ac684cdcb8fa..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb +++ /dev/null @@ -1,1011 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/migration/v2/migration_service_pb" -require "google/cloud/bigquery/migration/v2/migration_service/rest/service_stub" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - module Rest - ## - # REST client for the MigrationService service. - # - # Service to handle EDW migrations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :migration_service_stub - - ## - # Configure the MigrationService Client class. - # - # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MigrationService clients - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "Migration", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_migration_workflow.timeout = 60.0 - - default_config.rpcs.get_migration_workflow.timeout = 60.0 - default_config.rpcs.get_migration_workflow.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_migration_workflows.timeout = 60.0 - default_config.rpcs.list_migration_workflows.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_migration_workflow.timeout = 60.0 - - default_config.rpcs.start_migration_workflow.timeout = 60.0 - default_config.rpcs.start_migration_workflow.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the MigrationService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @migration_service_stub.universe_domain - end - - ## - # Create a new MigrationService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MigrationService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @migration_service_stub = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @migration_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @migration_service_stub.logger - end - - # Service calls - - ## - # Creates a migration workflow. - # - # @overload create_migration_workflow(request, options = nil) - # Pass arguments to `create_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_migration_workflow(parent: nil, migration_workflow: nil) - # Pass arguments to `create_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project to which this migration workflow belongs. - # Example: `projects/foo/locations/bar` - # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] - # Required. The migration workflow to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new - # - # # Call the create_migration_workflow method. - # result = client.create_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def create_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.create_migration_workflow request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a previously created migration workflow. - # - # @overload get_migration_workflow(request, options = nil) - # Pass arguments to `get_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_migration_workflow(name: nil, read_mask: nil) - # Pass arguments to `get_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new - # - # # Call the get_migration_workflow method. - # result = client.get_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def get_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.get_migration_workflow request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously created migration workflow. - # - # @overload list_migration_workflows(request, options = nil) - # Pass arguments to `list_migration_workflows` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_migration_workflows` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location of the migration workflows to list. - # Example: `projects/123/locations/us` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # @param page_size [::Integer] - # The maximum number of migration workflows to return. The service may return - # fewer than this number. - # @param page_token [::String] - # A page token, received from previous `ListMigrationWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationWorkflows` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new - # - # # Call the list_migration_workflows method. - # result = client.list_migration_workflows request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p item - # end - # - def list_migration_workflows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_migration_workflows.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_migration_workflows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_migration_workflows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.list_migration_workflows request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, "migration_workflows", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a migration workflow by name. - # - # @overload delete_migration_workflow(request, options = nil) - # Pass arguments to `delete_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_migration_workflow(name: nil) - # Pass arguments to `delete_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new - # - # # Call the delete_migration_workflow method. - # result = client.delete_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.delete_migration_workflow request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts a previously created migration workflow. I.e., the state transitions - # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - # An error will be signaled if the state is anything other than DRAFT or - # RUNNING. - # - # @overload start_migration_workflow(request, options = nil) - # Pass arguments to `start_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload start_migration_workflow(name: nil) - # Pass arguments to `start_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new - # - # # Call the start_migration_workflow method. - # result = client.start_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def start_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.start_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.start_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.start_migration_workflow request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a previously created migration subtask. - # - # @overload get_migration_subtask(request, options = nil) - # Pass arguments to `get_migration_subtask` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_migration_subtask(name: nil, read_mask: nil) - # Pass arguments to `get_migration_subtask` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The unique identifier for the migration subtask. - # Example: `projects/123/locations/us/workflows/1234/subtasks/543` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new - # - # # Call the get_migration_subtask method. - # result = client.get_migration_subtask request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - # p result - # - def get_migration_subtask request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_migration_subtask.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_migration_subtask.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_migration_subtask.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.get_migration_subtask request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously created migration subtasks. - # - # @overload list_migration_subtasks(request, options = nil) - # Pass arguments to `list_migration_subtasks` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_migration_subtasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The migration task of the subtasks to list. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # @param page_size [::Integer] - # Optional. The maximum number of migration tasks to return. The service may - # return fewer than this number. - # @param page_token [::String] - # Optional. A page token, received from previous `ListMigrationSubtasks` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationSubtasks` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. The filter to apply. This can be used to get the subtasks of a - # specific tasks in a workflow, e.g. `migration_task = "ab012"` where - # `"ab012"` is the task ID (not the name in the named map). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new - # - # # Call the list_migration_subtasks method. - # result = client.list_migration_subtasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - # p item - # end - # - def list_migration_subtasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_migration_subtasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_migration_subtasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_migration_subtasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.list_migration_subtasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, "migration_subtasks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MigrationService REST API. - # - # This class represents the configuration for MigrationService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_migration_workflow to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "bigquerymigration.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the MigrationService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :create_migration_workflow - ## - # RPC-specific configuration for `get_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_workflow - ## - # RPC-specific configuration for `list_migration_workflows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_workflows - ## - # RPC-specific configuration for `delete_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_migration_workflow - ## - # RPC-specific configuration for `start_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :start_migration_workflow - ## - # RPC-specific configuration for `get_migration_subtask` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_subtask - ## - # RPC-specific configuration for `list_migration_subtasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_subtasks - - # @private - def initialize parent_rpcs = nil - create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow - @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config - get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow - @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config - list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows - @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config - delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow - @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config - start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow - @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config - get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask - @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config - list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks - @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb deleted file mode 100644 index 21756920f3bf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb +++ /dev/null @@ -1,512 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/migration/v2/migration_service_pb" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - module Rest - ## - # REST service stub for the MigrationService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: false, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # A result object deserialized from the server's reply - def create_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_migration_workflow_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_migration_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # A result object deserialized from the server's reply - def get_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_workflow_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_migration_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_migration_workflows REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] - # A result object deserialized from the server's reply - def list_migration_workflows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_workflows_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_migration_workflows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_migration_workflow_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_migration_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the start_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def start_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_migration_workflow_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "start_migration_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_migration_subtask REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # A result object deserialized from the server's reply - def get_migration_subtask request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_subtask_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_migration_subtask", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_migration_subtasks REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse] - # A result object deserialized from the server's reply - def list_migration_subtasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_subtasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_migration_subtasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/workflows", - body: "migration_workflow", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_migration_workflows REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_migration_workflows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/workflows", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:start", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_migration_subtask REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_migration_subtask_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/subtasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_migration_subtasks REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_migration_subtasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/subtasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb deleted file mode 100644 index 22bab24f5771..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/migration_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/bigquery/migration/v2/migration_entities_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n:google/cloud/bigquery/migration/v2/migration_service.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a;google/cloud/bigquery/migration/v2/migration_entities.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb3\x01\n\x1e\x43reateMigrationWorkflowRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12V\n\x12migration_workflow\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflowB\x03\xe0\x41\x02\"\x96\x01\n\x1bGetMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb0\x01\n\x1dListMigrationWorkflowsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8d\x01\n\x1eListMigrationWorkflowsResponse\x12R\n\x13migration_workflows\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1e\x44\x65leteMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"i\n\x1dStartMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"\x99\x01\n\x1aGetMigrationSubtaskRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1bigquerymigration.googleapis.com/MigrationSubtask\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xe4\x01\n\x1cListMigrationSubtasksRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x1dListMigrationSubtasksResponse\x12P\n\x12migration_subtasks\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcb\x0c\n\x10MigrationService\x12\xfb\x01\n\x17\x43reateMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"e\xda\x41\x19parent,migration_workflow\x82\xd3\xe4\x93\x02\x43\"-/v2/{parent=projects/*/locations/*}/workflows:\x12migration_workflow\x12\xcc\x01\n\x14GetMigrationWorkflow\x12?.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/workflows/*}\x12\xdf\x01\n\x16ListMigrationWorkflows\x12\x41.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest\x1a\x42.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/workflows\x12\xb3\x01\n\x17\x44\x65leteMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/workflows/*}\x12\xba\x01\n\x16StartMigrationWorkflow\x12\x41.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/workflows/*}:start:\x01*\x12\xd4\x01\n\x13GetMigrationSubtask\x12>.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest\x1a\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}\x12\xe7\x01\n\x15ListMigrationSubtasks\x12@.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest\x1a\x41.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v2/{parent=projects/*/locations/*/workflows/*}/subtasks\x1aT\xca\x41 bigquerymigration.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationServiceProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - CreateMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest").msgclass - GetMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest").msgclass - ListMigrationWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest").msgclass - ListMigrationWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse").msgclass - DeleteMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest").msgclass - StartMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest").msgclass - GetMigrationSubtaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest").msgclass - ListMigrationSubtasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest").msgclass - ListMigrationSubtasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb deleted file mode 100644 index 8984838dfd6d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/migration/v2/migration_service.proto for package 'google.cloud.bigquery.migration.v2' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/bigquery/migration/v2/migration_service_pb' - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - # Service to handle EDW migrations. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.migration.v2.MigrationService' - - # Creates a migration workflow. - rpc :CreateMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow - # Gets a previously created migration workflow. - rpc :GetMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow - # Lists previously created migration workflow. - rpc :ListMigrationWorkflows, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse - # Deletes a migration workflow by name. - rpc :DeleteMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Google::Protobuf::Empty - # Starts a previously created migration workflow. I.e., the state transitions - # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - # An error will be signaled if the state is anything other than DRAFT or - # RUNNING. - rpc :StartMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Google::Protobuf::Empty - # Gets a previously created migration subtask. - rpc :GetMigrationSubtask, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask - # Lists previously created migration subtasks. - rpc :ListMigrationSubtasks, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb deleted file mode 100644 index 76d58e045e9e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/migration/v2/migration_service/rest" -require "google/cloud/bigquery/migration/v2/version" - -module Google - module Cloud - module Bigquery - module Migration - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/migration/v2/rest" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module V2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb deleted file mode 100644 index 26de688def6d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/translation_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n;google/cloud/bigquery/migration/v2/translation_config.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe0\x03\n\x18TranslationConfigDetails\x12\x19\n\x0fgcs_source_path\x18\x01 \x01(\tH\x00\x12\x19\n\x0fgcs_target_path\x18\x02 \x01(\tH\x01\x12V\n\x11name_mapping_list\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.migration.v2.ObjectNameMappingListH\x02\x12\x43\n\x0esource_dialect\x18\x03 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x43\n\x0etarget_dialect\x18\x04 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x41\n\nsource_env\x18\x06 \x01(\x0b\x32-.google.cloud.bigquery.migration.v2.SourceEnv\x12\x16\n\x0erequest_source\x18\x08 \x01(\t\x12\x14\n\x0ctarget_types\x18\t \x03(\tB\x11\n\x0fsource_locationB\x11\n\x0ftarget_locationB\x15\n\x13output_name_mapping\"\xeb\n\n\x07\x44ialect\x12O\n\x10\x62igquery_dialect\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.BigQueryDialectH\x00\x12K\n\x0ehiveql_dialect\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.HiveQLDialectH\x00\x12O\n\x10redshift_dialect\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.RedshiftDialectH\x00\x12O\n\x10teradata_dialect\x18\x04 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.TeradataDialectH\x00\x12K\n\x0eoracle_dialect\x18\x05 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.OracleDialectH\x00\x12O\n\x10sparksql_dialect\x18\x06 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.SparkSQLDialectH\x00\x12Q\n\x11snowflake_dialect\x18\x07 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SnowflakeDialectH\x00\x12M\n\x0fnetezza_dialect\x18\x08 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NetezzaDialectH\x00\x12X\n\x15\x61zure_synapse_dialect\x18\t \x01(\x0b\x32\x37.google.cloud.bigquery.migration.v2.AzureSynapseDialectH\x00\x12M\n\x0fvertica_dialect\x18\n \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.VerticaDialectH\x00\x12R\n\x12sql_server_dialect\x18\x0b \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SQLServerDialectH\x00\x12S\n\x12postgresql_dialect\x18\x0c \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.PostgresqlDialectH\x00\x12K\n\x0epresto_dialect\x18\r \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.PrestoDialectH\x00\x12I\n\rmysql_dialect\x18\x0e \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.MySQLDialectH\x00\x12\x45\n\x0b\x64\x62\x32_dialect\x18\x0f \x01(\x0b\x32..google.cloud.bigquery.migration.v2.DB2DialectH\x00\x12K\n\x0esqlite_dialect\x18\x10 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.SQLiteDialectH\x00\x12Q\n\x11greenplum_dialect\x18\x11 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.GreenplumDialectH\x00\x42\x0f\n\rdialect_value\"\x11\n\x0f\x42igQueryDialect\"\x0f\n\rHiveQLDialect\"\x11\n\x0fRedshiftDialect\"\x8a\x01\n\x0fTeradataDialect\x12\x46\n\x04mode\x18\x01 \x01(\x0e\x32\x38.google.cloud.bigquery.migration.v2.TeradataDialect.Mode\"/\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x07\n\x03SQL\x10\x01\x12\x08\n\x04\x42TEQ\x10\x02\"\x0f\n\rOracleDialect\"\x11\n\x0fSparkSQLDialect\"\x12\n\x10SnowflakeDialect\"\x10\n\x0eNetezzaDialect\"\x15\n\x13\x41zureSynapseDialect\"\x10\n\x0eVerticaDialect\"\x12\n\x10SQLServerDialect\"\x13\n\x11PostgresqlDialect\"\x0f\n\rPrestoDialect\"\x0e\n\x0cMySQLDialect\"\x0c\n\nDB2Dialect\"\x0f\n\rSQLiteDialect\"\x12\n\x10GreenplumDialect\"`\n\x15ObjectNameMappingList\x12G\n\x08name_map\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.ObjectNameMapping\"\x9d\x01\n\x11ObjectNameMapping\x12\x42\n\x06source\x18\x01 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NameMappingKey\x12\x44\n\x06target\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.NameMappingValue\"\xab\x02\n\x0eNameMappingKey\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.migration.v2.NameMappingKey.Type\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08relation\x18\x04 \x01(\t\x12\x11\n\tattribute\x18\x05 \x01(\t\"\x8a\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x0c\n\x08RELATION\x10\x03\x12\r\n\tATTRIBUTE\x10\x04\x12\x12\n\x0eRELATION_ALIAS\x10\x05\x12\x13\n\x0f\x41TTRIBUTE_ALIAS\x10\x06\x12\x0c\n\x08\x46UNCTION\x10\x07\"Y\n\x10NameMappingValue\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x10\n\x08relation\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\"f\n\tSourceEnv\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd2\x01\n&com.google.cloud.bigquery.migration.v2B\x16TranslationConfigProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TranslationConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationConfigDetails").msgclass - Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Dialect").msgclass - BigQueryDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.BigQueryDialect").msgclass - HiveQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.HiveQLDialect").msgclass - RedshiftDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.RedshiftDialect").msgclass - TeradataDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect").msgclass - TeradataDialect::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect.Mode").enummodule - OracleDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.OracleDialect").msgclass - SparkSQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SparkSQLDialect").msgclass - SnowflakeDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SnowflakeDialect").msgclass - NetezzaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NetezzaDialect").msgclass - AzureSynapseDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AzureSynapseDialect").msgclass - VerticaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.VerticaDialect").msgclass - SQLServerDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLServerDialect").msgclass - PostgresqlDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PostgresqlDialect").msgclass - PrestoDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PrestoDialect").msgclass - MySQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.MySQLDialect").msgclass - DB2Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DB2Dialect").msgclass - SQLiteDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLiteDialect").msgclass - GreenplumDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GreenplumDialect").msgclass - ObjectNameMappingList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMappingList").msgclass - ObjectNameMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMapping").msgclass - NameMappingKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey").msgclass - NameMappingKey::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey.Type").enummodule - NameMappingValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingValue").msgclass - SourceEnv = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnv").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb deleted file mode 100644 index 52eee84cfd27..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/translation_details.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\n\x07literal\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.LiteralH\x00\x12\x17\n\rgcs_file_path\x18\x04 \x01(\tH\x00\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06source\"#\n\nTargetSpec\x12\x15\n\rrelative_path\x18\x01 \x01(\t\"h\n\x07Literal\x12\x18\n\x0eliteral_string\x18\x02 \x01(\tH\x00\x12\x17\n\rliteral_bytes\x18\x03 \x01(\x0cH\x00\x12\x1a\n\rrelative_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0e\n\x0cliteral_data\"n\n\x11SourceEnvironment\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd3\x01\n&com.google.cloud.bigquery.migration.v2B\x17TranslationDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TranslationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationDetails").msgclass - SuggestionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionConfig").msgclass - SuggestionStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep").msgclass - SuggestionStep::SuggestionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType").enummodule - SuggestionStep::RewriteTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget").enummodule - SourceTargetMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceTargetMapping").msgclass - SourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceSpec").msgclass - TargetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TargetSpec").msgclass - Literal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Literal").msgclass - SourceEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnvironment").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb deleted file mode 100644 index b371a88bb83b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/translation_suggestion.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n?google/cloud/bigquery/migration/v2/translation_suggestion.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x88\x02\n\x17TranslationReportRecord\x12V\n\x08severity\x18\x01 \x01(\x0e\x32\x44.google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity\x12\x13\n\x0bscript_line\x18\x02 \x01(\x05\x12\x15\n\rscript_column\x18\x03 \x01(\x05\x12\x10\n\x08\x63\x61tegory\x18\x04 \x01(\t\x12\x0f\n\x07message\x18\x05 \x01(\t\"F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\xd6\x01\n&com.google.cloud.bigquery.migration.v2B\x1aTranslationSuggestionProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TranslationReportRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord").msgclass - TranslationReportRecord::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb deleted file mode 100644 index 840017a9f86a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/translation_usability.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n>google/cloud/bigquery/migration/v2/translation_usability.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf6\x01\n\x13GcsReportLogMessage\x12\x10\n\x08severity\x18\x01 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x02 \x01(\t\x12\x11\n\tfile_path\x18\x03 \x01(\t\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x1a\n\x12source_script_line\x18\x05 \x01(\x05\x12\x1c\n\x14source_script_column\x18\x06 \x01(\x05\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x16\n\x0escript_context\x18\x08 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\t \x01(\t\x12\x0e\n\x06\x65\x66\x66\x65\x63t\x18\n \x01(\t\x12\x13\n\x0bobject_name\x18\x0b \x01(\tB\xd5\x01\n&com.google.cloud.bigquery.migration.v2B\x19TranslationUsabilityProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - GcsReportLogMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GcsReportLogMessage").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb deleted file mode 100644 index c33fa4b1c721..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md deleted file mode 100644 index 6a3802be6255..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Migration V2 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-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-bigquery-migration-v2/proto_docs/google/api/distribution.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb deleted file mode 100644 index e4f870d5ad0d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb +++ /dev/null @@ -1,233 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Distribution` contains summary statistics for a population of values. It - # optionally contains a histogram representing the distribution of those values - # across a set of buckets. - # - # The summary statistics are the count, mean, sum of the squared deviation from - # the mean, the minimum, and the maximum of the set of population of values. - # The histogram is based on a sequence of buckets and gives a count of values - # that fall into each bucket. The boundaries of the buckets are given either - # explicitly or by formulas for buckets of fixed or exponentially increasing - # widths. - # - # Although it is not forbidden, it is generally a bad idea to include - # non-finite values (infinities or NaNs) in the population of values, as this - # will render the `mean` and `sum_of_squared_deviation` fields meaningless. - # @!attribute [rw] count - # @return [::Integer] - # The number of values in the population. Must be non-negative. This value - # must equal the sum of the values in `bucket_counts` if a histogram is - # provided. - # @!attribute [rw] mean - # @return [::Float] - # The arithmetic mean of the values in the population. If `count` is zero - # then this field must be zero. - # @!attribute [rw] sum_of_squared_deviation - # @return [::Float] - # The sum of squared deviations from the mean of the values in the - # population. For values x_i this is: - # - # Sum[i=1..n]((x_i - mean)^2) - # - # Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition - # describes Welford's method for accumulating this sum in one pass. - # - # If `count` is zero then this field must be zero. - # @!attribute [rw] range - # @return [::Google::Api::Distribution::Range] - # If specified, contains the range of the population values. The field - # must not be present if the `count` is zero. - # @!attribute [rw] bucket_options - # @return [::Google::Api::Distribution::BucketOptions] - # Defines the histogram bucket boundaries. If the distribution does not - # contain a histogram, then omit this field. - # @!attribute [rw] bucket_counts - # @return [::Array<::Integer>] - # The number of values in each bucket of the histogram, as described in - # `bucket_options`. If the distribution does not have a histogram, then omit - # this field. If there is a histogram, then the sum of the values in - # `bucket_counts` must equal the value in the `count` field of the - # distribution. - # - # If present, `bucket_counts` should contain N values, where N is the number - # of buckets specified in `bucket_options`. If you supply fewer than N - # values, the remaining values are assumed to be 0. - # - # The order of the values in `bucket_counts` follows the bucket numbering - # schemes described for the three bucket types. The first value must be the - # count for the underflow bucket (number 0). The next N-2 values are the - # counts for the finite buckets (number 1 through N-2). The N'th value in - # `bucket_counts` is the count for the overflow bucket (number N-1). - # @!attribute [rw] exemplars - # @return [::Array<::Google::Api::Distribution::Exemplar>] - # Must be in increasing order of `value` field. - class Distribution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The range of the population values. - # @!attribute [rw] min - # @return [::Float] - # The minimum of the population values. - # @!attribute [rw] max - # @return [::Float] - # The maximum of the population values. - class Range - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BucketOptions` describes the bucket boundaries used to create a histogram - # for the distribution. The buckets can be in a linear sequence, an - # exponential sequence, or each bucket can be specified explicitly. - # `BucketOptions` does not include the number of values in each bucket. - # - # A bucket has an inclusive lower bound and exclusive upper bound for the - # values that are counted for that bucket. The upper bound of a bucket must - # be strictly greater than the lower bound. The sequence of N buckets for a - # distribution consists of an underflow bucket (number 0), zero or more - # finite buckets (number 1 through N - 2) and an overflow bucket (number N - - # 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the - # same as the upper bound of bucket i - 1. The buckets span the whole range - # of finite values: lower bound of the underflow bucket is -infinity and the - # upper bound of the overflow bucket is +infinity. The finite buckets are - # so-called because both bounds are finite. - # @!attribute [rw] linear_buckets - # @return [::Google::Api::Distribution::BucketOptions::Linear] - # The linear bucket. - # - # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exponential_buckets - # @return [::Google::Api::Distribution::BucketOptions::Exponential] - # The exponential buckets. - # - # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] explicit_buckets - # @return [::Google::Api::Distribution::BucketOptions::Explicit] - # The explicit buckets. - # - # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BucketOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies a linear sequence of buckets that all have the same width - # (except overflow and underflow). Each bucket represents a constant - # absolute uncertainty on the specific value in the bucket. - # - # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the - # following boundaries: - # - # Upper bound (0 <= i < N-1): offset + (width * i). - # - # Lower bound (1 <= i < N): offset + (width * (i - 1)). - # @!attribute [rw] num_finite_buckets - # @return [::Integer] - # Must be greater than 0. - # @!attribute [rw] width - # @return [::Float] - # Must be greater than 0. - # @!attribute [rw] offset - # @return [::Float] - # Lower bound of the first bucket. - class Linear - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies an exponential sequence of buckets that have a width that is - # proportional to the value of the lower bound. Each bucket represents a - # constant relative uncertainty on a specific value in the bucket. - # - # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the - # following boundaries: - # - # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). - # - # Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). - # @!attribute [rw] num_finite_buckets - # @return [::Integer] - # Must be greater than 0. - # @!attribute [rw] growth_factor - # @return [::Float] - # Must be greater than 1. - # @!attribute [rw] scale - # @return [::Float] - # Must be greater than 0. - class Exponential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a set of buckets with arbitrary widths. - # - # There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following - # boundaries: - # - # Upper bound (0 <= i < N-1): bounds[i] - # Lower bound (1 <= i < N); bounds[i - 1] - # - # The `bounds` field must contain at least one element. If `bounds` has - # only one element, then there are no finite buckets, and that single - # element is the common boundary of the overflow and underflow buckets. - # @!attribute [rw] bounds - # @return [::Array<::Float>] - # The values must be monotonically increasing. - class Explicit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Exemplars are example points that may be used to annotate aggregated - # distribution values. They are metadata that gives information about a - # particular value added to a Distribution bucket, such as a trace ID that - # was active when a value was added. They may contain further information, - # such as a example values and timestamps, origin, etc. - # @!attribute [rw] value - # @return [::Float] - # Value of the exemplar point. This value determines to which bucket the - # exemplar belongs. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # The observation (sampling) time of the above value. - # @!attribute [rw] attachments - # @return [::Array<::Google::Protobuf::Any>] - # Contextual information about the example value. Examples are: - # - # Trace: type.googleapis.com/google.monitoring.v3.SpanContext - # - # Literal string: type.googleapis.com/google.protobuf.StringValue - # - # Labels dropped during aggregation: - # type.googleapis.com/google.monitoring.v3.DroppedLabels - # - # There may be only a single attachment of any given message type in a - # single exemplar, and this is enforced by the system. - class Exemplar - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb deleted file mode 100644 index 02d2f8d451f9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A description of a label. - # @!attribute [rw] key - # @return [::String] - # The label key. - # @!attribute [rw] value_type - # @return [::Google::Api::LabelDescriptor::ValueType] - # The type of data that can be assigned to the label. - # @!attribute [rw] description - # @return [::String] - # A human-readable description for the label. - class LabelDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value types that can be used as label values. - module ValueType - # A variable-length string. This is the default. - STRING = 0 - - # Boolean; true or false. - BOOL = 1 - - # A 64-bit signed integer. - INT64 = 2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb deleted file mode 100644 index 56510feeee0f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb +++ /dev/null @@ -1,299 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Defines a metric type and its schema. Once a metric descriptor is created, - # deleting or altering it stops data collection and makes the metric type's - # existing data unusable. - # @!attribute [rw] name - # @return [::String] - # The resource name of the metric descriptor. - # @!attribute [rw] type - # @return [::String] - # The metric type, including its DNS name prefix. The type is not - # URL-encoded. All user-defined metric types have the DNS name - # `custom.googleapis.com` or `external.googleapis.com`. Metric types should - # use a natural hierarchical grouping. For example: - # - # "custom.googleapis.com/invoice/paid/amount" - # "external.googleapis.com/prometheus/up" - # "appengine.googleapis.com/http/server/response_latencies" - # @!attribute [rw] labels - # @return [::Array<::Google::Api::LabelDescriptor>] - # The set of labels that can be used to describe a specific - # instance of this metric type. For example, the - # `appengine.googleapis.com/http/server/response_latencies` metric - # type has a label for the HTTP response code, `response_code`, so - # you can look at latencies for successful responses or just - # for responses that failed. - # @!attribute [rw] metric_kind - # @return [::Google::Api::MetricDescriptor::MetricKind] - # Whether the metric records instantaneous values, changes to a value, etc. - # Some combinations of `metric_kind` and `value_type` might not be supported. - # @!attribute [rw] value_type - # @return [::Google::Api::MetricDescriptor::ValueType] - # Whether the measurement is an integer, a floating-point number, etc. - # Some combinations of `metric_kind` and `value_type` might not be supported. - # @!attribute [rw] unit - # @return [::String] - # The units in which the metric value is reported. It is only applicable - # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` - # defines the representation of the stored metric values. - # - # Different systems might scale the values to be more easily displayed (so a - # value of `0.02kBy` _might_ be displayed as `20By`, and a value of - # `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is - # `kBy`, then the value of the metric is always in thousands of bytes, no - # matter how it might be displayed. - # - # If you want a custom metric to record the exact number of CPU-seconds used - # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is - # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 - # CPU-seconds, then the value is written as `12005`. - # - # Alternatively, if you want a custom metric to record data in a more - # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is - # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), - # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). - # - # The supported units are a subset of [The Unified Code for Units of - # Measure](https://unitsofmeasure.org/ucum.html) standard: - # - # **Basic units (UNIT)** - # - # * `bit` bit - # * `By` byte - # * `s` second - # * `min` minute - # * `h` hour - # * `d` day - # * `1` dimensionless - # - # **Prefixes (PREFIX)** - # - # * `k` kilo (10^3) - # * `M` mega (10^6) - # * `G` giga (10^9) - # * `T` tera (10^12) - # * `P` peta (10^15) - # * `E` exa (10^18) - # * `Z` zetta (10^21) - # * `Y` yotta (10^24) - # - # * `m` milli (10^-3) - # * `u` micro (10^-6) - # * `n` nano (10^-9) - # * `p` pico (10^-12) - # * `f` femto (10^-15) - # * `a` atto (10^-18) - # * `z` zepto (10^-21) - # * `y` yocto (10^-24) - # - # * `Ki` kibi (2^10) - # * `Mi` mebi (2^20) - # * `Gi` gibi (2^30) - # * `Ti` tebi (2^40) - # * `Pi` pebi (2^50) - # - # **Grammar** - # - # The grammar also includes these connectors: - # - # * `/` division or ratio (as an infix operator). For examples, - # `kBy/{email}` or `MiBy/10ms` (although you should almost never - # have `/s` in a metric `unit`; rates should always be computed at - # query time from the underlying cumulative or delta value). - # * `.` multiplication or composition (as an infix operator). For - # examples, `GBy.d` or `k{watt}.h`. - # - # The grammar for a unit is as follows: - # - # Expression = Component { "." Component } { "/" Component } ; - # - # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] - # | Annotation - # | "1" - # ; - # - # Annotation = "{" NAME "}" ; - # - # Notes: - # - # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation - # is used alone, then the unit is equivalent to `1`. For examples, - # `{request}/s == 1/s`, `By{transmitted}/s == By/s`. - # * `NAME` is a sequence of non-blank printable ASCII characters not - # containing `{` or `}`. - # * `1` represents a unitary [dimensionless - # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such - # as in `1/s`. It is typically used when none of the basic units are - # appropriate. For example, "new users per day" can be represented as - # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new - # users). Alternatively, "thousands of page views per day" would be - # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric - # value of `5.3` would mean "5300 page views per day"). - # * `%` represents dimensionless value of 1/100, and annotates values giving - # a percentage (so the metric values are typically in the range of 0..100, - # and a metric value `3` means "3 percent"). - # * `10^2.%` indicates a metric contains a ratio, typically in the range - # 0..1, that will be multiplied by 100 and displayed as a percentage - # (so a metric value `0.03` means "3 percent"). - # @!attribute [rw] description - # @return [::String] - # A detailed description of the metric, which can be used in documentation. - # @!attribute [rw] display_name - # @return [::String] - # A concise name for the metric, which can be displayed in user interfaces. - # Use sentence case without an ending period, for example "Request count". - # This field is optional but it is recommended to be set for any metrics - # associated with user-visible concepts, such as Quota. - # @!attribute [rw] metadata - # @return [::Google::Api::MetricDescriptor::MetricDescriptorMetadata] - # Optional. Metadata which can be used to guide usage of the metric. - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Optional. The launch stage of the metric definition. - # @!attribute [rw] monitored_resource_types - # @return [::Array<::String>] - # Read-only. If present, then a [time - # series][google.monitoring.v3.TimeSeries], which is identified partially by - # a metric type and a - # [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that - # is associated with this metric type can only be associated with one of the - # monitored resource types listed here. - class MetricDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional annotations that can be used to guide the usage of a metric. - # @!attribute [rw] launch_stage - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Api::LaunchStage] - # Deprecated. Must use the - # {::Google::Api::MetricDescriptor#launch_stage MetricDescriptor.launch_stage} - # instead. - # @!attribute [rw] sample_period - # @return [::Google::Protobuf::Duration] - # The sampling period of metric data points. For metrics which are written - # periodically, consecutive data points are stored at this time interval, - # excluding data loss due to errors. Metrics with a higher granularity have - # a smaller sampling period. - # @!attribute [rw] ingest_delay - # @return [::Google::Protobuf::Duration] - # The delay of data points caused by ingestion. Data points older than this - # age are guaranteed to be ingested and available to be read, excluding - # data loss due to errors. - # @!attribute [rw] time_series_resource_hierarchy_level - # @return [::Array<::Google::Api::MetricDescriptor::MetricDescriptorMetadata::TimeSeriesResourceHierarchyLevel>] - # The scope of the timeseries data of the metric. - class MetricDescriptorMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The resource hierarchy level of the timeseries data of a metric. - module TimeSeriesResourceHierarchyLevel - # Do not use this default value. - TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0 - - # Scopes a metric to a project. - PROJECT = 1 - - # Scopes a metric to an organization. - ORGANIZATION = 2 - - # Scopes a metric to a folder. - FOLDER = 3 - end - end - - # The kind of measurement. It describes how the data is reported. - # For information on setting the start time and end time based on - # the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval]. - module MetricKind - # Do not use this default value. - METRIC_KIND_UNSPECIFIED = 0 - - # An instantaneous measurement of a value. - GAUGE = 1 - - # The change in a value during a time interval. - DELTA = 2 - - # A value accumulated over a time interval. Cumulative - # measurements in a time series should have the same start time - # and increasing end times, until an event resets the cumulative - # value to zero and sets a new start time for the following - # points. - CUMULATIVE = 3 - end - - # The value type of a metric. - module ValueType - # Do not use this default value. - VALUE_TYPE_UNSPECIFIED = 0 - - # The value is a boolean. - # This value type can be used only if the metric kind is `GAUGE`. - BOOL = 1 - - # The value is a signed 64-bit integer. - INT64 = 2 - - # The value is a double precision floating point number. - DOUBLE = 3 - - # The value is a text string. - # This value type can be used only if the metric kind is `GAUGE`. - STRING = 4 - - # The value is a {::Google::Api::Distribution `Distribution`}. - DISTRIBUTION = 5 - - # The value is money. - MONEY = 6 - end - end - - # A specific metric, identified by specifying values for all of the - # labels of a {::Google::Api::MetricDescriptor `MetricDescriptor`}. - # @!attribute [rw] type - # @return [::String] - # An existing metric type, see - # {::Google::Api::MetricDescriptor google.api.MetricDescriptor}. For example, - # `custom.googleapis.com/invoice/paid/amount`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The set of label values that uniquely identify this metric. All - # labels listed in the `MetricDescriptor` must be assigned values. - class Metric - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb deleted file mode 100644 index 51337845e2a2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.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 Bigquery - module Migration - module V2 - # Assessment task config. - # @!attribute [rw] input_path - # @return [::String] - # Required. The Cloud Storage path for assessment input files. - # @!attribute [rw] output_dataset - # @return [::String] - # Required. The BigQuery dataset for output. - # @!attribute [rw] querylogs_path - # @return [::String] - # Optional. An optional Cloud Storage path to write the query logs (which is - # then used as an input path on the translation task) - # @!attribute [rw] data_source - # @return [::String] - # Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) - # from which the input data is extracted. - # @!attribute [rw] feature_handle - # @return [::Google::Cloud::Bigquery::Migration::V2::AssessmentFeatureHandle] - # Optional. A collection of additional feature flags for this assessment. - class AssessmentTaskDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # User-definable feature flags for assessment tasks. - # @!attribute [rw] add_shareable_dataset - # @return [::Boolean] - # Optional. Whether to create a dataset containing non-PII data in addition - # to the output dataset. - class AssessmentFeatureHandle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb deleted file mode 100644 index 2e38004a68f2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb +++ /dev/null @@ -1,297 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - # A migration workflow which specifies what needs to be done for an EDW - # migration. - # @!attribute [r] name - # @return [::String] - # Output only. Immutable. Identifier. The unique identifier for the migration - # workflow. The ID is server-generated. - # - # Example: `projects/123/locations/us/workflows/345` - # @!attribute [rw] display_name - # @return [::String] - # The display name of the workflow. This can be set to give a workflow - # a descriptive name. There is no guarantee or enforcement of uniqueness. - # @!attribute [rw] tasks - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Migration::V2::MigrationTask}] - # The tasks in a workflow in a named map. The name (i.e. key) has no - # meaning and is merely a convenient way to address a specific task - # in a workflow. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow::State] - # Output only. That status of the workflow. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the workflow was created. - # @!attribute [r] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the workflow was last updated. - class MigrationWorkflow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask] - class TasksEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible migration workflow states. - module State - # Workflow state is unspecified. - STATE_UNSPECIFIED = 0 - - # Workflow is in draft status, i.e. tasks are not yet eligible for - # execution. - DRAFT = 1 - - # Workflow is running (i.e. tasks are eligible for execution). - RUNNING = 2 - - # Workflow is paused. Tasks currently in progress may continue, but no - # further tasks will be scheduled. - PAUSED = 3 - - # Workflow is complete. There should not be any task in a non-terminal - # state, but if they are (e.g. forced termination), they will not be - # scheduled. - COMPLETED = 4 - end - end - - # A single task for a migration which has details about the configuration of - # the task. - # @!attribute [rw] assessment_task_details - # @return [::Google::Cloud::Bigquery::Migration::V2::AssessmentTaskDetails] - # Task configuration for Assessment. - # - # Note: The following fields are mutually exclusive: `assessment_task_details`, `translation_config_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] translation_config_details - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationConfigDetails] - # Task configuration for CW Batch/Offline SQL Translation. - # - # Note: The following fields are mutually exclusive: `translation_config_details`, `assessment_task_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] translation_details - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationDetails] - # Task details for unified SQL Translation. - # - # Note: The following fields are mutually exclusive: `translation_details`, `assessment_task_details`, `translation_config_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] id - # @return [::String] - # Output only. Immutable. The unique identifier for the migration task. The - # ID is server-generated. - # @!attribute [rw] type - # @return [::String] - # The type of the task. This must be one of the supported task types. - # - # Assessment: - # - # - `Assessment_Hive` - Assessment for Hive. - # - `Assessment_Redshift` - Assessment for Redshift. - # - `Assessment_Snowflake` - Assessment for Snowflake. - # - `Assessment_Teradata_v2` - Assessment for Teradata. - # - `Assessment_Oracle` - Assessment for Oracle. - # - `Assessment_Hadoop` - Assessment for Hadoop. - # - `Assessment_Informatica` - Assessment for Informatica. - # - # Translation: - # See [Supported Task - # Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) - # for a list of supported task types. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask::State] - # Output only. The current state of the task. - # @!attribute [r] processing_error - # @return [::Google::Rpc::ErrorInfo] - # Output only. An explanation that may be populated when the task is in - # FAILED state. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the task was created. - # @!attribute [r] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the task was last updated. - # @!attribute [r] resource_error_details - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] - # Output only. Provides details to errors and issues encountered while - # processing the task. Presence of error details does not mean that the task - # failed. - # @!attribute [r] resource_error_count - # @return [::Integer] - # Output only. The number or resources with errors. Note: This is not the - # total number of errors as each resource can have more than one error. This - # is used to indicate truncation by having a `resource_error_count` that is - # higher than the size of `resource_error_details`. - # @!attribute [r] metrics - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] - # Output only. The metrics for the task. - # @!attribute [r] task_result - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTaskResult] - # Output only. The result of the task. - # @!attribute [r] total_processing_error_count - # @return [::Integer] - # Output only. Count of all the processing errors in this task and its - # subtasks. - # @!attribute [r] total_resource_error_count - # @return [::Integer] - # Output only. Count of all the resource errors in this task and its - # subtasks. - class MigrationTask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of a migration task. - module State - # The state is unspecified. - STATE_UNSPECIFIED = 0 - - # The task is waiting for orchestration. - PENDING = 1 - - # The task is assigned to an orchestrator. - ORCHESTRATING = 2 - - # The task is running, i.e. its subtasks are ready for execution. - RUNNING = 3 - - # The task is paused. Assigned subtasks can continue, but no new subtasks - # will be scheduled. - PAUSED = 4 - - # The task finished successfully. - SUCCEEDED = 5 - - # The task finished unsuccessfully. - FAILED = 6 - end - end - - # A subtask for a migration which carries details about the configuration of - # the subtask. The content of the details should not matter to the end user, - # but is a contract between the subtask creator and subtask worker. - # @!attribute [r] name - # @return [::String] - # Output only. Immutable. The resource name for the migration subtask. The ID - # is server-generated. - # - # Example: `projects/123/locations/us/workflows/345/subtasks/678` - # @!attribute [rw] task_id - # @return [::String] - # The unique ID of the task to which this subtask belongs. - # @!attribute [rw] type - # @return [::String] - # The type of the Subtask. The migration service does not check whether this - # is a known type. It is up to the task creator (i.e. orchestrator or worker) - # to ensure it only creates subtasks for which there are compatible workers - # polling for Subtasks. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask::State] - # Output only. The current state of the subtask. - # @!attribute [r] processing_error - # @return [::Google::Rpc::ErrorInfo] - # Output only. An explanation that may be populated when the task is in - # FAILED state. - # @!attribute [r] resource_error_details - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] - # Output only. Provides details to errors and issues encountered while - # processing the subtask. Presence of error details does not mean that the - # subtask failed. - # @!attribute [r] resource_error_count - # @return [::Integer] - # Output only. The number or resources with errors. Note: This is not the - # total number of errors as each resource can have more than one error. This - # is used to indicate truncation by having a `resource_error_count` that is - # higher than the size of `resource_error_details`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the subtask was created. - # @!attribute [r] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the subtask was last updated. - # @!attribute [r] metrics - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] - # Output only. The metrics for the subtask. - class MigrationSubtask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of a migration subtask. - module State - # The state is unspecified. - STATE_UNSPECIFIED = 0 - - # The subtask is ready, i.e. it is ready for execution. - ACTIVE = 1 - - # The subtask is running, i.e. it is assigned to a worker for execution. - RUNNING = 2 - - # The subtask finished successfully. - SUCCEEDED = 3 - - # The subtask finished unsuccessfully. - FAILED = 4 - - # The subtask is paused, i.e., it will not be scheduled. If it was already - # assigned,it might still finish but no new lease renewals will be granted. - PAUSED = 5 - - # The subtask is pending a dependency. It will be scheduled once its - # dependencies are done. - PENDING_DEPENDENCY = 6 - end - end - - # The migration task result. - # @!attribute [rw] translation_task_result - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationTaskResult] - # Details specific to translation task types. - class MigrationTaskResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Translation specific result details from the migration task. - # @!attribute [rw] translated_literals - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Literal>] - # The list of the translated literals. - # @!attribute [rw] report_log_messages - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::GcsReportLogMessage>] - # The records from the aggregate CSV report for a migration workflow. - # @!attribute [rw] console_uri - # @return [::String] - # The Cloud Console URI for the migration workflow. - class TranslationTaskResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb deleted file mode 100644 index 29dfe6d0ee40..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - # Provides details for errors and the corresponding resources. - # @!attribute [rw] resource_info - # @return [::Google::Rpc::ResourceInfo] - # Required. Information about the resource where the error is located. - # @!attribute [rw] error_details - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ErrorDetail>] - # Required. The error details for the resource. - # @!attribute [rw] error_count - # @return [::Integer] - # Required. How many errors there are in total for the resource. Truncation - # can be indicated by having an `error_count` that is higher than the size of - # `error_details`. - class ResourceErrorDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides details for errors, e.g. issues that where encountered when - # processing a subtask. - # @!attribute [rw] location - # @return [::Google::Cloud::Bigquery::Migration::V2::ErrorLocation] - # Optional. The exact location within the resource (if applicable). - # @!attribute [rw] error_info - # @return [::Google::Rpc::ErrorInfo] - # Required. Describes the cause of the error with structured detail. - class ErrorDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Holds information about where the error is located. - # @!attribute [rw] line - # @return [::Integer] - # Optional. If applicable, denotes the line where the error occurred. A zero - # value means that there is no line information. - # @!attribute [rw] column - # @return [::Integer] - # Optional. If applicable, denotes the column where the error occurred. A - # zero value means that there is no columns information. - class ErrorLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb deleted file mode 100644 index 41e34dd60654..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb +++ /dev/null @@ -1,129 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - # The metrics object for a SubTask. - # @!attribute [rw] metric - # @return [::String] - # Required. The name of the metric. - # - # If the metric is not known by the service yet, it will be auto-created. - # @!attribute [rw] value_type - # @return [::Google::Api::MetricDescriptor::ValueType] - # Required. The value type of the time series. - # @!attribute [rw] metric_kind - # @return [::Google::Api::MetricDescriptor::MetricKind] - # Optional. The metric kind of the time series. - # - # If present, it must be the same as the metric kind of the associated - # metric. If the associated metric's descriptor must be auto-created, then - # this field specifies the metric kind of the new descriptor and must be - # either `GAUGE` (the default) or `CUMULATIVE`. - # @!attribute [rw] points - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Point>] - # Required. The data points of this time series. When listing time series, - # points are returned in reverse time order. - # - # When creating a time series, this field must contain exactly one point and - # the point's type must be the same as the value type of the associated - # metric. If the associated metric's descriptor must be auto-created, then - # the value type of the descriptor is determined by the point's type, which - # must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - class TimeSeries - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single data point in a time series. - # @!attribute [rw] interval - # @return [::Google::Cloud::Bigquery::Migration::V2::TimeInterval] - # The time interval to which the data point applies. For `GAUGE` metrics, - # the start time does not need to be supplied, but if it is supplied, it must - # equal the end time. For `DELTA` metrics, the start and end time should - # specify a non-zero interval, with subsequent points specifying contiguous - # and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - # time should specify a non-zero interval, with subsequent points specifying - # the same start time and increasing end times, until an event resets the - # cumulative value to zero and sets a new start time for the following - # points. - # @!attribute [rw] value - # @return [::Google::Cloud::Bigquery::Migration::V2::TypedValue] - # The value of the data point. - class Point - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A time interval extending just after a start time through an end time. - # If the start time is the same as the end time, then the interval - # represents a single point in time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The beginning of the time interval. The default value - # for the start time is the end time. The start time must not be - # later than the end time. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. The end of the time interval. - class TimeInterval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single strongly-typed value. - # @!attribute [rw] bool_value - # @return [::Boolean] - # A Boolean value: `true` or `false`. - # - # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int64_value - # @return [::Integer] - # A 64-bit integer. Its range is approximately `+/-9.2x10^18`. - # - # Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] double_value - # @return [::Float] - # A 64-bit double-precision floating-point number. Its magnitude - # is approximately `+/-10^(+/-300)` and it has 16 significant digits of - # precision. - # - # Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # A variable-length string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] distribution_value - # @return [::Google::Api::Distribution] - # A distribution value. - # - # Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TypedValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb deleted file mode 100644 index d833be3e5b1d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb +++ /dev/null @@ -1,166 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - # Request to create a migration workflow resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project to which this migration workflow belongs. - # Example: `projects/foo/locations/bar` - # @!attribute [rw] migration_workflow - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # Required. The migration workflow to create. - class CreateMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a previously created migration workflow. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be retrieved. - class GetMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list previously created migration workflows. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location of the migration workflows to list. - # Example: `projects/123/locations/us` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be retrieved. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of migration workflows to return. The service may return - # fewer than this number. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from previous `ListMigrationWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationWorkflows` - # must match the call that provided the page token. - class ListMigrationWorkflowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for a `ListMigrationWorkflows` call. - # @!attribute [rw] migration_workflows - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # The migration workflows for the specified project / location. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListMigrationWorkflowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete a previously created migration workflow. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - class DeleteMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to start a previously created migration workflow. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - class StartMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a previously created migration subtasks. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration subtask. - # Example: `projects/123/locations/us/workflows/1234/subtasks/543` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to be retrieved. - class GetMigrationSubtaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list previously created migration subtasks. - # @!attribute [rw] parent - # @return [::String] - # Required. The migration task of the subtasks to list. - # Example: `projects/123/locations/us/workflows/1234` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to be retrieved. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of migration tasks to return. The service may - # return fewer than this number. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from previous `ListMigrationSubtasks` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationSubtasks` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to apply. This can be used to get the subtasks of a - # specific tasks in a workflow, e.g. `migration_task = "ab012"` where - # `"ab012"` is the task ID (not the name in the named map). - class ListMigrationSubtasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for a `ListMigrationSubtasks` call. - # @!attribute [rw] migration_subtasks - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # The migration subtasks for the specified task. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListMigrationSubtasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb deleted file mode 100644 index d0c7dde5e35b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb +++ /dev/null @@ -1,389 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - # The translation config to capture necessary settings for a translation task - # and subtask. - # @!attribute [rw] gcs_source_path - # @return [::String] - # The Cloud Storage path for a directory of files to translate in a task. - # @!attribute [rw] gcs_target_path - # @return [::String] - # The Cloud Storage path to write back the corresponding input files to. - # @!attribute [rw] name_mapping_list - # @return [::Google::Cloud::Bigquery::Migration::V2::ObjectNameMappingList] - # The mapping of objects to their desired output names in list form. - # @!attribute [rw] source_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] - # The dialect of the input files. - # @!attribute [rw] target_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] - # The target dialect for the engine to translate the input to. - # @!attribute [rw] source_env - # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnv] - # The default source environment values for the translation. - # @!attribute [rw] request_source - # @return [::String] - # The indicator to show translation request initiator. - # @!attribute [rw] target_types - # @return [::Array<::String>] - # The types of output to generate, e.g. sql, metadata etc. If not specified, - # a default set of targets will be generated. Some additional target types - # may be slower to generate. See the documentation for the set of available - # target types. - class TranslationConfigDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible dialect options for translation. - # @!attribute [rw] bigquery_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::BigQueryDialect] - # The BigQuery dialect - # - # Note: The following fields are mutually exclusive: `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] hiveql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::HiveQLDialect] - # The HiveQL dialect - # - # Note: The following fields are mutually exclusive: `hiveql_dialect`, `bigquery_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] redshift_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::RedshiftDialect] - # The Redshift dialect - # - # Note: The following fields are mutually exclusive: `redshift_dialect`, `bigquery_dialect`, `hiveql_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] teradata_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect] - # The Teradata dialect - # - # Note: The following fields are mutually exclusive: `teradata_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oracle_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::OracleDialect] - # The Oracle dialect - # - # Note: The following fields are mutually exclusive: `oracle_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sparksql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SparkSQLDialect] - # The SparkSQL dialect - # - # Note: The following fields are mutually exclusive: `sparksql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] snowflake_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SnowflakeDialect] - # The Snowflake dialect - # - # Note: The following fields are mutually exclusive: `snowflake_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] netezza_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::NetezzaDialect] - # The Netezza dialect - # - # Note: The following fields are mutually exclusive: `netezza_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] azure_synapse_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::AzureSynapseDialect] - # The Azure Synapse dialect - # - # Note: The following fields are mutually exclusive: `azure_synapse_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vertica_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::VerticaDialect] - # The Vertica dialect - # - # Note: The following fields are mutually exclusive: `vertica_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sql_server_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SQLServerDialect] - # The SQL Server dialect - # - # Note: The following fields are mutually exclusive: `sql_server_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] postgresql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::PostgresqlDialect] - # The Postgresql dialect - # - # Note: The following fields are mutually exclusive: `postgresql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] presto_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::PrestoDialect] - # The Presto dialect - # - # Note: The following fields are mutually exclusive: `presto_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mysql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::MySQLDialect] - # The MySQL dialect - # - # Note: The following fields are mutually exclusive: `mysql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] db2_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::DB2Dialect] - # DB2 dialect - # - # Note: The following fields are mutually exclusive: `db2_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sqlite_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SQLiteDialect] - # SQLite dialect - # - # Note: The following fields are mutually exclusive: `sqlite_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] greenplum_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::GreenplumDialect] - # Greenplum dialect - # - # Note: The following fields are mutually exclusive: `greenplum_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Dialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for BigQuery. - class BigQueryDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for HiveQL. - class HiveQLDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Redshift. - class RedshiftDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Teradata. - # @!attribute [rw] mode - # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect::Mode] - # Which Teradata sub-dialect mode the user specifies. - class TeradataDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The sub-dialect options for Teradata. - module Mode - # Unspecified mode. - MODE_UNSPECIFIED = 0 - - # Teradata SQL mode. - SQL = 1 - - # BTEQ mode (which includes SQL). - BTEQ = 2 - end - end - - # The dialect definition for Oracle. - class OracleDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for SparkSQL. - class SparkSQLDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Snowflake. - class SnowflakeDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Netezza. - class NetezzaDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Azure Synapse. - class AzureSynapseDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Vertica. - class VerticaDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for SQL Server. - class SQLServerDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Postgresql. - class PostgresqlDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Presto. - class PrestoDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for MySQL. - class MySQLDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for DB2. - class DB2Dialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for SQLite. - class SQLiteDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Greenplum. - class GreenplumDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a map of name mappings using a list of key:value proto messages of - # existing name to desired output name. - # @!attribute [rw] name_map - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ObjectNameMapping>] - # The elements of the object name map. - class ObjectNameMappingList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a key-value pair of NameMappingKey to NameMappingValue to - # represent the mapping of SQL names from the input value to desired output. - # @!attribute [rw] source - # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey] - # The name of the object in source that is being mapped. - # @!attribute [rw] target - # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingValue] - # The desired target name of the object that is being mapped. - class ObjectNameMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The potential components of a full name mapping that will be mapped - # during translation in the source data warehouse. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey::Type] - # The type of object that is being mapped. - # @!attribute [rw] database - # @return [::String] - # The database name (BigQuery project ID equivalent in the source data - # warehouse). - # @!attribute [rw] schema - # @return [::String] - # The schema name (BigQuery dataset equivalent in the source data warehouse). - # @!attribute [rw] relation - # @return [::String] - # The relation name (BigQuery table or view equivalent in the source data - # warehouse). - # @!attribute [rw] attribute - # @return [::String] - # The attribute name (BigQuery column equivalent in the source data - # warehouse). - class NameMappingKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the object that is being mapped. - module Type - # Unspecified name mapping type. - TYPE_UNSPECIFIED = 0 - - # The object being mapped is a database. - DATABASE = 1 - - # The object being mapped is a schema. - SCHEMA = 2 - - # The object being mapped is a relation. - RELATION = 3 - - # The object being mapped is an attribute. - ATTRIBUTE = 4 - - # The object being mapped is a relation alias. - RELATION_ALIAS = 5 - - # The object being mapped is a an attribute alias. - ATTRIBUTE_ALIAS = 6 - - # The object being mapped is a function. - FUNCTION = 7 - end - end - - # The potential components of a full name mapping that will be mapped - # during translation in the target data warehouse. - # @!attribute [rw] database - # @return [::String] - # The database name (BigQuery project ID equivalent in the target data - # warehouse). - # @!attribute [rw] schema - # @return [::String] - # The schema name (BigQuery dataset equivalent in the target data warehouse). - # @!attribute [rw] relation - # @return [::String] - # The relation name (BigQuery table or view equivalent in the target data - # warehouse). - # @!attribute [rw] attribute - # @return [::String] - # The attribute name (BigQuery column equivalent in the target data - # warehouse). - class NameMappingValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the default source environment values for the translation. - # @!attribute [rw] default_database - # @return [::String] - # The default database name to fully qualify SQL objects when their database - # name is missing. - # @!attribute [rw] schema_search_path - # @return [::Array<::String>] - # The schema search path. When SQL objects are missing schema name, - # translation engine will search through this list to find the value. - # @!attribute [rw] metadata_store_dataset - # @return [::String] - # Optional. Expects a valid BigQuery dataset ID that exists, e.g., - # project-123.metadata_store_123. If specified, translation will search and - # read the required schema information from a metadata store in this dataset. - # If metadata store doesn't exist, translation will parse the metadata file - # and upload the schema info to a temp table in the dataset to speed up - # future translation jobs. - class SourceEnv - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb deleted file mode 100644 index 43810632c46b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.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 Cloud - module Bigquery - module Migration - module V2 - # The translation details to capture the necessary settings for a translation - # job. - # @!attribute [rw] source_target_mapping - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SourceTargetMapping>] - # The mapping from source to target SQL. - # @!attribute [rw] target_base_uri - # @return [::String] - # The base URI for all writes to persistent storage. - # @!attribute [rw] source_environment - # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnvironment] - # The default source environment values for the translation. - # @!attribute [rw] target_return_literals - # @return [::Array<::String>] - # The list of literal targets that will be directly returned to the response. - # Each entry consists of the constructed path, EXCLUDING the base path. Not - # providing a target_base_uri will prevent writing to persistent storage. - # @!attribute [rw] target_types - # @return [::Array<::String>] - # The types of output to generate, e.g. sql, metadata, - # lineage_from_sql_scripts, etc. If not specified, a default set of - # targets will be generated. Some additional target types may be slower to - # generate. See the documentation for the set of available target types. - # @!attribute [rw] suggestion_config - # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionConfig] - # The configuration for the suggestion if requested as a target type. - class TranslationDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration for the suggestion if requested as a target type. - # @!attribute [rw] skip_suggestion_steps - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SuggestionStep>] - # The list of suggestion steps to skip. - class SuggestionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Suggestion step to skip. - # @!attribute [rw] suggestion_type - # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionStep::SuggestionType] - # The type of suggestion. - # @!attribute [rw] rewrite_target - # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionStep::RewriteTarget] - # The rewrite target. - class SuggestionStep - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Suggestion type. - module SuggestionType - # Suggestion type unspecified. - SUGGESTION_TYPE_UNSPECIFIED = 0 - - # Query customization. - QUERY_CUSTOMIZATION = 1 - - # Translation explanation. - TRANSLATION_EXPLANATION = 2 - end - - # The target to apply the suggestion to. - module RewriteTarget - # Rewrite target unspecified. - REWRITE_TARGET_UNSPECIFIED = 0 - - # Source SQL. - SOURCE_SQL = 1 - - # Target SQL. - TARGET_SQL = 2 - end - end - - # Represents one mapping from a source SQL to a target SQL. - # @!attribute [rw] source_spec - # @return [::Google::Cloud::Bigquery::Migration::V2::SourceSpec] - # The source SQL or the path to it. - # @!attribute [rw] target_spec - # @return [::Google::Cloud::Bigquery::Migration::V2::TargetSpec] - # The target SQL or the path for it. - class SourceTargetMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents one path to the location that holds source data. - # @!attribute [rw] base_uri - # @return [::String] - # The base URI for all files to be read in as sources for translation. - # - # Note: The following fields are mutually exclusive: `base_uri`, `literal`, `gcs_file_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] literal - # @return [::Google::Cloud::Bigquery::Migration::V2::Literal] - # Source literal. - # - # Note: The following fields are mutually exclusive: `literal`, `base_uri`, `gcs_file_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcs_file_path - # @return [::String] - # The path to a single source file in Cloud Storage. - # - # Note: The following fields are mutually exclusive: `gcs_file_path`, `base_uri`, `literal`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The optional field to specify the encoding of the sql bytes. - class SourceSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents one path to the location that holds target data. - # @!attribute [rw] relative_path - # @return [::String] - # The relative path for the target data. Given source file - # `base_uri/input/sql`, the output would be - # `target_base_uri/sql/relative_path/input.sql`. - class TargetSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Literal data. - # @!attribute [rw] literal_string - # @return [::String] - # Literal string data. - # - # Note: The following fields are mutually exclusive: `literal_string`, `literal_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] literal_bytes - # @return [::String] - # Literal byte data. - # - # Note: The following fields are mutually exclusive: `literal_bytes`, `literal_string`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] relative_path - # @return [::String] - # Required. The identifier of the literal entry. - class Literal - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the default source environment values for the translation. - # @!attribute [rw] default_database - # @return [::String] - # The default database name to fully qualify SQL objects when their database - # name is missing. - # @!attribute [rw] schema_search_path - # @return [::Array<::String>] - # The schema search path. When SQL objects are missing schema name, - # translation engine will search through this list to find the value. - # @!attribute [rw] metadata_store_dataset - # @return [::String] - # Optional. Expects a validQ BigQuery dataset ID that exists, e.g., - # project-123.metadata_store_123. If specified, translation will search and - # read the required schema information from a metadata store in this dataset. - # If metadata store doesn't exist, translation will parse the metadata file - # and upload the schema info to a temp table in the dataset to speed up - # future translation jobs. - class SourceEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb deleted file mode 100644 index ba08b1dfb393..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - # Details about a record. - # @!attribute [rw] severity - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationReportRecord::Severity] - # Severity of the translation record. - # @!attribute [rw] script_line - # @return [::Integer] - # Specifies the row from the source text where the error occurred (0 based). - # Example: 2 - # @!attribute [rw] script_column - # @return [::Integer] - # Specifies the column from the source texts where the error occurred. (0 - # based) example: 6 - # @!attribute [rw] category - # @return [::String] - # Category of the error/warning. Example: SyntaxError - # @!attribute [rw] message - # @return [::String] - # Detailed message of the record. - class TranslationReportRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity type of the record. - module Severity - # SeverityType not specified. - SEVERITY_UNSPECIFIED = 0 - - # INFO type. - INFO = 1 - - # WARNING type. The translated query may still provide useful information - # if all the report records are WARNING. - WARNING = 2 - - # ERROR type. Translation failed. - ERROR = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb deleted file mode 100644 index 13d55b41ed54..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - # A record in the aggregate CSV report for a migration workflow - # @!attribute [rw] severity - # @return [::String] - # Severity of the translation record. - # @!attribute [rw] category - # @return [::String] - # Category of the error/warning. Example: SyntaxError - # @!attribute [rw] file_path - # @return [::String] - # The file path in which the error occurred - # @!attribute [rw] filename - # @return [::String] - # The file name in which the error occurred - # @!attribute [rw] source_script_line - # @return [::Integer] - # Specifies the row from the source text where the error occurred (0 based, - # -1 for messages without line location). Example: 2 - # @!attribute [rw] source_script_column - # @return [::Integer] - # Specifies the column from the source texts where the error occurred. (0 - # based, -1 for messages without column location) example: 6 - # @!attribute [rw] message - # @return [::String] - # Detailed message of the record. - # @!attribute [rw] script_context - # @return [::String] - # The script context (obfuscated) in which the error occurred - # @!attribute [rw] action - # @return [::String] - # Category of the error/warning. Example: SyntaxError - # @!attribute [rw] effect - # @return [::String] - # Effect of the error/warning. Example: COMPATIBILITY - # @!attribute [rw] object_name - # @return [::String] - # Name of the affected object in the log message. - class GcsReportLogMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-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-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb deleted file mode 100644 index 507d2b54094a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb +++ /dev/null @@ -1,420 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # Describes the cause of the error with structured details. - # - # Example of an error when contacting the "pubsub.googleapis.com" API when it - # is not enabled: - # - # { "reason": "API_DISABLED" - # "domain": "googleapis.com" - # "metadata": { - # "resource": "projects/123", - # "service": "pubsub.googleapis.com" - # } - # } - # - # This response indicates that the pubsub.googleapis.com API is not enabled. - # - # Example of an error that is returned when attempting to create a Spanner - # instance in a region that is out of stock: - # - # { "reason": "STOCKOUT" - # "domain": "spanner.googleapis.com", - # "metadata": { - # "availableRegions": "us-central1,us-east2" - # } - # } - # @!attribute [rw] reason - # @return [::String] - # The reason of the error. This is a constant value that identifies the - # proximate cause of the error. Error reasons are unique within a particular - # domain of errors. This should be at most 63 characters and match a - # regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents - # UPPER_SNAKE_CASE. - # @!attribute [rw] domain - # @return [::String] - # The logical grouping to which the "reason" belongs. The error domain - # is typically the registered service name of the tool or product that - # generates the error. Example: "pubsub.googleapis.com". If the error is - # generated by some common infrastructure, the error domain must be a - # globally unique value that identifies the infrastructure. For Google API - # infrastructure, the error domain is "googleapis.com". - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional structured details about this error. - # - # Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should - # ideally be lowerCamelCase. Also, they must be limited to 64 characters in - # length. When identifying the current value of an exceeded limit, the units - # should be contained in the key, not the value. For example, rather than - # `{"instanceLimit": "100/request"}`, should be returned as, - # `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of - # instances that can be created in a single (batch) request. - class ErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes when the clients can retry a failed request. Clients could ignore - # the recommendation here or retry when this information is missing from error - # responses. - # - # It's always recommended that clients should use exponential backoff when - # retrying. - # - # Clients should wait until `retry_delay` amount of time has passed since - # receiving the error response before retrying. If retrying requests also - # fail, clients should use an exponential backoff scheme to gradually increase - # the delay between retries based on `retry_delay`, until either a maximum - # number of retries have been reached or a maximum retry delay cap has been - # reached. - # @!attribute [rw] retry_delay - # @return [::Google::Protobuf::Duration] - # Clients should wait at least this long between retrying the same request. - class RetryInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes additional debugging info. - # @!attribute [rw] stack_entries - # @return [::Array<::String>] - # The stack trace entries indicating where the error occurred. - # @!attribute [rw] detail - # @return [::String] - # Additional debugging information provided by the server. - class DebugInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes how a quota check failed. - # - # For example if a daily limit was exceeded for the calling project, - # a service could respond with a QuotaFailure detail containing the project - # id and the description of the quota limit that was exceeded. If the - # calling project hasn't enabled the service in the developer console, then - # a service could respond with the project id and set `service_disabled` - # to true. - # - # Also see RetryInfo and Help types for other details about handling a - # quota failure. - # @!attribute [rw] violations - # @return [::Array<::Google::Rpc::QuotaFailure::Violation>] - # Describes all quota violations. - class QuotaFailure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A message type used to describe a single quota violation. For example, a - # daily quota or a custom quota that was exceeded. - # @!attribute [rw] subject - # @return [::String] - # The subject on which the quota check failed. - # For example, "clientip:" or "project:". - # @!attribute [rw] description - # @return [::String] - # A description of how the quota check failed. Clients can use this - # description to find more about the quota configuration in the service's - # public documentation, or find the relevant quota limit to adjust through - # developer console. - # - # For example: "Service disabled" or "Daily Limit for read operations - # exceeded". - # @!attribute [rw] api_service - # @return [::String] - # The API Service from which the `QuotaFailure.Violation` orginates. In - # some cases, Quota issues originate from an API Service other than the one - # that was called. In other words, a dependency of the called API Service - # could be the cause of the `QuotaFailure`, and this field would have the - # dependency API service name. - # - # For example, if the called API is Kubernetes Engine API - # (container.googleapis.com), and a quota violation occurs in the - # Kubernetes Engine API itself, this field would be - # "container.googleapis.com". On the other hand, if the quota violation - # occurs when the Kubernetes Engine API creates VMs in the Compute Engine - # API (compute.googleapis.com), this field would be - # "compute.googleapis.com". - # @!attribute [rw] quota_metric - # @return [::String] - # The metric of the violated quota. A quota metric is a named counter to - # measure usage, such as API requests or CPUs. When an activity occurs in a - # service, such as Virtual Machine allocation, one or more quota metrics - # may be affected. - # - # For example, "compute.googleapis.com/cpus_per_vm_family", - # "storage.googleapis.com/internet_egress_bandwidth". - # @!attribute [rw] quota_id - # @return [::String] - # The id of the violated quota. Also know as "limit name", this is the - # unique identifier of a quota in the context of an API service. - # - # For example, "CPUS-PER-VM-FAMILY-per-project-region". - # @!attribute [rw] quota_dimensions - # @return [::Google::Protobuf::Map{::String => ::String}] - # The dimensions of the violated quota. Every non-global quota is enforced - # on a set of dimensions. While quota metric defines what to count, the - # dimensions specify for what aspects the counter should be increased. - # - # For example, the quota "CPUs per region per VM family" enforces a limit - # on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions - # "region" and "vm_family". And if the violation occurred in region - # "us-central1" and for VM family "n1", the quota_dimensions would be, - # - # { - # "region": "us-central1", - # "vm_family": "n1", - # } - # - # When a quota is enforced globally, the quota_dimensions would always be - # empty. - # @!attribute [rw] quota_value - # @return [::Integer] - # The enforced quota value at the time of the `QuotaFailure`. - # - # For example, if the enforced quota value at the time of the - # `QuotaFailure` on the number of CPUs is "10", then the value of this - # field would reflect this quantity. - # @!attribute [rw] future_quota_value - # @return [::Integer] - # The new quota value being rolled out at the time of the violation. At the - # completion of the rollout, this value will be enforced in place of - # quota_value. If no rollout is in progress at the time of the violation, - # this field is not set. - # - # For example, if at the time of the violation a rollout is in progress - # changing the number of CPUs quota from 10 to 20, 20 would be the value of - # this field. - class Violation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class QuotaDimensionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Describes what preconditions have failed. - # - # For example, if an RPC failed because it required the Terms of Service to be - # acknowledged, it could list the terms of service violation in the - # PreconditionFailure message. - # @!attribute [rw] violations - # @return [::Array<::Google::Rpc::PreconditionFailure::Violation>] - # Describes all precondition violations. - class PreconditionFailure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A message type used to describe a single precondition failure. - # @!attribute [rw] type - # @return [::String] - # The type of PreconditionFailure. We recommend using a service-specific - # enum type to define the supported precondition violation subjects. For - # example, "TOS" for "Terms of Service violation". - # @!attribute [rw] subject - # @return [::String] - # The subject, relative to the type, that failed. - # For example, "google.com/cloud" relative to the "TOS" type would indicate - # which terms of service is being referenced. - # @!attribute [rw] description - # @return [::String] - # A description of how the precondition failed. Developers can use this - # description to understand how to fix the failure. - # - # For example: "Terms of service not accepted". - class Violation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes violations in a client request. This error type focuses on the - # syntactic aspects of the request. - # @!attribute [rw] field_violations - # @return [::Array<::Google::Rpc::BadRequest::FieldViolation>] - # Describes all violations in a client request. - class BadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A message type used to describe a single bad request field. - # @!attribute [rw] field - # @return [::String] - # A path that leads to a field in the request body. The value will be a - # sequence of dot-separated identifiers that identify a protocol buffer - # field. - # - # Consider the following: - # - # message CreateContactRequest { - # message EmailAddress { - # enum Type { - # TYPE_UNSPECIFIED = 0; - # HOME = 1; - # WORK = 2; - # } - # - # optional string email = 1; - # repeated EmailType type = 2; - # } - # - # string full_name = 1; - # repeated EmailAddress email_addresses = 2; - # } - # - # In this example, in proto `field` could take one of the following values: - # - # * `full_name` for a violation in the `full_name` value - # * `email_addresses[0].email` for a violation in the `email` field of the - # first `email_addresses` message - # * `email_addresses[2].type[1]` for a violation in the second `type` - # value in the third `email_addresses` message. - # - # In JSON, the same values are represented as: - # - # * `fullName` for a violation in the `fullName` value - # * `emailAddresses[0].email` for a violation in the `email` field of the - # first `emailAddresses` message - # * `emailAddresses[2].type[1]` for a violation in the second `type` - # value in the third `emailAddresses` message. - # @!attribute [rw] description - # @return [::String] - # A description of why the request element is bad. - # @!attribute [rw] reason - # @return [::String] - # The reason of the field-level error. This is a constant value that - # identifies the proximate cause of the field-level error. It should - # uniquely identify the type of the FieldViolation within the scope of the - # google.rpc.ErrorInfo.domain. This should be at most 63 - # characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, - # which represents UPPER_SNAKE_CASE. - # @!attribute [rw] localized_message - # @return [::Google::Rpc::LocalizedMessage] - # Provides a localized error message for field-level errors that is safe to - # return to the API consumer. - class FieldViolation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Contains metadata about the request that clients can attach when filing a bug - # or providing other forms of feedback. - # @!attribute [rw] request_id - # @return [::String] - # An opaque string that should only be interpreted by the service generating - # it. For example, it can be used to identify requests in the service's logs. - # @!attribute [rw] serving_data - # @return [::String] - # Any data that was used to serve this request. For example, an encrypted - # stack trace that can be sent back to the service provider for debugging. - class RequestInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the resource that is being accessed. - # @!attribute [rw] resource_type - # @return [::String] - # A name for the type of resource being accessed, e.g. "sql table", - # "cloud storage bucket", "file", "Google calendar"; or the type URL - # of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". - # @!attribute [rw] resource_name - # @return [::String] - # The name of the resource being accessed. For example, a shared calendar - # name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - # error is - # [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - # @!attribute [rw] owner - # @return [::String] - # The owner of the resource (optional). - # For example, "user:" or "project:". - # @!attribute [rw] description - # @return [::String] - # Describes what error is encountered when accessing this resource. - # For example, updating a cloud project may require the `writer` permission - # on the developer console project. - class ResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides links to documentation or for performing an out of band action. - # - # For example, if a quota check failed with an error indicating the calling - # project hasn't enabled the accessed service, this can contain a URL pointing - # directly to the right place in the developer console to flip the bit. - # @!attribute [rw] links - # @return [::Array<::Google::Rpc::Help::Link>] - # URL(s) pointing to additional information on handling the current error. - class Help - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a URL link. - # @!attribute [rw] description - # @return [::String] - # Describes what the link offers. - # @!attribute [rw] url - # @return [::String] - # The URL of the link. - class Link - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Provides a localized error message that is safe to return to the user - # which can be attached to an RPC error. - # @!attribute [rw] locale - # @return [::String] - # The locale used following the specification defined at - # https://www.rfc-editor.org/rfc/bcp/bcp47.txt. - # Examples are: "en-US", "fr-CH", "es-MX" - # @!attribute [rw] message - # @return [::String] - # The localized error message in the above locale. - class LocalizedMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile deleted file mode 100644 index 4d1b3eac9aa1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-bigquery-migration-v2", path: "../" -else - gem "google-cloud-bigquery-migration-v2" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb deleted file mode 100644 index eb3b21d627fc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the create_migration_workflow call in the MigrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow. -# -def create_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new - - # Call the create_migration_workflow method. - result = client.create_migration_workflow request - - # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb deleted file mode 100644 index add86a0f96f7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the delete_migration_workflow call in the MigrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow. -# -def delete_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new - - # Call the delete_migration_workflow method. - result = client.delete_migration_workflow request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb deleted file mode 100644 index 1e668aecb17b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the get_migration_subtask call in the MigrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask. -# -def get_migration_subtask - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new - - # Call the get_migration_subtask method. - result = client.get_migration_subtask request - - # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb deleted file mode 100644 index 835a5af7a227..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the get_migration_workflow call in the MigrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow. -# -def get_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new - - # Call the get_migration_workflow method. - result = client.get_migration_workflow request - - # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb deleted file mode 100644 index b526522af82b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the list_migration_subtasks call in the MigrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks. -# -def list_migration_subtasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new - - # Call the list_migration_subtasks method. - result = client.list_migration_subtasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - p item - end -end -# [END bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb deleted file mode 100644 index acc8872c9867..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the list_migration_workflows call in the MigrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows. -# -def list_migration_workflows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new - - # Call the list_migration_workflows method. - result = client.list_migration_workflows request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - p item - end -end -# [END bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb deleted file mode 100644 index db1b4071ef4d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the start_migration_workflow call in the MigrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow. -# -def start_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new - - # Call the start_migration_workflow method. - result = client.start_migration_workflow request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json deleted file mode 100644 index a72510c3fe90..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-migration-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.migration.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync", - "title": "Snippet for the create_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow.", - "file": "migration_service/create_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "CreateMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync", - "title": "Snippet for the get_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow.", - "file": "migration_service/get_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "GetMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync", - "title": "Snippet for the list_migration_workflows call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows.", - "file": "migration_service/list_migration_workflows.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_migration_workflows", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "ListMigrationWorkflows", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflows", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync", - "title": "Snippet for the delete_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow.", - "file": "migration_service/delete_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "DeleteMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync", - "title": "Snippet for the start_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow.", - "file": "migration_service/start_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "StartMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync", - "title": "Snippet for the get_migration_subtask call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask.", - "file": "migration_service/get_migration_subtask.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_migration_subtask", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "GetMigrationSubtask", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtask", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync", - "title": "Snippet for the list_migration_subtasks call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks.", - "file": "migration_service/list_migration_subtasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_migration_subtasks", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "ListMigrationSubtasks", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasks", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb deleted file mode 100644 index 930bdb76bea3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/migration/v2/migration_service" - -class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_migration_subtask_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.migration_subtask_path project: "value0", location: "value1", workflow: "value2", subtask: "value3" - assert_equal "projects/value0/locations/value1/workflows/value2/subtasks/value3", path - end - end - - def test_migration_workflow_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.migration_workflow_path project: "value0", location: "value1", workflow: "value2" - assert_equal "projects/value0/locations/value1/workflows/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb deleted file mode 100644 index 9012c7921707..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb +++ /dev/null @@ -1,487 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/bigquery/migration/v2/migration_service_pb" -require "google/cloud/bigquery/migration/v2/migration_service/rest" - - -class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_migration_workflow - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - migration_workflow = {} - - create_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_create_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_migration_workflow_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_migration_workflow_client_stub.call_count - end - end - end - - def test_get_migration_workflow - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_migration_workflow_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_migration_workflow({ name: name, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_migration_workflow name: name, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_migration_workflow({ name: name, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_migration_workflow_client_stub.call_count - end - end - end - - def test_list_migration_workflows - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_mask = {} - page_size = 42 - page_token = "hello world" - - list_migration_workflows_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_workflows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_migration_workflows_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_migration_workflows parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_migration_workflows_client_stub.call_count - end - end - end - - def test_delete_migration_workflow - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_delete_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_migration_workflow_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_migration_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_migration_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_migration_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_migration_workflow_client_stub.call_count - end - end - end - - def test_start_migration_workflow - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - start_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_start_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_migration_workflow_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.start_migration_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.start_migration_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.start_migration_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_migration_workflow_client_stub.call_count - end - end - end - - def test_get_migration_subtask - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_migration_subtask_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_subtask_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_migration_subtask_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_migration_subtask({ name: name, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_migration_subtask name: name, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_migration_subtask({ name: name, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_migration_subtask_client_stub.call_count - end - end - end - - def test_list_migration_subtasks - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_mask = {} - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_migration_subtasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_subtasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_migration_subtasks_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_migration_subtasks parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_migration_subtasks_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb deleted file mode 100644 index 16e72e64171e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb +++ /dev/null @@ -1,540 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/migration/v2/migration_service_pb" -require "google/cloud/bigquery/migration/v2/migration_service" - -class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_migration_workflow - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - migration_workflow = {} - - create_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow), request["migration_workflow"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_migration_workflow_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_migration_workflow_client_stub.call_rpc_count - end - end - - def test_get_migration_workflow - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_migration_workflow_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_migration_workflow({ name: name, read_mask: read_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_migration_workflow name: name, read_mask: read_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_migration_workflow({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_migration_workflow_client_stub.call_rpc_count - end - end - - def test_list_migration_workflows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_mask = {} - page_size = 42 - page_token = "hello world" - - list_migration_workflows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_migration_workflows, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_migration_workflows_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_migration_workflows parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_migration_workflows_client_stub.call_rpc_count - end - end - - def test_delete_migration_workflow - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_migration_workflow_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_migration_workflow({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_migration_workflow name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_migration_workflow({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_migration_workflow_client_stub.call_rpc_count - end - end - - def test_start_migration_workflow - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - start_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_migration_workflow_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.start_migration_workflow({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.start_migration_workflow name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.start_migration_workflow({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, start_migration_workflow_client_stub.call_rpc_count - end - end - - def test_get_migration_subtask - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_migration_subtask_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_migration_subtask, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_migration_subtask_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_migration_subtask({ name: name, read_mask: read_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_migration_subtask name: name, read_mask: read_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_migration_subtask({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_migration_subtask_client_stub.call_rpc_count - end - end - - def test_list_migration_subtasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_mask = {} - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_migration_subtasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_migration_subtasks, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_migration_subtasks_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_migration_subtasks parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_migration_subtasks_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-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-bigquery-reservation-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json deleted file mode 100644 index a2ae9c6f27bd..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "bigqueryreservation.googleapis.com", - "api_shortname": "bigqueryreservation", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest", - "distribution_name": "google-cloud-bigquery-reservation-v1", - "is_cloud": true, - "language": "ruby", - "name": "bigqueryreservation", - "name_pretty": "BigQuery Reservation V1 API", - "product_documentation": "https://cloud.google.com/bigquery/docs/reference/reservations", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. Note that google-cloud-bigquery-reservation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-reservation instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BIGQUERY_RESERVATION", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/reference/reservations", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml deleted file mode 100644 index 9001cc0bde65..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-reservation-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-bigquery-reservation-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts deleted file mode 100644 index 9fa1700ac9d1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Reservation V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md deleted file mode 100644 index 0b1eacbc181a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-reservation-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-bigquery-reservation-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/bigquery/reservation/v1" - -client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/reservation/v1" - -::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-bigquery-reservation-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/bigquery/reservation/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md deleted file mode 100644 index 029f3afa6042..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Reservation V1 API - -A service to modify your BigQuery reservations. - -The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Reservation V1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-reservation](https://rubygems.org/gems/google-cloud-bigquery-reservation). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-reservation-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/bigqueryreservation.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/reservation/v1" - -client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new -request = ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new # (request fields as keyword arguments...) -response = client.create_reservation request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/reservations) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/bigquery/reservation/v1" -require "logger" - -client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.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-bigquery-reservation`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-reservation-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-bigquery-reservation`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-bigquery-reservation-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile deleted file mode 100644 index 9f80b229812a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-bigquery-reservation-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BIGQUERY_RESERVATION_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BIGQUERY_RESERVATION_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BIGQUERY_RESERVATION_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or BIGQUERY_RESERVATION_TEST_PROJECT=test123 BIGQUERY_RESERVATION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BIGQUERY_RESERVATION_PROJECT"] = project - ENV["BIGQUERY_RESERVATION_TEST_PROJECT"] = project - ENV["BIGQUERY_RESERVATION_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-reservation-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-reservation-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-reservation-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bigquery-reservation-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-reservation-v1" - header "google-cloud-bigquery-reservation-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-reservation-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-reservation-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-reservation-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-reservation-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json deleted file mode 100644 index effdec3d98a3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.reservation.v1", - "libraryPackage": "::Google::Cloud::Bigquery::Reservation::V1", - "services": { - "ReservationService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client", - "rpcs": { - "CreateReservation": { - "methods": [ - "create_reservation" - ] - }, - "ListReservations": { - "methods": [ - "list_reservations" - ] - }, - "GetReservation": { - "methods": [ - "get_reservation" - ] - }, - "DeleteReservation": { - "methods": [ - "delete_reservation" - ] - }, - "UpdateReservation": { - "methods": [ - "update_reservation" - ] - }, - "FailoverReservation": { - "methods": [ - "failover_reservation" - ] - }, - "CreateCapacityCommitment": { - "methods": [ - "create_capacity_commitment" - ] - }, - "ListCapacityCommitments": { - "methods": [ - "list_capacity_commitments" - ] - }, - "GetCapacityCommitment": { - "methods": [ - "get_capacity_commitment" - ] - }, - "DeleteCapacityCommitment": { - "methods": [ - "delete_capacity_commitment" - ] - }, - "UpdateCapacityCommitment": { - "methods": [ - "update_capacity_commitment" - ] - }, - "SplitCapacityCommitment": { - "methods": [ - "split_capacity_commitment" - ] - }, - "MergeCapacityCommitments": { - "methods": [ - "merge_capacity_commitments" - ] - }, - "CreateAssignment": { - "methods": [ - "create_assignment" - ] - }, - "ListAssignments": { - "methods": [ - "list_assignments" - ] - }, - "DeleteAssignment": { - "methods": [ - "delete_assignment" - ] - }, - "SearchAssignments": { - "methods": [ - "search_assignments" - ] - }, - "SearchAllAssignments": { - "methods": [ - "search_all_assignments" - ] - }, - "MoveAssignment": { - "methods": [ - "move_assignment" - ] - }, - "UpdateAssignment": { - "methods": [ - "update_assignment" - ] - }, - "GetBiReservation": { - "methods": [ - "get_bi_reservation" - ] - }, - "UpdateBiReservation": { - "methods": [ - "update_bi_reservation" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "CreateReservationGroup": { - "methods": [ - "create_reservation_group" - ] - }, - "GetReservationGroup": { - "methods": [ - "get_reservation_group" - ] - }, - "DeleteReservationGroup": { - "methods": [ - "delete_reservation_group" - ] - }, - "ListReservationGroups": { - "methods": [ - "list_reservation_groups" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec deleted file mode 100644 index aaa9a7ab3439..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/reservation/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-reservation-v1" - gem.version = Google::Cloud::Bigquery::Reservation::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. Note that google-cloud-bigquery-reservation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-reservation instead. See the readme for more details." - gem.summary = "A service to modify your BigQuery reservations." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.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-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb deleted file mode 100644 index 2ad2aa32f13c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/bigquery/reservation/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb deleted file mode 100644 index 155fb2af6d91..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/reservation/v1/reservation_service" -require "google/cloud/bigquery/reservation/v1/version" - -module Google - module Cloud - module Bigquery - module Reservation - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/reservation/v1" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/reservation/v1" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/bigquery/reservation/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb deleted file mode 100644 index 0a0dbb35a131..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/reservation/v1/reservation.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n6google/cloud/bigquery/reservation/v1/reservation.proto\x12$google.cloud.bigquery.reservation.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xfc\x0c\n\x0bReservation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\rslot_capacity\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1e\n\x11ignore_idle_slots\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12S\n\tautoscale\x18\x07 \x01(\x0b\x32;.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleB\x03\xe0\x41\x01\x12\x18\n\x0b\x63oncurrency\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x36\n\rcreation_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\"\n\x16multi_region_auxiliary\x18\x0e \x01(\x08\x42\x02\x18\x01\x12\x43\n\x07\x65\x64ition\x18\x11 \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.EditionB\x03\xe0\x41\x01\x12\x43\n\x10primary_location\x18\x12 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x45\n\x12secondary_location\x18\x13 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!locations.googleapis.com/Location\x12L\n\x19original_primary_location\x18\x14 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\tmax_slots\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12X\n\x0cscaling_mode\x18\x16 \x01(\x0e\x32=.google.cloud.bigquery.reservation.v1.Reservation.ScalingModeB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x17 \x03(\x0b\x32=.google.cloud.bigquery.reservation.v1.Reservation.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x11reservation_group\x18\x19 \x01(\tB\x03\xe0\x41\x01\x12\x64\n\x12replication_status\x18\x18 \x01(\x0b\x32\x43.google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatusB\x03\xe0\x41\x03\x12V\n\x11scheduling_policy\x18\x1b \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xe0\x41\x01\x1a?\n\tAutoscale\x12\x1a\n\rcurrent_slots\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\tmax_slots\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x1a\xf8\x01\n\x11ReplicationStatus\x12&\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x38\n\x0flast_error_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x15last_replication_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x18soft_failover_start_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"c\n\x0bScalingMode\x12\x1c\n\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41UTOSCALE_ONLY\x10\x01\x12\x13\n\x0fIDLE_SLOTS_ONLY\x10\x02\x12\r\n\tALL_SLOTS\x10\x03:w\xea\x41t\n.bigqueryreservation.googleapis.com/Reservation\x12\x42projects/{project}/locations/{location}/reservations/{reservation}B\x0c\n\n_max_slots\"l\n\x10SchedulingPolicy\x12\x1d\n\x0b\x63oncurrency\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1b\n\tmax_slots\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x0e\n\x0c_concurrencyB\x0c\n\n_max_slots\"\xd5\x01\n\x10ReservationGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:\xad\x01\xea\x41\xa9\x01\n3bigqueryreservation.googleapis.com/ReservationGroup\x12Mprojects/{project}/locations/{location}/reservationGroups/{reservation_group}*\x11reservationGroups2\x10reservationGroup\"\xaa\x08\n\x12\x43\x61pacityCommitment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nslot_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12Z\n\x04plan\x18\x03 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xe0\x41\x01\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.bigquery.reservation.v1.CapacityCommitment.StateB\x03\xe0\x41\x03\x12>\n\x15\x63ommitment_start_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13\x63ommitment_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12/\n\x0e\x66\x61ilure_status\x18\x07 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x62\n\x0crenewal_plan\x18\x08 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xe0\x41\x01\x12\"\n\x16multi_region_auxiliary\x18\n \x01(\x08\x42\x02\x18\x01\x12\x43\n\x07\x65\x64ition\x18\x0c \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.EditionB\x03\xe0\x41\x01\x12\x19\n\x0cis_flat_rate\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\"\xca\x01\n\x0e\x43ommitmentPlan\x12\x1f\n\x1b\x43OMMITMENT_PLAN_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46LEX\x10\x03\x12\x16\n\x0e\x46LEX_FLAT_RATE\x10\x07\x1a\x02\x08\x01\x12\r\n\x05TRIAL\x10\x05\x1a\x02\x08\x01\x12\x0b\n\x07MONTHLY\x10\x02\x12\x19\n\x11MONTHLY_FLAT_RATE\x10\x08\x1a\x02\x08\x01\x12\n\n\x06\x41NNUAL\x10\x04\x12\x18\n\x10\x41NNUAL_FLAT_RATE\x10\t\x1a\x02\x08\x01\x12\x0e\n\nTHREE_YEAR\x10\n\x12\x08\n\x04NONE\x10\x06\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03:\x8e\x01\xea\x41\x8a\x01\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12Qprojects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}\"\xc2\x01\n\x18\x43reateReservationRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x16\n\x0ereservation_id\x18\x02 \x01(\t\x12\x46\n\x0breservation\x18\x03 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\"\x88\x01\n\x17ListReservationsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"|\n\x18ListReservationsResponse\x12G\n\x0creservations\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x15GetReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"`\n\x18\x44\x65leteReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"\x93\x01\n\x18UpdateReservationRequest\x12\x46\n\x0breservation\x18\x01 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb2\x01\n\x1a\x46\x61iloverReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\x12N\n\rfailover_mode\x18\x02 \x01(\x0e\x32\x32.google.cloud.bigquery.reservation.v1.FailoverModeB\x03\xe0\x41\x01\"\xe7\x01\n\x1d\x43reateReservationGroupRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x62igqueryreservation.googleapis.com/ReservationGroup\x12!\n\x14reservation_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x11reservation_group\x18\x03 \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.ReservationGroupB\x03\xe0\x41\x02\"g\n\x1aGetReservationGroupRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3bigqueryreservation.googleapis.com/ReservationGroup\"\x92\x01\n\x1cListReservationGroupsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x62igqueryreservation.googleapis.com/ReservationGroup\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8c\x01\n\x1dListReservationGroupsResponse\x12R\n\x12reservation_groups\x18\x01 \x03(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1d\x44\x65leteReservationGroupRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3bigqueryreservation.googleapis.com/ReservationGroup\"\x95\x02\n\x1f\x43reateCapacityCommitmentRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12U\n\x13\x63\x61pacity_commitment\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12,\n$enforce_single_admin_project_per_org\x18\x04 \x01(\x08\x12\x1e\n\x16\x63\x61pacity_commitment_id\x18\x05 \x01(\t\"\x96\x01\n\x1eListCapacityCommitmentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x92\x01\n\x1fListCapacityCommitmentsResponse\x12V\n\x14\x63\x61pacity_commitments\x18\x01 \x03(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x1cGetCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\"}\n\x1f\x44\x65leteCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"\xa9\x01\n\x1fUpdateCapacityCommitmentRequest\x12U\n\x13\x63\x61pacity_commitment\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x81\x01\n\x1eSplitCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x12\n\nslot_count\x18\x02 \x01(\x03\"\xb4\x01\n\x1fSplitCapacityCommitmentResponse\x12G\n\x05\x66irst\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12H\n\x06second\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\"\xb3\x01\n\x1fMergeCapacityCommitmentsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x1f\n\x17\x63\x61pacity_commitment_ids\x18\x02 \x03(\t\x12#\n\x16\x63\x61pacity_commitment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb1\x06\n\nAssignment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x61ssignee\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12O\n\x08job_type\x18\x03 \x01(\x0e\x32\x38.google.cloud.bigquery.reservation.v1.Assignment.JobTypeB\x03\xe0\x41\x01\x12J\n\x05state\x18\x06 \x01(\x0e\x32\x36.google.cloud.bigquery.reservation.v1.Assignment.StateB\x03\xe0\x41\x03\x12(\n\x19\x65nable_gemini_in_bigquery\x18\n \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12V\n\x11scheduling_policy\x18\x0b \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xe0\x41\x01\x12\x16\n\tprincipal\x18\x0c \x01(\tB\x03\xe0\x41\x01\"\xdc\x01\n\x07JobType\x12\x18\n\x14JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08PIPELINE\x10\x01\x12\t\n\x05QUERY\x10\x02\x12\x0f\n\x0bML_EXTERNAL\x10\x03\x12\x0e\n\nBACKGROUND\x10\x04\x12\x0e\n\nCONTINUOUS\x10\x06\x12\"\n\x1e\x42\x41\x43KGROUND_CHANGE_DATA_CAPTURE\x10\x07\x12$\n BACKGROUND_COLUMN_METADATA_INDEX\x10\x08\x12#\n\x1f\x42\x41\x43KGROUND_SEARCH_INDEX_REFRESH\x10\t\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02:\xa9\x01\xea\x41\xa5\x01\n-bigqueryreservation.googleapis.com/Assignment\x12[projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}*\x0b\x61ssignments2\nassignment\"\xbd\x01\n\x17\x43reateAssignmentRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x44\n\nassignment\x18\x02 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x15\n\rassignment_id\x18\x04 \x01(\t\"\x86\x01\n\x16ListAssignmentsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x17ListAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17\x44\x65leteAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\"\x8b\x01\n\x18SearchAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8e\x01\n\x1bSearchAllAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"{\n\x19SearchAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"~\n\x1cSearchAllAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbf\x01\n\x15MoveAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\x12J\n\x0e\x64\x65stination_id\x18\x03 \x01(\tB2\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x15\n\rassignment_id\x18\x05 \x01(\t\"\x90\x01\n\x17UpdateAssignmentRequest\x12\x44\n\nassignment\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"Y\n\x0eTableReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ndataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08table_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xae\x02\n\rBiReservation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04size\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12S\n\x10preferred_tables\x18\x05 \x03(\x0b\x32\x34.google.cloud.bigquery.reservation.v1.TableReferenceB\x03\xe0\x41\x01:l\xea\x41i\n0bigqueryreservation.googleapis.com/BiReservation\x12\x35projects/{project}/locations/{location}/biReservation\"a\n\x17GetBiReservationRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0bigqueryreservation.googleapis.com/BiReservation\"\x9a\x01\n\x1aUpdateBiReservationRequest\x12K\n\x0e\x62i_reservation\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.reservation.v1.BiReservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask*U\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x03*A\n\x0c\x46\x61iloverMode\x12\x1d\n\x19\x46\x41ILOVER_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SOFT\x10\x01\x12\x08\n\x04HARD\x10\x02\x32\xa3\x36\n\x12ReservationService\x12\xf1\x01\n\x11\x43reateReservation\x12>.google.cloud.bigquery.reservation.v1.CreateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"i\xda\x41!parent,reservation,reservation_id\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/reservations:\x0breservation\x12\xd4\x01\n\x10ListReservations\x12=.google.cloud.bigquery.reservation.v1.ListReservationsRequest\x1a>.google.cloud.bigquery.reservation.v1.ListReservationsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/reservations\x12\xc1\x01\n\x0eGetReservation\x12;.google.cloud.bigquery.reservation.v1.GetReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/reservations/*}\x12\xac\x01\n\x11\x44\x65leteReservation\x12>.google.cloud.bigquery.reservation.v1.DeleteReservationRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/reservations/*}\x12\xf3\x01\n\x11UpdateReservation\x12>.google.cloud.bigquery.reservation.v1.UpdateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"k\xda\x41\x17reservation,update_mask\x82\xd3\xe4\x93\x02K2/v1/{parent=projects/*/locations/*/reservations/*}/assignments:\nassignment\x12\xdf\x01\n\x0fListAssignments\x12<.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest\x1a=.google.cloud.bigquery.reservation.v1.ListAssignmentsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/reservations/*}/assignments\x12\xb8\x01\n\x10\x44\x65leteAssignment\x12=.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/reservations/*/assignments/*}\x12\xe5\x01\n\x11SearchAssignments\x12>.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest\x1a?.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse\"O\x88\x02\x01\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}:searchAssignments\x12\xee\x01\n\x14SearchAllAssignments\x12\x41.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest\x1a\x42.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse\"O\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}:searchAllAssignments\x12\xe5\x01\n\x0eMoveAssignment\x12;.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"d\xda\x41\x13name,destination_id\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move:\x01*\x12\xfb\x01\n\x10UpdateAssignment\x12=.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"v\xda\x41\x16\x61ssignment,update_mask\x82\xd3\xe4\x93\x02W2I/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}:\nassignment\x12\xc6\x01\n\x10GetBiReservation\x12=.google.cloud.bigquery.reservation.v1.GetBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/biReservation}\x12\x81\x02\n\x13UpdateBiReservation\x12@.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\"s\xda\x41\x1a\x62i_reservation,update_mask\x82\xd3\xe4\x93\x02P2>/v1/{bi_reservation.name=projects/*/locations/*/biReservation}:\x0e\x62i_reservation\x12\xf4\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xa8\x01\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x96\x01\x12\x41/v1/{resource=projects/*/locations/*/reservations/*}:getIamPolicyZQ\x12O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:getIamPolicy\x12\x81\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xb5\x01\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x9c\x01\"A/v1/{resource=projects/*/locations/*/reservations/*}:setIamPolicy:\x01*ZT\"O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:setIamPolicy:\x01*\x12\x9b\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xaf\x01\x82\xd3\xe4\x93\x02\xa8\x01\"G/v1/{resource=projects/*/locations/*/reservations/*}:testIamPermissions:\x01*ZZ\"U/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:testIamPermissions:\x01*\x12\xe7\x01\n\x16\x43reateReservationGroup\x12\x43.google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest\x1a\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\"P\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/reservationGroups:\x11reservation_group\x12\xd5\x01\n\x13GetReservationGroup\x12@.google.cloud.bigquery.reservation.v1.GetReservationGroupRequest\x1a\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xbb\x01\n\x16\x44\x65leteReservationGroup\x12\x43.google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xe8\x01\n\x15ListReservationGroups\x12\x42.google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest\x1a\x43.google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/reservationGroups\x1a\x7f\xca\x41\"bigqueryreservation.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xd8\x01\n(com.google.cloud.bigquery.reservation.v1B\x10ReservationProtoP\x01ZJcloud.google.com/go/bigquery/reservation/apiv1/reservationpb;reservationpb\xaa\x02$Google.Cloud.BigQuery.Reservation.V1\xca\x02$Google\\Cloud\\BigQuery\\Reservation\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - Reservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation").msgclass - Reservation::Autoscale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.Autoscale").msgclass - Reservation::ReplicationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus").msgclass - Reservation::ScalingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.ScalingMode").enummodule - SchedulingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SchedulingPolicy").msgclass - ReservationGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ReservationGroup").msgclass - CapacityCommitment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment").msgclass - CapacityCommitment::CommitmentPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan").enummodule - CapacityCommitment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.State").enummodule - CreateReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateReservationRequest").msgclass - ListReservationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationsRequest").msgclass - ListReservationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationsResponse").msgclass - GetReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetReservationRequest").msgclass - DeleteReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteReservationRequest").msgclass - UpdateReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateReservationRequest").msgclass - FailoverReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.FailoverReservationRequest").msgclass - CreateReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest").msgclass - GetReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetReservationGroupRequest").msgclass - ListReservationGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest").msgclass - ListReservationGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse").msgclass - DeleteReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest").msgclass - CreateCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest").msgclass - ListCapacityCommitmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest").msgclass - ListCapacityCommitmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsResponse").msgclass - GetCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest").msgclass - DeleteCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest").msgclass - UpdateCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest").msgclass - SplitCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest").msgclass - SplitCapacityCommitmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse").msgclass - MergeCapacityCommitmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest").msgclass - Assignment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment").msgclass - Assignment::JobType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment.JobType").enummodule - Assignment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment.State").enummodule - CreateAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateAssignmentRequest").msgclass - ListAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsRequest").msgclass - ListAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsResponse").msgclass - DeleteAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest").msgclass - SearchAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest").msgclass - SearchAllAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest").msgclass - SearchAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse").msgclass - SearchAllAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse").msgclass - MoveAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MoveAssignmentRequest").msgclass - UpdateAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest").msgclass - TableReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.TableReference").msgclass - BiReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.BiReservation").msgclass - GetBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetBiReservationRequest").msgclass - UpdateBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest").msgclass - Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Edition").enummodule - FailoverMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.FailoverMode").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb deleted file mode 100644 index 2f3df98d3356..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/reservation/v1/version" - -require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" -require "google/cloud/bigquery/reservation/v1/reservation_service/paths" -require "google/cloud/bigquery/reservation/v1/reservation_service/client" -require "google/cloud/bigquery/reservation/v1/reservation_service/rest" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - ## - # This API allows users to manage their BigQuery reservations. - # - # A reservation provides computational resource guarantees, in the form of - # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a - # unit of computational power in BigQuery, and serves as the basic unit of - # parallelism. In a scan of a multi-partitioned table, a single slot operates - # on a single partition of the table. A reservation resource exists as a child - # resource of the admin project and location, e.g.: - # `projects/myproject/locations/US/reservations/reservationName`. - # - # A capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. A capacity - # commitment resource exists as a child resource of the admin project and - # location, e.g.: - # `projects/myproject/locations/US/capacityCommitments/id`. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/reservation/v1/reservation_service" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/reservation/v1/reservation_service/rest" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - module ReservationService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "reservation_service", "helpers.rb" -require "google/cloud/bigquery/reservation/v1/reservation_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb deleted file mode 100644 index 71c3545c8e3a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb +++ /dev/null @@ -1,3516 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/reservation/v1/reservation_pb" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - ## - # Client for the ReservationService service. - # - # This API allows users to manage their BigQuery reservations. - # - # A reservation provides computational resource guarantees, in the form of - # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a - # unit of computational power in BigQuery, and serves as the basic unit of - # parallelism. In a scan of a multi-partitioned table, a single slot operates - # on a single partition of the table. A reservation resource exists as a child - # resource of the admin project and location, e.g.: - # `projects/myproject/locations/US/reservations/reservationName`. - # - # A capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. A capacity - # commitment resource exists as a child resource of the admin project and - # location, e.g.: - # `projects/myproject/locations/US/capacityCommitments/id`. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigqueryreservation.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reservation_service_stub - - ## - # Configure the ReservationService Client class. - # - # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReservationService clients - # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "Reservation", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_reservation.timeout = 300.0 - - default_config.rpcs.list_reservations.timeout = 300.0 - default_config.rpcs.list_reservations.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_reservation.timeout = 300.0 - default_config.rpcs.get_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_reservation.timeout = 300.0 - default_config.rpcs.delete_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_reservation.timeout = 300.0 - - default_config.rpcs.failover_reservation.timeout = 300.0 - - default_config.rpcs.create_capacity_commitment.timeout = 300.0 - - default_config.rpcs.list_capacity_commitments.timeout = 300.0 - default_config.rpcs.list_capacity_commitments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_capacity_commitment.timeout = 300.0 - default_config.rpcs.get_capacity_commitment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_capacity_commitment.timeout = 300.0 - default_config.rpcs.delete_capacity_commitment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_capacity_commitment.timeout = 300.0 - - default_config.rpcs.split_capacity_commitment.timeout = 300.0 - - default_config.rpcs.merge_capacity_commitments.timeout = 300.0 - - default_config.rpcs.create_assignment.timeout = 300.0 - - default_config.rpcs.list_assignments.timeout = 300.0 - default_config.rpcs.list_assignments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_assignment.timeout = 300.0 - default_config.rpcs.delete_assignment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_assignments.timeout = 300.0 - default_config.rpcs.search_assignments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.move_assignment.timeout = 300.0 - - default_config.rpcs.get_bi_reservation.timeout = 300.0 - default_config.rpcs.get_bi_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_bi_reservation.timeout = 300.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReservationService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @reservation_service_stub.universe_domain - end - - ## - # Create a new ReservationService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReservationService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/bigquery/reservation/v1/reservation_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @reservation_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @reservation_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reservation_service_stub.logger - end - - # Service calls - - ## - # Creates a new reservation resource. - # - # @overload create_reservation(request, options = nil) - # Pass arguments to `create_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_reservation(parent: nil, reservation_id: nil, reservation: nil) - # Pass arguments to `create_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project, location. E.g., - # `projects/myproject/locations/US` - # @param reservation_id [::String] - # The reservation ID. It must only contain lower case alphanumeric - # characters or dashes. It must start with a letter and must not end - # with a dash. Its maximum length is 64 characters. - # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] - # Definition of the new reservation to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new - # - # # Call the create_reservation method. - # result = client.create_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def create_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :create_reservation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the reservations for the project in the specified location. - # - # @overload list_reservations(request, options = nil) - # Pass arguments to `list_reservations` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_reservations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reservations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new - # - # # Call the list_reservations method. - # result = client.list_reservations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p item - # end - # - def list_reservations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_reservations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_reservations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reservations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :list_reservations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_reservations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about the reservation. - # - # @overload get_reservation(request, options = nil) - # Pass arguments to `get_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_reservation(name: nil) - # Pass arguments to `get_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new - # - # # Call the get_reservation method. - # result = client.get_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def get_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :get_reservation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - # - # @overload delete_reservation(request, options = nil) - # Pass arguments to `delete_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_reservation(name: nil) - # Pass arguments to `delete_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new - # - # # Call the delete_reservation method. - # result = client.delete_reservation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :delete_reservation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing reservation resource. - # - # @overload update_reservation(request, options = nil) - # Pass arguments to `update_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_reservation(reservation: nil, update_mask: nil) - # Pass arguments to `update_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] - # Content of the reservation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new - # - # # Call the update_reservation method. - # result = client.update_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def update_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.reservation&.name - header_params["reservation.name"] = request.reservation.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :update_reservation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fail over a reservation to the secondary location. The operation should be - # done in the current secondary location, which will be promoted to the - # new primary location for the reservation. - # Attempting to failover a reservation in the current primary location will - # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload failover_reservation(request, options = nil) - # Pass arguments to `failover_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload failover_reservation(name: nil, failover_mode: nil) - # Pass arguments to `failover_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation to failover. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # @param failover_mode [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] - # Optional. A parameter that determines how writes that are pending - # replication are handled after a failover is initiated. If not specified, - # HARD failover mode is used by default. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new - # - # # Call the failover_reservation method. - # result = client.failover_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def failover_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.failover_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.failover_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.failover_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :failover_reservation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new capacity commitment resource. - # - # @overload create_capacity_commitment(request, options = nil) - # Pass arguments to `create_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil, capacity_commitment_id: nil) - # Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] - # Content of the capacity commitment to create. - # @param enforce_single_admin_project_per_org [::Boolean] - # If true, fail the request if another project in the organization has a - # capacity commitment. - # @param capacity_commitment_id [::String] - # The optional capacity commitment ID. Capacity commitment name will be - # generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - # NOTE: this ID won't be kept if the capacity commitment is split or merged. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new - # - # # Call the create_capacity_commitment method. - # result = client.create_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def create_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_capacity_commitment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_capacity_commitment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :create_capacity_commitment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the capacity commitments for the admin project. - # - # @overload list_capacity_commitments(request, options = nil) - # Pass arguments to `list_capacity_commitments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_capacity_commitments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_capacity_commitments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new - # - # # Call the list_capacity_commitments method. - # result = client.list_capacity_commitments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p item - # end - # - def list_capacity_commitments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_capacity_commitments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_capacity_commitments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_capacity_commitments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :list_capacity_commitments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_capacity_commitments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about the capacity commitment. - # - # @overload get_capacity_commitment(request, options = nil) - # Pass arguments to `get_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_capacity_commitment(name: nil) - # Pass arguments to `get_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the capacity commitment to retrieve. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new - # - # # Call the get_capacity_commitment method. - # result = client.get_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def get_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_capacity_commitment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_capacity_commitment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :get_capacity_commitment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a capacity commitment. Attempting to delete capacity commitment - # before its commitment_end_time will fail with the error code - # `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload delete_capacity_commitment(request, options = nil) - # Pass arguments to `delete_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_capacity_commitment(name: nil, force: nil) - # Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the capacity commitment to delete. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # @param force [::Boolean] - # Can be used to force delete commitments even if assignments exist. Deleting - # commitments with assignments may cause queries to fail if they no longer - # have access to slots. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new - # - # # Call the delete_capacity_commitment method. - # result = client.delete_capacity_commitment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_capacity_commitment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_capacity_commitment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :delete_capacity_commitment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing capacity commitment. - # - # Only `plan` and `renewal_plan` fields can be updated. - # - # Plan can only be changed to a plan of a longer commitment period. - # Attempting to change to a plan with shorter commitment period will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload update_capacity_commitment(request, options = nil) - # Pass arguments to `update_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_capacity_commitment(capacity_commitment: nil, update_mask: nil) - # Pass arguments to `update_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] - # Content of the capacity commitment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new - # - # # Call the update_capacity_commitment method. - # result = client.update_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def update_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_capacity_commitment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.capacity_commitment&.name - header_params["capacity_commitment.name"] = request.capacity_commitment.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_capacity_commitment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :update_capacity_commitment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Splits capacity commitment to two commitments of the same plan and - # `commitment_end_time`. - # - # A common use case is to enable downgrading commitments. - # - # For example, in order to downgrade from 10000 slots to 8000, you might - # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, - # you delete the first one after the commitment end time passes. - # - # @overload split_capacity_commitment(request, options = nil) - # Pass arguments to `split_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload split_capacity_commitment(name: nil, slot_count: nil) - # Pass arguments to `split_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name e.g.,: - # `projects/myproject/locations/US/capacityCommitments/123` - # @param slot_count [::Integer] - # Number of slots in the capacity commitment after the split. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new - # - # # Call the split_capacity_commitment method. - # result = client.split_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. - # p result - # - def split_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.split_capacity_commitment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.split_capacity_commitment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.split_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :split_capacity_commitment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Merges capacity commitments of the same plan into a single commitment. - # - # The resulting capacity commitment has the greater commitment_end_time - # out of the to-be-merged capacity commitments. - # - # Attempting to merge capacity commitments of different plan will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload merge_capacity_commitments(request, options = nil) - # Pass arguments to `merge_capacity_commitments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload merge_capacity_commitments(parent: nil, capacity_commitment_ids: nil, capacity_commitment_id: nil) - # Pass arguments to `merge_capacity_commitments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent resource that identifies admin project and location e.g., - # `projects/myproject/locations/us` - # @param capacity_commitment_ids [::Array<::String>] - # Ids of capacity commitments to merge. - # These capacity commitments must exist under admin project and location - # specified in the parent. - # ID is the last portion of capacity commitment name e.g., 'abc' for - # projects/myproject/locations/US/capacityCommitments/abc - # @param capacity_commitment_id [::String] - # Optional. The optional resulting capacity commitment ID. Capacity - # commitment name will be generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new - # - # # Call the merge_capacity_commitments method. - # result = client.merge_capacity_commitments request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def merge_capacity_commitments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.merge_capacity_commitments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.merge_capacity_commitments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :merge_capacity_commitments, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an assignment object which allows the given project to submit jobs - # of a certain type using slots from the specified reservation. - # - # Currently a - # resource (project, folder, organization) can only have one assignment per - # each (job_type, location) combination, and that reservation will be used - # for all jobs of the matching type. - # - # Different assignments can be created on different levels of the - # projects, folders or organization hierarchy. During query execution, - # the assignment is looked up at the project, folder and organization levels - # in that order. The first assignment found is applied to the query. - # - # When creating assignments, it does not matter if other assignments exist at - # higher levels. - # - # Example: - # - # * The organization `organizationA` contains two projects, `project1` - # and `project2`. - # * Assignments for all three entities (`organizationA`, `project1`, and - # `project2`) could all be created and mapped to the same or different - # reservations. - # - # "None" assignments represent an absence of the assignment. Projects - # assigned to None use on-demand pricing. To create a "None" assignment, use - # "none" as a reservation_id in the parent. Example parent: - # `projects/myproject/locations/US/reservations/none`. - # - # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have - # 'bigquery.admin' permissions on the project using the reservation - # and the project that owns this reservation. - # - # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment - # does not match location of the reservation. - # - # @overload create_assignment(request, options = nil) - # Pass arguments to `create_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_assignment(parent: nil, assignment: nil, assignment_id: nil) - # Pass arguments to `create_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name of the assignment - # E.g. `projects/myproject/locations/US/reservations/team1-prod` - # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] - # Assignment resource to create. - # @param assignment_id [::String] - # The optional assignment ID. Assignment name will be generated automatically - # if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # Max length is 64 characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new - # - # # Call the create_assignment method. - # result = client.create_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def create_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_assignment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_assignment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :create_assignment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists assignments. - # - # Only explicitly created assignments will be returned. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, ListAssignments will just return the above two assignments - # for reservation `res1`, and no expansion/merge will happen. - # - # The wildcard "-" can be used for - # reservations in the request. In that case all assignments belongs to the - # specified project and location will be listed. - # - # **Note** "-" cannot be used for projects nor locations. - # - # @overload list_assignments(request, options = nil) - # Pass arguments to `list_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_assignments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_assignments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name e.g.: - # - # `projects/myproject/locations/US/reservations/team1-prod` - # - # Or: - # - # `projects/myproject/locations/US/reservations/-` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new - # - # # Call the list_assignments method. - # result = client.list_assignments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def list_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_assignments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_assignments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :list_assignments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_assignments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a assignment. No expansion will happen. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, deletion of the `` assignment won't - # affect the other assignment ``. After said deletion, - # queries from `project1` will still use `res1` while queries from - # `project2` will switch to use on-demand mode. - # - # @overload delete_assignment(request, options = nil) - # Pass arguments to `delete_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_assignment(name: nil) - # Pass arguments to `delete_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource, e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new - # - # # Call the delete_assignment method. - # result = client.delete_assignment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_assignment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_assignment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :delete_assignment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deprecated: Looks up assignments for a specified resource for a particular - # region. If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - # - # **Note** "-" cannot be used for projects - # nor locations. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload search_assignments(request, options = nil) - # Pass arguments to `search_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_assignments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the admin project(containing project and - # location), e.g.: - # `projects/myproject/locations/US`. - # @param query [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new - # - # # Call the search_assignments method. - # result = client.search_assignments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def search_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_assignments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_assignments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :search_assignments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_assignments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Looks up assignments for a specified resource for a particular region. - # If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - # - # @overload search_all_assignments(request, options = nil) - # Pass arguments to `search_all_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_all_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_all_assignments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name with location (project name could be the - # wildcard '-'), e.g.: - # `projects/-/locations/US`. - # @param query [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new - # - # # Call the search_all_assignments method. - # result = client.search_all_assignments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def search_all_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_all_assignments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_all_assignments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_all_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :search_all_assignments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_all_assignments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Moves an assignment under a new reservation. - # - # This differs from removing an existing assignment and recreating a new one - # by providing a transactional change that ensures an assignee always has an - # associated reservation. - # - # @overload move_assignment(request, options = nil) - # Pass arguments to `move_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload move_assignment(name: nil, destination_id: nil, assignment_id: nil) - # Pass arguments to `move_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the assignment, - # e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - # @param destination_id [::String] - # The new reservation ID, e.g.: - # `projects/myotherproject/locations/US/reservations/team2-prod` - # @param assignment_id [::String] - # The optional assignment ID. A new assignment name is generated if this - # field is empty. - # - # This field can contain only lowercase alphanumeric characters or dashes. - # Max length is 64 characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new - # - # # Call the move_assignment method. - # result = client.move_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def move_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.move_assignment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.move_assignment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.move_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :move_assignment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing assignment. - # - # Only the `priority` field can be updated. - # - # @overload update_assignment(request, options = nil) - # Pass arguments to `update_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_assignment(assignment: nil, update_mask: nil) - # Pass arguments to `update_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] - # Content of the assignment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new - # - # # Call the update_assignment method. - # result = client.update_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def update_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_assignment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.assignment&.name - header_params["assignment.name"] = request.assignment.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_assignment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :update_assignment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a BI reservation. - # - # @overload get_bi_reservation(request, options = nil) - # Pass arguments to `get_bi_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_bi_reservation(name: nil) - # Pass arguments to `get_bi_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested reservation, for example: - # `projects/{project_id}/locations/{location_id}/biReservation` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new - # - # # Call the get_bi_reservation method. - # result = client.get_bi_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - # p result - # - def get_bi_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_bi_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_bi_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_bi_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :get_bi_reservation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a BI reservation. - # - # Only fields specified in the `field_mask` are updated. - # - # A singleton BI reservation always exists with default size 0. - # In order to reserve BI capacity it needs to be updated to an amount - # greater than 0. In order to release BI capacity reservation size - # must be set to 0. - # - # @overload update_bi_reservation(request, options = nil) - # Pass arguments to `update_bi_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_bi_reservation(bi_reservation: nil, update_mask: nil) - # Pass arguments to `update_bi_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param bi_reservation [::Google::Cloud::Bigquery::Reservation::V1::BiReservation, ::Hash] - # A reservation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A list of fields to be updated in this request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new - # - # # Call the update_bi_reservation method. - # result = client.update_bi_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - # p result - # - def update_bi_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_bi_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.bi_reservation&.name - header_params["bi_reservation.name"] = request.bi_reservation.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_bi_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_bi_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :update_bi_reservation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a resource. - # May return: - # - # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - # permission to view it. - # * An empty policy if the resource exists but doesn't have a set policy. - # - # Supported resources are: - # - Reservations - # - ReservationAssignments - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.getIamPolicy` to get policies on - # reservations. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets an access control policy for a resource. Replaces any existing - # policy. - # - # Supported resources are: - # - Reservations - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.setIamPolicy` to set policies on - # reservations. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets your permissions on a resource. Returns an empty set of permissions if - # the resource doesn't exist. - # - # Supported resources are: - # - Reservations - # - # No Google IAM permissions are required to call this method. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new reservation group. - # - # @overload create_reservation_group(request, options = nil) - # Pass arguments to `create_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_reservation_group(parent: nil, reservation_group_id: nil, reservation_group: nil) - # Pass arguments to `create_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project, location. E.g., - # `projects/myproject/locations/US` - # @param reservation_group_id [::String] - # Required. The reservation group ID. It must only contain lower case - # alphanumeric characters or dashes. It must start with a letter and must not - # end with a dash. Its maximum length is 64 characters. - # @param reservation_group [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup, ::Hash] - # Required. New Reservation Group to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new - # - # # Call the create_reservation_group method. - # result = client.create_reservation_group request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p result - # - def create_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_reservation_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :create_reservation_group, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about the reservation group. - # - # @overload get_reservation_group(request, options = nil) - # Pass arguments to `get_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_reservation_group(name: nil) - # Pass arguments to `get_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new - # - # # Call the get_reservation_group method. - # result = client.get_reservation_group request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p result - # - def get_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_reservation_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :get_reservation_group, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - # - # @overload delete_reservation_group(request, options = nil) - # Pass arguments to `delete_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_reservation_group(name: nil) - # Pass arguments to `delete_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new - # - # # Call the delete_reservation_group method. - # result = client.delete_reservation_group request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_reservation_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :delete_reservation_group, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the reservation groups for the project in the specified location. - # - # @overload list_reservation_groups(request, options = nil) - # Pass arguments to `list_reservation_groups` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_reservation_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reservation_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new - # - # # Call the list_reservation_groups method. - # result = client.list_reservation_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p item - # end - # - def list_reservation_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_reservation_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_reservation_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reservation_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :list_reservation_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_reservation_groups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ReservationService API. - # - # This class represents the configuration for ReservationService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_reservation to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_reservation.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_reservation.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "bigqueryreservation.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ReservationService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reservation - ## - # RPC-specific configuration for `list_reservations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reservations - ## - # RPC-specific configuration for `get_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reservation - ## - # RPC-specific configuration for `delete_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_reservation - ## - # RPC-specific configuration for `update_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_reservation - ## - # RPC-specific configuration for `failover_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :failover_reservation - ## - # RPC-specific configuration for `create_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_capacity_commitment - ## - # RPC-specific configuration for `list_capacity_commitments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_capacity_commitments - ## - # RPC-specific configuration for `get_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_capacity_commitment - ## - # RPC-specific configuration for `delete_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_capacity_commitment - ## - # RPC-specific configuration for `update_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_capacity_commitment - ## - # RPC-specific configuration for `split_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :split_capacity_commitment - ## - # RPC-specific configuration for `merge_capacity_commitments` - # @return [::Gapic::Config::Method] - # - attr_reader :merge_capacity_commitments - ## - # RPC-specific configuration for `create_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_assignment - ## - # RPC-specific configuration for `list_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assignments - ## - # RPC-specific configuration for `delete_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_assignment - ## - # RPC-specific configuration for `search_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :search_assignments - ## - # RPC-specific configuration for `search_all_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :search_all_assignments - ## - # RPC-specific configuration for `move_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :move_assignment - ## - # RPC-specific configuration for `update_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_assignment - ## - # RPC-specific configuration for `get_bi_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_bi_reservation - ## - # RPC-specific configuration for `update_bi_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_bi_reservation - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `create_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reservation_group - ## - # RPC-specific configuration for `get_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reservation_group - ## - # RPC-specific configuration for `delete_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_reservation_group - ## - # RPC-specific configuration for `list_reservation_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reservation_groups - - # @private - def initialize parent_rpcs = nil - create_reservation_config = parent_rpcs.create_reservation if parent_rpcs.respond_to? :create_reservation - @create_reservation = ::Gapic::Config::Method.new create_reservation_config - list_reservations_config = parent_rpcs.list_reservations if parent_rpcs.respond_to? :list_reservations - @list_reservations = ::Gapic::Config::Method.new list_reservations_config - get_reservation_config = parent_rpcs.get_reservation if parent_rpcs.respond_to? :get_reservation - @get_reservation = ::Gapic::Config::Method.new get_reservation_config - delete_reservation_config = parent_rpcs.delete_reservation if parent_rpcs.respond_to? :delete_reservation - @delete_reservation = ::Gapic::Config::Method.new delete_reservation_config - update_reservation_config = parent_rpcs.update_reservation if parent_rpcs.respond_to? :update_reservation - @update_reservation = ::Gapic::Config::Method.new update_reservation_config - failover_reservation_config = parent_rpcs.failover_reservation if parent_rpcs.respond_to? :failover_reservation - @failover_reservation = ::Gapic::Config::Method.new failover_reservation_config - create_capacity_commitment_config = parent_rpcs.create_capacity_commitment if parent_rpcs.respond_to? :create_capacity_commitment - @create_capacity_commitment = ::Gapic::Config::Method.new create_capacity_commitment_config - list_capacity_commitments_config = parent_rpcs.list_capacity_commitments if parent_rpcs.respond_to? :list_capacity_commitments - @list_capacity_commitments = ::Gapic::Config::Method.new list_capacity_commitments_config - get_capacity_commitment_config = parent_rpcs.get_capacity_commitment if parent_rpcs.respond_to? :get_capacity_commitment - @get_capacity_commitment = ::Gapic::Config::Method.new get_capacity_commitment_config - delete_capacity_commitment_config = parent_rpcs.delete_capacity_commitment if parent_rpcs.respond_to? :delete_capacity_commitment - @delete_capacity_commitment = ::Gapic::Config::Method.new delete_capacity_commitment_config - update_capacity_commitment_config = parent_rpcs.update_capacity_commitment if parent_rpcs.respond_to? :update_capacity_commitment - @update_capacity_commitment = ::Gapic::Config::Method.new update_capacity_commitment_config - split_capacity_commitment_config = parent_rpcs.split_capacity_commitment if parent_rpcs.respond_to? :split_capacity_commitment - @split_capacity_commitment = ::Gapic::Config::Method.new split_capacity_commitment_config - merge_capacity_commitments_config = parent_rpcs.merge_capacity_commitments if parent_rpcs.respond_to? :merge_capacity_commitments - @merge_capacity_commitments = ::Gapic::Config::Method.new merge_capacity_commitments_config - create_assignment_config = parent_rpcs.create_assignment if parent_rpcs.respond_to? :create_assignment - @create_assignment = ::Gapic::Config::Method.new create_assignment_config - list_assignments_config = parent_rpcs.list_assignments if parent_rpcs.respond_to? :list_assignments - @list_assignments = ::Gapic::Config::Method.new list_assignments_config - delete_assignment_config = parent_rpcs.delete_assignment if parent_rpcs.respond_to? :delete_assignment - @delete_assignment = ::Gapic::Config::Method.new delete_assignment_config - search_assignments_config = parent_rpcs.search_assignments if parent_rpcs.respond_to? :search_assignments - @search_assignments = ::Gapic::Config::Method.new search_assignments_config - search_all_assignments_config = parent_rpcs.search_all_assignments if parent_rpcs.respond_to? :search_all_assignments - @search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config - move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment - @move_assignment = ::Gapic::Config::Method.new move_assignment_config - update_assignment_config = parent_rpcs.update_assignment if parent_rpcs.respond_to? :update_assignment - @update_assignment = ::Gapic::Config::Method.new update_assignment_config - get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation - @get_bi_reservation = ::Gapic::Config::Method.new get_bi_reservation_config - update_bi_reservation_config = parent_rpcs.update_bi_reservation if parent_rpcs.respond_to? :update_bi_reservation - @update_bi_reservation = ::Gapic::Config::Method.new update_bi_reservation_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - create_reservation_group_config = parent_rpcs.create_reservation_group if parent_rpcs.respond_to? :create_reservation_group - @create_reservation_group = ::Gapic::Config::Method.new create_reservation_group_config - get_reservation_group_config = parent_rpcs.get_reservation_group if parent_rpcs.respond_to? :get_reservation_group - @get_reservation_group = ::Gapic::Config::Method.new get_reservation_group_config - delete_reservation_group_config = parent_rpcs.delete_reservation_group if parent_rpcs.respond_to? :delete_reservation_group - @delete_reservation_group = ::Gapic::Config::Method.new delete_reservation_group_config - list_reservation_groups_config = parent_rpcs.list_reservation_groups if parent_rpcs.respond_to? :list_reservation_groups - @list_reservation_groups = ::Gapic::Config::Method.new list_reservation_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb deleted file mode 100644 index a7158a1de8b0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - # Credentials for the ReservationService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BIGQUERY_RESERVATION_CREDENTIALS", - "BIGQUERY_RESERVATION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BIGQUERY_RESERVATION_CREDENTIALS_JSON", - "BIGQUERY_RESERVATION_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb deleted file mode 100644 index 24dc5bcf219f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb +++ /dev/null @@ -1,147 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - # Path helper methods for the ReservationService API. - module Paths - ## - # Create a fully-qualified Assignment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}` - # - # @param project [String] - # @param location [String] - # @param reservation [String] - # @param assignment [String] - # - # @return [::String] - def assignment_path project:, location:, reservation:, assignment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "reservation cannot contain /" if reservation.to_s.include? "/" - - "projects/#{project}/locations/#{location}/reservations/#{reservation}/assignments/#{assignment}" - end - - ## - # Create a fully-qualified BiReservation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/biReservation` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def bi_reservation_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}/biReservation" - end - - ## - # Create a fully-qualified CapacityCommitment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}` - # - # @param project [String] - # @param location [String] - # @param capacity_commitment [String] - # - # @return [::String] - def capacity_commitment_path project:, location:, capacity_commitment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/capacityCommitments/#{capacity_commitment}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Reservation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/reservations/{reservation}` - # - # @param project [String] - # @param location [String] - # @param reservation [String] - # - # @return [::String] - def reservation_path project:, location:, reservation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/reservations/#{reservation}" - end - - ## - # Create a fully-qualified ReservationGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/reservationGroups/{reservation_group}` - # - # @param project [String] - # @param location [String] - # @param reservation_group [String] - # - # @return [::String] - def reservation_group_path project:, location:, reservation_group: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/reservationGroups/#{reservation_group}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb deleted file mode 100644 index 41e991c06c3e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/reservation/v1/version" - -require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" -require "google/cloud/bigquery/reservation/v1/reservation_service/paths" -require "google/cloud/bigquery/reservation/v1/reservation_service/rest/client" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - ## - # This API allows users to manage their BigQuery reservations. - # - # A reservation provides computational resource guarantees, in the form of - # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a - # unit of computational power in BigQuery, and serves as the basic unit of - # parallelism. In a scan of a multi-partitioned table, a single slot operates - # on a single partition of the table. A reservation resource exists as a child - # resource of the admin project and location, e.g.: - # `projects/myproject/locations/US/reservations/reservationName`. - # - # A capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. A capacity - # commitment resource exists as a child resource of the admin project and - # location, e.g.: - # `projects/myproject/locations/US/capacityCommitments/id`. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/reservation/v1/reservation_service/rest" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - module ReservationService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/reservation/v1/reservation_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb deleted file mode 100644 index d225ac8bf66e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb +++ /dev/null @@ -1,3268 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/reservation/v1/reservation_pb" -require "google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - module Rest - ## - # REST client for the ReservationService service. - # - # This API allows users to manage their BigQuery reservations. - # - # A reservation provides computational resource guarantees, in the form of - # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a - # unit of computational power in BigQuery, and serves as the basic unit of - # parallelism. In a scan of a multi-partitioned table, a single slot operates - # on a single partition of the table. A reservation resource exists as a child - # resource of the admin project and location, e.g.: - # `projects/myproject/locations/US/reservations/reservationName`. - # - # A capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. A capacity - # commitment resource exists as a child resource of the admin project and - # location, e.g.: - # `projects/myproject/locations/US/capacityCommitments/id`. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigqueryreservation.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reservation_service_stub - - ## - # Configure the ReservationService Client class. - # - # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReservationService clients - # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "Reservation", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_reservation.timeout = 300.0 - - default_config.rpcs.list_reservations.timeout = 300.0 - default_config.rpcs.list_reservations.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_reservation.timeout = 300.0 - default_config.rpcs.get_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_reservation.timeout = 300.0 - default_config.rpcs.delete_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_reservation.timeout = 300.0 - - default_config.rpcs.failover_reservation.timeout = 300.0 - - default_config.rpcs.create_capacity_commitment.timeout = 300.0 - - default_config.rpcs.list_capacity_commitments.timeout = 300.0 - default_config.rpcs.list_capacity_commitments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_capacity_commitment.timeout = 300.0 - default_config.rpcs.get_capacity_commitment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_capacity_commitment.timeout = 300.0 - default_config.rpcs.delete_capacity_commitment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_capacity_commitment.timeout = 300.0 - - default_config.rpcs.split_capacity_commitment.timeout = 300.0 - - default_config.rpcs.merge_capacity_commitments.timeout = 300.0 - - default_config.rpcs.create_assignment.timeout = 300.0 - - default_config.rpcs.list_assignments.timeout = 300.0 - default_config.rpcs.list_assignments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_assignment.timeout = 300.0 - default_config.rpcs.delete_assignment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_assignments.timeout = 300.0 - default_config.rpcs.search_assignments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.move_assignment.timeout = 300.0 - - default_config.rpcs.get_bi_reservation.timeout = 300.0 - default_config.rpcs.get_bi_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_bi_reservation.timeout = 300.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReservationService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @reservation_service_stub.universe_domain - end - - ## - # Create a new ReservationService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReservationService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @reservation_service_stub = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @reservation_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reservation_service_stub.logger - end - - # Service calls - - ## - # Creates a new reservation resource. - # - # @overload create_reservation(request, options = nil) - # Pass arguments to `create_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_reservation(parent: nil, reservation_id: nil, reservation: nil) - # Pass arguments to `create_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project, location. E.g., - # `projects/myproject/locations/US` - # @param reservation_id [::String] - # The reservation ID. It must only contain lower case alphanumeric - # characters or dashes. It must start with a letter and must not end - # with a dash. Its maximum length is 64 characters. - # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] - # Definition of the new reservation to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new - # - # # Call the create_reservation method. - # result = client.create_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def create_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.create_reservation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the reservations for the project in the specified location. - # - # @overload list_reservations(request, options = nil) - # Pass arguments to `list_reservations` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_reservations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reservations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new - # - # # Call the list_reservations method. - # result = client.list_reservations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p item - # end - # - def list_reservations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_reservations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_reservations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reservations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.list_reservations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_reservations, "reservations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about the reservation. - # - # @overload get_reservation(request, options = nil) - # Pass arguments to `get_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_reservation(name: nil) - # Pass arguments to `get_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new - # - # # Call the get_reservation method. - # result = client.get_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def get_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.get_reservation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - # - # @overload delete_reservation(request, options = nil) - # Pass arguments to `delete_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_reservation(name: nil) - # Pass arguments to `delete_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new - # - # # Call the delete_reservation method. - # result = client.delete_reservation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.delete_reservation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing reservation resource. - # - # @overload update_reservation(request, options = nil) - # Pass arguments to `update_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_reservation(reservation: nil, update_mask: nil) - # Pass arguments to `update_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] - # Content of the reservation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new - # - # # Call the update_reservation method. - # result = client.update_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def update_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.update_reservation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fail over a reservation to the secondary location. The operation should be - # done in the current secondary location, which will be promoted to the - # new primary location for the reservation. - # Attempting to failover a reservation in the current primary location will - # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload failover_reservation(request, options = nil) - # Pass arguments to `failover_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload failover_reservation(name: nil, failover_mode: nil) - # Pass arguments to `failover_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation to failover. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # @param failover_mode [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] - # Optional. A parameter that determines how writes that are pending - # replication are handled after a failover is initiated. If not specified, - # HARD failover mode is used by default. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new - # - # # Call the failover_reservation method. - # result = client.failover_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def failover_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.failover_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.failover_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.failover_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.failover_reservation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new capacity commitment resource. - # - # @overload create_capacity_commitment(request, options = nil) - # Pass arguments to `create_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil, capacity_commitment_id: nil) - # Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] - # Content of the capacity commitment to create. - # @param enforce_single_admin_project_per_org [::Boolean] - # If true, fail the request if another project in the organization has a - # capacity commitment. - # @param capacity_commitment_id [::String] - # The optional capacity commitment ID. Capacity commitment name will be - # generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - # NOTE: this ID won't be kept if the capacity commitment is split or merged. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new - # - # # Call the create_capacity_commitment method. - # result = client.create_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def create_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_capacity_commitment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_capacity_commitment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.create_capacity_commitment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the capacity commitments for the admin project. - # - # @overload list_capacity_commitments(request, options = nil) - # Pass arguments to `list_capacity_commitments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_capacity_commitments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_capacity_commitments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new - # - # # Call the list_capacity_commitments method. - # result = client.list_capacity_commitments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p item - # end - # - def list_capacity_commitments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_capacity_commitments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_capacity_commitments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_capacity_commitments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.list_capacity_commitments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_capacity_commitments, "capacity_commitments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about the capacity commitment. - # - # @overload get_capacity_commitment(request, options = nil) - # Pass arguments to `get_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_capacity_commitment(name: nil) - # Pass arguments to `get_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the capacity commitment to retrieve. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new - # - # # Call the get_capacity_commitment method. - # result = client.get_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def get_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_capacity_commitment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_capacity_commitment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.get_capacity_commitment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a capacity commitment. Attempting to delete capacity commitment - # before its commitment_end_time will fail with the error code - # `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload delete_capacity_commitment(request, options = nil) - # Pass arguments to `delete_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_capacity_commitment(name: nil, force: nil) - # Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the capacity commitment to delete. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # @param force [::Boolean] - # Can be used to force delete commitments even if assignments exist. Deleting - # commitments with assignments may cause queries to fail if they no longer - # have access to slots. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new - # - # # Call the delete_capacity_commitment method. - # result = client.delete_capacity_commitment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_capacity_commitment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_capacity_commitment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.delete_capacity_commitment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing capacity commitment. - # - # Only `plan` and `renewal_plan` fields can be updated. - # - # Plan can only be changed to a plan of a longer commitment period. - # Attempting to change to a plan with shorter commitment period will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload update_capacity_commitment(request, options = nil) - # Pass arguments to `update_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_capacity_commitment(capacity_commitment: nil, update_mask: nil) - # Pass arguments to `update_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] - # Content of the capacity commitment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new - # - # # Call the update_capacity_commitment method. - # result = client.update_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def update_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_capacity_commitment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_capacity_commitment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.update_capacity_commitment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Splits capacity commitment to two commitments of the same plan and - # `commitment_end_time`. - # - # A common use case is to enable downgrading commitments. - # - # For example, in order to downgrade from 10000 slots to 8000, you might - # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, - # you delete the first one after the commitment end time passes. - # - # @overload split_capacity_commitment(request, options = nil) - # Pass arguments to `split_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload split_capacity_commitment(name: nil, slot_count: nil) - # Pass arguments to `split_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name e.g.,: - # `projects/myproject/locations/US/capacityCommitments/123` - # @param slot_count [::Integer] - # Number of slots in the capacity commitment after the split. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new - # - # # Call the split_capacity_commitment method. - # result = client.split_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. - # p result - # - def split_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.split_capacity_commitment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.split_capacity_commitment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.split_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.split_capacity_commitment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Merges capacity commitments of the same plan into a single commitment. - # - # The resulting capacity commitment has the greater commitment_end_time - # out of the to-be-merged capacity commitments. - # - # Attempting to merge capacity commitments of different plan will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload merge_capacity_commitments(request, options = nil) - # Pass arguments to `merge_capacity_commitments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload merge_capacity_commitments(parent: nil, capacity_commitment_ids: nil, capacity_commitment_id: nil) - # Pass arguments to `merge_capacity_commitments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent resource that identifies admin project and location e.g., - # `projects/myproject/locations/us` - # @param capacity_commitment_ids [::Array<::String>] - # Ids of capacity commitments to merge. - # These capacity commitments must exist under admin project and location - # specified in the parent. - # ID is the last portion of capacity commitment name e.g., 'abc' for - # projects/myproject/locations/US/capacityCommitments/abc - # @param capacity_commitment_id [::String] - # Optional. The optional resulting capacity commitment ID. Capacity - # commitment name will be generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new - # - # # Call the merge_capacity_commitments method. - # result = client.merge_capacity_commitments request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def merge_capacity_commitments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.merge_capacity_commitments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.merge_capacity_commitments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.merge_capacity_commitments request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an assignment object which allows the given project to submit jobs - # of a certain type using slots from the specified reservation. - # - # Currently a - # resource (project, folder, organization) can only have one assignment per - # each (job_type, location) combination, and that reservation will be used - # for all jobs of the matching type. - # - # Different assignments can be created on different levels of the - # projects, folders or organization hierarchy. During query execution, - # the assignment is looked up at the project, folder and organization levels - # in that order. The first assignment found is applied to the query. - # - # When creating assignments, it does not matter if other assignments exist at - # higher levels. - # - # Example: - # - # * The organization `organizationA` contains two projects, `project1` - # and `project2`. - # * Assignments for all three entities (`organizationA`, `project1`, and - # `project2`) could all be created and mapped to the same or different - # reservations. - # - # "None" assignments represent an absence of the assignment. Projects - # assigned to None use on-demand pricing. To create a "None" assignment, use - # "none" as a reservation_id in the parent. Example parent: - # `projects/myproject/locations/US/reservations/none`. - # - # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have - # 'bigquery.admin' permissions on the project using the reservation - # and the project that owns this reservation. - # - # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment - # does not match location of the reservation. - # - # @overload create_assignment(request, options = nil) - # Pass arguments to `create_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_assignment(parent: nil, assignment: nil, assignment_id: nil) - # Pass arguments to `create_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name of the assignment - # E.g. `projects/myproject/locations/US/reservations/team1-prod` - # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] - # Assignment resource to create. - # @param assignment_id [::String] - # The optional assignment ID. Assignment name will be generated automatically - # if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # Max length is 64 characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new - # - # # Call the create_assignment method. - # result = client.create_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def create_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_assignment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_assignment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.create_assignment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists assignments. - # - # Only explicitly created assignments will be returned. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, ListAssignments will just return the above two assignments - # for reservation `res1`, and no expansion/merge will happen. - # - # The wildcard "-" can be used for - # reservations in the request. In that case all assignments belongs to the - # specified project and location will be listed. - # - # **Note** "-" cannot be used for projects nor locations. - # - # @overload list_assignments(request, options = nil) - # Pass arguments to `list_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_assignments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_assignments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name e.g.: - # - # `projects/myproject/locations/US/reservations/team1-prod` - # - # Or: - # - # `projects/myproject/locations/US/reservations/-` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new - # - # # Call the list_assignments method. - # result = client.list_assignments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def list_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_assignments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_assignments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.list_assignments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_assignments, "assignments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a assignment. No expansion will happen. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, deletion of the `` assignment won't - # affect the other assignment ``. After said deletion, - # queries from `project1` will still use `res1` while queries from - # `project2` will switch to use on-demand mode. - # - # @overload delete_assignment(request, options = nil) - # Pass arguments to `delete_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_assignment(name: nil) - # Pass arguments to `delete_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource, e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new - # - # # Call the delete_assignment method. - # result = client.delete_assignment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_assignment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_assignment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.delete_assignment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deprecated: Looks up assignments for a specified resource for a particular - # region. If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - # - # **Note** "-" cannot be used for projects - # nor locations. - # - # @overload search_assignments(request, options = nil) - # Pass arguments to `search_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_assignments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the admin project(containing project and - # location), e.g.: - # `projects/myproject/locations/US`. - # @param query [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new - # - # # Call the search_assignments method. - # result = client.search_assignments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def search_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_assignments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_assignments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.search_assignments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :search_assignments, "assignments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Looks up assignments for a specified resource for a particular region. - # If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - # - # @overload search_all_assignments(request, options = nil) - # Pass arguments to `search_all_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_all_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_all_assignments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name with location (project name could be the - # wildcard '-'), e.g.: - # `projects/-/locations/US`. - # @param query [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new - # - # # Call the search_all_assignments method. - # result = client.search_all_assignments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def search_all_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_all_assignments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_all_assignments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_all_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.search_all_assignments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :search_all_assignments, "assignments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Moves an assignment under a new reservation. - # - # This differs from removing an existing assignment and recreating a new one - # by providing a transactional change that ensures an assignee always has an - # associated reservation. - # - # @overload move_assignment(request, options = nil) - # Pass arguments to `move_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload move_assignment(name: nil, destination_id: nil, assignment_id: nil) - # Pass arguments to `move_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the assignment, - # e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - # @param destination_id [::String] - # The new reservation ID, e.g.: - # `projects/myotherproject/locations/US/reservations/team2-prod` - # @param assignment_id [::String] - # The optional assignment ID. A new assignment name is generated if this - # field is empty. - # - # This field can contain only lowercase alphanumeric characters or dashes. - # Max length is 64 characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new - # - # # Call the move_assignment method. - # result = client.move_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def move_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.move_assignment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.move_assignment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.move_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.move_assignment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing assignment. - # - # Only the `priority` field can be updated. - # - # @overload update_assignment(request, options = nil) - # Pass arguments to `update_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_assignment(assignment: nil, update_mask: nil) - # Pass arguments to `update_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] - # Content of the assignment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new - # - # # Call the update_assignment method. - # result = client.update_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def update_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_assignment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_assignment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.update_assignment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a BI reservation. - # - # @overload get_bi_reservation(request, options = nil) - # Pass arguments to `get_bi_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_bi_reservation(name: nil) - # Pass arguments to `get_bi_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested reservation, for example: - # `projects/{project_id}/locations/{location_id}/biReservation` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new - # - # # Call the get_bi_reservation method. - # result = client.get_bi_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - # p result - # - def get_bi_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_bi_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_bi_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_bi_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.get_bi_reservation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a BI reservation. - # - # Only fields specified in the `field_mask` are updated. - # - # A singleton BI reservation always exists with default size 0. - # In order to reserve BI capacity it needs to be updated to an amount - # greater than 0. In order to release BI capacity reservation size - # must be set to 0. - # - # @overload update_bi_reservation(request, options = nil) - # Pass arguments to `update_bi_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_bi_reservation(bi_reservation: nil, update_mask: nil) - # Pass arguments to `update_bi_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param bi_reservation [::Google::Cloud::Bigquery::Reservation::V1::BiReservation, ::Hash] - # A reservation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A list of fields to be updated in this request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new - # - # # Call the update_bi_reservation method. - # result = client.update_bi_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - # p result - # - def update_bi_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_bi_reservation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_bi_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_bi_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.update_bi_reservation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a resource. - # May return: - # - # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - # permission to view it. - # * An empty policy if the resource exists but doesn't have a set policy. - # - # Supported resources are: - # - Reservations - # - ReservationAssignments - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.getIamPolicy` to get policies on - # reservations. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets an access control policy for a resource. Replaces any existing - # policy. - # - # Supported resources are: - # - Reservations - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.setIamPolicy` to set policies on - # reservations. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets your permissions on a resource. Returns an empty set of permissions if - # the resource doesn't exist. - # - # Supported resources are: - # - Reservations - # - # No Google IAM permissions are required to call this method. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new reservation group. - # - # @overload create_reservation_group(request, options = nil) - # Pass arguments to `create_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_reservation_group(parent: nil, reservation_group_id: nil, reservation_group: nil) - # Pass arguments to `create_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project, location. E.g., - # `projects/myproject/locations/US` - # @param reservation_group_id [::String] - # Required. The reservation group ID. It must only contain lower case - # alphanumeric characters or dashes. It must start with a letter and must not - # end with a dash. Its maximum length is 64 characters. - # @param reservation_group [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup, ::Hash] - # Required. New Reservation Group to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new - # - # # Call the create_reservation_group method. - # result = client.create_reservation_group request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p result - # - def create_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_reservation_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.create_reservation_group request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about the reservation group. - # - # @overload get_reservation_group(request, options = nil) - # Pass arguments to `get_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_reservation_group(name: nil) - # Pass arguments to `get_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new - # - # # Call the get_reservation_group method. - # result = client.get_reservation_group request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p result - # - def get_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_reservation_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.get_reservation_group request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - # - # @overload delete_reservation_group(request, options = nil) - # Pass arguments to `delete_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_reservation_group(name: nil) - # Pass arguments to `delete_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new - # - # # Call the delete_reservation_group method. - # result = client.delete_reservation_group request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_reservation_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.delete_reservation_group request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the reservation groups for the project in the specified location. - # - # @overload list_reservation_groups(request, options = nil) - # Pass arguments to `list_reservation_groups` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_reservation_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reservation_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new - # - # # Call the list_reservation_groups method. - # result = client.list_reservation_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p item - # end - # - def list_reservation_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_reservation_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_reservation_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reservation_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.list_reservation_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_reservation_groups, "reservation_groups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ReservationService REST API. - # - # This class represents the configuration for ReservationService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_reservation to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_reservation.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_reservation.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "bigqueryreservation.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ReservationService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reservation - ## - # RPC-specific configuration for `list_reservations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reservations - ## - # RPC-specific configuration for `get_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reservation - ## - # RPC-specific configuration for `delete_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_reservation - ## - # RPC-specific configuration for `update_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_reservation - ## - # RPC-specific configuration for `failover_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :failover_reservation - ## - # RPC-specific configuration for `create_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_capacity_commitment - ## - # RPC-specific configuration for `list_capacity_commitments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_capacity_commitments - ## - # RPC-specific configuration for `get_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_capacity_commitment - ## - # RPC-specific configuration for `delete_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_capacity_commitment - ## - # RPC-specific configuration for `update_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_capacity_commitment - ## - # RPC-specific configuration for `split_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :split_capacity_commitment - ## - # RPC-specific configuration for `merge_capacity_commitments` - # @return [::Gapic::Config::Method] - # - attr_reader :merge_capacity_commitments - ## - # RPC-specific configuration for `create_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_assignment - ## - # RPC-specific configuration for `list_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assignments - ## - # RPC-specific configuration for `delete_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_assignment - ## - # RPC-specific configuration for `search_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :search_assignments - ## - # RPC-specific configuration for `search_all_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :search_all_assignments - ## - # RPC-specific configuration for `move_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :move_assignment - ## - # RPC-specific configuration for `update_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_assignment - ## - # RPC-specific configuration for `get_bi_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_bi_reservation - ## - # RPC-specific configuration for `update_bi_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_bi_reservation - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `create_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reservation_group - ## - # RPC-specific configuration for `get_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reservation_group - ## - # RPC-specific configuration for `delete_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_reservation_group - ## - # RPC-specific configuration for `list_reservation_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reservation_groups - - # @private - def initialize parent_rpcs = nil - create_reservation_config = parent_rpcs.create_reservation if parent_rpcs.respond_to? :create_reservation - @create_reservation = ::Gapic::Config::Method.new create_reservation_config - list_reservations_config = parent_rpcs.list_reservations if parent_rpcs.respond_to? :list_reservations - @list_reservations = ::Gapic::Config::Method.new list_reservations_config - get_reservation_config = parent_rpcs.get_reservation if parent_rpcs.respond_to? :get_reservation - @get_reservation = ::Gapic::Config::Method.new get_reservation_config - delete_reservation_config = parent_rpcs.delete_reservation if parent_rpcs.respond_to? :delete_reservation - @delete_reservation = ::Gapic::Config::Method.new delete_reservation_config - update_reservation_config = parent_rpcs.update_reservation if parent_rpcs.respond_to? :update_reservation - @update_reservation = ::Gapic::Config::Method.new update_reservation_config - failover_reservation_config = parent_rpcs.failover_reservation if parent_rpcs.respond_to? :failover_reservation - @failover_reservation = ::Gapic::Config::Method.new failover_reservation_config - create_capacity_commitment_config = parent_rpcs.create_capacity_commitment if parent_rpcs.respond_to? :create_capacity_commitment - @create_capacity_commitment = ::Gapic::Config::Method.new create_capacity_commitment_config - list_capacity_commitments_config = parent_rpcs.list_capacity_commitments if parent_rpcs.respond_to? :list_capacity_commitments - @list_capacity_commitments = ::Gapic::Config::Method.new list_capacity_commitments_config - get_capacity_commitment_config = parent_rpcs.get_capacity_commitment if parent_rpcs.respond_to? :get_capacity_commitment - @get_capacity_commitment = ::Gapic::Config::Method.new get_capacity_commitment_config - delete_capacity_commitment_config = parent_rpcs.delete_capacity_commitment if parent_rpcs.respond_to? :delete_capacity_commitment - @delete_capacity_commitment = ::Gapic::Config::Method.new delete_capacity_commitment_config - update_capacity_commitment_config = parent_rpcs.update_capacity_commitment if parent_rpcs.respond_to? :update_capacity_commitment - @update_capacity_commitment = ::Gapic::Config::Method.new update_capacity_commitment_config - split_capacity_commitment_config = parent_rpcs.split_capacity_commitment if parent_rpcs.respond_to? :split_capacity_commitment - @split_capacity_commitment = ::Gapic::Config::Method.new split_capacity_commitment_config - merge_capacity_commitments_config = parent_rpcs.merge_capacity_commitments if parent_rpcs.respond_to? :merge_capacity_commitments - @merge_capacity_commitments = ::Gapic::Config::Method.new merge_capacity_commitments_config - create_assignment_config = parent_rpcs.create_assignment if parent_rpcs.respond_to? :create_assignment - @create_assignment = ::Gapic::Config::Method.new create_assignment_config - list_assignments_config = parent_rpcs.list_assignments if parent_rpcs.respond_to? :list_assignments - @list_assignments = ::Gapic::Config::Method.new list_assignments_config - delete_assignment_config = parent_rpcs.delete_assignment if parent_rpcs.respond_to? :delete_assignment - @delete_assignment = ::Gapic::Config::Method.new delete_assignment_config - search_assignments_config = parent_rpcs.search_assignments if parent_rpcs.respond_to? :search_assignments - @search_assignments = ::Gapic::Config::Method.new search_assignments_config - search_all_assignments_config = parent_rpcs.search_all_assignments if parent_rpcs.respond_to? :search_all_assignments - @search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config - move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment - @move_assignment = ::Gapic::Config::Method.new move_assignment_config - update_assignment_config = parent_rpcs.update_assignment if parent_rpcs.respond_to? :update_assignment - @update_assignment = ::Gapic::Config::Method.new update_assignment_config - get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation - @get_bi_reservation = ::Gapic::Config::Method.new get_bi_reservation_config - update_bi_reservation_config = parent_rpcs.update_bi_reservation if parent_rpcs.respond_to? :update_bi_reservation - @update_bi_reservation = ::Gapic::Config::Method.new update_bi_reservation_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - create_reservation_group_config = parent_rpcs.create_reservation_group if parent_rpcs.respond_to? :create_reservation_group - @create_reservation_group = ::Gapic::Config::Method.new create_reservation_group_config - get_reservation_group_config = parent_rpcs.get_reservation_group if parent_rpcs.respond_to? :get_reservation_group - @get_reservation_group = ::Gapic::Config::Method.new get_reservation_group_config - delete_reservation_group_config = parent_rpcs.delete_reservation_group if parent_rpcs.respond_to? :delete_reservation_group - @delete_reservation_group = ::Gapic::Config::Method.new delete_reservation_group_config - list_reservation_groups_config = parent_rpcs.list_reservation_groups if parent_rpcs.respond_to? :list_reservation_groups - @list_reservation_groups = ::Gapic::Config::Method.new list_reservation_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb deleted file mode 100644 index 546513e1180a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb +++ /dev/null @@ -1,1889 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/reservation/v1/reservation_pb" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - module Rest - ## - # REST service stub for the ReservationService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # A result object deserialized from the server's reply - def create_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_reservation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_reservations REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse] - # A result object deserialized from the server's reply - def list_reservations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reservations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_reservations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # A result object deserialized from the server's reply - def get_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_reservation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_reservation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # A result object deserialized from the server's reply - def update_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_reservation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the failover_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # A result object deserialized from the server's reply - def failover_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_failover_reservation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "failover_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # A result object deserialized from the server's reply - def create_capacity_commitment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_capacity_commitment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_capacity_commitment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_capacity_commitments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse] - # A result object deserialized from the server's reply - def list_capacity_commitments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_capacity_commitments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_capacity_commitments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # A result object deserialized from the server's reply - def get_capacity_commitment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_capacity_commitment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_capacity_commitment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_capacity_commitment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_capacity_commitment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_capacity_commitment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # A result object deserialized from the server's reply - def update_capacity_commitment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_capacity_commitment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_capacity_commitment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the split_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # A result object deserialized from the server's reply - def split_capacity_commitment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_split_capacity_commitment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "split_capacity_commitment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the merge_capacity_commitments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # A result object deserialized from the server's reply - def merge_capacity_commitments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_merge_capacity_commitments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "merge_capacity_commitments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # A result object deserialized from the server's reply - def create_assignment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_assignment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_assignment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse] - # A result object deserialized from the server's reply - def list_assignments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_assignments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_assignments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_assignment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_assignment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_assignment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse] - # A result object deserialized from the server's reply - def search_assignments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_assignments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_assignments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_all_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse] - # A result object deserialized from the server's reply - def search_all_assignments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_all_assignments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_all_assignments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the move_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # A result object deserialized from the server's reply - def move_assignment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_move_assignment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "move_assignment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # A result object deserialized from the server's reply - def update_assignment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_assignment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_assignment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_bi_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # A result object deserialized from the server's reply - def get_bi_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_bi_reservation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_bi_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_bi_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # A result object deserialized from the server's reply - def update_bi_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_bi_reservation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_bi_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # A result object deserialized from the server's reply - def create_reservation_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_reservation_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_reservation_group", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # A result object deserialized from the server's reply - def get_reservation_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_reservation_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_reservation_group", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_reservation_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_reservation_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_reservation_group", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_reservation_groups REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse] - # A result object deserialized from the server's reply - def list_reservation_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reservation_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_reservation_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/reservations", - body: "reservation", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reservations REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_reservations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/reservations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{reservation.name}", - body: "reservation", - matches: [ - ["reservation.name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the failover_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_failover_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:failoverReservation", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_capacity_commitment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/capacityCommitments", - body: "capacity_commitment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_capacity_commitments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_capacity_commitments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/capacityCommitments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_capacity_commitment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_capacity_commitment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_capacity_commitment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{capacity_commitment.name}", - body: "capacity_commitment", - matches: [ - ["capacity_commitment.name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the split_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_split_capacity_commitment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:split", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the merge_capacity_commitments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_merge_capacity_commitments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/capacityCommitments:merge", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_assignment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assignments", - body: "assignment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_assignments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assignments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_assignment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_assignments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}:searchAssignments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_all_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_all_assignments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}:searchAllAssignments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the move_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_move_assignment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:move", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_assignment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{assignment.name}", - body: "assignment", - matches: [ - ["assignment.name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_bi_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_bi_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/biReservation/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_bi_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_bi_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{bi_reservation.name}", - body: "bi_reservation", - matches: [ - ["bi_reservation.name", %r{^projects/[^/]+/locations/[^/]+/biReservation/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_reservation_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/reservationGroups", - body: "reservation_group", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_reservation_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservationGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_reservation_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservationGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reservation_groups REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_reservation_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/reservationGroups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb deleted file mode 100644 index 2edd21e05187..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb +++ /dev/null @@ -1,297 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/reservation/v1/reservation.proto for package 'google.cloud.bigquery.reservation.v1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/bigquery/reservation/v1/reservation_pb' - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - # This API allows users to manage their BigQuery reservations. - # - # A reservation provides computational resource guarantees, in the form of - # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a - # unit of computational power in BigQuery, and serves as the basic unit of - # parallelism. In a scan of a multi-partitioned table, a single slot operates - # on a single partition of the table. A reservation resource exists as a child - # resource of the admin project and location, e.g.: - # `projects/myproject/locations/US/reservations/reservationName`. - # - # A capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. A capacity - # commitment resource exists as a child resource of the admin project and - # location, e.g.: - # `projects/myproject/locations/US/capacityCommitments/id`. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.reservation.v1.ReservationService' - - # Creates a new reservation resource. - rpc :CreateReservation, ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation - # Lists all the reservations for the project in the specified location. - rpc :ListReservations, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse - # Returns information about the reservation. - rpc :GetReservation, ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - rpc :DeleteReservation, ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Google::Protobuf::Empty - # Updates an existing reservation resource. - rpc :UpdateReservation, ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation - # Fail over a reservation to the secondary location. The operation should be - # done in the current secondary location, which will be promoted to the - # new primary location for the reservation. - # Attempting to failover a reservation in the current primary location will - # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. - rpc :FailoverReservation, ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation - # Creates a new capacity commitment resource. - rpc :CreateCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment - # Lists all the capacity commitments for the admin project. - rpc :ListCapacityCommitments, ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse - # Returns information about the capacity commitment. - rpc :GetCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment - # Deletes a capacity commitment. Attempting to delete capacity commitment - # before its commitment_end_time will fail with the error code - # `google.rpc.Code.FAILED_PRECONDITION`. - rpc :DeleteCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Google::Protobuf::Empty - # Updates an existing capacity commitment. - # - # Only `plan` and `renewal_plan` fields can be updated. - # - # Plan can only be changed to a plan of a longer commitment period. - # Attempting to change to a plan with shorter commitment period will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - rpc :UpdateCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment - # Splits capacity commitment to two commitments of the same plan and - # `commitment_end_time`. - # - # A common use case is to enable downgrading commitments. - # - # For example, in order to downgrade from 10000 slots to 8000, you might - # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, - # you delete the first one after the commitment end time passes. - rpc :SplitCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse - # Merges capacity commitments of the same plan into a single commitment. - # - # The resulting capacity commitment has the greater commitment_end_time - # out of the to-be-merged capacity commitments. - # - # Attempting to merge capacity commitments of different plan will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - rpc :MergeCapacityCommitments, ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment - # Creates an assignment object which allows the given project to submit jobs - # of a certain type using slots from the specified reservation. - # - # Currently a - # resource (project, folder, organization) can only have one assignment per - # each (job_type, location) combination, and that reservation will be used - # for all jobs of the matching type. - # - # Different assignments can be created on different levels of the - # projects, folders or organization hierarchy. During query execution, - # the assignment is looked up at the project, folder and organization levels - # in that order. The first assignment found is applied to the query. - # - # When creating assignments, it does not matter if other assignments exist at - # higher levels. - # - # Example: - # - # * The organization `organizationA` contains two projects, `project1` - # and `project2`. - # * Assignments for all three entities (`organizationA`, `project1`, and - # `project2`) could all be created and mapped to the same or different - # reservations. - # - # "None" assignments represent an absence of the assignment. Projects - # assigned to None use on-demand pricing. To create a "None" assignment, use - # "none" as a reservation_id in the parent. Example parent: - # `projects/myproject/locations/US/reservations/none`. - # - # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have - # 'bigquery.admin' permissions on the project using the reservation - # and the project that owns this reservation. - # - # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment - # does not match location of the reservation. - rpc :CreateAssignment, ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment - # Lists assignments. - # - # Only explicitly created assignments will be returned. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, ListAssignments will just return the above two assignments - # for reservation `res1`, and no expansion/merge will happen. - # - # The wildcard "-" can be used for - # reservations in the request. In that case all assignments belongs to the - # specified project and location will be listed. - # - # **Note** "-" cannot be used for projects nor locations. - rpc :ListAssignments, ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse - # Deletes a assignment. No expansion will happen. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, deletion of the `` assignment won't - # affect the other assignment ``. After said deletion, - # queries from `project1` will still use `res1` while queries from - # `project2` will switch to use on-demand mode. - rpc :DeleteAssignment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Google::Protobuf::Empty - # Deprecated: Looks up assignments for a specified resource for a particular - # region. If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - # - # **Note** "-" cannot be used for projects - # nor locations. - rpc :SearchAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse - # Looks up assignments for a specified resource for a particular region. - # If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - rpc :SearchAllAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse - # Moves an assignment under a new reservation. - # - # This differs from removing an existing assignment and recreating a new one - # by providing a transactional change that ensures an assignee always has an - # associated reservation. - rpc :MoveAssignment, ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment - # Updates an existing assignment. - # - # Only the `priority` field can be updated. - rpc :UpdateAssignment, ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment - # Retrieves a BI reservation. - rpc :GetBiReservation, ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::BiReservation - # Updates a BI reservation. - # - # Only fields specified in the `field_mask` are updated. - # - # A singleton BI reservation always exists with default size 0. - # In order to reserve BI capacity it needs to be updated to an amount - # greater than 0. In order to release BI capacity reservation size - # must be set to 0. - rpc :UpdateBiReservation, ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::BiReservation - # Gets the access control policy for a resource. - # May return: - # - # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - # permission to view it. - # * An empty policy if the resource exists but doesn't have a set policy. - # - # Supported resources are: - # - Reservations - # - ReservationAssignments - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.getIamPolicy` to get policies on - # reservations. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets an access control policy for a resource. Replaces any existing - # policy. - # - # Supported resources are: - # - Reservations - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.setIamPolicy` to set policies on - # reservations. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets your permissions on a resource. Returns an empty set of permissions if - # the resource doesn't exist. - # - # Supported resources are: - # - Reservations - # - # No Google IAM permissions are required to call this method. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Creates a new reservation group. - rpc :CreateReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup - # Returns information about the reservation group. - rpc :GetReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - rpc :DeleteReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Google::Protobuf::Empty - # Lists all the reservation groups for the project in the specified location. - rpc :ListReservationGroups, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb deleted file mode 100644 index bb32a525c996..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/reservation/v1/reservation_service/rest" -require "google/cloud/bigquery/reservation/v1/version" - -module Google - module Cloud - module Bigquery - module Reservation - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/reservation/v1/rest" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb deleted file mode 100644 index be5b8808b160..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md deleted file mode 100644 index dcf8e9f79d59..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Reservation V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb deleted file mode 100644 index e49ef9709d5c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb +++ /dev/null @@ -1,1207 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - # A reservation is a mechanism used to guarantee slots to users. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the reservation, e.g., - # `projects/*/locations/*/reservations/team1-prod`. - # The reservation_id must only contain lower case alphanumeric characters or - # dashes. It must start with a letter and must not end with a dash. Its - # maximum length is 64 characters. - # @!attribute [rw] slot_capacity - # @return [::Integer] - # Optional. Baseline slots available to this reservation. A slot is a unit of - # computational power in BigQuery, and serves as the unit of parallelism. - # - # Queries using this reservation might use more slots during runtime if - # ignore_idle_slots is set to false, or autoscaling is enabled. - # - # The total slot_capacity of the reservation and its siblings - # may exceed the total slot_count of capacity commitments. In that case, the - # exceeding slots will be charged with the autoscale SKU. You can increase - # the number of baseline slots in a reservation every few minutes. If you - # want to decrease your baseline slots, you are limited to once an hour if - # you have recently changed your baseline slot capacity and your baseline - # slots exceed your committed slots. Otherwise, you can decrease your - # baseline slots every few minutes. - # @!attribute [rw] ignore_idle_slots - # @return [::Boolean] - # Optional. If false, any query or pipeline job using this reservation will - # use idle slots from other reservations within the same admin project. If - # true, a query or pipeline job using this reservation will execute with the - # slot capacity specified in the slot_capacity field at most. - # @!attribute [rw] autoscale - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::Autoscale] - # Optional. The configuration parameters for the auto scaling feature. - # @!attribute [rw] concurrency - # @return [::Integer] - # Optional. Job concurrency target which sets a soft upper bound on the - # number of jobs that can run concurrently in this reservation. This is a - # soft target due to asynchronous nature of the system and various - # optimizations for small queries. Default value is 0 which means that - # concurrency target will be automatically computed by the system. NOTE: this - # field is exposed as target job concurrency in the Information Schema, DDL - # and BigQuery CLI. - # @!attribute [r] creation_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation time of the reservation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update time of the reservation. - # @!attribute [rw] multi_region_auxiliary - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Applicable only for reservations located within one of the BigQuery - # multi-regions (US or EU). - # - # If set to true, this reservation is placed in the organization's - # secondary region which is designated for disaster recovery purposes. - # If false, this reservation is placed in the organization's default region. - # - # NOTE: this is a preview feature. Project must be allow-listed in order to - # set this field. - # @!attribute [rw] edition - # @return [::Google::Cloud::Bigquery::Reservation::V1::Edition] - # Optional. Edition of the reservation. - # @!attribute [r] primary_location - # @return [::String] - # Output only. The current location of the reservation's primary replica. - # This field is only set for reservations using the managed disaster recovery - # feature. - # @!attribute [rw] secondary_location - # @return [::String] - # Optional. The current location of the reservation's secondary replica. This - # field is only set for reservations using the managed disaster recovery - # feature. Users can set this in create reservation calls - # to create a failover reservation or in update reservation calls to convert - # a non-failover reservation to a failover reservation(or vice versa). - # @!attribute [r] original_primary_location - # @return [::String] - # Output only. The location where the reservation was originally created. - # This is set only during the failover reservation's creation. All billing - # charges for the failover reservation will be applied to this location. - # @!attribute [rw] max_slots - # @return [::Integer] - # Optional. The overall max slots for the reservation, covering slot_capacity - # (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. - # If present, the reservation won't use more than the specified number of - # slots, even if there is demand and supply (from idle slots). - # NOTE: capping a reservation's idle slot usage is best effort and its - # usage may exceed the max_slots value. However, in terms of - # autoscale.current_slots (which accounts for the additional added slots), it - # will never exceed the max_slots - baseline. - # - # - # This field must be set together with the scaling_mode enum value, - # otherwise the request will be rejected with error code - # `google.rpc.Code.INVALID_ARGUMENT`. - # - # If the max_slots and scaling_mode are set, the autoscale or - # autoscale.max_slots field must be unset. Otherwise the request will be - # rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the - # autoscale field may still be in the output. The autopscale.max_slots will - # always show as 0 and the autoscaler.current_slots will represent the - # current slots from autoscaler excluding idle slots. - # For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, - # then in the output, the autoscaler.max_slots will be 0 and the - # autoscaler.current_slots may be any value between 0 and 1000. - # - # If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 - # and idle slots usage is 200, then in the output, the autoscaler.max_slots - # will be 0 and the autoscaler.current_slots will not be higher than 700. - # - # If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the - # output, the autoscaler field will be null. - # - # If the max_slots and scaling_mode are set, then the ignore_idle_slots field - # must be aligned with the scaling_mode enum value.(See details in - # ScalingMode comments). Otherwise the request will be rejected with - # error code `google.rpc.Code.INVALID_ARGUMENT`. - # - # Please note, the max_slots is for user to manage the part of slots greater - # than the baseline. Therefore, we don't allow users to set max_slots smaller - # or equal to the baseline as it will not be meaningful. If the field is - # present and slot_capacity>=max_slots, requests will be rejected with error - # code `google.rpc.Code.INVALID_ARGUMENT`. - # - # Please note that if max_slots is set to 0, we will treat it as unset. - # Customers can set max_slots to 0 and set scaling_mode to - # SCALING_MODE_UNSPECIFIED to disable the max_slots feature. - # @!attribute [rw] scaling_mode - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::ScalingMode] - # Optional. The scaling mode for the reservation. - # If the field is present but max_slots is not present, requests will be - # rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels associated with this reservation. You can use these - # to organize and group your reservations. - # You can set this property when you create or update a reservation. - # @!attribute [rw] reservation_group - # @return [::String] - # Optional. The reservation group that this reservation belongs to. - # You can set this property when you create or update a reservation. - # Reservations do not need to belong to a reservation group. - # Format: - # projects/\\{project}/locations/\\{location}/reservationGroups/\\{reservation_group} - # or just \\{reservation_group} - # @!attribute [r] replication_status - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::ReplicationStatus] - # Output only. The Disaster Recovery(DR) replication status of the - # reservation. This is only available for the primary replicas of DR/failover - # reservations and provides information about the both the staleness of the - # secondary and the last error encountered while trying to replicate changes - # from the primary to the secondary. If this field is blank, it means that - # the reservation is either not a DR reservation or the reservation is a DR - # secondary or that any replication operations on the reservation have - # succeeded. - # @!attribute [rw] scheduling_policy - # @return [::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy] - # Optional. The scheduling policy to use for jobs and queries running under - # this reservation. The scheduling policy controls how the reservation's - # resources are distributed. - # - # This feature is not yet generally available. - class Reservation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Auto scaling settings. - # @!attribute [r] current_slots - # @return [::Integer] - # Output only. The slot capacity added to this reservation when autoscale - # happens. Will be between [0, max_slots]. Note: after users reduce - # max_slots, it may take a while before it can be propagated, so - # current_slots may stay in the original value and could be larger than - # max_slots for that brief period (less than one minute) - # @!attribute [rw] max_slots - # @return [::Integer] - # Optional. Number of slots to be scaled when needed. - class Autoscale - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Disaster Recovery(DR) replication status of the reservation. - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. The last error encountered while trying to replicate changes - # from the primary to the secondary. This field is only available if the - # replication has not succeeded since. - # @!attribute [r] last_error_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the last error was encountered while - # trying to replicate changes from the primary to the secondary. This field - # is only available if the replication has not succeeded since. - # @!attribute [r] last_replication_time - # @return [::Google::Protobuf::Timestamp] - # Output only. A timestamp corresponding to the last change on the primary - # that was successfully replicated to the secondary. - # @!attribute [r] soft_failover_start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which a soft failover for the reservation and - # its associated datasets was initiated. After this field is set, all - # subsequent changes to the reservation will be rejected unless a hard - # failover overrides this operation. This field will be cleared once the - # failover is complete. - class ReplicationStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The scaling mode for the reservation. This enum determines how the - # reservation scales up and down. - module ScalingMode - # Default value of ScalingMode. - SCALING_MODE_UNSPECIFIED = 0 - - # The reservation will scale up only using slots from autoscaling. It will - # not use any idle slots even if there may be some available. The upper - # limit that autoscaling can scale up to will be max_slots - baseline. - # For example, if max_slots is 1000, baseline is 200 and customer sets - # ScalingMode to AUTOSCALE_ONLY, then autoscalerg will scale up to 800 - # slots and no idle slots will be used. - # - # Please note, in this mode, the ignore_idle_slots field must be set to - # true. Otherwise the request will be rejected with error code - # `google.rpc.Code.INVALID_ARGUMENT`. - AUTOSCALE_ONLY = 1 - - # The reservation will scale up using only idle slots contributed by - # other reservations or from unassigned commitments. If no idle slots are - # available it will not scale up further. If the idle slots which it is - # using are reclaimed by the contributing reservation(s) it may be forced - # to scale down. The max idle slots the reservation can be max_slots - - # baseline capacity. For example, if max_slots is 1000, baseline is 200 and - # customer sets ScalingMode to IDLE_SLOTS_ONLY, - # 1. if there are 1000 idle slots available in other reservations, the - # reservation will scale up to 1000 slots with 200 baseline and 800 idle - # slots. - # 2. if there are 500 idle slots available in other reservations, the - # reservation will scale up to 700 slots with 200 baseline and 500 idle - # slots. - # Please note, in this mode, the reservation might not be able to scale up - # to max_slots. - # - # Please note, in this mode, the ignore_idle_slots field must be set to - # false. Otherwise the request will be rejected with error code - # `google.rpc.Code.INVALID_ARGUMENT`. - IDLE_SLOTS_ONLY = 2 - - # The reservation will scale up using all slots available to it. It will - # use idle slots contributed by other reservations or from unassigned - # commitments first. If no idle slots are available it will scale up using - # autoscaling. For example, if max_slots is 1000, baseline is 200 and - # customer sets ScalingMode to ALL_SLOTS, - # 1. if there are 800 idle slots available in other reservations, the - # reservation will scale up to 1000 slots with 200 baseline and 800 idle - # slots. - # 2. if there are 500 idle slots available in other reservations, the - # reservation will scale up to 1000 slots with 200 baseline, 500 idle - # slots and 300 autoscaling slots. - # 3. if there are no idle slots available in other reservations, it will - # scale up to 1000 slots with 200 baseline and 800 autoscaling slots. - # - # Please note, in this mode, the ignore_idle_slots field must be set to - # false. Otherwise the request will be rejected with error code - # `google.rpc.Code.INVALID_ARGUMENT`. - ALL_SLOTS = 3 - end - end - - # The scheduling policy controls how a reservation's resources are distributed. - # @!attribute [rw] concurrency - # @return [::Integer] - # Optional. If present and > 0, the reservation will attempt to limit the - # concurrency of jobs running for any particular project within it to the - # given value. - # - # This feature is not yet generally available. - # @!attribute [rw] max_slots - # @return [::Integer] - # Optional. If present and > 0, the reservation will attempt to limit the - # slot consumption of queries running for any particular project within it to - # the given value. - # - # This feature is not yet generally available. - class SchedulingPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A reservation group is a container for reservations. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the reservation group, e.g., - # `projects/*/locations/*/reservationGroups/team1-prod`. - # The reservation_group_id must only contain lower case alphanumeric - # characters or dashes. It must start with a letter and must not end with a - # dash. Its maximum length is 64 characters. - class ReservationGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. Annual - # commitments renew by default. Commitments can be removed after their - # commitment end time passes. - # - # In order to remove annual commitment, its plan needs to be changed - # to monthly or flex first. - # - # A capacity commitment resource exists as a child resource of the admin - # project. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the capacity commitment, e.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # The commitment_id must only contain lower case alphanumeric characters or - # dashes. It must start with a letter and must not end - # with a dash. Its maximum length is 64 characters. - # @!attribute [rw] slot_count - # @return [::Integer] - # Optional. Number of slots in this commitment. - # @!attribute [rw] plan - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::CommitmentPlan] - # Optional. Capacity commitment commitment plan. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::State] - # Output only. State of the commitment. - # @!attribute [r] commitment_start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The start of the current commitment period. It is applicable - # only for ACTIVE capacity commitments. Note after the commitment is renewed, - # commitment_start_time won't be changed. It refers to the start time of the - # original commitment. - # @!attribute [r] commitment_end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The end of the current commitment period. It is applicable - # only for ACTIVE capacity commitments. Note after renewal, - # commitment_end_time is the time the renewed commitment expires. So itwould - # be at a time after commitment_start_time + committed period, because we - # don't change commitment_start_time , - # @!attribute [r] failure_status - # @return [::Google::Rpc::Status] - # Output only. For FAILED commitment plan, provides the reason of failure. - # @!attribute [rw] renewal_plan - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::CommitmentPlan] - # Optional. The plan this capacity commitment is converted to after - # commitment_end_time passes. Once the plan is changed, committed period is - # extended according to commitment plan. Only applicable for ANNUAL and TRIAL - # commitments. - # @!attribute [rw] multi_region_auxiliary - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Applicable only for commitments located within one of the BigQuery - # multi-regions (US or EU). - # - # If set to true, this commitment is placed in the organization's - # secondary region which is designated for disaster recovery purposes. - # If false, this commitment is placed in the organization's default region. - # - # NOTE: this is a preview feature. Project must be allow-listed in order to - # set this field. - # @!attribute [rw] edition - # @return [::Google::Cloud::Bigquery::Reservation::V1::Edition] - # Optional. Edition of the capacity commitment. - # @!attribute [r] is_flat_rate - # @return [::Boolean] - # Output only. If true, the commitment is a flat-rate commitment, otherwise, - # it's an edition commitment. - class CapacityCommitment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Commitment plan defines the current committed period. Capacity commitment - # cannot be deleted during it's committed period. - module CommitmentPlan - # Invalid plan value. Requests with this value will be rejected with - # error code `google.rpc.Code.INVALID_ARGUMENT`. - COMMITMENT_PLAN_UNSPECIFIED = 0 - - # Flex commitments have committed period of 1 minute after becoming ACTIVE. - # After that, they are not in a committed period anymore and can be removed - # any time. - FLEX = 3 - - # Same as FLEX, should only be used if flat-rate commitments are still - # available. - FLEX_FLAT_RATE = 7 - - # Trial commitments have a committed period of 182 days after becoming - # ACTIVE. After that, they are converted to a new commitment based on the - # `renewal_plan`. Default `renewal_plan` for Trial commitment is Flex so - # that it can be deleted right after committed period ends. - TRIAL = 5 - - # Monthly commitments have a committed period of 30 days after becoming - # ACTIVE. After that, they are not in a committed period anymore and can be - # removed any time. - MONTHLY = 2 - - # Same as MONTHLY, should only be used if flat-rate commitments are still - # available. - MONTHLY_FLAT_RATE = 8 - - # Annual commitments have a committed period of 365 days after becoming - # ACTIVE. After that they are converted to a new commitment based on the - # renewal_plan. - ANNUAL = 4 - - # Same as ANNUAL, should only be used if flat-rate commitments are still - # available. - ANNUAL_FLAT_RATE = 9 - - # 3-year commitments have a committed period of 1095(3 * 365) days after - # becoming ACTIVE. After that they are converted to a new commitment based - # on the renewal_plan. - THREE_YEAR = 10 - - # Should only be used for `renewal_plan` and is only meaningful if - # edition is specified to values other than EDITION_UNSPECIFIED. Otherwise - # CreateCapacityCommitmentRequest or UpdateCapacityCommitmentRequest will - # be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. If the - # renewal_plan is NONE, capacity commitment will be removed at the end of - # its commitment period. - NONE = 6 - end - - # Capacity commitment can either become ACTIVE right away or transition - # from PENDING to ACTIVE or FAILED. - module State - # Invalid state value. - STATE_UNSPECIFIED = 0 - - # Capacity commitment is pending provisioning. Pending capacity commitment - # does not contribute to the project's slot_capacity. - PENDING = 1 - - # Once slots are provisioned, capacity commitment becomes active. - # slot_count is added to the project's slot_capacity. - ACTIVE = 2 - - # Capacity commitment is failed to be activated by the backend. - FAILED = 3 - end - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation ReservationService.CreateReservation}. - # @!attribute [rw] parent - # @return [::String] - # Required. Project, location. E.g., - # `projects/myproject/locations/US` - # @!attribute [rw] reservation_id - # @return [::String] - # The reservation ID. It must only contain lower case alphanumeric - # characters or dashes. It must start with a letter and must not end - # with a dash. Its maximum length is 64 characters. - # @!attribute [rw] reservation - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # Definition of the new reservation to create. - class CreateReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListReservationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}. - # @!attribute [rw] reservations - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] - # List of reservations visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListReservationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation ReservationService.GetReservation}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - class GetReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation ReservationService.DeleteReservation}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - class DeleteReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation ReservationService.UpdateReservation}. - # @!attribute [rw] reservation - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # Content of the reservation to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Standard field mask for the set of fields to be updated. - class UpdateReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for ReservationService.FailoverReservation. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the reservation to failover. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # @!attribute [rw] failover_mode - # @return [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] - # Optional. A parameter that determines how writes that are pending - # replication are handled after a failover is initiated. If not specified, - # HARD failover mode is used by default. - class FailoverReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group ReservationService.CreateReservationGroup}. - # @!attribute [rw] parent - # @return [::String] - # Required. Project, location. E.g., - # `projects/myproject/locations/US` - # @!attribute [rw] reservation_group_id - # @return [::String] - # Required. The reservation group ID. It must only contain lower case - # alphanumeric characters or dashes. It must start with a letter and must not - # end with a dash. Its maximum length is 64 characters. - # @!attribute [rw] reservation_group - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # Required. New Reservation Group to create. - class CreateReservationGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group ReservationService.GetReservationGroup}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - class GetReservationGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups ReservationService.ListReservationGroups}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListReservationGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups ReservationService.ListReservationGroups}. - # @!attribute [rw] reservation_groups - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] - # List of reservations visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListReservationGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group ReservationService.DeleteReservationGroup}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - class DeleteReservationGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment ReservationService.CreateCapacityCommitment}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @!attribute [rw] capacity_commitment - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # Content of the capacity commitment to create. - # @!attribute [rw] enforce_single_admin_project_per_org - # @return [::Boolean] - # If true, fail the request if another project in the organization has a - # capacity commitment. - # @!attribute [rw] capacity_commitment_id - # @return [::String] - # The optional capacity commitment ID. Capacity commitment name will be - # generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - # NOTE: this ID won't be kept if the capacity commitment is split or merged. - class CreateCapacityCommitmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListCapacityCommitmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}. - # @!attribute [rw] capacity_commitments - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] - # List of capacity commitments visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListCapacityCommitmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment ReservationService.GetCapacityCommitment}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the capacity commitment to retrieve. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - class GetCapacityCommitmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment ReservationService.DeleteCapacityCommitment}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the capacity commitment to delete. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # @!attribute [rw] force - # @return [::Boolean] - # Can be used to force delete commitments even if assignments exist. Deleting - # commitments with assignments may cause queries to fail if they no longer - # have access to slots. - class DeleteCapacityCommitmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment ReservationService.UpdateCapacityCommitment}. - # @!attribute [rw] capacity_commitment - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # Content of the capacity commitment to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Standard field mask for the set of fields to be updated. - class UpdateCapacityCommitmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name e.g.,: - # `projects/myproject/locations/US/capacityCommitments/123` - # @!attribute [rw] slot_count - # @return [::Integer] - # Number of slots in the capacity commitment after the split. - class SplitCapacityCommitmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}. - # @!attribute [rw] first - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # First capacity commitment, result of a split. - # @!attribute [rw] second - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # Second capacity commitment, result of a split. - class SplitCapacityCommitmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments ReservationService.MergeCapacityCommitments}. - # @!attribute [rw] parent - # @return [::String] - # Parent resource that identifies admin project and location e.g., - # `projects/myproject/locations/us` - # @!attribute [rw] capacity_commitment_ids - # @return [::Array<::String>] - # Ids of capacity commitments to merge. - # These capacity commitments must exist under admin project and location - # specified in the parent. - # ID is the last portion of capacity commitment name e.g., 'abc' for - # projects/myproject/locations/US/capacityCommitments/abc - # @!attribute [rw] capacity_commitment_id - # @return [::String] - # Optional. The optional resulting capacity commitment ID. Capacity - # commitment name will be generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - class MergeCapacityCommitmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An assignment allows a project to submit jobs - # of a certain type using slots from the specified reservation. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the resource. E.g.: - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. - # The assignment_id must only contain lower case alphanumeric characters or - # dashes and the max length is 64 characters. - # @!attribute [rw] assignee - # @return [::String] - # Optional. The resource which will use the reservation. E.g. - # `projects/myproject`, `folders/123`, or `organizations/456`. - # @!attribute [rw] job_type - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment::JobType] - # Optional. Which type of jobs will use the reservation. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment::State] - # Output only. State of the assignment. - # @!attribute [rw] enable_gemini_in_bigquery - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Optional. Deprecated: "Gemini in BigQuery" is now available by - # default for all BigQuery editions and should not be explicitly set. - # Controls if "Gemini in BigQuery" - # (https://cloud.google.com/gemini/docs/bigquery/overview) features should be - # enabled for this reservation assignment. - # @!attribute [rw] scheduling_policy - # @return [::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy] - # Optional. The scheduling policy to use for jobs and queries of this - # assignee when running under the associated reservation. The scheduling - # policy controls how the reservation's resources are distributed. This - # overrides the default scheduling policy specified on the reservation. - # - # This feature is not yet generally available. - # @!attribute [rw] principal - # @return [::String] - # Optional. Represents the principal for this assignment. If not empty, jobs - # run by this principal will utilize the associated reservation. Otherwise, - # jobs will fall back to using the reservation assigned to the project, - # folder, or organization (in that order). If no reservation is assigned at - # any of these levels, on-demand capacity will be used. - # - # The supported formats are: - # - # * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, - # * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` - # for service accounts, - # * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` - # for workload identity pool identities. - # * The special value `unknown_or_deleted_user` represents principals which - # cannot be read from the user info service, for example deleted users. - class Assignment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of job, which could be specified when using the reservation. - module JobType - # Invalid type. Requests with this value will be rejected with - # error code `google.rpc.Code.INVALID_ARGUMENT`. - JOB_TYPE_UNSPECIFIED = 0 - - # Pipeline (load/export) jobs from the project will use the reservation. - PIPELINE = 1 - - # Query jobs from the project will use the reservation. - QUERY = 2 - - # BigQuery ML jobs that use services external to BigQuery for model - # training. These jobs will not utilize idle slots from other reservations. - ML_EXTERNAL = 3 - - # Background jobs that BigQuery runs for the customers in the background. - BACKGROUND = 4 - - # Continuous SQL jobs will use this reservation. Reservations with - # continuous assignments cannot be mixed with non-continuous assignments. - CONTINUOUS = 6 - - # Finer granularity background jobs for capturing changes in a source - # database and streaming them into BigQuery. Reservations with this job - # type take priority over a default BACKGROUND reservation assignment (if - # it exists). - BACKGROUND_CHANGE_DATA_CAPTURE = 7 - - # Finer granularity background jobs for refreshing cached metadata for - # BigQuery tables. Reservations with this job type take priority over a - # default BACKGROUND reservation assignment (if it exists). - BACKGROUND_COLUMN_METADATA_INDEX = 8 - - # Finer granularity background jobs for refreshing search indexes upon - # BigQuery table columns. Reservations with this job type - # take priority over a default BACKGROUND reservation assignment (if it - # exists). - BACKGROUND_SEARCH_INDEX_REFRESH = 9 - end - - # Assignment will remain in PENDING state if no active capacity commitment is - # present. It will become ACTIVE when some capacity commitment becomes - # active. - module State - # Invalid state value. - STATE_UNSPECIFIED = 0 - - # Queries from assignee will be executed as on-demand, if related - # assignment is pending. - PENDING = 1 - - # Assignment is ready. - ACTIVE = 2 - end - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment ReservationService.CreateAssignment}. - # Note: "bigquery.reservationAssignments.create" permission is required on the - # related assignee. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name of the assignment - # E.g. `projects/myproject/locations/US/reservations/team1-prod` - # @!attribute [rw] assignment - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # Assignment resource to create. - # @!attribute [rw] assignment_id - # @return [::String] - # The optional assignment ID. Assignment name will be generated automatically - # if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # Max length is 64 characters. - class CreateAssignmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name e.g.: - # - # `projects/myproject/locations/US/reservations/team1-prod` - # - # Or: - # - # `projects/myproject/locations/US/reservations/-` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListAssignmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}. - # @!attribute [rw] assignments - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # List of assignments visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListAssignmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment ReservationService.DeleteAssignment}. - # Note: "bigquery.reservationAssignments.delete" permission is required on the - # related assignee. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource, e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - class DeleteAssignmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}. - # Note: "bigquery.reservationAssignments.search" permission is required on the - # related assignee. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the admin project(containing project and - # location), e.g.: - # `projects/myproject/locations/US`. - # @!attribute [rw] query - # @return [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class SearchAssignmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}. - # Note: "bigquery.reservationAssignments.search" permission is required on the - # related assignee. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name with location (project name could be the - # wildcard '-'), e.g.: - # `projects/-/locations/US`. - # @!attribute [rw] query - # @return [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class SearchAllAssignmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}. - # @!attribute [rw] assignments - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # List of assignments visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class SearchAssignmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}. - # @!attribute [rw] assignments - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # List of assignments visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class SearchAllAssignmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment ReservationService.MoveAssignment}. - # - # **Note**: "bigquery.reservationAssignments.create" permission is required on - # the destination_id. - # - # **Note**: "bigquery.reservationAssignments.create" and - # "bigquery.reservationAssignments.delete" permission are required on the - # related assignee. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the assignment, - # e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - # @!attribute [rw] destination_id - # @return [::String] - # The new reservation ID, e.g.: - # `projects/myotherproject/locations/US/reservations/team2-prod` - # @!attribute [rw] assignment_id - # @return [::String] - # The optional assignment ID. A new assignment name is generated if this - # field is empty. - # - # This field can contain only lowercase alphanumeric characters or dashes. - # Max length is 64 characters. - class MoveAssignmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment ReservationService.UpdateAssignment}. - # @!attribute [rw] assignment - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # Content of the assignment to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Standard field mask for the set of fields to be updated. - class UpdateAssignmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fully qualified reference to BigQuery table. - # Internally stored as google.cloud.bi.v1.BqTableReference. - # @!attribute [rw] project_id - # @return [::String] - # Optional. The assigned project ID of the project. - # @!attribute [rw] dataset_id - # @return [::String] - # Optional. The ID of the dataset in the above project. - # @!attribute [rw] table_id - # @return [::String] - # Optional. The ID of the table in the above dataset. - class TableReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a BI Reservation. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the singleton BI reservation. - # Reservation names have the form - # `projects/{project_id}/locations/{location_id}/biReservation`. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of a reservation. - # @!attribute [rw] size - # @return [::Integer] - # Optional. Size of a reservation, in bytes. - # @!attribute [rw] preferred_tables - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::TableReference>] - # Optional. Preferred tables to use BI capacity for. - class BiReservation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a singleton BI reservation. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the requested reservation, for example: - # `projects/{project_id}/locations/{location_id}/biReservation` - class GetBiReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a BI reservation. - # @!attribute [rw] bi_reservation - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # A reservation to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # A list of fields to be updated in this request. - class UpdateBiReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of editions. - # Different features and behaviors are provided to different editions - # Capacity commitments and reservations are linked to editions. - module Edition - # Default value, which will be treated as ENTERPRISE. - EDITION_UNSPECIFIED = 0 - - # Standard edition. - STANDARD = 1 - - # Enterprise edition. - ENTERPRISE = 2 - - # Enterprise Plus edition. - ENTERPRISE_PLUS = 3 - end - - # The failover mode when a user initiates a failover on a reservation - # determines how writes that are pending replication are handled after the - # failover is initiated. - module FailoverMode - # Invalid value. - FAILOVER_MODE_UNSPECIFIED = 0 - - # When customers initiate a soft failover, BigQuery will wait until all - # committed writes are replicated to the secondary. This mode requires both - # regions to be available for the failover to succeed and prevents data loss. - SOFT = 1 - - # When customers initiate a hard failover, BigQuery will not wait until all - # committed writes are replicated to the secondary. There can be data loss - # for hard failover. - HARD = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile deleted file mode 100644 index d0e18bc92cd2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-bigquery-reservation-v1", path: "../" -else - gem "google-cloud-bigquery-reservation-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb deleted file mode 100644 index 521034bd4bbb..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the create_assignment call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment. -# -def create_assignment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new - - # Call the create_assignment method. - result = client.create_assignment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb deleted file mode 100644 index 009f27435599..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the create_capacity_commitment call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment. -# -def create_capacity_commitment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new - - # Call the create_capacity_commitment method. - result = client.create_capacity_commitment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb deleted file mode 100644 index 085d3fc69e50..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the create_reservation call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation. -# -def create_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new - - # Call the create_reservation method. - result = client.create_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb deleted file mode 100644 index bce27da2456d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the create_reservation_group call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group. -# -def create_reservation_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new - - # Call the create_reservation_group method. - result = client.create_reservation_group request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb deleted file mode 100644 index bcd9a3be93fc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the delete_assignment call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment. -# -def delete_assignment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new - - # Call the delete_assignment method. - result = client.delete_assignment request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb deleted file mode 100644 index b0c78a4fd165..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the delete_capacity_commitment call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment. -# -def delete_capacity_commitment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new - - # Call the delete_capacity_commitment method. - result = client.delete_capacity_commitment request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb deleted file mode 100644 index d8bac2d9baf1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the delete_reservation call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation. -# -def delete_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new - - # Call the delete_reservation method. - result = client.delete_reservation request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb deleted file mode 100644 index fe6838172e60..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the delete_reservation_group call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group. -# -def delete_reservation_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new - - # Call the delete_reservation_group method. - result = client.delete_reservation_group request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb deleted file mode 100644 index 80443f502d44..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the failover_reservation call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation. -# -def failover_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new - - # Call the failover_reservation method. - result = client.failover_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb deleted file mode 100644 index 2b549c493903..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the get_bi_reservation call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation. -# -def get_bi_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new - - # Call the get_bi_reservation method. - result = client.get_bi_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb deleted file mode 100644 index bf907ad51799..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the get_capacity_commitment call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment. -# -def get_capacity_commitment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new - - # Call the get_capacity_commitment method. - result = client.get_capacity_commitment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb deleted file mode 100644 index e3861739e77e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the get_iam_policy call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb deleted file mode 100644 index accd2421609b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the get_reservation call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation. -# -def get_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new - - # Call the get_reservation method. - result = client.get_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb deleted file mode 100644 index 0c3d3ef808b9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the get_reservation_group call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group. -# -def get_reservation_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new - - # Call the get_reservation_group method. - result = client.get_reservation_group request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb deleted file mode 100644 index f1f669f1ff95..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the list_assignments call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments. -# -def list_assignments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new - - # Call the list_assignments method. - result = client.list_assignments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb deleted file mode 100644 index bcfb6bd8ea92..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the list_capacity_commitments call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments. -# -def list_capacity_commitments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new - - # Call the list_capacity_commitments method. - result = client.list_capacity_commitments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb deleted file mode 100644 index f06ea8557380..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the list_reservation_groups call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups. -# -def list_reservation_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new - - # Call the list_reservation_groups method. - result = client.list_reservation_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb deleted file mode 100644 index a33941e64425..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the list_reservations call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations. -# -def list_reservations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new - - # Call the list_reservations method. - result = client.list_reservations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Reservation. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb deleted file mode 100644 index e613421e5c07..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the merge_capacity_commitments call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments. -# -def merge_capacity_commitments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new - - # Call the merge_capacity_commitments method. - result = client.merge_capacity_commitments request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb deleted file mode 100644 index bfde018b1dbe..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the move_assignment call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment. -# -def move_assignment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new - - # Call the move_assignment method. - result = client.move_assignment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb deleted file mode 100644 index b44239d089c1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the search_all_assignments call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments. -# -def search_all_assignments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new - - # Call the search_all_assignments method. - result = client.search_all_assignments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb deleted file mode 100644 index de534b544c70..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the search_assignments call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments. -# -def search_assignments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new - - # Call the search_assignments method. - result = client.search_assignments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb deleted file mode 100644 index 87068c26b062..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the set_iam_policy call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb deleted file mode 100644 index d162341ed27b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the split_capacity_commitment call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment. -# -def split_capacity_commitment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new - - # Call the split_capacity_commitment method. - result = client.split_capacity_commitment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb deleted file mode 100644 index a178dceda953..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the test_iam_permissions call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb deleted file mode 100644 index 6f60f2e93e93..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the update_assignment call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment. -# -def update_assignment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new - - # Call the update_assignment method. - result = client.update_assignment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb deleted file mode 100644 index c3b37b5568d5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the update_bi_reservation call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation. -# -def update_bi_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new - - # Call the update_bi_reservation method. - result = client.update_bi_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb deleted file mode 100644 index 47aea627cc66..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the update_capacity_commitment call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment. -# -def update_capacity_commitment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new - - # Call the update_capacity_commitment method. - result = client.update_capacity_commitment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb deleted file mode 100644 index a607011a6c50..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the update_reservation call in the ReservationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation. -# -def update_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new - - # Call the update_reservation method. - result = client.update_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json deleted file mode 100644 index 9c975b868826..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json +++ /dev/null @@ -1,1175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-reservation-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.reservation.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync", - "title": "Snippet for the create_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation.", - "file": "reservation_service/create_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "CreateReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListReservations_sync", - "title": "Snippet for the list_reservations call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations.", - "file": "reservation_service/list_reservations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reservations", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "ListReservations", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListReservations", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetReservation_sync", - "title": "Snippet for the get_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation.", - "file": "reservation_service/get_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "GetReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync", - "title": "Snippet for the delete_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation.", - "file": "reservation_service/delete_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "DeleteReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync", - "title": "Snippet for the update_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation.", - "file": "reservation_service/update_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "UpdateReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync", - "title": "Snippet for the failover_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation.", - "file": "reservation_service/failover_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "failover_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "FailoverReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.FailoverReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync", - "title": "Snippet for the create_capacity_commitment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment.", - "file": "reservation_service/create_capacity_commitment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_capacity_commitment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "CreateCapacityCommitment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateCapacityCommitment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync", - "title": "Snippet for the list_capacity_commitments call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments.", - "file": "reservation_service/list_capacity_commitments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_capacity_commitments", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "ListCapacityCommitments", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListCapacityCommitments", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync", - "title": "Snippet for the get_capacity_commitment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment.", - "file": "reservation_service/get_capacity_commitment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_capacity_commitment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "GetCapacityCommitment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetCapacityCommitment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync", - "title": "Snippet for the delete_capacity_commitment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment.", - "file": "reservation_service/delete_capacity_commitment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_capacity_commitment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "DeleteCapacityCommitment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteCapacityCommitment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync", - "title": "Snippet for the update_capacity_commitment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment.", - "file": "reservation_service/update_capacity_commitment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_capacity_commitment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "UpdateCapacityCommitment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateCapacityCommitment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync", - "title": "Snippet for the split_capacity_commitment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment.", - "file": "reservation_service/split_capacity_commitment.rb", - "language": "RUBY", - "client_method": { - "short_name": "split_capacity_commitment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "SplitCapacityCommitment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SplitCapacityCommitment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync", - "title": "Snippet for the merge_capacity_commitments call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments.", - "file": "reservation_service/merge_capacity_commitments.rb", - "language": "RUBY", - "client_method": { - "short_name": "merge_capacity_commitments", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "MergeCapacityCommitments", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.MergeCapacityCommitments", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync", - "title": "Snippet for the create_assignment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment.", - "file": "reservation_service/create_assignment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_assignment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "CreateAssignment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateAssignment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync", - "title": "Snippet for the list_assignments call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments.", - "file": "reservation_service/list_assignments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_assignments", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "ListAssignments", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListAssignments", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync", - "title": "Snippet for the delete_assignment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment.", - "file": "reservation_service/delete_assignment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_assignment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "DeleteAssignment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteAssignment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync", - "title": "Snippet for the search_assignments call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments.", - "file": "reservation_service/search_assignments.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_assignments", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "SearchAssignments", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SearchAssignments", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync", - "title": "Snippet for the search_all_assignments call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments.", - "file": "reservation_service/search_all_assignments.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_all_assignments", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "SearchAllAssignments", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SearchAllAssignments", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync", - "title": "Snippet for the move_assignment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment.", - "file": "reservation_service/move_assignment.rb", - "language": "RUBY", - "client_method": { - "short_name": "move_assignment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "MoveAssignment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.MoveAssignment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync", - "title": "Snippet for the update_assignment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment.", - "file": "reservation_service/update_assignment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_assignment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "UpdateAssignment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateAssignment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync", - "title": "Snippet for the get_bi_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation.", - "file": "reservation_service/get_bi_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_bi_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::BiReservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "GetBiReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetBiReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync", - "title": "Snippet for the update_bi_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation.", - "file": "reservation_service/update_bi_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_bi_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::BiReservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "UpdateBiReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateBiReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy.", - "file": "reservation_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetIamPolicy", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy.", - "file": "reservation_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SetIamPolicy", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions.", - "file": "reservation_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.TestIamPermissions", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync", - "title": "Snippet for the create_reservation_group call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group.", - "file": "reservation_service/create_reservation_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_reservation_group", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "CreateReservationGroup", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateReservationGroup", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync", - "title": "Snippet for the get_reservation_group call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group.", - "file": "reservation_service/get_reservation_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_reservation_group", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "GetReservationGroup", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetReservationGroup", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync", - "title": "Snippet for the delete_reservation_group call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group.", - "file": "reservation_service/delete_reservation_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_reservation_group", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "DeleteReservationGroup", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteReservationGroup", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync", - "title": "Snippet for the list_reservation_groups call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups.", - "file": "reservation_service/list_reservation_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reservation_groups", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "ListReservationGroups", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListReservationGroups", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb deleted file mode 100644 index f56e3454b155..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb +++ /dev/null @@ -1,115 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/reservation/v1/reservation_service" - -class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_assignment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.assignment_path project: "value0", location: "value1", reservation: "value2", assignment: "value3" - assert_equal "projects/value0/locations/value1/reservations/value2/assignments/value3", path - end - end - - def test_bi_reservation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.bi_reservation_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1/biReservation", path - end - end - - def test_capacity_commitment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.capacity_commitment_path project: "value0", location: "value1", capacity_commitment: "value2" - assert_equal "projects/value0/locations/value1/capacityCommitments/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_reservation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reservation_path project: "value0", location: "value1", reservation: "value2" - assert_equal "projects/value0/locations/value1/reservations/value2", path - end - end - - def test_reservation_group_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reservation_group_path project: "value0", location: "value1", reservation_group: "value2" - assert_equal "projects/value0/locations/value1/reservationGroups/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb deleted file mode 100644 index de701638258c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb +++ /dev/null @@ -1,1703 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/bigquery/reservation/v1/reservation_pb" -require "google/cloud/bigquery/reservation/v1/reservation_service/rest" - - -class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reservation_id = "hello world" - reservation = {} - - create_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_reservation parent: parent, reservation_id: reservation_id, reservation: reservation do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_reservation ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_reservation(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_reservation_client_stub.call_count - end - end - end - - def test_list_reservations - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_reservations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_reservations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reservations_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_reservations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_reservations parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_reservations ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_reservations({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_reservations(::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_reservations_client_stub.call_count - end - end - end - - def test_get_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_reservation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_reservation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_reservation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_reservation_client_stub.call_count - end - end - end - - def test_delete_reservation - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_reservation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_reservation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_reservation ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_reservation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_reservation(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_reservation_client_stub.call_count - end - end - end - - def test_update_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - reservation = {} - update_mask = {} - - update_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_reservation({ reservation: reservation, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_reservation reservation: reservation, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_reservation({ reservation: reservation, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_reservation_client_stub.call_count - end - end - end - - def test_failover_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - failover_mode = :FAILOVER_MODE_UNSPECIFIED - - failover_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_failover_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, failover_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.failover_reservation({ name: name, failover_mode: failover_mode }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.failover_reservation name: name, failover_mode: failover_mode do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.failover_reservation ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.failover_reservation({ name: name, failover_mode: failover_mode }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.failover_reservation(::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, failover_reservation_client_stub.call_count - end - end - end - - def test_create_capacity_commitment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - capacity_commitment = {} - enforce_single_admin_project_per_org = true - capacity_commitment_id = "hello world" - - create_capacity_commitment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_capacity_commitment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_capacity_commitment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_capacity_commitment parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_capacity_commitment_client_stub.call_count - end - end - end - - def test_list_capacity_commitments - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_capacity_commitments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_capacity_commitments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_capacity_commitments_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_capacity_commitments({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_capacity_commitments parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_capacity_commitments({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_capacity_commitments_client_stub.call_count - end - end - end - - def test_get_capacity_commitment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_capacity_commitment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_capacity_commitment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_capacity_commitment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_capacity_commitment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_capacity_commitment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_capacity_commitment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_capacity_commitment_client_stub.call_count - end - end - end - - def test_delete_capacity_commitment - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_capacity_commitment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_capacity_commitment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_capacity_commitment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_capacity_commitment({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_capacity_commitment name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_capacity_commitment({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_capacity_commitment_client_stub.call_count - end - end - end - - def test_update_capacity_commitment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - capacity_commitment = {} - update_mask = {} - - update_capacity_commitment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_capacity_commitment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_capacity_commitment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_capacity_commitment capacity_commitment: capacity_commitment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_capacity_commitment_client_stub.call_count - end - end - end - - def test_split_capacity_commitment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - slot_count = 42 - - split_capacity_commitment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_split_capacity_commitment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, split_capacity_commitment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.split_capacity_commitment({ name: name, slot_count: slot_count }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.split_capacity_commitment name: name, slot_count: slot_count do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.split_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.split_capacity_commitment({ name: name, slot_count: slot_count }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.split_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, split_capacity_commitment_client_stub.call_count - end - end - end - - def test_merge_capacity_commitments - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - capacity_commitment_ids = ["hello world"] - capacity_commitment_id = "hello world" - - merge_capacity_commitments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_merge_capacity_commitments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, merge_capacity_commitments_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.merge_capacity_commitments parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.merge_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.merge_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, merge_capacity_commitments_client_stub.call_count - end - end - end - - def test_create_assignment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - assignment = {} - assignment_id = "hello world" - - create_assignment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_assignment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_assignment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_assignment parent: parent, assignment: assignment, assignment_id: assignment_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_assignment ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_assignment(::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_assignment_client_stub.call_count - end - end - end - - def test_list_assignments - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_assignments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_assignments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_assignments_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_assignments({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_assignments parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_assignments ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_assignments({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_assignments(::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_assignments_client_stub.call_count - end - end - end - - def test_delete_assignment - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_assignment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_assignment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_assignment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_assignment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_assignment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_assignment ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_assignment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_assignment(::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_assignment_client_stub.call_count - end - end - end - - def test_search_assignments - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_assignments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_search_assignments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_assignments_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_assignments_client_stub.call_count - end - end - end - - def test_search_all_assignments - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_all_assignments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_search_all_assignments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_all_assignments_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_all_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_all_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_all_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_all_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_all_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_all_assignments_client_stub.call_count - end - end - end - - def test_move_assignment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - destination_id = "hello world" - assignment_id = "hello world" - - move_assignment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_move_assignment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, move_assignment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.move_assignment name: name, destination_id: destination_id, assignment_id: assignment_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.move_assignment ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.move_assignment(::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, move_assignment_client_stub.call_count - end - end - end - - def test_update_assignment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - assignment = {} - update_mask = {} - - update_assignment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_assignment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_assignment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_assignment({ assignment: assignment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_assignment assignment: assignment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_assignment ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_assignment({ assignment: assignment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_assignment(::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_assignment_client_stub.call_count - end - end - end - - def test_get_bi_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_bi_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_bi_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_bi_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_bi_reservation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_bi_reservation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_bi_reservation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_bi_reservation_client_stub.call_count - end - end - end - - def test_update_bi_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - bi_reservation = {} - update_mask = {} - - update_bi_reservation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_bi_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_bi_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_bi_reservation bi_reservation: bi_reservation, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_bi_reservation_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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_reservation_group - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reservation_group_id = "hello world" - reservation_group = {} - - create_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_reservation_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_reservation_group_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_reservation_group parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_reservation_group_client_stub.call_count - end - end - end - - def test_get_reservation_group - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_reservation_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_reservation_group_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_reservation_group({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_reservation_group name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_reservation_group({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_reservation_group_client_stub.call_count - end - end - end - - def test_delete_reservation_group - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_reservation_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_reservation_group_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_reservation_group({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_reservation_group name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_reservation_group({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_reservation_group_client_stub.call_count - end - end - end - - def test_list_reservation_groups - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_reservation_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_reservation_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reservation_groups_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_reservation_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_reservation_groups ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_reservation_groups(::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_reservation_groups_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb deleted file mode 100644 index 83f89c3b1580..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb +++ /dev/null @@ -1,1892 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/reservation/v1/reservation_pb" -require "google/cloud/bigquery/reservation/v1/reservation_service" - -class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reservation_id = "hello world" - reservation = {} - - create_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["reservation_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Reservation), request["reservation"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_reservation parent: parent, reservation_id: reservation_id, reservation: reservation do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_reservation ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_reservation(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_reservation_client_stub.call_rpc_count - end - end - - def test_list_reservations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_reservations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reservations, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_reservations_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_reservations({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_reservations parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_reservations ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_reservations({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_reservations(::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_reservations_client_stub.call_rpc_count - end - end - - def test_get_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_reservation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_reservation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_reservation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_reservation_client_stub.call_rpc_count - end - end - - def test_delete_reservation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_reservation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_reservation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_reservation ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_reservation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_reservation(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_reservation_client_stub.call_rpc_count - end - end - - def test_update_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - reservation = {} - update_mask = {} - - update_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Reservation), request["reservation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_reservation({ reservation: reservation, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_reservation reservation: reservation, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_reservation({ reservation: reservation, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_reservation_client_stub.call_rpc_count - end - end - - def test_failover_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - failover_mode = :FAILOVER_MODE_UNSPECIFIED - - failover_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :failover_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, request - assert_equal "hello world", request["name"] - assert_equal :FAILOVER_MODE_UNSPECIFIED, request["failover_mode"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, failover_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.failover_reservation({ name: name, failover_mode: failover_mode }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.failover_reservation name: name, failover_mode: failover_mode do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.failover_reservation ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.failover_reservation({ name: name, failover_mode: failover_mode }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.failover_reservation(::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, failover_reservation_client_stub.call_rpc_count - end - end - - def test_create_capacity_commitment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - capacity_commitment = {} - enforce_single_admin_project_per_org = true - capacity_commitment_id = "hello world" - - create_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_capacity_commitment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment), request["capacity_commitment"] - assert_equal true, request["enforce_single_admin_project_per_org"] - assert_equal "hello world", request["capacity_commitment_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_capacity_commitment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_capacity_commitment parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_capacity_commitment_client_stub.call_rpc_count - end - end - - def test_list_capacity_commitments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_capacity_commitments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_capacity_commitments, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_capacity_commitments_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_capacity_commitments({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_capacity_commitments parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_capacity_commitments({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_capacity_commitments_client_stub.call_rpc_count - end - end - - def test_get_capacity_commitment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_capacity_commitment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_capacity_commitment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_capacity_commitment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_capacity_commitment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_capacity_commitment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_capacity_commitment_client_stub.call_rpc_count - end - end - - def test_delete_capacity_commitment - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_capacity_commitment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_capacity_commitment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_capacity_commitment({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_capacity_commitment name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_capacity_commitment({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_capacity_commitment_client_stub.call_rpc_count - end - end - - def test_update_capacity_commitment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - capacity_commitment = {} - update_mask = {} - - update_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_capacity_commitment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment), request["capacity_commitment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_capacity_commitment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_capacity_commitment capacity_commitment: capacity_commitment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_capacity_commitment_client_stub.call_rpc_count - end - end - - def test_split_capacity_commitment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - slot_count = 42 - - split_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :split_capacity_commitment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["slot_count"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, split_capacity_commitment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.split_capacity_commitment({ name: name, slot_count: slot_count }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.split_capacity_commitment name: name, slot_count: slot_count do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.split_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.split_capacity_commitment({ name: name, slot_count: slot_count }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.split_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, split_capacity_commitment_client_stub.call_rpc_count - end - end - - def test_merge_capacity_commitments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - capacity_commitment_ids = ["hello world"] - capacity_commitment_id = "hello world" - - merge_capacity_commitments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :merge_capacity_commitments, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["capacity_commitment_ids"] - assert_equal "hello world", request["capacity_commitment_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, merge_capacity_commitments_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.merge_capacity_commitments parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.merge_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.merge_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, merge_capacity_commitments_client_stub.call_rpc_count - end - end - - def test_create_assignment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - assignment = {} - assignment_id = "hello world" - - create_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_assignment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Assignment), request["assignment"] - assert_equal "hello world", request["assignment_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_assignment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_assignment parent: parent, assignment: assignment, assignment_id: assignment_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_assignment ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_assignment(::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_assignment_client_stub.call_rpc_count - end - end - - def test_list_assignments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_assignments, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_assignments_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_assignments({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_assignments parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_assignments ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_assignments({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_assignments(::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_assignments_client_stub.call_rpc_count - end - end - - def test_delete_assignment - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_assignment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_assignment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_assignment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_assignment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_assignment ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_assignment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_assignment(::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_assignment_client_stub.call_rpc_count - end - end - - def test_search_assignments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_assignments, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_assignments_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_assignments_client_stub.call_rpc_count - end - end - - def test_search_all_assignments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_all_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_all_assignments, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_all_assignments_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_all_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_all_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_all_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_all_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_all_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_all_assignments_client_stub.call_rpc_count - end - end - - def test_move_assignment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - destination_id = "hello world" - assignment_id = "hello world" - - move_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :move_assignment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["destination_id"] - assert_equal "hello world", request["assignment_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, move_assignment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.move_assignment name: name, destination_id: destination_id, assignment_id: assignment_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.move_assignment ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.move_assignment(::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, move_assignment_client_stub.call_rpc_count - end - end - - def test_update_assignment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - assignment = {} - update_mask = {} - - update_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_assignment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Assignment), request["assignment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_assignment_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_assignment({ assignment: assignment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_assignment assignment: assignment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_assignment ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_assignment({ assignment: assignment, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_assignment(::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_assignment_client_stub.call_rpc_count - end - end - - def test_get_bi_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_bi_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_bi_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_bi_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_bi_reservation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_bi_reservation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_bi_reservation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_bi_reservation_client_stub.call_rpc_count - end - end - - def test_update_bi_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - bi_reservation = {} - update_mask = {} - - update_bi_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_bi_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::BiReservation), request["bi_reservation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_bi_reservation_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_bi_reservation bi_reservation: bi_reservation, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_bi_reservation_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::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_reservation_group - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reservation_group_id = "hello world" - reservation_group = {} - - create_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_reservation_group, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["reservation_group_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup), request["reservation_group"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_reservation_group_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_reservation_group parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_reservation_group_client_stub.call_rpc_count - end - end - - def test_get_reservation_group - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_reservation_group, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_reservation_group_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_reservation_group({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_reservation_group name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_reservation_group({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_reservation_group_client_stub.call_rpc_count - end - end - - def test_delete_reservation_group - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_reservation_group, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_reservation_group_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_reservation_group({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_reservation_group name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_reservation_group({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_reservation_group_client_stub.call_rpc_count - end - end - - def test_list_reservation_groups - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_reservation_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reservation_groups, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_reservation_groups_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_reservation_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_reservation_groups ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_reservation_groups(::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_reservation_groups_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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"